6.安装和配置OpenStack图片服务组件
Posted IT菜鸟园
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了6.安装和配置OpenStack图片服务组件相关的知识,希望对你有一定的参考价值。
安装和配置图片服务组件
这里是安装在控制器上
安装和配置图片服务组件
yum install –y openstack-glance python-glanceclient
编辑/etc/glance/glance-api.conf
mv /etc/glance/glance-api.conf /etc/glance/glance-api.conf_bak vim /etc/glance/glance-api.conf [database] connection = mysql://glance:[email protected]/glance [keystone_authtoken] auth_uri = http://controller:5000/v2.0 identity_uri = http://controller:35357 admin_tenant_name = service admin_user = glance admin_password = Abcd1234 [paste_deploy] flavor = keystone [glance_store] default_store = file filesystem_store_datadir = /var/lib/glance/images/ [DEFAULT] verbose = True notification_driver = noop
编辑/etc/glance/glance-registry.conf
mv /etc/glance/glance-registry.conf /etc/glance/glance-registry.conf_bak vim /etc/glance/glance-registry.conf [database] connection = mysql://glance:[email protected]/glance [keystone_authtoken] auth_uri = http://controller:5000/v2.0 identity_uri = http://controller:35357 admin_tenant_name = service admin_user = glance admin_password = Abcd1234 [paste_deploy] flavor = keystone [DEFAULT] verbose = True notification_driver = noop
填充图像服务数据库并启动图像服务配置为开机自启动
su -s /bin/sh -c "glance-manage db_sync" glance systemctl enable openstack-glance-api.service openstack-glance-registry.service systemctl start openstack-glance-api.service openstack-glance-registry.service
测试服务是否正常
mkdir /tmp/images yum install -y wget wget -P /tmp/images http://cdn.download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-disk.img source admin-openrc.sh glance image-create --name "cirros-0.3.3-x86_64" --file /tmp/images/cirros-0.3.3-x86_64-disk.img --disk-format qcow2 --container-format bare --is-public True --progress glance image-list rm -r /tmp/images
以上是关于6.安装和配置OpenStack图片服务组件的主要内容,如果未能解决你的问题,请参考以下文章
OpenStack---M版---双节点搭建---Swift安装和配置
OpenStack---M版---双节点搭建---Neutron安装和配置