标签:project mys 链接 备份 安装配置 emc wc -l syn sql
点此快速打开文章【图床_OpenStack-镜像服务】
glance
mysql CREATE DATABASE glance; GRANT ALL PRIVILEGES ON glance.* TO ‘glance‘@‘localhost‘ IDENTIFIED BY ‘GLANCE_DBPASS‘; GRANT ALL PRIVILEGES ON glance.* TO ‘glance‘@‘%‘ IDENTIFIED BY ‘GLANCE_DBPASS‘;
用一个合适的密码替换
GLANCE_DBPASS
。
glance
用户openstack user create --domain default --password GLANCE_PASS glance
用一个合适的密码替换
GLANCE_PASS
。
openstack role add --project service --user glance admin
openstack service create --name glance --description "OpenStack Image" image openstack endpoint create --region RegionOne image public http://controller:9292 openstack endpoint create --region RegionOne image internal http://controller:9292 openstack endpoint create --region RegionOne image admin http://controller:9292
glance
yum install openstack-glance -y &>/dev/null echo $?
cp /etc/glance/glance-api.conf{,.bak} egrep -v ‘^$|#‘ /etc/glance/glance-api.conf.bak >/etc/glance/glance-api.conf
/etc/glance/glance-api.conf
并完成如下动作:vim /etc/glance/glance-api.conf
- 在
[database]
部分,配置数据库访问[database] # ... connection = mysql+pymysql://glance:GLANCE_DBPASS@controller/glance
将
GLANCE_DBPASS
替换为你为镜像服务选择的密码
- 在
[keystone_authtoken]
和[paste_deploy]
部分,配置认证服务访问[keystone_authtoken] # ... auth_uri = http://controller:5000 auth_url = http://controller:35357 memcached_servers = controller:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = glance password = GLANCE_PASS [paste_deploy] # ... flavor = keystone
将
GLANCE_PASS
替换为你为认证服务中你为glance
用户选择的密码。
- 在
[glance_store]
部分,配置本地文件系统存储和镜像文件位置[glance_store] # ... stores = file,http default_store = file filesystem_store_datadir = /var/lib/glance/images/
cp /etc/glance/glance-registry.conf{,.bak} egrep -v ‘^$|#‘ /etc/glance/glance-registry.conf.bak >/etc/glance/glance-registry.conf
/etc/glance/glance-registry.conf
并完成如下动作:vim /etc/glance/glance-registry.conf
- 在
[database]
部分,配置数据库访问[database] # ... connection = mysql+pymysql://glance:GLANCE_DBPASS@controller/glance
将
GLANCE_DBPASS
替换为你为镜像服务选择的密码。
- 在
[keystone_authtoken]
和[paste_deploy]
部分,配置认证服务访问[keystone_authtoken] # ... auth_uri = http://controller:5000 auth_url = http://controller:35357 memcached_servers = controller:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = glance password = GLANCE_PASS [paste_deploy] # ... flavor = keystone
将
GLANCE_PASS
替换为你为认证服务中你为glance
用户选择的密码。
su -s /bin/sh -c "glance-manage db_sync" glance
验证操作
mysql glance -e ‘show tables;‘|wc -l
systemctl enable openstack-glance-api.service openstack-glance-registry.service systemctl start openstack-glance-api.service openstack-glance-registry.service
netstat -lntup|grep -E ‘9191|9292‘
【官方文档】点我快速打开文章
本地上传镜像
ls rz ls
命令行上传镜像
file cirros-0.4.0-x86_64-disk.img openstack image create "cirros" --file cirros-0.4.0-x86_64-disk.img --disk-format qcow2 --container-format bare --public
确认镜像的上传并验证属性
openstack image list
『MineGi有话说』:快来扫一扫下面链接的二维码,加入我们吧!
标签:project mys 链接 备份 安装配置 emc wc -l syn sql
原文地址:https://www.cnblogs.com/MineGi/p/12781736.html