openstack搭建之镜像服务glance的安装之本地文件系统版本(四)
ceph版本请参照:
openstack搭建之镜像服务glance的安装(四)<ceph版> - 运维术 (cnbugs.com)
以下所有操作均在controller节点完成
认证服务创建
创建glance数据库并配置权限
mysql -uroot -p000000
create database glance;
grant all privileges on glance.* to 'glance'@'%' identified by '000000';
grant all privileges on glance.* to 'glance'@'localhost' identified by '000000';
exit
创建glance服务的认证
source admin-openrc
创建用户
openstack user create --domain default --password-prompt glance
创建角色
openstack role add --project service --user glance admin
创建service entity和api endpoints:
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 -y openstack-glance ceph-common
配置glance服务
cat<<EOF>>/etc/glance/glance-api.conf
[DEFAULT]
[cinder]
[cors]
[database]
connection = mysql+pymysql://glance:000000@controller/glance
[file]
[glance.store.http.store]
[glance.store.rbd.store]
[glance.store.sheepdog.store]
[glance.store.swift.store]
[glance.store.vmware_datastore.store]
[glance_store]
stores = file,http
default_store = file
filesystem_store_datadir = /var/lib/glance/images/
[image_format]
[keystone_authtoken]
www_authenticate_uri = http://controller:5000
auth_url = http://controller:5000
memcached_servers = controller:11211
auth_type = password
project_domain_name = Default
user_domain_name = Default
project_name = service
username = glance
password = 000000
[oslo_concurrency]
[oslo_messaging_amqp]
[oslo_messaging_kafka]
[oslo_messaging_notifications]
[oslo_messaging_rabbit]
[oslo_middleware]
[oslo_policy]
[paste_deploy]
flavor = keystone
[profiler]
[store_type_location_strategy]
[task]
[taskflow_executor]
EOF
初始化数据库
su -s /bin/sh -c "glance-manage db_sync" glance
启动glance服务并设开机启动
systemctl enable openstack-glance-api.service
systemctl start openstack-glance-api.service
查看服务状态
systemctl status openstack-glance-api.service
至此,glance服务告一段落。
主题授权提示:请在后台主题设置-主题授权-激活主题的正版授权,授权购买:RiTheme官网
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。