remove related code about ironic rpms install and database creat
Change-Id: I92efd9b7ec7295199b33a399b293ce992f1acc3d Signed-off-by: luyao <lu.yao135@zte.com.cn>
This commit is contained in:
parent
2b92bfe362
commit
cb5241703c
@ -636,30 +636,6 @@ function modify_sudoers
|
||||
fi
|
||||
}
|
||||
|
||||
function config_ironic
|
||||
{
|
||||
local file=$1
|
||||
[ ! -e $file ] && { write_install_log "Error:$file is not exist"; exit 1;}
|
||||
|
||||
openstack-config --set "$file" DEFAULT "rpc_backend" "rabbit"
|
||||
|
||||
get_public_ip
|
||||
if [ -z $public_ip ];then
|
||||
write_install_log "Error:default gateway is not set!!!"
|
||||
exit 1
|
||||
else
|
||||
openstack-config --set "$file" DEFAULT "rabbit_host" "$public_ip"
|
||||
openstack-config --set "$file" database "connection" "mysql://ironic:ironic@$public_ip:3306/ironic?charset=utf8"
|
||||
fi
|
||||
openstack-config --set "$file" DEFAULT "rabbit_password" "guest"
|
||||
openstack-config --set "$file" DEFAULT "enabled_drivers" "pxe_ipmitool"
|
||||
mkdir -p /var/log/ironic
|
||||
chown -R ironic:ironic /var/log/ironic
|
||||
openstack-config --set "$file" DEFAULT "log_dir" "/var/log/ironic"
|
||||
openstack-config --set "$file" DEFAULT "verbose" "true"
|
||||
openstack-config --set "$file" DEFAULT "auth_strategy" "noauth"
|
||||
}
|
||||
|
||||
function config_rabbitmq_env
|
||||
{
|
||||
local config_file="/etc/rabbitmq/rabbitmq-env.conf"
|
||||
|
@ -56,9 +56,6 @@ function all_install
|
||||
write_install_log "install keystone rpm"
|
||||
install_rpm_by_yum "openstack-keystone"
|
||||
|
||||
write_install_log "install ironic rpm"
|
||||
install_rpm_by_yum "openstack-ironic-api openstack-ironic-common openstack-ironic-conductor python-ironicclient"
|
||||
|
||||
write_install_log "install ironic-discoverd depend rpm"
|
||||
install_rpm_by_yum "python-flask"
|
||||
|
||||
@ -132,15 +129,6 @@ function all_install
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# creat ironic datebase
|
||||
local create_ironic_sql="create database IF NOT EXISTS $ironic_name default charset=utf8"
|
||||
write_install_log "create $ironic_name database in mariadb"
|
||||
echo ${create_ironic_sql} | ${mysql_cmd}
|
||||
if [ $? -ne 0 ];then
|
||||
write_install_log "Error:create $ironic_name database failed..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# create keystone user
|
||||
write_install_log "create keystone user in mariadb"
|
||||
echo "grant all privileges on *.* to 'keystone'@'localhost' identified by 'keystone'" | ${mysql_cmd}
|
||||
@ -157,14 +145,6 @@ function all_install
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# create ironic user
|
||||
write_install_log "create ironic user in mariadb"
|
||||
echo "grant all privileges on ironic.* to 'ironic'@'localhost' identified by 'ironic'" | ${mysql_cmd}
|
||||
if [ $? -ne 0 ];then
|
||||
write_install_log "Error:create ironic user failed..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# give the host access to keystone database
|
||||
write_install_log "Give the host access to the keystone database"
|
||||
echo "grant all privileges on keystone.* to 'keystone'@'%' identified by 'keystone'"| ${mysql_cmd}
|
||||
@ -181,14 +161,6 @@ function all_install
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# give the host access to ironic database
|
||||
write_install_log "Give the host access to the ironic database"
|
||||
echo "grant all privileges on ironic.* to 'ironic'@'%' identified by 'ironic'"| ${mysql_cmd}
|
||||
if [ $? -ne 0 ];then
|
||||
write_install_log "Error:Give the host access to the ironic database failed..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "flush privileges"| ${mysql_cmd}
|
||||
|
||||
else
|
||||
@ -237,7 +209,6 @@ function all_install
|
||||
config_rabbitmq_config
|
||||
|
||||
#Configure ironic related configuration items
|
||||
config_ironic "/etc/ironic/ironic.conf"
|
||||
config_ironic_discoverd "/etc/ironic-discoverd/discoverd.conf" "$public_ip"
|
||||
|
||||
#modify clustershell configuration
|
||||
@ -245,24 +216,12 @@ function all_install
|
||||
sed -i "s/connect_timeout:[[:space:]]*.*/connect_timeout: 360/g" $clustershell_conf
|
||||
sed -i "s/command_timeout:[[:space:]]*.*/command_timeout: 3600/g" $clustershell_conf
|
||||
|
||||
#creat ironic datebase tables
|
||||
which ironic-dbsync >> $install_logfile 2>&1
|
||||
if [ "$?" == 0 ];then
|
||||
write_install_log "start ironic-dbsync ..."
|
||||
ironic-dbsync --config-file /etc/ironic/ironic.conf create_schema
|
||||
[ "$?" -ne 0 ] && { write_install_log "Error:ironic-dbsync --config-file /etc/ironic/ironic.conf create_schema failed"; exit 1; }
|
||||
fi
|
||||
|
||||
systemctl restart rabbitmq-server.service
|
||||
[ "$?" -ne 0 ] && { write_install_log "Error:systemctl restart rabbitmq-server.service failed"; exit 1; }
|
||||
|
||||
systemctl restart openstack-keystone.service
|
||||
[ "$?" -ne 0 ] && { write_install_log "Error:systemctl restart rabbitmq-server.service failed"; exit 1; }
|
||||
|
||||
systemctl restart openstack-ironic-api.service
|
||||
[ "$?" -ne 0 ] && { write_install_log "Error:systemctl restart openstack-ironic-api.service failed"; exit 1; }
|
||||
systemctl restart openstack-ironic-conductor.service
|
||||
[ "$?" -ne 0 ] && { write_install_log "Error:systemctl restart openstack-ironic-conductor.service failed"; exit 1; }
|
||||
systemctl restart openstack-ironic-discoverd.service
|
||||
[ "$?" -ne 0 ] && { write_install_log "Error:systemctl restart openstack-ironic-discoverd.service failed"; exit 1; }
|
||||
|
||||
@ -270,8 +229,6 @@ function all_install
|
||||
[ "$?" -ne 0 ] && { write_install_log "Error:systemctl start daisy-orchestration.service failed"; exit 1; }
|
||||
|
||||
systemctl enable daisy-orchestration.service >> $install_logfile 2>&1
|
||||
systemctl enable openstack-ironic-api.service >> $install_logfile 2>&1
|
||||
systemctl enable openstack-ironic-conductor.service >> $install_logfile 2>&1
|
||||
systemctl enable openstack-ironic-discoverd.service >> $install_logfile 2>&1
|
||||
|
||||
#init daisy
|
||||
|
Loading…
x
Reference in New Issue
Block a user