[install] Liberty updates for glance

Update glance configuration for Liberty and address some
consistency issues.

Changes and testing specific to distribution packages
primarily involve Ubuntu. Other distributions may require
additional patches.

Change-Id: I6c9696b28fe42f00b8a3f9d7344a9807b74accfb
Implements: blueprint installguide-liberty
This commit is contained in:
Matthew Kassawara 2015-09-30 17:37:43 -06:00
parent 046de3d84b
commit b46b1a5689
7 changed files with 286 additions and 277 deletions

View File

@ -33,7 +33,7 @@ This section describes how to verify operation of the Telemetry module.
.. code-block:: console .. code-block:: console
$ IMAGE_ID=$(glance image-list | grep 'cirros-0.3.4-x86_64' | awk '{ print $2 }') $ IMAGE_ID=$(glance image-list | grep 'cirros' | awk '{ print $2 }')
$ glance image-download $IMAGE_ID > /tmp/cirros.img $ glance image-download $IMAGE_ID > /tmp/cirros.img
#. List available meters again to validate detection of the image #. List available meters again to validate detection of the image

View File

@ -1,43 +1,34 @@
=====================
Install and configure Install and configure
===================== ~~~~~~~~~~~~~~~~~~~~~
This section describes how to install and configure the Image service, This section describes how to install and configure the Image service,
code-named glance, on the controller node. For simplicity, this code-named glance, on the controller node. For simplicity, this
configuration stores images on the local file system. configuration stores images on the local file system.
.. note::
This section assumes proper installation, configuration, and
operation of the Identity service as described in the
":doc:`keystone-install`" section and the ":doc:`keystone-verify`"
section as well as setup of the :file:`admin-openrc.sh` script
as described in the ":doc:`keystone-openrc`" section.
.. only:: obs or rdo or ubuntu .. only:: obs or rdo or ubuntu
To configure prerequisites Prerequisites
~~~~~~~~~~~~~~~~~~~~~~~~~~ -------------
Before you install and configure the Image service, you must Before you install and configure the Image service, you must
create a database, service credentials, and API endpoint. create a database, service credentials, and API endpoints.
#. To create the database, complete these steps: #. To create the database, complete these steps:
a. Use the database access client to connect to the database * Use the database access client to connect to the database
server as the ``root`` user: server as the ``root`` user:
.. code-block:: console .. code-block:: console
$ mysql -u root -p $ mysql -u root -p
b. Create the ``glance`` database: * Create the ``glance`` database:
.. code-block:: console .. code-block:: console
CREATE DATABASE glance; CREATE DATABASE glance;
c. Grant proper access to the ``glance`` database: * Grant proper access to the ``glance`` database:
.. code-block:: console .. code-block:: console
@ -48,7 +39,7 @@ configuration stores images on the local file system.
Replace ``GLANCE_DBPASS`` with a suitable password. Replace ``GLANCE_DBPASS`` with a suitable password.
d. Exit the database access client. * Exit the database access client.
#. Source the ``admin`` credentials to gain access to #. Source the ``admin`` credentials to gain access to
admin-only CLI commands: admin-only CLI commands:
@ -59,37 +50,34 @@ configuration stores images on the local file system.
#. To create the service credentials, complete these steps: #. To create the service credentials, complete these steps:
a. Create the ``glance`` user: * Create the ``glance`` user:
.. code-block:: console .. code-block:: console
$ openstack user create --password-prompt glance $ openstack user create --password-prompt glance
User Password: User Password:
Repeat User Password: Repeat User Password:
+----------+----------------------------------+ +-----------+----------------------------------+
| Field | Value | | Field | Value |
+----------+----------------------------------+ +-----------+----------------------------------+
| email | None | | domain_id | default |
| enabled | True | | enabled | True |
| id | 1dc206e084334db2bee88363745da014 | | id | e38230eeff474607805b596c91fa15d9 |
| name | glance | | name | glance |
| username | glance | +-----------+----------------------------------+
+----------+----------------------------------+
b. Add the ``admin`` role to the ``glance`` user and * Add the ``admin`` role to the ``glance`` user and
``service`` project: ``service`` project:
.. code-block:: console .. code-block:: console
$ openstack role add --project service --user glance admin $ openstack role add --project service --user glance admin
+-------+----------------------------------+
| Field | Value |
+-------+----------------------------------+
| id | cd2cb9a39e874ea69e5d4b896eb16128 |
| name | admin |
+-------+----------------------------------+
c. Create the ``glance`` service entity: .. note::
This command provides no output.
* Create the ``glance`` service entity:
.. code-block:: console .. code-block:: console
@ -100,36 +88,65 @@ configuration stores images on the local file system.
+-------------+----------------------------------+ +-------------+----------------------------------+
| description | OpenStack Image service | | description | OpenStack Image service |
| enabled | True | | enabled | True |
| id | 178124d6081c441b80d79972614149c6 | | id | 8c2c7f1b9b5049ea9e63757b5533e6d2 |
| name | glance | | name | glance |
| type | image | | type | image |
+-------------+----------------------------------+ +-------------+----------------------------------+
#. Create the Image service API endpoint: #. Create the Image service API endpoints:
.. code-block:: console .. code-block:: console
$ openstack endpoint create \ $ openstack endpoint create --region RegionOne \
--publicurl http://controller:9292 \ image public http://controller:9292
--internalurl http://controller:9292 \
--adminurl http://controller:9292 \
--region RegionOne \
image
+--------------+----------------------------------+ +--------------+----------------------------------+
| Field | Value | | Field | Value |
+--------------+----------------------------------+ +--------------+----------------------------------+
| adminurl | http://controller:9292 | | enabled | True |
| id | 805b1dbc90ab47479111102bc6423313 | | id | 340be3625e9b4239a6415d034e98aace |
| internalurl | http://controller:9292 | | interface | public |
| publicurl | http://controller:9292 |
| region | RegionOne | | region | RegionOne |
| service_id | 178124d6081c441b80d79972614149c6 | | region_id | RegionOne |
| service_id | 8c2c7f1b9b5049ea9e63757b5533e6d2 |
| service_name | glance | | service_name | glance |
| service_type | image | | service_type | image |
| url | http://controller:9292 |
+--------------+----------------------------------+ +--------------+----------------------------------+
To install and configure the Image service components $ openstack endpoint create --region RegionOne \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ image internal http://controller:9292
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | a6e4b153c2ae4c919eccfdbb7dceb5d2 |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 8c2c7f1b9b5049ea9e63757b5533e6d2 |
| service_name | glance |
| service_type | image |
| url | http://controller:9292 |
+--------------+----------------------------------+
$ openstack endpoint create --region RegionOne \
image admin http://controller:9292
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 0c37ed58103f4300a84ff125a539032d |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 8c2c7f1b9b5049ea9e63757b5533e6d2 |
| service_name | glance |
| service_type | image |
| url | http://controller:9292 |
+--------------+----------------------------------+
Install and configure components
--------------------------------
.. only:: obs or rdo or ubuntu .. only:: obs or rdo or ubuntu
@ -164,13 +181,12 @@ To install and configure the Image service components
.. only:: obs or rdo or ubuntu .. only:: obs or rdo or ubuntu
2. Edit the :file:`/etc/glance/glance-api.conf` file and complete 2. Edit the ``/etc/glance/glance-api.conf`` file and complete
the following actions: the following actions:
a. In the ``[database]`` section, configure database access: * In the ``[database]`` section, configure database access:
.. code-block:: ini .. code-block:: ini
:linenos:
[database] [database]
... ...
@ -179,11 +195,10 @@ To install and configure the Image service components
Replace ``GLANCE_DBPASS`` with the password you chose for the Replace ``GLANCE_DBPASS`` with the password you chose for the
Image service database. Image service database.
b. In the ``[keystone_authtoken]`` and ``[paste_deploy]`` sections, * In the ``[keystone_authtoken]`` and ``[paste_deploy]`` sections,
configure Identity service access: configure Identity service access:
.. code-block:: ini .. code-block:: ini
:linenos:
[keystone_authtoken] [keystone_authtoken]
... ...
@ -208,23 +223,21 @@ To install and configure the Image service components
Comment out or remove any other options in the Comment out or remove any other options in the
``[keystone_authtoken]`` section. ``[keystone_authtoken]`` section.
c. In the ``[glance_store]`` section, configure the local file * In the ``[glance_store]`` section, configure the local file
system store and location of image files: system store and location of image files:
.. code-block:: ini .. code-block:: ini
:linenos:
[glance_store] [glance_store]
... ...
default_store = file default_store = file
filesystem_store_datadir = /var/lib/glance/images/ filesystem_store_datadir = /var/lib/glance/images/
d. In the ``[DEFAULT]`` section, configure the ``noop`` * In the ``[DEFAULT]`` section, configure the ``noop``
notification driver to disable notifications because notification driver to disable notifications because
they only pertain to the optional Telemetry service: they only pertain to the optional Telemetry service:
.. code-block:: ini .. code-block:: ini
:linenos:
[DEFAULT] [DEFAULT]
... ...
@ -233,23 +246,21 @@ To install and configure the Image service components
The Telemetry chapter provides an Image service configuration The Telemetry chapter provides an Image service configuration
that enables notifications. that enables notifications.
e. (Optional) To assist with troubleshooting, * (Optional) To assist with troubleshooting,
enable verbose logging in the ``[DEFAULT]`` section: enable verbose logging in the ``[DEFAULT]`` section:
.. code-block:: ini .. code-block:: ini
:linenos:
[DEFAULT] [DEFAULT]
... ...
verbose = True verbose = True
3. Edit the :file:`/etc/glance/glance-registry.conf` file and 3. Edit the ``/etc/glance/glance-registry.conf`` file and
complete the following actions: complete the following actions:
a. In the ``[database]`` section, configure database access: * In the ``[database]`` section, configure database access:
.. code-block:: ini .. code-block:: ini
:linenos:
[database] [database]
... ...
@ -258,11 +269,10 @@ To install and configure the Image service components
Replace ``GLANCE_DBPASS`` with the password you chose for the Replace ``GLANCE_DBPASS`` with the password you chose for the
Image service database. Image service database.
b. In the ``[keystone_authtoken]`` and ``[paste_deploy]`` sections, * In the ``[keystone_authtoken]`` and ``[paste_deploy]`` sections,
configure Identity service access: configure Identity service access:
.. code-block:: ini .. code-block:: ini
:linenos:
[keystone_authtoken] [keystone_authtoken]
... ...
@ -287,12 +297,11 @@ To install and configure the Image service components
Comment out or remove any other options in the Comment out or remove any other options in the
``[keystone_authtoken]`` section. ``[keystone_authtoken]`` section.
c. In the ``[DEFAULT]`` section, configure the ``noop`` notification * In the ``[DEFAULT]`` section, configure the ``noop`` notification
driver to disable notifications because they only pertain to the driver to disable notifications because they only pertain to the
optional Telemetry service: optional Telemetry service:
.. code-block:: ini .. code-block:: ini
:linenos:
[DEFAULT] [DEFAULT]
... ...
@ -301,11 +310,10 @@ To install and configure the Image service components
The Telemetry chapter provides an Image service configuration The Telemetry chapter provides an Image service configuration
that enables notifications. that enables notifications.
d. (Optional) To assist with troubleshooting, * (Optional) To assist with troubleshooting,
enable verbose logging in the ``[DEFAULT]`` section: enable verbose logging in the ``[DEFAULT]`` section:
.. code-block:: ini .. code-block:: ini
:linenos:
[DEFAULT] [DEFAULT]
... ...
@ -339,8 +347,8 @@ To install and configure the Image service components
.. image:: figures/debconf-screenshots/glance-common_pipeline_flavor.png .. image:: figures/debconf-screenshots/glance-common_pipeline_flavor.png
:width: 100% :width: 100%
To finalize installation Finalize installation
------------------------ ---------------------
.. only:: obs or rdo .. only:: obs or rdo
@ -349,8 +357,10 @@ To finalize installation
.. code-block:: console .. code-block:: console
# systemctl enable openstack-glance-api.service openstack-glance-registry.service # systemctl enable openstack-glance-api.service \
# systemctl start openstack-glance-api.service openstack-glance-registry.service openstack-glance-registry.service
# systemctl start openstack-glance-api.service \
openstack-glance-registry.service
.. only:: ubuntu or debian .. only:: ubuntu or debian

