Fix Debian install (remove Debconf)
Since the Debconf stuff is moved to a separate guide, do like for keystone: remove the conditionals, and set it closer to what's done in Ubuntu. Change-Id: Id2ada6f35a1bbd0337eca6a8165013f7eab655d2
This commit is contained in:
parent
3c90965a3b
commit
cfb1c18cbb
@ -5,152 +5,148 @@ 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.
|
||||||
|
|
||||||
.. only:: obs or rdo or ubuntu
|
Prerequisites
|
||||||
|
-------------
|
||||||
|
|
||||||
Prerequisites
|
Before you install and configure the Image service, you must
|
||||||
-------------
|
create a database, service credentials, and API endpoints.
|
||||||
|
|
||||||
Before you install and configure the Image service, you must
|
#. To create the database, complete these steps:
|
||||||
create a database, service credentials, and API endpoints.
|
|
||||||
|
|
||||||
#. To create the database, complete these steps:
|
* Use the database access client to connect to the database
|
||||||
|
server as the ``root`` user:
|
||||||
|
|
||||||
* Use the database access client to connect to the database
|
.. code-block:: console
|
||||||
server as the ``root`` user:
|
|
||||||
|
|
||||||
.. code-block:: console
|
$ mysql -u root -p
|
||||||
|
|
||||||
$ mysql -u root -p
|
* Create the ``glance`` database:
|
||||||
|
|
||||||
* Create the ``glance`` database:
|
.. code-block:: console
|
||||||
|
|
||||||
.. code-block:: console
|
CREATE DATABASE glance;
|
||||||
|
|
||||||
CREATE DATABASE glance;
|
* Grant proper access to the ``glance`` database:
|
||||||
|
|
||||||
* Grant proper access to the ``glance`` database:
|
.. code-block:: console
|
||||||
|
|
||||||
.. code-block:: console
|
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' \
|
||||||
|
IDENTIFIED BY 'GLANCE_DBPASS';
|
||||||
|
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' \
|
||||||
|
IDENTIFIED BY 'GLANCE_DBPASS';
|
||||||
|
|
||||||
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' \
|
Replace ``GLANCE_DBPASS`` with a suitable password.
|
||||||
IDENTIFIED BY 'GLANCE_DBPASS';
|
|
||||||
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' \
|
|
||||||
IDENTIFIED BY 'GLANCE_DBPASS';
|
|
||||||
|
|
||||||
Replace ``GLANCE_DBPASS`` with a suitable password.
|
* Exit the database access client.
|
||||||
|
|
||||||
* Exit the database access client.
|
#. Source the ``admin`` credentials to gain access to
|
||||||
|
admin-only CLI commands:
|
||||||
|
|
||||||
#. Source the ``admin`` credentials to gain access to
|
.. code-block:: console
|
||||||
admin-only CLI commands:
|
|
||||||
|
|
||||||
.. code-block:: console
|
$ . admin-openrc
|
||||||
|
|
||||||
$ . admin-openrc
|
#. To create the service credentials, complete these steps:
|
||||||
|
|
||||||
#. To create the service credentials, complete these steps:
|
* Create the ``glance`` user:
|
||||||
|
|
||||||
* Create the ``glance`` user:
|
.. code-block:: console
|
||||||
|
|
||||||
.. code-block:: console
|
$ openstack user create --domain default --password-prompt glance
|
||||||
|
User Password:
|
||||||
|
Repeat User Password:
|
||||||
|
+-----------+----------------------------------+
|
||||||
|
| Field | Value |
|
||||||
|
+-----------+----------------------------------+
|
||||||
|
| domain_id | e0353a670a9e496da891347c589539e9 |
|
||||||
|
| enabled | True |
|
||||||
|
| id | e38230eeff474607805b596c91fa15d9 |
|
||||||
|
| name | glance |
|
||||||
|
+-----------+----------------------------------+
|
||||||
|
|
||||||
$ openstack user create --domain default --password-prompt glance
|
* Add the ``admin`` role to the ``glance`` user and
|
||||||
User Password:
|
``service`` project:
|
||||||
Repeat User Password:
|
|
||||||
+-----------+----------------------------------+
|
|
||||||
| Field | Value |
|
|
||||||
+-----------+----------------------------------+
|
|
||||||
| domain_id | e0353a670a9e496da891347c589539e9 |
|
|
||||||
| enabled | True |
|
|
||||||
| id | e38230eeff474607805b596c91fa15d9 |
|
|
||||||
| name | glance |
|
|
||||||
+-----------+----------------------------------+
|
|
||||||
|
|
||||||
* Add the ``admin`` role to the ``glance`` user and
|
.. code-block:: console
|
||||||
``service`` project:
|
|
||||||
|
|
||||||
.. code-block:: console
|
$ openstack role add --project service --user glance admin
|
||||||
|
|
||||||
$ openstack role add --project service --user glance admin
|
.. note::
|
||||||
|
|
||||||
.. note::
|
This command provides no output.
|
||||||
|
|
||||||
This command provides no output.
|
* Create the ``glance`` service entity:
|
||||||
|
|
||||||
* Create the ``glance`` service entity:
|
.. code-block:: console
|
||||||
|
|
||||||
.. code-block:: console
|
$ openstack service create --name glance \
|
||||||
|
--description "OpenStack Image" image
|
||||||
|
+-------------+----------------------------------+
|
||||||
|
| Field | Value |
|
||||||
|
+-------------+----------------------------------+
|
||||||
|
| description | OpenStack Image |
|
||||||
|
| enabled | True |
|
||||||
|
| id | 8c2c7f1b9b5049ea9e63757b5533e6d2 |
|
||||||
|
| name | glance |
|
||||||
|
| type | image |
|
||||||
|
+-------------+----------------------------------+
|
||||||
|
|
||||||
$ openstack service create --name glance \
|
#. Create the Image service API endpoints:
|
||||||
--description "OpenStack Image" image
|
|
||||||
+-------------+----------------------------------+
|
|
||||||
| Field | Value |
|
|
||||||
+-------------+----------------------------------+
|
|
||||||
| description | OpenStack Image |
|
|
||||||
| enabled | True |
|
|
||||||
| id | 8c2c7f1b9b5049ea9e63757b5533e6d2 |
|
|
||||||
| name | glance |
|
|
||||||
| type | image |
|
|
||||||
+-------------+----------------------------------+
|
|
||||||
|
|
||||||
#. Create the Image service API endpoints:
|
.. code-block:: console
|
||||||
|
|
||||||
.. code-block:: console
|
$ openstack endpoint create --region RegionOne \
|
||||||
|
image public http://controller:9292
|
||||||
|
+--------------+----------------------------------+
|
||||||
|
| Field | Value |
|
||||||
|
+--------------+----------------------------------+
|
||||||
|
| enabled | True |
|
||||||
|
| id | 340be3625e9b4239a6415d034e98aace |
|
||||||
|
| interface | public |
|
||||||
|
| region | RegionOne |
|
||||||
|
| region_id | RegionOne |
|
||||||
|
| service_id | 8c2c7f1b9b5049ea9e63757b5533e6d2 |
|
||||||
|
| service_name | glance |
|
||||||
|
| service_type | image |
|
||||||
|
| url | http://controller:9292 |
|
||||||
|
+--------------+----------------------------------+
|
||||||
|
|
||||||
$ openstack endpoint create --region RegionOne \
|
$ openstack endpoint create --region RegionOne \
|
||||||
image public http://controller:9292
|
image internal http://controller:9292
|
||||||
+--------------+----------------------------------+
|
+--------------+----------------------------------+
|
||||||
| Field | Value |
|
| Field | Value |
|
||||||
+--------------+----------------------------------+
|
+--------------+----------------------------------+
|
||||||
| enabled | True |
|
| enabled | True |
|
||||||
| id | 340be3625e9b4239a6415d034e98aace |
|
| id | a6e4b153c2ae4c919eccfdbb7dceb5d2 |
|
||||||
| interface | public |
|
| interface | internal |
|
||||||
| region | RegionOne |
|
| region | RegionOne |
|
||||||
| region_id | RegionOne |
|
| region_id | RegionOne |
|
||||||
| service_id | 8c2c7f1b9b5049ea9e63757b5533e6d2 |
|
| service_id | 8c2c7f1b9b5049ea9e63757b5533e6d2 |
|
||||||
| service_name | glance |
|
| service_name | glance |
|
||||||
| service_type | image |
|
| service_type | image |
|
||||||
| url | http://controller:9292 |
|
| url | http://controller:9292 |
|
||||||
+--------------+----------------------------------+
|
+--------------+----------------------------------+
|
||||||
|
|
||||||
$ openstack endpoint create --region RegionOne \
|
$ openstack endpoint create --region RegionOne \
|
||||||
image internal http://controller:9292
|
image admin http://controller:9292
|
||||||
+--------------+----------------------------------+
|
+--------------+----------------------------------+
|
||||||
| Field | Value |
|
| Field | Value |
|
||||||
+--------------+----------------------------------+
|
+--------------+----------------------------------+
|
||||||
| enabled | True |
|
| enabled | True |
|
||||||
| id | a6e4b153c2ae4c919eccfdbb7dceb5d2 |
|
| id | 0c37ed58103f4300a84ff125a539032d |
|
||||||
| interface | internal |
|
| interface | admin |
|
||||||
| region | RegionOne |
|
| region | RegionOne |
|
||||||
| region_id | RegionOne |
|
| region_id | RegionOne |
|
||||||
| service_id | 8c2c7f1b9b5049ea9e63757b5533e6d2 |
|
| service_id | 8c2c7f1b9b5049ea9e63757b5533e6d2 |
|
||||||
| service_name | glance |
|
| service_name | glance |
|
||||||
| service_type | image |
|
| service_type | image |
|
||||||
| url | http://controller:9292 |
|
| 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
|
Install and configure components
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
|
||||||
.. only:: obs or rdo or ubuntu
|
.. include:: shared/note_configuration_vary_by_distribution.rst
|
||||||
|
|
||||||
.. include:: shared/note_configuration_vary_by_distribution.rst
|
|
||||||
|
|
||||||
.. only:: obs
|
.. only:: obs
|
||||||
|
|
||||||
@ -168,7 +164,7 @@ Install and configure components
|
|||||||
|
|
||||||
# yum install openstack-glance
|
# yum install openstack-glance
|
||||||
|
|
||||||
.. only:: ubuntu
|
.. only:: ubuntu or debian
|
||||||
|
|
||||||
#. Install the packages:
|
#. Install the packages:
|
||||||
|
|
||||||
@ -176,106 +172,104 @@ Install and configure components
|
|||||||
|
|
||||||
# apt-get install glance
|
# apt-get install glance
|
||||||
|
|
||||||
.. only:: obs or rdo or ubuntu
|
2. Edit the ``/etc/glance/glance-api.conf`` file and complete the
|
||||||
|
following actions:
|
||||||
|
|
||||||
2. Edit the ``/etc/glance/glance-api.conf`` file and complete the
|
* In the ``[database]`` section, configure database access:
|
||||||
following actions:
|
|
||||||
|
|
||||||
* In the ``[database]`` section, configure database access:
|
.. code-block:: ini
|
||||||
|
|
||||||
.. code-block:: ini
|
[database]
|
||||||
|
...
|
||||||
|
connection = mysql+pymysql://glance:GLANCE_DBPASS@controller/glance
|
||||||
|
|
||||||
[database]
|
Replace ``GLANCE_DBPASS`` with the password you chose for the
|
||||||
...
|
Image service database.
|
||||||
connection = mysql+pymysql://glance:GLANCE_DBPASS@controller/glance
|
|
||||||
|
|
||||||
Replace ``GLANCE_DBPASS`` with the password you chose for the
|
* In the ``[keystone_authtoken]`` and ``[paste_deploy]`` sections,
|
||||||
Image service database.
|
configure Identity service access:
|
||||||
|
|
||||||
* In the ``[keystone_authtoken]`` and ``[paste_deploy]`` sections,
|
.. code-block:: ini
|
||||||
configure Identity service access:
|
|
||||||
|
|
||||||
.. code-block:: ini
|
[keystone_authtoken]
|
||||||
|
...
|
||||||
|
auth_uri = http://controller:5000
|
||||||
|
auth_url = http://controller:35357
|
||||||
|
memcached_servers = controller:11211
|
||||||
|
auth_type = password
|
||||||
|
project_domain_name = default
|
||||||
|
user_domain_name = default
|
||||||
|
project_name = service
|
||||||
|
username = glance
|
||||||
|
password = GLANCE_PASS
|
||||||
|
|
||||||
[keystone_authtoken]
|
[paste_deploy]
|
||||||
...
|
...
|
||||||
auth_uri = http://controller:5000
|
flavor = keystone
|
||||||
auth_url = http://controller:35357
|
|
||||||
memcached_servers = controller:11211
|
|
||||||
auth_type = password
|
|
||||||
project_domain_name = default
|
|
||||||
user_domain_name = default
|
|
||||||
project_name = service
|
|
||||||
username = glance
|
|
||||||
password = GLANCE_PASS
|
|
||||||
|
|
||||||
[paste_deploy]
|
Replace ``GLANCE_PASS`` with the password you chose for the
|
||||||
...
|
``glance`` user in the Identity service.
|
||||||
flavor = keystone
|
|
||||||
|
|
||||||
Replace ``GLANCE_PASS`` with the password you chose for the
|
.. note::
|
||||||
``glance`` user in the Identity service.
|
|
||||||
|
|
||||||
.. note::
|
Comment out or remove any other options in the
|
||||||
|
``[keystone_authtoken]`` section.
|
||||||
|
|
||||||
Comment out or remove any other options in the
|
* In the ``[glance_store]`` section, configure the local file
|
||||||
``[keystone_authtoken]`` section.
|
system store and location of image files:
|
||||||
|
|
||||||
* In the ``[glance_store]`` section, configure the local file
|
.. code-block:: ini
|
||||||
system store and location of image files:
|
|
||||||
|
|
||||||
.. code-block:: ini
|
[glance_store]
|
||||||
|
...
|
||||||
|
stores = file,http
|
||||||
|
default_store = file
|
||||||
|
filesystem_store_datadir = /var/lib/glance/images/
|
||||||
|
|
||||||
[glance_store]
|
3. Edit the ``/etc/glance/glance-registry.conf`` file and complete
|
||||||
...
|
the following actions:
|
||||||
stores = file,http
|
|
||||||
default_store = file
|
|
||||||
filesystem_store_datadir = /var/lib/glance/images/
|
|
||||||
|
|
||||||
3. Edit the ``/etc/glance/glance-registry.conf`` file and complete
|
* In the ``[database]`` section, configure database access:
|
||||||
the following actions:
|
|
||||||
|
|
||||||
* In the ``[database]`` section, configure database access:
|
.. code-block:: ini
|
||||||
|
|
||||||
.. code-block:: ini
|
[database]
|
||||||
|
...
|
||||||
|
connection = mysql+pymysql://glance:GLANCE_DBPASS@controller/glance
|
||||||
|
|
||||||
[database]
|
Replace ``GLANCE_DBPASS`` with the password you chose for the
|
||||||
...
|
Image service database.
|
||||||
connection = mysql+pymysql://glance:GLANCE_DBPASS@controller/glance
|
|
||||||
|
|
||||||
Replace ``GLANCE_DBPASS`` with the password you chose for the
|
* In the ``[keystone_authtoken]`` and ``[paste_deploy]`` sections,
|
||||||
Image service database.
|
configure Identity service access:
|
||||||
|
|
||||||
* In the ``[keystone_authtoken]`` and ``[paste_deploy]`` sections,
|
.. code-block:: ini
|
||||||
configure Identity service access:
|
|
||||||
|
|
||||||
.. code-block:: ini
|
[keystone_authtoken]
|
||||||
|
...
|
||||||
|
auth_uri = http://controller:5000
|
||||||
|
auth_url = http://controller:35357
|
||||||
|
memcached_servers = controller:11211
|
||||||
|
auth_type = password
|
||||||
|
project_domain_name = default
|
||||||
|
user_domain_name = default
|
||||||
|
project_name = service
|
||||||
|
username = glance
|
||||||
|
password = GLANCE_PASS
|
||||||
|
|
||||||
[keystone_authtoken]
|
[paste_deploy]
|
||||||
...
|
...
|
||||||
auth_uri = http://controller:5000
|
flavor = keystone
|
||||||
auth_url = http://controller:35357
|
|
||||||
memcached_servers = controller:11211
|
|
||||||
auth_type = password
|
|
||||||
project_domain_name = default
|
|
||||||
user_domain_name = default
|
|
||||||
project_name = service
|
|
||||||
username = glance
|
|
||||||
password = GLANCE_PASS
|
|
||||||
|
|
||||||
[paste_deploy]
|
Replace ``GLANCE_PASS`` with the password you chose for the
|
||||||
...
|
``glance`` user in the Identity service.
|
||||||
flavor = keystone
|
|
||||||
|
|
||||||
Replace ``GLANCE_PASS`` with the password you chose for the
|
.. note::
|
||||||
``glance`` user in the Identity service.
|
|
||||||
|
|
||||||
.. note::
|
Comment out or remove any other options in the
|
||||||
|
``[keystone_authtoken]`` section.
|
||||||
|
|
||||||
Comment out or remove any other options in the
|
.. only:: rdo or ubuntu or debian
|
||||||
``[keystone_authtoken]`` section.
|
|
||||||
|
|
||||||
.. only:: rdo or ubuntu
|
|
||||||
|
|
||||||
4. Populate the Image service database:
|
4. Populate the Image service database:
|
||||||
|
|
||||||
@ -287,49 +281,26 @@ Install and configure components
|
|||||||
|
|
||||||
Ignore any deprecation messages in this output.
|
Ignore any deprecation messages in this output.
|
||||||
|
|
||||||
.. only:: debian
|
Finalize installation
|
||||||
|
---------------------
|
||||||
|
|
||||||
#. Install the packages:
|
.. only:: obs or rdo
|
||||||
|
|
||||||
|
* Start the Image services and configure them to start when
|
||||||
|
the system boots:
|
||||||
|
|
||||||
|
.. code-block:: console
|
||||||
|
|
||||||
|
# systemctl enable openstack-glance-api.service \
|
||||||
|
openstack-glance-registry.service
|
||||||
|
# systemctl start openstack-glance-api.service \
|
||||||
|
openstack-glance-registry.service
|
||||||
|
|
||||||
|
.. only:: ubuntu or debian
|
||||||
|
|
||||||
|
#. Restart the Image services:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
# apt-get install glance python-glanceclient
|
# service glance-registry restart
|
||||||
|
# service glance-api restart
|
||||||
#. Respond to prompts for debconf.
|
|
||||||
|
|
||||||
.. :doc:`database management <debconf/debconf-dbconfig-common>`,
|
|
||||||
:doc:`Identity service credentials <debconf/debconf-keystone-authtoken>`,
|
|
||||||
:doc:`service endpoint registration <debconf/debconf-api-endpoints>`,
|
|
||||||
and :doc:`message broker credentials <debconf/debconf-rabbitmq>`.
|
|
||||||
|
|
||||||
#. Select the ``keystone`` pipeline to configure the Image service
|
|
||||||
to use the Identity service:
|
|
||||||
|
|
||||||
.. image:: figures/debconf-screenshots/glance-common_pipeline_flavor.png
|
|
||||||
:width: 100%
|
|
||||||
|
|
||||||
.. only:: obs or rdo or ubuntu
|
|
||||||
|
|
||||||
Finalize installation
|
|
||||||
---------------------
|
|
||||||
|
|
||||||
.. only:: obs or rdo
|
|
||||||
|
|
||||||
* Start the Image services and configure them to start when
|
|
||||||
the system boots:
|
|
||||||
|
|
||||||
.. code-block:: console
|
|
||||||
|
|
||||||
# systemctl enable openstack-glance-api.service \
|
|
||||||
openstack-glance-registry.service
|
|
||||||
# systemctl start openstack-glance-api.service \
|
|
||||||
openstack-glance-registry.service
|
|
||||||
|
|
||||||
.. only:: ubuntu
|
|
||||||
|
|
||||||
#. Restart the Image services:
|
|
||||||
|
|
||||||
.. code-block:: console
|
|
||||||
|
|
||||||
# service glance-registry restart
|
|
||||||
# service glance-api restart
|
|
||||||
|
Loading…
Reference in New Issue
Block a user