Controller:
Yum Install openstack-glance python-glanceclient
Openstack-config--set/etc/glance/glance-api.conf database \
Connection Mysql://glance:[email Protected]/glance
Openstack-config--set/etc/glance/glance-registry.conf database \
Connection Mysql://glance:[email Protected]/glance
Initialize the database:
Mysql-u Root-popenstack
Mysql> CREATE DATABASE Glance;
Mysql> GRANT all privileges in glance.* to ' glance ' @ ' localhost ' \
Identified by ' OpenStack ';
Mysql> GRANT all privileges in glance.* to ' glance ' @ '% ' \
Identified by ' OpenStack ';
Su-s/bin/sh-c "Glance-manage db_sync" glance
Keystone User-create--name=glance--pass=glance [email protected]
Openstack-config--set/etc/glance/glance-api.conf Keystone_authtoken Auth_uri http://10.0.0.10:5000
Openstack-config--set/etc/glance/glance-api.conf Keystone_authtoken auth_host 10.0.0.10
Openstack-config--set/etc/glance/glance-api.conf Keystone_authtoken Auth_port 35357
Openstack-config--set/etc/glance/glance-api.conf Keystone_authtoken Auth_protocol http
Openstack-config--set/etc/glance/glance-api.conf keystone_authtoken admin_tenant_name Service
Openstack-config--set/etc/glance/glance-api.conf Keystone_authtoken Admin_user Glance
Openstack-config--set/etc/glance/glance-api.conf Keystone_authtoken Admin_password Glance
Openstack-config--set/etc/glance/glance-api.conf Paste_deploy Flavor Keystone
Openstack-config--set/etc/glance/glance-registry.conf Keystone_authtoken Auth_uri http://10.0.0.10:5000
Openstack-config--set/etc/glance/glance-registry.conf Keystone_authtoken auth_host 10.0.0.10
Openstack-config--set/etc/glance/glance-registry.conf Keystone_authtoken Auth_port 35357
Openstack-config--set/etc/glance/glance-registry.conf Keystone_authtoken Auth_protocol http
Openstack-config--set/etc/glance/glance-registry.conf keystone_authtoken admin_tenant_name Service
Openstack-config--set/etc/glance/glance-registry.conf Keystone_authtoken Admin_user Glance
Openstack-config--set/etc/glance/glance-registry.conf Keystone_authtoken Admin_password Glance
Openstack-config--set/etc/glance/glance-registry.conf Paste_deploy Flavor Keystone
Keystone Service-create--name=glance--type=image--description= "OpenStack Image Service"
Keystone endpoint-create \
--service-id=$ (Keystone Service-list | awk '/image/{print $} ') \
--publicurl=http://controller:9292 \
--internalurl=http://controller:9292 \
--adminurl=http://controller:9292
Service Openstack-glance-api Restart
Service Openstack-glance-registry Restart
Chkconfig Openstack-glance-api on
Chkconfig Openstack-glance-registry on
Verify that the mirroring service configuration was successful:
cd/root/
wget http://cdn.download.cirros-cloud.net/0.3.2/cirros-0.3.0-x86_64-
Disk.img
Glance image-create--progress--name= "Cirros 0.3.0"--disk-format=qcow2 \
--CONTAINER-FORMAT=OVF--is-public=true < cirros-0.3.0-x86_64-disk.img
Glance Image-list
This article is from the "Gaogaozi" blog, make sure to keep this source http://hangtiangazi.blog.51cto.com/8584103/1671862
Glance hand-built