标签:bash control 开机 res 访问权限 dir chm emctl efault
# mysql -uroot -p000000
>create database glance;
> grant all privileges on glance.* to 'glance'@'localhost' identified by '000000';
> grant all privileges on glance.* to 'glance'@'%' identified by '000000';
# . /root/admin-openrc
创建 glance 用户
#openstack user create --domain default --password 000000 glance
添加 admin 角色到 glance 用户和 service 项目上
#openstack role add --project service --user glance admin
创建 glance 服务实体:
#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
#yum -y install openstack-glance
#vi /etc/glance/glance-api.conf
在[database]下添加
connection = mysql+pymysql://glance:000000@controller/glance
在[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 = 000000 #此处六个零为之前创建的glance用户密码
在[paste_deploy]下添加
flavor = keystone
在[glance_store]下添加,配置本地文件系统存储和镜像文件位置
stores = file,http
default_store = file
filesystem_store_datadir = /var/lib/glance/images/
/etc/glance/glance-registry.conf
#vi /etc/glance/glance-registry.conf
在[database]下,添加
connection = mysql+pymysql://glance:000000@controller/glance
在 [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 = 000000
在[paste_deploy]下添加
flavor = keystone
# su -s /bin/sh -c "glance-manage db_sync" glance
#systemctl start openstack-glance-api.service openstack-glance-registry.service
#systemctl enable openstack-glance-api.service openstack-glance-registry.service
# . /root/admin-openrc
# glance image-create --name cirros --disk-format qcow2 --container-format bare --progress < /opt/mitaka/image/cirros-0.3.4-x86_64-disk.img
# openstack image list
(四)OpenStack---M版---双节点搭建---Glance安装和配置
标签:bash control 开机 res 访问权限 dir chm emctl efault
原文地址:https://www.cnblogs.com/zhijian1574/p/11956834.html