Merge "Update install guide for placement database configuration"

This commit is contained in:
Zuul 2018-07-31 10:32:49 +00:00 committed by Gerrit Code Review
commit 03ccb1f933
3 changed files with 49 additions and 17 deletions

View File

@ -19,13 +19,15 @@ databases, service credentials, and API endpoints.
$ mysql -u root -p $ mysql -u root -p
* Create the ``nova_api``, ``nova``, and ``nova_cell0`` databases: * Create the ``nova_api``, ``nova``, ``nova_cell0``, and ``placement``
databases:
.. code-block:: console .. code-block:: console
MariaDB [(none)]> CREATE DATABASE nova_api; MariaDB [(none)]> CREATE DATABASE nova_api;
MariaDB [(none)]> CREATE DATABASE nova; MariaDB [(none)]> CREATE DATABASE nova;
MariaDB [(none)]> CREATE DATABASE nova_cell0; MariaDB [(none)]> CREATE DATABASE nova_cell0;
MariaDB [(none)]> CREATE DATABASE placement;
* Grant proper access to the databases: * Grant proper access to the databases:
@ -46,7 +48,12 @@ databases, service credentials, and API endpoints.
MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'%' \ MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'%' \
IDENTIFIED BY 'NOVA_DBPASS'; IDENTIFIED BY 'NOVA_DBPASS';
Replace ``NOVA_DBPASS`` with a suitable password. MariaDB [(none)]> GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'localhost' \
IDENTIFIED BY 'PLACEMENT_DBPASS';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'%' \
IDENTIFIED BY 'PLACEMENT_DBPASS';
Replace ``NOVA_DBPASS`` and ``PLACEMENT_DBPASS`` with a suitable password.
* Exit the database access client. * Exit the database access client.
@ -293,8 +300,8 @@ Install and configure components
# ... # ...
enabled_apis = osapi_compute,metadata enabled_apis = osapi_compute,metadata
* In the ``[api_database]`` and ``[database]`` sections, configure database * In the ``[api_database]``, ``[database]``, and ``[placement_database]``
access: sections, configure database access:
.. path /etc/nova/nova.conf .. path /etc/nova/nova.conf
.. code-block:: ini .. code-block:: ini
@ -307,8 +314,12 @@ Install and configure components
# ... # ...
connection = mysql+pymysql://nova:NOVA_DBPASS@controller/nova connection = mysql+pymysql://nova:NOVA_DBPASS@controller/nova
[placement_database]
# ...
connection = mysql+pymysql://placement:PLACEMENT_DBPASS@controller/placement
Replace ``NOVA_DBPASS`` with the password you chose for the Compute Replace ``NOVA_DBPASS`` with the password you chose for the Compute
databases. databases and ``PLACEMENT_DBPASS`` for Placement database.
* In the ``[DEFAULT]`` section, configure ``RabbitMQ`` message queue access: * In the ``[DEFAULT]`` section, configure ``RabbitMQ`` message queue access:
@ -434,7 +445,7 @@ Install and configure components
``placement`` user in the Identity service. Comment out any other options ``placement`` user in the Identity service. Comment out any other options
in the ``[placement]`` section. in the ``[placement]`` section.
#. Populate the ``nova-api`` database: #. Populate the ``nova-api`` and ``placement`` databases:
.. code-block:: console .. code-block:: console

View File

