Controller Node:1. Sudo apt-get install glance python-glanceclient 2. sudo vi/etc/glance/glance-api.conf
andsudo vi/etc/glance/glance-registry.conf
[Database]Connection = Mysql://glance:[email Protected]/glance 3. sudo rm/var/lib/glance/glance.sqlite 4. Create databases Mysql-u root-pcreate database glance; GRANT all privileges The glance.* to ' glance ' @ ' localhost ' identified by ' glance_dbpass '; GRANT all privileges The glance.* to ' glance ' @ '% ' identified by ' glance_dbpass '; 5. Sudo-s/bin/sh-c "Glance-manage db_sync" glance 6. Create user Keystone User-create--name=glance--pass=glance_pass [email protected]keystone user-role-add--user=glance-- Tenant=service--role=admin 7. sudo vi/etc/glance/glance-api.conf
andsudo vi/etc/glance/glance-registry.conf
[Keystone_authtoken]Auth_uri = Http://controller:5000auth_host = Controllerauth_port = 35357auth_protocol = Httpadmin_tenant_name = Serviceadmin_user = Glanceadmin_password = Glance_pass
[Paste_deploy]Flavor = Keystone 8. 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=ht tp://controller:9292 \--adminurl=http://controller:9292 9. sudo service glance-registry restart && sudo service glance-api restart
Verify:1. sudo mkdir/tmp/imagescd/tmp/images/sudo wget http://cdn.download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64- Disk.img 2. SOURCE admin-openrc.shglance image-create--name "cirros-0.3.2-x86_64"--disk-format qcow2--container-format Bare-- Is-public True--progress < cirros-0.3.2-x86_64-disk.img 3. Glance Image-list
5. Configure the Image Service