diff --git a/doc/source/index.rst b/doc/source/index.rst index b5f9d92ce..19c99431f 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -47,6 +47,8 @@ For an overview of some of the features provided by placement, see For a command line reference, see :doc:`cli/index`. +For installation, see the :doc:`installation reference `. + See the :doc:`Configuration Guide ` for information on configuring the system, including role-based access control policy rules. @@ -249,8 +251,11 @@ This history of placement microversions may be found in contributor/api-ref-guideline contributor/goals contributor/quick-dev + install/index + install/from-pypi install/controller-install-obs install/controller-install-rdo install/controller-install-ubuntu + install/verify placement-api-microversion-history usage/index diff --git a/doc/source/install/controller-install-obs.rst b/doc/source/install/controller-install-obs.rst index b4ca8951d..9e29d7d88 100644 --- a/doc/source/install/controller-install-obs.rst +++ b/doc/source/install/controller-install-obs.rst @@ -1,16 +1,16 @@ Install and configure controller node for openSUSE and SUSE Linux Enterprise ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This section describes how to install and configure the Compute service, -code-named nova, on the controller node. +This section describes how to install and configure the placement service on +the controller node. Prerequisites ------------- -Before you install and configure the Compute service, you must create -databases, service credentials, and API endpoints. +Before you install and configure the placement service, you must create +a database, service credentials, and API endpoints. -#. To create the databases, complete these steps: +#. To create the database, complete these steps: * Use the database access client to connect to the database server as the ``root`` user: @@ -19,41 +19,22 @@ databases, service credentials, and API endpoints. $ mysql -u root -p - * Create the ``nova_api``, ``nova``, ``nova_cell0``, and ``placement`` - databases: + * Create the ``placement`` database: .. code-block:: console - MariaDB [(none)]> CREATE DATABASE nova_api; - MariaDB [(none)]> CREATE DATABASE nova; - MariaDB [(none)]> CREATE DATABASE nova_cell0; MariaDB [(none)]> CREATE DATABASE placement; * Grant proper access to the databases: .. code-block:: console - MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'localhost' \ - 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'; - 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. + Replace ``PLACEMENT_DBPASS`` with a suitable password. * Exit the database access client. @@ -63,109 +44,6 @@ databases, service credentials, and API endpoints. $ . admin-openrc -#. Create the Compute service credentials: - - * Create the ``nova`` user: - - .. code-block:: console - - $ openstack user create --domain default --password-prompt nova - - User Password: - Repeat User Password: - +---------------------+----------------------------------+ - | Field | Value | - +---------------------+----------------------------------+ - | domain_id | default | - | enabled | True | - | id | 8a7dbf5279404537b1c7b86c033620fe | - | name | nova | - | options | {} | - | password_expires_at | None | - +---------------------+----------------------------------+ - - * Add the ``admin`` role to the ``nova`` user: - - .. code-block:: console - - $ openstack role add --project service --user nova admin - - .. note:: - - This command provides no output. - - * Create the ``nova`` service entity: - - .. code-block:: console - - $ openstack service create --name nova \ - --description "OpenStack Compute" compute - - +-------------+----------------------------------+ - | Field | Value | - +-------------+----------------------------------+ - | description | OpenStack Compute | - | enabled | True | - | id | 060d59eac51b4594815603d75a00aba2 | - | name | nova | - | type | compute | - +-------------+----------------------------------+ - -#. Create the Compute API service endpoints: - - .. code-block:: console - - $ openstack endpoint create --region RegionOne \ - compute public http://controller:8774/v2.1 - - +--------------+-------------------------------------------+ - | Field | Value | - +--------------+-------------------------------------------+ - | enabled | True | - | id | 3c1caa473bfe4390a11e7177894bcc7b | - | interface | public | - | region | RegionOne | - | region_id | RegionOne | - | service_id | 060d59eac51b4594815603d75a00aba2 | - | service_name | nova | - | service_type | compute | - | url | http://controller:8774/v2.1 | - +--------------+-------------------------------------------+ - - $ openstack endpoint create --region RegionOne \ - compute internal http://controller:8774/v2.1 - - +--------------+-------------------------------------------+ - | Field | Value | - +--------------+-------------------------------------------+ - | enabled | True | - | id | e3c918de680746a586eac1f2d9bc10ab | - | interface | internal | - | region | RegionOne | - | region_id | RegionOne | - | service_id | 060d59eac51b4594815603d75a00aba2 | - | service_name | nova | - | service_type | compute | - | url | http://controller:8774/v2.1 | - +--------------+-------------------------------------------+ - - $ openstack endpoint create --region RegionOne \ - compute admin http://controller:8774/v2.1 - - +--------------+-------------------------------------------+ - | Field | Value | - +--------------+-------------------------------------------+ - | enabled | True | - | id | 38f7af91666a47cfb97b4dc790b94424 | - | interface | admin | - | region | RegionOne | - | region_id | RegionOne | - | service_id | 060d59eac51b4594815603d75a00aba2 | - | service_name | nova | - | service_type | compute | - | url | http://controller:8774/v2.1 | - +--------------+-------------------------------------------+ - #. Create a Placement service user using your chosen ``PLACEMENT_PASS``: .. code-block:: console @@ -275,68 +153,37 @@ Install and configure components .. note:: As of the Newton release, SUSE OpenStack packages are shipped with the - upstream default configuration files. For example, ``/etc/nova/nova.conf`` - has customizations in ``/etc/nova/nova.conf.d/010-nova.conf``. While the - following instructions modify the default configuration file, adding a new - file in ``/etc/nova/nova.conf.d`` achieves the same result. + upstream default configuration files. For example, + ``/etc/placement/placement.conf`` has customizations in + ``/etc/placement/placement.conf.d/010-placement.conf``. While the following + instructions modify the default configuration file, adding a new file in + ``/etc/placement/placement.conf.d`` achieves the same result. #. Install the packages: .. code-block:: console - # zypper install openstack-nova-api openstack-nova-scheduler \ - openstack-nova-conductor openstack-nova-novncproxy \ - openstack-nova-placement-api iptables + # zypper install openstack-placement-api -#. Edit the ``/etc/nova/nova.conf`` file and complete the following actions: +#. Edit the ``/etc/placement/placement.conf`` file and complete the following + actions: - * In the ``[DEFAULT]`` section, enable only the compute and metadata - APIs: + * In the ``[placement_database]`` section, configure database access: - .. path /etc/nova/nova.conf + .. path /etc/placement/placement.conf .. code-block:: ini - [DEFAULT] - # ... - enabled_apis = osapi_compute,metadata - - * In the ``[api_database]``, ``[database]``, and ``[placement_database]`` - sections, configure database access: - - .. path /etc/nova/nova.conf - .. code-block:: ini - - [api_database] - # ... - connection = mysql+pymysql://nova:NOVA_DBPASS@controller/nova_api - - [database] - # ... - 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 - databases and ``PLACEMENT_DBPASS`` for Placement database. - - * In the ``[DEFAULT]`` section, configure ``RabbitMQ`` message queue access: - - .. path /etc/nova/nova.conf - .. code-block:: ini - - [DEFAULT] - # ... - transport_url = rabbit://openstack:RABBIT_PASS@controller - - Replace ``RABBIT_PASS`` with the password you chose for the ``openstack`` - account in ``RabbitMQ``. + Replace ``PLACEMENT_DBPASS`` with the password you chose for the + placement database. * In the ``[api]`` and ``[keystone_authtoken]`` sections, configure Identity service access: - .. path /etc/nova/nova.conf + .. path /etc/placement/placement.conf .. code-block:: ini [api] @@ -351,141 +198,27 @@ Install and configure components project_domain_name = default user_domain_name = default project_name = service - username = nova - password = NOVA_PASS + username = placement + password = PLACEMENT_PASS - Replace ``NOVA_PASS`` with the password you chose for the ``nova`` user in - the Identity service. + Replace ``PLACEMENT_PASS`` with the password you chose for the + ``placement`` user in the Identity service. .. note:: Comment out or remove any other options in the ``[keystone_authtoken]`` section. - * In the ``[DEFAULT]`` section, configure the ``my_ip`` option to use the - management interface IP address of the controller node: - - .. path /etc/nova/nova.conf - .. code-block:: ini - - [DEFAULT] - # ... - my_ip = 10.0.0.11 - - * In the ``[DEFAULT]`` section, enable support for the Networking service: - - .. path /etc/nova/nova.conf - .. code-block:: ini - - [DEFAULT] - # ... - use_neutron = true - firewall_driver = nova.virt.firewall.NoopFirewallDriver - - .. note:: - - By default, Compute uses an internal firewall driver. Since the - Networking service includes a firewall driver, you must disable the - Compute firewall driver by using the - ``nova.virt.firewall.NoopFirewallDriver`` firewall driver. - - * Configure the ``[neutron]`` section of **/etc/nova/nova.conf**. Refer to - the :neutron-doc:`Networking service install guide - ` - for more details. - - * In the ``[vnc]`` section, configure the VNC proxy to use the management - interface IP address of the controller node: - - .. path /etc/nova/nova.conf - .. code-block:: ini - - [vnc] - enabled = true - # ... - server_listen = $my_ip - server_proxyclient_address = $my_ip - - * In the ``[glance]`` section, configure the location of the Image service - API: - - .. path /etc/nova/nova.conf - .. code-block:: ini - - [glance] - # ... - api_servers = http://controller:9292 - - * In the ``[oslo_concurrency]`` section, configure the lock path: - - .. path /etc/nova/nova.conf - .. code-block:: ini - - [oslo_concurrency] - # ... - lock_path = /var/run/nova - - * In the ``[placement]`` section, configure the Placement API: - - .. path /etc/nova/nova.conf - .. code-block:: ini - - [placement] - # ... - region_name = RegionOne - project_domain_name = Default - project_name = service - auth_type = password - user_domain_name = Default - auth_url = http://controller:5000/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. - -#. Populate the ``nova-api`` and ``placement`` databases: +#. Populate the ``placement`` database: .. code-block:: console - # su -s /bin/sh -c "nova-manage api_db sync" nova + # su -s /bin/sh -c "placement-manage db sync" placement .. note:: Ignore any deprecation messages in this output. -#. Register the ``cell0`` database: - - .. code-block:: console - - # su -s /bin/sh -c "nova-manage cell_v2 map_cell0" nova - -#. 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 - -#. Populate the nova database: - - .. code-block:: console - - # su -s /bin/sh -c "nova-manage db sync" nova - -#. Verify nova cell0 and cell1 are registered correctly: - - .. code-block:: console - - # su -s /bin/sh -c "nova-manage cell_v2 list_cells" nova - +-------+--------------------------------------+ - | Name | UUID | - +-------+--------------------------------------+ - | cell1 | 109e1d4b-536a-40d0-83c6-5f121b82b650 | - | cell0 | 00000000-0000-0000-0000-000000000000 | - +-------+--------------------------------------+ - Finalize installation --------------------- @@ -493,17 +226,6 @@ Finalize installation .. code-block:: console - # mv /etc/apache2/vhosts.d/nova-placement-api.conf.sample \ - /etc/apache2/vhosts.d/nova-placement-api.conf + # mv /etc/apache2/vhosts.d/placement-api.conf.sample \ + /etc/apache2/vhosts.d/placement-api.conf # systemctl reload apache2.service - -* Start the Compute services and configure them to start when the system boots: - - .. code-block:: console - - # systemctl enable openstack-nova-api.service \ - openstack-nova-scheduler.service openstack-nova-conductor.service \ - openstack-nova-novncproxy.service - # systemctl start openstack-nova-api.service \ - openstack-nova-scheduler.service openstack-nova-conductor.service \ - openstack-nova-novncproxy.service diff --git a/doc/source/install/controller-install-rdo.rst b/doc/source/install/controller-install-rdo.rst index 803646121..203ecd984 100644 --- a/doc/source/install/controller-install-rdo.rst +++ b/doc/source/install/controller-install-rdo.rst @@ -1,14 +1,14 @@ Install and configure controller node for Red Hat Enterprise Linux and CentOS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This section describes how to install and configure the Compute service, -code-named nova, on the controller node. +This section describes how to install and configure the placement service on +the controller node. Prerequisites ------------- -Before you install and configure the Compute service, you must create -databases, service credentials, and API endpoints. +Before you install and configure the placement service, you must create +a database, service credentials, and API endpoints. #. To create the databases, complete these steps: @@ -19,40 +19,22 @@ databases, service credentials, and API endpoints. $ mysql -u root -p - * Create the ``nova_api``, ``nova``, ``nova_cell0``, and ``placement`` databases: + * Create the ``placement`` database: .. code-block:: console - MariaDB [(none)]> CREATE DATABASE nova_api; - MariaDB [(none)]> CREATE DATABASE nova; - MariaDB [(none)]> CREATE DATABASE nova_cell0; MariaDB [(none)]> CREATE DATABASE placement; - * Grant proper access to the databases: + * Grant proper access to the database: .. code-block:: console - MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'localhost' \ - 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'; - 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. + Replace ``PLACEMENT_DBPASS`` with a suitable password. * Exit the database access client. @@ -62,109 +44,6 @@ databases, service credentials, and API endpoints. $ . admin-openrc -#. Create the Compute service credentials: - - * Create the ``nova`` user: - - .. code-block:: console - - $ openstack user create --domain default --password-prompt nova - - User Password: - Repeat User Password: - +---------------------+----------------------------------+ - | Field | Value | - +---------------------+----------------------------------+ - | domain_id | default | - | enabled | True | - | id | 8a7dbf5279404537b1c7b86c033620fe | - | name | nova | - | options | {} | - | password_expires_at | None | - +---------------------+----------------------------------+ - - * Add the ``admin`` role to the ``nova`` user: - - .. code-block:: console - - $ openstack role add --project service --user nova admin - - .. note:: - - This command provides no output. - - * Create the ``nova`` service entity: - - .. code-block:: console - - $ openstack service create --name nova \ - --description "OpenStack Compute" compute - - +-------------+----------------------------------+ - | Field | Value | - +-------------+----------------------------------+ - | description | OpenStack Compute | - | enabled | True | - | id | 060d59eac51b4594815603d75a00aba2 | - | name | nova | - | type | compute | - +-------------+----------------------------------+ - -#. Create the Compute API service endpoints: - - .. code-block:: console - - $ openstack endpoint create --region RegionOne \ - compute public http://controller:8774/v2.1 - - +--------------+-------------------------------------------+ - | Field | Value | - +--------------+-------------------------------------------+ - | enabled | True | - | id | 3c1caa473bfe4390a11e7177894bcc7b | - | interface | public | - | region | RegionOne | - | region_id | RegionOne | - | service_id | 060d59eac51b4594815603d75a00aba2 | - | service_name | nova | - | service_type | compute | - | url | http://controller:8774/v2.1 | - +--------------+-------------------------------------------+ - - $ openstack endpoint create --region RegionOne \ - compute internal http://controller:8774/v2.1 - - +--------------+-------------------------------------------+ - | Field | Value | - +--------------+-------------------------------------------+ - | enabled | True | - | id | e3c918de680746a586eac1f2d9bc10ab | - | interface | internal | - | region | RegionOne | - | region_id | RegionOne | - | service_id | 060d59eac51b4594815603d75a00aba2 | - | service_name | nova | - | service_type | compute | - | url | http://controller:8774/v2.1 | - +--------------+-------------------------------------------+ - - $ openstack endpoint create --region RegionOne \ - compute admin http://controller:8774/v2.1 - - +--------------+-------------------------------------------+ - | Field | Value | - +--------------+-------------------------------------------+ - | enabled | True | - | id | 38f7af91666a47cfb97b4dc790b94424 | - | interface | admin | - | region | RegionOne | - | region_id | RegionOne | - | service_id | 060d59eac51b4594815603d75a00aba2 | - | service_name | nova | - | service_type | compute | - | url | http://controller:8774/v2.1 | - +--------------+-------------------------------------------+ - #. Create a Placement service user using your chosen ``PLACEMENT_PASS``: .. code-block:: console @@ -275,58 +154,27 @@ Install and configure components .. code-block:: console - # yum install openstack-nova-api openstack-nova-conductor \ - openstack-nova-console openstack-nova-novncproxy \ - openstack-nova-scheduler openstack-nova-placement-api + # yum install openstack-placement-api -#. Edit the ``/etc/nova/nova.conf`` file and complete the following actions: +#. Edit the ``/etc/placement/placement.conf`` file and complete the following + actions: - * In the ``[DEFAULT]`` section, enable only the compute and metadata APIs: + * In the ``[placement_database]`` section, configure database access: - .. path /etc/nova/nova.conf + .. path /etc/placement/placement.conf .. code-block:: ini - [DEFAULT] - # ... - enabled_apis = osapi_compute,metadata - - * In the ``[api_database]``, ``[database]``, and ``[placement_database]`` - sections, configure database access: - - .. path /etc/nova/nova.conf - .. code-block:: ini - - [api_database] - # ... - connection = mysql+pymysql://nova:NOVA_DBPASS@controller/nova_api - - [database] - # ... - 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 - databases and ``PLACEMENT_DBPASS`` for Placement database. - - * In the ``[DEFAULT]`` section, configure ``RabbitMQ`` message queue access: - - .. path /etc/nova/nova.conf - .. code-block:: ini - - [DEFAULT] - # ... - transport_url = rabbit://openstack:RABBIT_PASS@controller - - Replace ``RABBIT_PASS`` with the password you chose for the ``openstack`` - account in ``RabbitMQ``. + Replace ``PLACEMENT_DBPASS`` with the password you chose for the placement + database. * In the ``[api]`` and ``[keystone_authtoken]`` sections, configure Identity service access: - .. path /etc/nova/nova.conf + .. path /etc/placement/placement.conf .. code-block:: ini [api] @@ -341,174 +189,32 @@ Install and configure components project_domain_name = default user_domain_name = default project_name = service - username = nova - password = NOVA_PASS + username = placement + password = PLACEMENT_PASS - Replace ``NOVA_PASS`` with the password you chose for the ``nova`` user in - the Identity service. + Replace ``PLACEMENT_PASS`` with the password you chose for the + ``placement`` user in the Identity service. .. note:: Comment out or remove any other options in the ``[keystone_authtoken]`` section. - * In the ``[DEFAULT]`` section, configure the ``my_ip`` option to use the - management interface IP address of the controller node: - - .. path /etc/nova/nova.conf - .. code-block:: ini - - [DEFAULT] - # ... - my_ip = 10.0.0.11 - - * In the ``[DEFAULT]`` section, enable support for the Networking service: - - .. path /etc/nova/nova.conf - .. code-block:: ini - - [DEFAULT] - # ... - use_neutron = true - firewall_driver = nova.virt.firewall.NoopFirewallDriver - - .. note:: - - By default, Compute uses an internal firewall driver. Since the - Networking service includes a firewall driver, you must disable the - Compute firewall driver by using the - ``nova.virt.firewall.NoopFirewallDriver`` firewall driver. - - * Configure the ``[neutron]`` section of **/etc/nova/nova.conf**. Refer to - the :neutron-doc:`Networking service install guide - ` for more details. - - * In the ``[vnc]`` section, configure the VNC proxy to use the management - interface IP address of the controller node: - - .. path /etc/nova/nova.conf - .. code-block:: ini - - [vnc] - enabled = true - # ... - server_listen = $my_ip - server_proxyclient_address = $my_ip - - * In the ``[glance]`` section, configure the location of the Image service - API: - - .. path /etc/nova/nova.conf - .. code-block:: ini - - [glance] - # ... - api_servers = http://controller:9292 - - * In the ``[oslo_concurrency]`` section, configure the lock path: - - .. path /etc/nova/nova.conf - .. code-block:: ini - - [oslo_concurrency] - # ... - lock_path = /var/lib/nova/tmp - - * In the ``[placement]`` section, configure the Placement API: - - .. path /etc/nova/nova.conf - .. code-block:: ini - - [placement] - # ... - region_name = RegionOne - project_domain_name = Default - project_name = service - auth_type = password - user_domain_name = Default - auth_url = http://controller:5000/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. - - * Due to a `packaging bug - `_, 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 - - - = 2.4> - Require all granted - - - Order allow,deny - Allow from all - - - - * Restart the httpd service: - - .. code-block:: console - - # systemctl restart httpd - -#. Populate the ``nova-api`` and ``placement`` databases: +#. Populate the ``placement`` database: .. code-block:: console - # su -s /bin/sh -c "nova-manage api_db sync" nova + # su -s /bin/sh -c "placement-manage db sync" placement .. note:: Ignore any deprecation messages in this output. -#. Register the ``cell0`` database: - - .. code-block:: console - - # su -s /bin/sh -c "nova-manage cell_v2 map_cell0" nova - -#. 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 - -#. Populate the nova database: - - .. code-block:: console - - # su -s /bin/sh -c "nova-manage db sync" nova - -#. Verify nova cell0 and cell1 are registered correctly: - - .. code-block:: console - - # su -s /bin/sh -c "nova-manage cell_v2 list_cells" nova - +-------+--------------------------------------+ - | Name | UUID | - +-------+--------------------------------------+ - | cell1 | 109e1d4b-536a-40d0-83c6-5f121b82b650 | - | cell0 | 00000000-0000-0000-0000-000000000000 | - +-------+--------------------------------------+ - Finalize installation --------------------- -* Start the Compute services and configure them to start when the system boots: +* Restart the httpd service: - .. code-block:: console + .. code-block:: console - # systemctl enable openstack-nova-api.service \ - openstack-nova-scheduler.service openstack-nova-conductor.service \ - openstack-nova-novncproxy.service - # systemctl start openstack-nova-api.service \ - openstack-nova-scheduler.service openstack-nova-conductor.service \ - openstack-nova-novncproxy.service + # systemctl restart httpd diff --git a/doc/source/install/controller-install-ubuntu.rst b/doc/source/install/controller-install-ubuntu.rst index 1b0925443..8fdef4cd8 100644 --- a/doc/source/install/controller-install-ubuntu.rst +++ b/doc/source/install/controller-install-ubuntu.rst @@ -1,16 +1,16 @@ Install and configure controller node for Ubuntu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This section describes how to install and configure the Compute service, -code-named nova, on the controller node. +This section describes how to install and configure the placement service on +the controller node. Prerequisites ------------- -Before you install and configure the Compute service, you must create -databases, service credentials, and API endpoints. +Before you install and configure the placement service, you must create +a database, service credentials, and API endpoints. -#. To create the databases, complete these steps: +#. To create the database, complete these steps: * Use the database access client to connect to the database server as the ``root`` user: @@ -19,41 +19,22 @@ databases, service credentials, and API endpoints. # mysql - * Create the ``nova_api``, ``nova``, ``nova_cell0``, and ``placement`` - databases: + * Create the ``placement`` database: .. code-block:: console - MariaDB [(none)]> CREATE DATABASE nova_api; - MariaDB [(none)]> CREATE DATABASE nova; - MariaDB [(none)]> CREATE DATABASE nova_cell0; MariaDB [(none)]> CREATE DATABASE placement; - * Grant proper access to the databases: + * Grant proper access to the database: .. code-block:: console - MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'localhost' \ - 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'; - 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 ``PLACEMENT_DBPASS`` with a suitable password. * Exit the database access client. @@ -63,109 +44,6 @@ databases, service credentials, and API endpoints. $ . admin-openrc -#. Create the Compute service credentials: - - * Create the ``nova`` user: - - .. code-block:: console - - $ openstack user create --domain default --password-prompt nova - - User Password: - Repeat User Password: - +---------------------+----------------------------------+ - | Field | Value | - +---------------------+----------------------------------+ - | domain_id | default | - | enabled | True | - | id | 8a7dbf5279404537b1c7b86c033620fe | - | name | nova | - | options | {} | - | password_expires_at | None | - +---------------------+----------------------------------+ - - * Add the ``admin`` role to the ``nova`` user: - - .. code-block:: console - - $ openstack role add --project service --user nova admin - - .. note:: - - This command provides no output. - - * Create the ``nova`` service entity: - - .. code-block:: console - - $ openstack service create --name nova \ - --description "OpenStack Compute" compute - - +-------------+----------------------------------+ - | Field | Value | - +-------------+----------------------------------+ - | description | OpenStack Compute | - | enabled | True | - | id | 060d59eac51b4594815603d75a00aba2 | - | name | nova | - | type | compute | - +-------------+----------------------------------+ - -#. Create the Compute API service endpoints: - - .. code-block:: console - - $ openstack endpoint create --region RegionOne \ - compute public http://controller:8774/v2.1 - - +--------------+-------------------------------------------+ - | Field | Value | - +--------------+-------------------------------------------+ - | enabled | True | - | id | 3c1caa473bfe4390a11e7177894bcc7b | - | interface | public | - | region | RegionOne | - | region_id | RegionOne | - | service_id | 060d59eac51b4594815603d75a00aba2 | - | service_name | nova | - | service_type | compute | - | url | http://controller:8774/v2.1 | - +--------------+-------------------------------------------+ - - $ openstack endpoint create --region RegionOne \ - compute internal http://controller:8774/v2.1 - - +--------------+-------------------------------------------+ - | Field | Value | - +--------------+-------------------------------------------+ - | enabled | True | - | id | e3c918de680746a586eac1f2d9bc10ab | - | interface | internal | - | region | RegionOne | - | region_id | RegionOne | - | service_id | 060d59eac51b4594815603d75a00aba2 | - | service_name | nova | - | service_type | compute | - | url | http://controller:8774/v2.1 | - +--------------+-------------------------------------------+ - - $ openstack endpoint create --region RegionOne \ - compute admin http://controller:8774/v2.1 - - +--------------+-------------------------------------------+ - | Field | Value | - +--------------+-------------------------------------------+ - | enabled | True | - | id | 38f7af91666a47cfb97b4dc790b94424 | - | interface | admin | - | region | RegionOne | - | region_id | RegionOne | - | service_id | 060d59eac51b4594815603d75a00aba2 | - | service_name | nova | - | service_type | compute | - | url | http://controller:8774/v2.1 | - +--------------+-------------------------------------------+ - #. Create a Placement service user using your chosen ``PLACEMENT_PASS``: .. code-block:: console @@ -276,48 +154,27 @@ Install and configure components .. code-block:: console - # apt install nova-api nova-conductor nova-novncproxy nova-scheduler \ - nova-placement-api + # apt install placement-api -#. Edit the ``/etc/nova/nova.conf`` file and complete the following actions: +#. Edit the ``/etc/placement/placement.conf`` file and complete the following + actions: - * In the ``[api_database]``, ``[database]``, and ``[placement_database]`` - sections, configure database access: + * In the ``[placement_database]`` section, configure database access: - .. path /etc/nova/nova.conf + .. path /etc/placement/placement.conf .. code-block:: ini - [api_database] - # ... - connection = mysql+pymysql://nova:NOVA_DBPASS@controller/nova_api - - [database] - # ... - 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 - databases and ``PLACEMENT_DBPASS`` for Placement database. - - * In the ``[DEFAULT]`` section, configure ``RabbitMQ`` message queue access: - - .. path /etc/nova/nova.conf - .. code-block:: ini - - [DEFAULT] - # ... - transport_url = rabbit://openstack:RABBIT_PASS@controller - - Replace ``RABBIT_PASS`` with the password you chose for the ``openstack`` - account in ``RabbitMQ``. + Replace ``PLACEMENT_DBPASS`` with the password you chose for the placement + database. * In the ``[api]`` and ``[keystone_authtoken]`` sections, configure Identity service access: - .. path /etc/nova/nova.conf + .. path /etc/placement/placement.conf .. code-block:: ini [api] @@ -332,152 +189,34 @@ Install and configure components project_domain_name = default user_domain_name = default project_name = service - username = nova - password = NOVA_PASS + username = placement + password = PLACEMENT_PASS - Replace ``NOVA_PASS`` with the password you chose for the ``nova`` user in - the Identity service. + Replace ``PLACEMENT_PASS`` with the password you chose for the + ``placement`` user in the Identity service. .. note:: Comment out or remove any other options in the ``[keystone_authtoken]`` section. - * In the ``[DEFAULT]`` section, configure the ``my_ip`` option to use the - management interface IP address of the controller node: - - .. path /etc/nova/nova.conf - .. code-block:: ini - - [DEFAULT] - # ... - my_ip = 10.0.0.11 - - * In the ``[DEFAULT]`` section, enable support for the Networking service: - - .. path /etc/nova/nova.conf - .. code-block:: ini - - [DEFAULT] - # ... - use_neutron = true - firewall_driver = nova.virt.firewall.NoopFirewallDriver - - .. note:: - - By default, Compute uses an internal firewall driver. Since the - Networking service includes a firewall driver, you must disable the - Compute firewall driver by using the - ``nova.virt.firewall.NoopFirewallDriver`` firewall driver. - - * Configure the ``[neutron]`` section of **/etc/nova/nova.conf**. Refer to - the :neutron-doc:`Networking service install guide - ` - for more information. - - * In the ``[vnc]`` section, configure the VNC proxy to use the management - interface IP address of the controller node: - - .. path /etc/nova/nova.conf - .. code-block:: ini - - [vnc] - enabled = true - # ... - server_listen = $my_ip - server_proxyclient_address = $my_ip - - * In the ``[glance]`` section, configure the location of the Image service - API: - - .. path /etc/nova/nova.conf - .. code-block:: ini - - [glance] - # ... - api_servers = http://controller:9292 - - * In the ``[oslo_concurrency]`` section, configure the lock path: - - .. path /etc/nova/nova.conf - .. code-block:: ini - - [oslo_concurrency] - # ... - lock_path = /var/lib/nova/tmp - - * Due to a packaging bug, remove the ``log_dir`` option from the - ``[DEFAULT]`` section. - - * In the ``[placement]`` section, configure the Placement API: - - .. path /etc/nova/nova.conf - .. code-block:: ini - - [placement] - # ... - region_name = RegionOne - project_domain_name = Default - project_name = service - auth_type = password - user_domain_name = Default - auth_url = http://controller:5000/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. - -#. Populate the ``nova-api`` and ``placement`` databases: +#. Populate the ``placement`` database: .. code-block:: console - # su -s /bin/sh -c "nova-manage api_db sync" nova + # su -s /bin/sh -c "placement-manage db sync" placement .. note:: Ignore any deprecation messages in this output. -#. Register the ``cell0`` database: - - .. code-block:: console - - # su -s /bin/sh -c "nova-manage cell_v2 map_cell0" nova - -#. 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 - -#. Populate the nova database: - - .. code-block:: console - - # su -s /bin/sh -c "nova-manage db sync" nova - -#. Verify nova cell0 and cell1 are registered correctly: - - .. code-block:: console - - # su -s /bin/sh -c "nova-manage cell_v2 list_cells" nova - +-------+--------------------------------------+ - | Name | UUID | - +-------+--------------------------------------+ - | cell1 | 109e1d4b-536a-40d0-83c6-5f121b82b650 | - | cell0 | 00000000-0000-0000-0000-000000000000 | - +-------+--------------------------------------+ Finalize installation --------------------- -* Restart the Compute services: +* Reload the web server to adjust to get new configuration settings for + placement. .. code-block:: console - # service nova-api restart - # service nova-scheduler restart - # service nova-conductor restart - # service nova-novncproxy restart + # service apache2 restart diff --git a/doc/source/install/from-pypi.rst b/doc/source/install/from-pypi.rst new file mode 100644 index 000000000..8d174d2a7 --- /dev/null +++ b/doc/source/install/from-pypi.rst @@ -0,0 +1,10 @@ +================= +Install From PyPI +================= + +.. TODO:: + + Write up docs on how to do an install from pypi, both with and without + keystone. When they are ready, make sure to add this file to the table + of contents in install/index.rst. + diff --git a/doc/source/install/index.rst b/doc/source/install/index.rst new file mode 100644 index 000000000..a88c22bd5 --- /dev/null +++ b/doc/source/install/index.rst @@ -0,0 +1,29 @@ +================= +Placement Service +================= + +.. warning:: These installation documents are a work in progress. Some of the + distribution packages mentioned are not yet available so the + instructions **will not work**. + +The placement service provides an `HTTP API`_ used to track resource provider +inventories and usages. More detail can be found at the :doc:`placement +overview `. + +Placement operates as a web service over a data model. Installation involves +creating the necessary database and installing and configuring the web service. +This is a straightforward process, but there are quite a few steps to integrate +placement with the rest of an OpenStack cloud. + +.. note:: Placement is required by some of the other OpenStack services, + notably nova, therefore it should be installed before those other + services but after Identity (keystone). + +.. toctree:: + :maxdepth: 1 + + controller-install-obs.rst + controller-install-rdo.rst + controller-install-ubuntu.rst + +.. _HTTP API: https://developer.openstack.org/api-ref/placement/ diff --git a/doc/source/install/verify.rst b/doc/source/install/verify.rst new file mode 100644 index 000000000..35494c492 --- /dev/null +++ b/doc/source/install/verify.rst @@ -0,0 +1,10 @@ +=================== +Verify Installation +=================== + +.. TODO:: + + Document how to ensure that yup, we made it work. One option is listing + resource providers after the service is up, but that's not ideal because + nova is installed after placement. When these docs are ready, make sure + to add this file to the table of contents in install/index.rst.