赞
踩
systemctl stop openstack-glance-api.service
systemctl stop openstack-glance-register.service
systemctl disable openstack-glance-api.service
systemctl disable openstack-glance-register.service
yum install mariadb mariadb-server python2-PyMySQL -y
systemctl start mariadb
systemctl enable mariadb
mysql_secure_installation # 数据库密码设置为openstack
1.控制节点glance数据库备份(原glance在控制节点上安装)
mysqkdump -uroot -popensatck glance > /root/glance.sql
2.新节点上还原数据库
scp root@controller:/root/glance.sql .
mysql -uroot -popenstack glance < /root/glance.sql
3.数据库授权
mysql -u root -popenstack
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' IDENTIFIED BY 'GLANCE_DBPASS';
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' IDENTIFIED BY 'GLANCE_DBPASS';
yum install openstack-glance openstack-utils -y
scp root@controller:/etc/glance/glance-api.conf /etc/glance/glance-api.conf
scp root@controller:/etc/glance/glance-registry.conf /etc/glance/glance-registry.conf
openstack-config --set /etc/glance/glance-api.conf database connection mysql+pymysql://glance:GLANCE_DBPASS@192.168.100.40/glance
openstack-config --set /etc/glance/glance-registry.conf database connection mysql+pymysql://glance:GLANCE_DBPASS@192.168.100.40/glance
systemctl start openstack-glance-api.service
systemctl start openstack-glance-register.service
systemctl enable openstack-glance-api.service
systemctl enable openstack-glance-register.service
scp root@controller:/var/lib/glance/images/* /var/lib/glance/images/
chown glance:glance /var/lib/glance/images/
mysql -uroot -popensatck
update endpoint set url = 'http://192.168.100.40:9292' where service_id = (select id from service where type = 'image');
sed -i 's#http://controller:9292#http://192.168.100.40:9292#' /etc/nova/nova.conf
systemctl restart openstack-nova-api
systemctl restart openstack-nova-compute
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。