Install and configure This section describes how to install and configure the Image Service, code-named glance, on the controller node. For simplicity, this configuration stores images on the local file system. This section assumes proper installation, configuration, and operation of the Identity service as described in and . To configure prerequisites Before you install and configure the Image Service, you must create a database and Identity service credentials including endpoints. To create the database, complete these steps: Use the database access client to connect to the database server as the root user: $ mysql -u root -p Create the glance database: mysql> CREATE DATABASE glance; Grant proper access to the glance database: mysql> GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' IDENTIFIED BY 'GLANCE_DBPASS'; mysql> GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' IDENTIFIED BY 'GLANCE_DBPASS'; Replace GLANCE_DBPASS with a suitable password. Exit the database access client: mysql> exit Source the admin credentials to gain access to admin-only CLI commands: $ source admin-openrc.sh To create the Identity service credentials, complete these steps: Create the glance user: $ keystone user-create --name=glance --pass=GLANCE_PASS --email=EMAIL_ADDRESS Replace GLANCE_PASS with a suitable password and EMAIL_ADDRESS with a suitable e-mail address. Link the glance user to the service tenant and admin role: $ keystone user-role-add --user=glance --tenant=service --role=admin Create the glance service: $ keystone service-create --name=glance --type=image \ --description="OpenStack Image Service" Create the Identity service endpoints: $ keystone endpoint-create \ --service-id=$(keystone service-list | awk '/ image / {print $2}') \ --publicurl=http://controller:9292 \ --internalurl=http://controller:9292 \ --adminurl=http://controller:9292 To install and configure the Image Service components Install the packages: # apt-get install glance python-glanceclient # yum install openstack-glance python-glanceclient # zypper install openstack-glance python-glanceclient Edit the /etc/glance/glance-api.conf file and complete the following actions: In the [database] section, configure database access: [database] ... connection = mysql://glance:GLANCE_DBPASS@controller/glance Replace GLANCE_DBPASS with the password you chose for the Image Service database. In the [DEFAULT] section, configure RabbitMQ message broker access: [DEFAULT] ... rpc_backend = rabbit rabbit_host = controller rabbit_password = RABBIT_PASS Replace RABBIT_PASS with the password you chose for the guest account in RabbitMQ. In the [keystone_authtoken] and [paste_deploy] sections, configure Identity service access: [keystone_authtoken] ... auth_uri = http://controller:5000/v2.0 auth_host = controller auth_port = 35357 auth_protocol = http admin_tenant_name = service admin_user = glance admin_password = GLANCE_PASS [paste_deploy] ... flavor = keystone Replace GLANCE_PASS with the password you chose for the glance user in the Identity service. Edit the /etc/glance/glance-registry.conf file and complete the following actions: In the [database] section, configure database access: [database] ... connection = mysql://glance:GLANCE_DBPASS@controller/glance Replace GLANCE_DBPASS with the password you chose for the Image Service database. In the [keystone_authtoken] and [paste_deploy] sections, configure Identity service access: [keystone_authtoken] ... auth_uri = http://controller:5000/v2.0 auth_host = controller auth_port = 35357 auth_protocol = http admin_tenant_name = service admin_user = glance admin_password = GLANCE_PASS ... [paste_deploy] ... flavor = keystone Replace GLANCE_PASS with the password you chose for the glance user in the Identity service. Populate the Image Service database: # su -s /bin/sh -c "glance-manage db_sync" glance To install and configure the Image Service components Install the packages: # apt-get install glance python-glanceclient Respond to prompts for database management, Identity service credentials, service endpoint registration, and message broker credentials. Select the keystone pipeline to configure the Image Service to use the Identity service: To finalize installation Restart the Image Service services: # service glance-registry restart # service glance-api restart Start the Image Service services and configure them to start when the system boots: # service openstack-glance-api start # service openstack-glance-registry start # chkconfig openstack-glance-api on # chkconfig openstack-glance-registry on By default, the Ubuntu packages create an SQLite database. Because this configuration uses a SQL database server, you can remove the SQLite database file: # rm /var/lib/glance/glance.sqlite