View File

@ -1,6 +1,5 @@
================
Verify operation Verify operation
================ ~~~~~~~~~~~~~~~~
Verify operation of the Image service using Verify operation of the Image service using
`CirrOS <http://launchpad.net/cirros>`__, a small `CirrOS <http://launchpad.net/cirros>`__, a small
@ -40,7 +39,7 @@ For information about how to manage images, see the
.. code-block:: console .. code-block:: console
$ glance image-create --name "cirros-0.3.4-x86_64" \ $ glance image-create --name "cirros" \
--file cirros-0.3.4-x86_64-disk.img \ --file cirros-0.3.4-x86_64-disk.img \
--disk-format qcow2 --container-format bare \ --disk-format qcow2 --container-format bare \
--visibility public --progress --visibility public --progress
@ -55,7 +54,7 @@ For information about how to manage images, see the
| id | 38047887-61a7-41ea-9b49-27987d5e8bb9 | | id | 38047887-61a7-41ea-9b49-27987d5e8bb9 |
| min_disk | 0 | | min_disk | 0 |
| min_ram | 0 | | min_ram | 0 |
| name | cirros-0.3.4-x86_64 | | name | cirros |
| owner | ae7a98326b9c455588edd2656d723b9d | | owner | ae7a98326b9c455588edd2656d723b9d |
| protected | False | | protected | False |
| size | 13200896 | | size | 13200896 |
@ -87,8 +86,8 @@ For information about how to manage images, see the
.. code-block:: console .. code-block:: console
$ glance image-list $ glance image-list
+--------------------------------------+---------------------+ +--------------------------------------+--------+
| ID | Name | | ID | Name |
+--------------------------------------+---------------------+ +--------------------------------------+--------+
| 38047887-61a7-41ea-9b49-27987d5e8bb9 | cirros-0.3.4-x86_64 | | 38047887-61a7-41ea-9b49-27987d5e8bb9 | cirros |
+--------------------------------------+---------------------+ +--------------------------------------+--------+