@ -19,13 +19,14 @@ databases, service credentials, and API endpoints.
$ mysql -u root -p $ mysql -u root -p
* Create the ``nova_api``, ``nova``, and ``nova_cell0`` databases: * Create the ``nova_api``, ``nova``, ``nova_cell0``, and ``placement`` databases:
.. code-block:: console .. code-block:: console
MariaDB [(none)]> CREATE DATABASE nova_api; MariaDB [(none)]> CREATE DATABASE nova_api;
MariaDB [(none)]> CREATE DATABASE nova; MariaDB [(none)]> CREATE DATABASE nova;
MariaDB [(none)]> CREATE DATABASE nova_cell0; MariaDB [(none)]> CREATE DATABASE nova_cell0;
MariaDB [(none)]> CREATE DATABASE placement;
* Grant proper access to the databases: * Grant proper access to the databases:
@ -46,7 +47,12 @@ databases, service credentials, and API endpoints.
MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'%' \ MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'%' \
IDENTIFIED BY 'NOVA_DBPASS'; IDENTIFIED BY 'NOVA_DBPASS';
Replace ``NOVA_DBPASS`` with a suitable password. MariaDB [(none)]> GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'localhost' \
IDENTIFIED BY 'PLACEMENT_DBPASS';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'%' \
IDENTIFIED BY 'PLACEMENT_DBPASS';
Replace ``NOVA_DBPASS`` and ``PLACEMENT_DBPASS`` with a suitable password.
* Exit the database access client. * Exit the database access client.
@ -284,8 +290,8 @@ Install and configure components
# ... # ...
enabled_apis = osapi_compute,metadata enabled_apis = osapi_compute,metadata
* In the ``[api_database]`` and ``[database]`` sections, configure database * In the ``[api_database]``, ``[database]``, and ``[placement_database]``
access: sections, configure database access:
.. path /etc/nova/nova.conf .. path /etc/nova/nova.conf
.. code-block:: ini .. code-block:: ini
@ -298,8 +304,12 @@ Install and configure components
# ... # ...
connection = mysql+pymysql://nova:NOVA_DBPASS@controller/nova connection = mysql+pymysql://nova:NOVA_DBPASS@controller/nova
[placement_database]
# ...
connection = mysql+pymysql://placement:PLACEMENT_DBPASS@controller/placement
Replace ``NOVA_DBPASS`` with the password you chose for the Compute Replace ``NOVA_DBPASS`` with the password you chose for the Compute
databases. databases and ``PLACEMENT_DBPASS`` for Placement database.
* In the ``[DEFAULT]`` section, configure ``RabbitMQ`` message queue access: * In the ``[DEFAULT]`` section, configure ``RabbitMQ`` message queue access:
@ -448,7 +458,7 @@ Install and configure components
# systemctl restart httpd # systemctl restart httpd
#. Populate the ``nova-api`` database: #. Populate the ``nova-api`` and ``placement`` databases:
.. code-block:: console .. code-block:: console

View File

@ -19,13 +19,15 @@ databases, service credentials, and API endpoints.
# mysql # mysql
* Create the ``nova_api``, ``nova``, and ``nova_cell0`` databases: * Create the ``nova_api``, ``nova``, ``nova_cell0``, and ``placement``
databases:
.. code-block:: console .. code-block:: console
MariaDB [(none)]> CREATE DATABASE nova_api; MariaDB [(none)]> CREATE DATABASE nova_api;
MariaDB [(none)]> CREATE DATABASE nova; MariaDB [(none)]> CREATE DATABASE nova;
MariaDB [(none)]> CREATE DATABASE nova_cell0; MariaDB [(none)]> CREATE DATABASE nova_cell0;
MariaDB [(none)]> CREATE DATABASE placement;
* Grant proper access to the databases: * Grant proper access to the databases:
@ -46,6 +48,11 @@ databases, service credentials, and API endpoints.
MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'%' \ MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'%' \
IDENTIFIED BY 'NOVA_DBPASS'; IDENTIFIED BY 'NOVA_DBPASS';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'localhost' \
IDENTIFIED BY 'PLACEMENT_DBPASS';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'%' \
IDENTIFIED BY 'PLACEMENT_DBPASS';
Replace ``NOVA_DBPASS`` with a suitable password. Replace ``NOVA_DBPASS`` with a suitable password.
* Exit the database access client. * Exit the database access client.
@ -274,8 +281,8 @@ Install and configure components
#. Edit the ``/etc/nova/nova.conf`` file and complete the following actions: #. Edit the ``/etc/nova/nova.conf`` file and complete the following actions:
* In the ``[api_database]`` and ``[database]`` sections, configure database * In the ``[api_database]``, ``[database]``, and ``[placement_database]``
access: sections, configure database access:
.. path /etc/nova/nova.conf .. path /etc/nova/nova.conf
.. code-block:: ini .. code-block:: ini
@ -288,8 +295,12 @@ Install and configure components
# ... # ...
connection = mysql+pymysql://nova:NOVA_DBPASS@controller/nova connection = mysql+pymysql://nova:NOVA_DBPASS@controller/nova
[placement_database]
# ...
connection = mysql+pymysql://placement:PLACEMENT_DBPASS@controller/placement
Replace ``NOVA_DBPASS`` with the password you chose for the Compute Replace ``NOVA_DBPASS`` with the password you chose for the Compute
databases. databases and ``PLACEMENT_DBPASS`` for Placement database.
* In the ``[DEFAULT]`` section, configure ``RabbitMQ`` message queue access: * In the ``[DEFAULT]`` section, configure ``RabbitMQ`` message queue access:
@ -418,7 +429,7 @@ Install and configure components
``placement`` user in the Identity service. Comment out any other options ``placement`` user in the Identity service. Comment out any other options
in the ``[placement]`` section. in the ``[placement]`` section.
#. Populate the nova-api database: #. Populate the ``nova-api`` and ``placement`` databases:
.. code-block:: console .. code-block:: console