Installing and Configuring Glance
Perform the following operations on the controller node.
- Install Glance.
1yum -y install openstack-glance
- Modify the /etc/glance/glance-api.conf file.
- Open the file.
vi /etc/glance/glance-api.conf
- Press i to enter the insert mode and perform the following configurations.
- Under [database], configure database access.
1 2
[database] connection = mysql+pymysql://glance:PASSWORD@controller/glance
Replace PASSWORD with the password for the glance user to access the database described in Creating the Glance Database.
- Configure Identity service access under [keystone_authtoken] and [paste_deploy].
1 2 3 4 5 6 7 8 9 10 11 12 13
[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 = PASSWORD [paste_deploy] flavor = keystone
Replace PASSWORD with the password for the glance user to access the database described in Creating the Glance Database.
- Under the [glance_store] field, configure the local file system storage and the location where image files are stored.
1 2 3 4
[glance_store] stores = file,http default_store = file filesystem_store_datadir = /var/lib/glance/images/
- Under [database], configure database access.
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the file.
- Modify the /etc/glance/glance-registry.conf file.
- Open the file.
vi /etc/glance/glance-registry.conf
- Press i to enter the insert mode and perform the following configurations.
- Under [database], configure database access.
1 2
[database] connection = mysql+pymysql://glance:PASSWORD@controller/glance
- Configure Identity service access under [keystone_authtoken] and [paste_deploy].
1 2 3 4 5 6 7 8 9 10 11 12 13
[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 = PASSWORD [paste_deploy] flavor = keystone
Replace PASSWORD with the password for the glance user to access the database described in Creating the Glance Database.
- Under [database], configure database access.
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the file.
- Populate the Image service database.
1su -s /bin/sh -c "glance-manage db_sync" glance

- Enable the Image service and configure it to start as the system boots.
1 2
systemctl enable openstack-glance-api.service openstack-glance-registry.service systemctl start openstack-glance-api.service openstack-glance-registry.service

Parent topic: Installing, Configuring, and Verifying Glance