View File

@ -55,7 +55,7 @@ module (heat).
$ NET_ID=$(nova net-list | awk '/ demo-net / { print $2 }') $ NET_ID=$(nova net-list | awk '/ demo-net / { print $2 }')
$ heat stack-create -f test-stack.yml \ $ heat stack-create -f test-stack.yml \
-P "ImageID=cirros-0.3.4-x86_64;NetID=$NET_ID" testStack -P "ImageID=cirros;NetID=$NET_ID" testStack
+--------------------------------------+------------+--------------------+----------------------+ +--------------------------------------+------------+--------------------+----------------------+
| id | stack_name | stack_status | creation_time | | id | stack_name | stack_status | creation_time |
+--------------------------------------+------------+--------------------+----------------------+ +--------------------------------------+------------+--------------------+----------------------+

View File

@ -38,13 +38,13 @@ name, network, security group, key, and instance name.
.. code-block:: console .. code-block:: console
$ nova image-list $ nova image-list
+--------------------------------------+---------------------+--------+--------+ +--------------------------------------+--------+--------+--------+
| ID | Name | Status | Server | | ID | Name | Status | Server |
+--------------------------------------+---------------------+--------+--------+ +--------------------------------------+--------+--------+--------+
| acafc7c0-40aa-4026-9673-b879898e1fc2 | cirros-0.3.4-x86_64 | ACTIVE | | | 38047887-61a7-41ea-9b49-27987d5e8bb9 | cirros | ACTIVE | |
+--------------------------------------+---------------------+--------+--------+ +--------------------------------------+--------+--------+--------+
This instance uses the ``cirros-0.3.4-x86_64`` image. This instance uses the ``cirros`` image.
#. List available networks: #. List available networks:
@ -80,11 +80,11 @@ name, network, security group, key, and instance name.
.. code-block:: console .. code-block:: console
$ nova boot --flavor m1.tiny --image cirros-0.3.4-x86_64 --nic net-id=PRIVATE_NET_ID \ $ nova boot --flavor m1.tiny --image cirros --nic net-id=PRIVATE_NET_ID \
--security-group default --key-name mykey private-instance --security-group default --key-name mykey private-instance
+--------------------------------------+------------------------------------------------------------+ +--------------------------------------+-----------------------------------------------+
| Property | Value | | Property | Value |
+--------------------------------------+------------------------------------------------------------+ +--------------------------------------+-----------------------------------------------+
| OS-DCF:diskConfig | MANUAL | | OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | nova | | OS-EXT-AZ:availability_zone | nova |
| OS-EXT-STS:power_state | 0 | | OS-EXT-STS:power_state | 0 |
@ -100,7 +100,7 @@ name, network, security group, key, and instance name.
| flavor | m1.tiny (1) | | flavor | m1.tiny (1) |
| hostId | | | hostId | |
| id | 113c5892-e58e-4093-88c7-e33f502eaaa4 | | id | 113c5892-e58e-4093-88c7-e33f502eaaa4 |
| image | cirros-0.3.4-x86_64 (939ad102-c74e-405d-a957-2798071d0a7c) | | image | cirros (38047887-61a7-41ea-9b49-27987d5e8bb9) |
| key_name | mykey | | key_name | mykey |
| metadata | {} | | metadata | {} |
| name | private-instance | | name | private-instance |
@ -111,7 +111,7 @@ name, network, security group, key, and instance name.
| tenant_id | f5b2ccaa75ac413591f12fcaa096aa5c | | tenant_id | f5b2ccaa75ac413591f12fcaa096aa5c |
| updated | 2015-09-17T22:36:05Z | | updated | 2015-09-17T22:36:05Z |
| user_id | 684286a9079845359882afc3aa5011fb | | user_id | 684286a9079845359882afc3aa5011fb |
+--------------------------------------+------------------------------------------------------------+ +--------------------------------------+-----------------------------------------------+
6. Check the status of your instance: 6. Check the status of your instance:

