[Install] Document Nova cells and placement API
With the Ocata release, Nova requires a basic cell_v2 setup and the Placement API service. Change-Id: I3ad1a53ea072f79cbc356248b0b800ddaabd5038 Closes-Bug: #1663485 Closes-Bug: #1669163
This commit is contained in:
parent
ae04134649
commit
d6a9c10445
@ -44,6 +44,10 @@ OpenStack Compute consists of the following areas and their components:
|
||||
from the queue and performs a series of system commands such as
|
||||
launching a KVM instance and updating its state in the database.
|
||||
|
||||
``nova-placement-api`` service
|
||||
Tracks the inventory and usage of each provider. For details, see
|
||||
`Placement API <https://docs.openstack.org/developer/nova/placement.html>`__.
|
||||
|
||||
``nova-scheduler`` service
|
||||
Takes a virtual machine instance request from the queue and
|
||||
determines on which compute server host it runs.
|
||||
|
@ -58,6 +58,8 @@ and their associated references in the guide.
|
||||
- Database password for Compute service
|
||||
* - ``NOVA_PASS``
|
||||
- Password of Compute service user ``nova``
|
||||
* - ``PLACEMENT_PASS``
|
||||
- Password of the Placement service user ``placement``
|
||||
* - ``RABBIT_PASS``
|
||||
- Password of user guest of RabbitMQ
|
||||
|
||||
|
@ -296,6 +296,27 @@ Install and configure components
|
||||
|
||||
.. endonly
|
||||
|
||||
|
||||
* In the ``[placement]`` section, configure the Placement API:
|
||||
|
||||
.. path /etc/nova/nova.conf
|
||||
.. code-block:: ini
|
||||
|
||||
[placement]
|
||||
# ...
|
||||
os_region_name = RegionOne
|
||||
project_domain_name = Default
|
||||
project_name = service
|
||||
auth_type = password
|
||||
user_domain_name = Default
|
||||
auth_url = http://controller:35357/v3
|
||||
username = placement
|
||||
password = PLACEMENT_PASS
|
||||
|
||||
Replace ``PLACEMENT_PASS`` with the password you choose for the
|
||||
``placement`` user in the Identity service. Comment out any other options
|
||||
in the ``[placement]`` section.
|
||||
|
||||
.. only:: obs or debian
|
||||
|
||||
3. Ensure the kernel module ``nbd`` is loaded.
|
||||
@ -411,3 +432,43 @@ Finalize installation
|
||||
the firewall on the controller node is preventing access to port 5672.
|
||||
Configure the firewall to open port 5672 on the controller node and
|
||||
restart ``nova-compute`` service on the compute node.
|
||||
|
||||
Add the compute node to the cell database
|
||||
-----------------------------------------
|
||||
|
||||
.. important::
|
||||
|
||||
Run the following commands on the **controller** node.
|
||||
|
||||
#. Source the admin credentials to enable admin-only CLI commands, then
|
||||
confirm there are compute hosts in the database:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ . admin-openrc
|
||||
|
||||
$ openstack hypervisor list
|
||||
+----+---------------------+-----------------+-----------+-------+
|
||||
| ID | Hypervisor Hostname | Hypervisor Type | Host IP | State |
|
||||
+----+---------------------+-----------------+-----------+-------+
|
||||
| 1 | compute1 | QEMU | 10.0.0.31 | up |
|
||||
+----+---------------------+-----------------+-----------+-------+
|
||||
|
||||
#. Discover compute hosts:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
# su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" nova
|
||||
|
||||
Found 2 cell mappings.
|
||||
Skipping cell0 since it does not contain hosts.
|
||||
Getting compute nodes from cell 'cell1': ad5a5985-a719-4567-98d8-8d148aaae4bc
|
||||
Found 1 computes in cell: ad5a5985-a719-4567-98d8-8d148aaae4bc
|
||||
Checking host mapping for compute host 'compute': fe58ddc1-1d65-4f87-9456-bc040dc106b3
|
||||
Creating host mapping for compute host 'compute': fe58ddc1-1d65-4f87-9456-bc040dc106b3
|
||||
|
||||
.. note::
|
||||
|
||||
When you add new compute nodes, you must run ``nova-manage cell_v2
|
||||
discover_hosts`` on the controller node to register those new compute
|
||||
nodes.
|
||||
|
@ -44,6 +44,7 @@ create databases, service credentials, and API endpoints.
|
||||
|
||||
MariaDB [(none)]> CREATE DATABASE nova_api;
|
||||
MariaDB [(none)]> CREATE DATABASE nova;
|
||||
MariaDB [(none)]> CREATE DATABASE nova_cell0;
|
||||
|
||||
.. end
|
||||
|
||||
@ -55,11 +56,17 @@ create databases, service credentials, and API endpoints.
|
||||
IDENTIFIED BY 'NOVA_DBPASS';
|
||||
MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'%' \
|
||||
IDENTIFIED BY 'NOVA_DBPASS';
|
||||
|
||||
MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' \
|
||||
IDENTIFIED BY 'NOVA_DBPASS';
|
||||
MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' \
|
||||
IDENTIFIED BY 'NOVA_DBPASS';
|
||||
|
||||
MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'localhost' \
|
||||
IDENTIFIED BY 'NOVA_DBPASS';
|
||||
MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'%' \
|
||||
IDENTIFIED BY 'NOVA_DBPASS';
|
||||
|
||||
.. end
|
||||
|
||||
Replace ``NOVA_DBPASS`` with a suitable password.
|
||||
@ -75,14 +82,13 @@ create databases, service credentials, and API endpoints.
|
||||
|
||||
.. end
|
||||
|
||||
#. To create the service credentials, complete these steps:
|
||||
#. Create the Compute service credentials:
|
||||
|
||||
* Create the ``nova`` user:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ openstack user create --domain default \
|
||||
--password-prompt nova
|
||||
$ openstack user create --domain default --password-prompt nova
|
||||
|
||||
User Password:
|
||||
Repeat User Password:
|
||||
@ -130,7 +136,7 @@ create databases, service credentials, and API endpoints.
|
||||
|
||||
.. end
|
||||
|
||||
#. Create the Compute service API endpoints:
|
||||
#. Create the Compute API service endpoints:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
@ -187,6 +193,99 @@ create databases, service credentials, and API endpoints.
|
||||
|
||||
.. end
|
||||
|
||||
#. Create a Placement service user using your chosen ``PLACEMENT_PASS``:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ openstack user create --domain default --password-prompt placement
|
||||
|
||||
User Password:
|
||||
Repeat User Password:
|
||||
+---------------------+----------------------------------+
|
||||
| Field | Value |
|
||||
+---------------------+----------------------------------+
|
||||
| domain_id | default |
|
||||
| enabled | True |
|
||||
| id | fa742015a6494a949f67629884fc7ec8 |
|
||||
| name | placement |
|
||||
| options | {} |
|
||||
| password_expires_at | None |
|
||||
+---------------------+----------------------------------+
|
||||
|
||||
#. Add the Placement user to the service project with the admin role:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ openstack role add --project service --user placement admin
|
||||
|
||||
.. note::
|
||||
|
||||
This command provides no output.
|
||||
|
||||
#. Create the Placement API entry in the service catalog:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ openstack service create --name placement --description "Placement API" placement
|
||||
+-------------+----------------------------------+
|
||||
| Field | Value |
|
||||
+-------------+----------------------------------+
|
||||
| description | Placement API |
|
||||
| enabled | True |
|
||||
| id | 2d1a27022e6e4185b86adac4444c495f |
|
||||
| name | placement |
|
||||
| type | placement |
|
||||
+-------------+----------------------------------+
|
||||
|
||||
#. Create the Placement API service endpoints:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ openstack endpoint create --region RegionOne placement public http://controller:8778
|
||||
+--------------+----------------------------------+
|
||||
| Field | Value |
|
||||
+--------------+----------------------------------+
|
||||
| enabled | True |
|
||||
| id | 2b1b2637908b4137a9c2e0470487cbc0 |
|
||||
| interface | public |
|
||||
| region | RegionOne |
|
||||
| region_id | RegionOne |
|
||||
| service_id | 2d1a27022e6e4185b86adac4444c495f |
|
||||
| service_name | placement |
|
||||
| service_type | placement |
|
||||
| url | http://controller:8778 |
|
||||
+--------------+----------------------------------+
|
||||
|
||||
$ openstack endpoint create --region RegionOne placement internal http://controller:8778
|
||||
+--------------+----------------------------------+
|
||||
| Field | Value |
|
||||
+--------------+----------------------------------+
|
||||
| enabled | True |
|
||||
| id | 02bcda9a150a4bd7993ff4879df971ab |
|
||||
| interface | internal |
|
||||
| region | RegionOne |
|
||||
| region_id | RegionOne |
|
||||
| service_id | 2d1a27022e6e4185b86adac4444c495f |
|
||||
| service_name | placement |
|
||||
| service_type | placement |
|
||||
| url | http://controller:8778 |
|
||||
+--------------+----------------------------------+
|
||||
|
||||
$ openstack endpoint create --region RegionOne placement admin http://controller:8778
|
||||
+--------------+----------------------------------+
|
||||
| Field | Value |
|
||||
+--------------+----------------------------------+
|
||||
| enabled | True |
|
||||
| id | 3d71177b9e0f406f98cbff198d74b182 |
|
||||
| interface | admin |
|
||||
| region | RegionOne |
|
||||
| region_id | RegionOne |
|
||||
| service_id | 2d1a27022e6e4185b86adac4444c495f |
|
||||
| service_name | placement |
|
||||
| service_type | placement |
|
||||
| url | http://controller:8778 |
|
||||
+--------------+----------------------------------+
|
||||
|
||||
Install and configure components
|
||||
--------------------------------
|
||||
|
||||
@ -200,7 +299,8 @@ Install and configure components
|
||||
|
||||
# zypper install openstack-nova-api openstack-nova-scheduler \
|
||||
openstack-nova-conductor openstack-nova-consoleauth \
|
||||
openstack-nova-novncproxy iptables
|
||||
openstack-nova-novncproxy openstack-nova-placement-api \
|
||||
iptables
|
||||
|
||||
.. end
|
||||
|
||||
@ -214,7 +314,7 @@ Install and configure components
|
||||
|
||||
# yum install openstack-nova-api openstack-nova-conductor \
|
||||
openstack-nova-console openstack-nova-novncproxy \
|
||||
openstack-nova-scheduler
|
||||
openstack-nova-scheduler openstack-nova-placement-api
|
||||
|
||||
.. end
|
||||
|
||||
@ -227,7 +327,7 @@ Install and configure components
|
||||
.. code-block:: console
|
||||
|
||||
# apt install nova-api nova-conductor nova-consoleauth \
|
||||
nova-novncproxy nova-scheduler
|
||||
nova-novncproxy nova-scheduler nova-placement-api
|
||||
|
||||
.. end
|
||||
|
||||
@ -476,14 +576,55 @@ Install and configure components
|
||||
|
||||
.. endonly
|
||||
|
||||
.. only:: rdo or ubuntu or debian
|
||||
* In the ``[placement]`` section, configure the Placement API:
|
||||
|
||||
3. Populate the Compute databases:
|
||||
.. path /etc/nova/nova.conf
|
||||
.. code-block:: ini
|
||||
|
||||
[placement]
|
||||
# ...
|
||||
os_region_name = RegionOne
|
||||
project_domain_name = Default
|
||||
project_name = service
|
||||
auth_type = password
|
||||
user_domain_name = Default
|
||||
auth_url = http://controller:35357/v3
|
||||
username = placement
|
||||
password = PLACEMENT_PASS
|
||||
|
||||
Replace ``PLACEMENT_PASS`` with the password you choose for the
|
||||
``placement`` user in the Identity service. Comment out any other options in
|
||||
the ``[placement]`` section.
|
||||
|
||||
.. only:: rdo
|
||||
|
||||
* Due to a `packaging bug
|
||||
<https://bugzilla.redhat.com/show_bug.cgi?id=1430540>`_, you must enable
|
||||
access to the Placement API by adding the following configuration to
|
||||
``/etc/httpd/conf.d/00-nova-placement-api.conf``:
|
||||
|
||||
.. path /etc/httpd/conf.d/00-nova-placement-api.conf
|
||||
.. code-block:: ini
|
||||
|
||||
<Directory /usr/bin>
|
||||
<IfVersion >= 2.4>
|
||||
Require all granted
|
||||
</IfVersion>
|
||||
<IfVersion < 2.4>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</IfVersion>
|
||||
</Directory>
|
||||
|
||||
.. endonly
|
||||
|
||||
.. only:: rdo or ubuntu or debian or obs
|
||||
|
||||
3. Populate the nova-api database:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
# su -s /bin/sh -c "nova-manage api_db sync" nova
|
||||
# su -s /bin/sh -c "nova-manage db sync" nova
|
||||
|
||||
.. end
|
||||
|
||||
@ -491,6 +632,43 @@ Install and configure components
|
||||
|
||||
Ignore any deprecation messages in this output.
|
||||
|
||||
4. Register the ``cell0`` database:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
# su -s /bin/sh -c "nova-manage cell_v2 map_cell0" nova
|
||||
|
||||
.. end
|
||||
|
||||
5. Create the ``cell1`` cell:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
# su -s /bin/sh -c "nova-manage cell_v2 create_cell --name=cell1 --verbose" nova
|
||||
109e1d4b-536a-40d0-83c6-5f121b82b650
|
||||
|
||||
.. end
|
||||
|
||||
6. Populate the nova database:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
# su -s /bin/sh -c "nova-manage db sync" nova
|
||||
|
||||
7. Verify nova cell0 and cell1 are registered correctly:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
# nova-manage cell_v2 list_cells
|
||||
+-------+--------------------------------------+
|
||||
| Name | UUID |
|
||||
+-------+--------------------------------------+
|
||||
| cell1 | 109e1d4b-536a-40d0-83c6-5f121b82b650 |
|
||||
| cell0 | 00000000-0000-0000-0000-000000000000 |
|
||||
+-------+--------------------------------------+
|
||||
|
||||
.. end
|
||||
|
||||
.. endonly
|
||||
|
||||
Finalize installation
|
||||
|
@ -51,31 +51,38 @@ Verify operation of the Compute service.
|
||||
|
||||
$ openstack catalog list
|
||||
|
||||
+----------+----------+-----------------------------------------+
|
||||
| Name | Type | Endpoints |
|
||||
+----------+----------+-----------------------------------------+
|
||||
| keystone | identity | RegionOne |
|
||||
| | | public: http://controller:5000/v3/ |
|
||||
| | | RegionOne |
|
||||
| | | internal: http://controller:5000/v3/ |
|
||||
| | | RegionOne |
|
||||
| | | admin: http://controller:35357/v3/ |
|
||||
| | | |
|
||||
| glance | image | RegionOne |
|
||||
| | | admin: http://controller:9292 |
|
||||
| | | RegionOne |
|
||||
| | | public: http://controller:9292 |
|
||||
| | | RegionOne |
|
||||
| | | internal: http://controller:9292 |
|
||||
| | | |
|
||||
| nova | compute | RegionOne |
|
||||
| | | admin: http://controller:8774/v2.1 |
|
||||
| | | RegionOne |
|
||||
| | | internal: http://controller:8774/v2.1 |
|
||||
| | | RegionOne |
|
||||
| | | public: http://controller:8774/v2.1 |
|
||||
| | | |
|
||||
+----------+----------+-----------------------------------------+
|
||||
+-----------+-----------+-----------------------------------------+
|
||||
| Name | Type | Endpoints |
|
||||
+-----------+-----------+-----------------------------------------+
|
||||
| keystone | identity | RegionOne |
|
||||
| | | public: http://controller:5000/v3/ |
|
||||
| | | RegionOne |
|
||||
| | | internal: http://controller:5000/v3/ |
|
||||
| | | RegionOne |
|
||||
| | | admin: http://controller:35357/v3/ |
|
||||
| | | |
|
||||
| glance | image | RegionOne |
|
||||
| | | admin: http://controller:9292 |
|
||||
| | | RegionOne |
|
||||
| | | public: http://controller:9292 |
|
||||
| | | RegionOne |
|
||||
| | | internal: http://controller:9292 |
|
||||
| | | |
|
||||
| nova | compute | RegionOne |
|
||||
| | | admin: http://controller:8774/v2.1 |
|
||||
| | | RegionOne |
|
||||
| | | internal: http://controller:8774/v2.1 |
|
||||
| | | RegionOne |
|
||||
| | | public: http://controller:8774/v2.1 |
|
||||
| | | |
|
||||
| placement | placement | RegionOne |
|
||||
| | | public: http://controller:8778 |
|
||||
| | | RegionOne |
|
||||
| | | admin: http://controller:8778 |
|
||||
| | | RegionOne |
|
||||
| | | internal: http://controller:8778 |
|
||||
| | | |
|
||||
+-----------+-----------+-----------------------------------------+
|
||||
|
||||
.. note::
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user