View File

@ -38,13 +38,13 @@ name, network, security group, key, and instance name.
.. code-block:: console .. code-block:: console
$ nova image-list $ nova image-list
+--------------------------------------+---------------------+--------+--------+ +--------------------------------------+--------+--------+--------+
| ID | Name | Status | Server | | ID | Name | Status | Server |
+--------------------------------------+---------------------+--------+--------+ +--------------------------------------+--------+--------+--------+
| acafc7c0-40aa-4026-9673-b879898e1fc2 | cirros-0.3.4-x86_64 | ACTIVE | | | 38047887-61a7-41ea-9b49-27987d5e8bb9 | cirros | ACTIVE | |
+--------------------------------------+---------------------+--------+--------+ +--------------------------------------+--------+--------+--------+
This instance uses the ``cirros-0.3.4-x86_64`` image. This instance uses the ``cirros`` image.
#. List available networks: #. List available networks:
@ -92,11 +92,11 @@ Launch the instance
.. code-block:: console .. code-block:: console
$ nova boot --flavor m1.tiny --image cirros-0.3.4-x86_64 --nic net-id=PUBLIC_NET_ID \ $ nova boot --flavor m1.tiny --image cirros --nic net-id=PUBLIC_NET_ID \
--security-group default --key-name mykey public-instance --security-group default --key-name mykey public-instance
+--------------------------------------+------------------------------------------------------------+ +--------------------------------------+-----------------------------------------------+
| Property | Value | | Property | Value |
+--------------------------------------+------------------------------------------------------------+ +--------------------------------------+-----------------------------------------------+
| OS-DCF:diskConfig | MANUAL | | OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | nova | | OS-EXT-AZ:availability_zone | nova |
| OS-EXT-STS:power_state | 0 | | OS-EXT-STS:power_state | 0 |
@ -112,7 +112,7 @@ Launch the instance
| flavor | m1.tiny (1) | | flavor | m1.tiny (1) |
| hostId | | | hostId | |
| id | 181c52ba-aebc-4c32-a97d-2e8e82e4eaaf | | id | 181c52ba-aebc-4c32-a97d-2e8e82e4eaaf |
| image | cirros-0.3.4-x86_64 (939ad102-c74e-405d-a957-2798071d0a7c) | | image | cirros (38047887-61a7-41ea-9b49-27987d5e8bb9) |
| key_name | key | | key_name | key |
| metadata | {} | | metadata | {} |
| name | public-instance | | name | public-instance |
@ -123,7 +123,7 @@ Launch the instance
| tenant_id | f5b2ccaa75ac413591f12fcaa096aa5c | | tenant_id | f5b2ccaa75ac413591f12fcaa096aa5c |
| updated | 2015-09-17T21:58:18Z | | updated | 2015-09-17T21:58:18Z |
| user_id | 684286a9079845359882afc3aa5011fb | | user_id | 684286a9079845359882afc3aa5011fb |
+--------------------------------------+------------------------------------------------------------+ +--------------------------------------+-----------------------------------------------+
#. Check the status of your instance: #. Check the status of your instance:

View File

@ -136,8 +136,8 @@ Verify operation of the Compute service.
.. code-block:: console .. code-block:: console
$ nova image-list $ nova image-list
+--------------------------------------+---------------------+--------+--------+ +--------------------------------------+--------+--------+--------+
| ID | Name | Status | Server | | ID | Name | Status | Server |
+--------------------------------------+---------------------+--------+--------+ +--------------------------------------+--------+--------+--------+
| 38047887-61a7-41ea-9b49-27987d5e8bb9 | cirros-0.3.4-x86_64 | ACTIVE | | | 38047887-61a7-41ea-9b49-27987d5e8bb9 | cirros | ACTIVE | |
+--------------------------------------+---------------------+--------+--------+ +--------------------------------------+--------+--------+--------+