Placement service has to be installed and configured with user and endpoints before Nova installation. But in stein release it is not mentioned in the prerequisites of Nova. Added reference to Placement installation guide in the prerequisites section of nova installation guide. Change-Id: I6af43a24dc5b3575016f092268d98cc720249d93 Closes-Bug: #1829032
13 KiB
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.
Prerequisites
Before you install and configure the Compute service, you must create databases, service credentials, and API endpoints.
To create the databases, complete these steps:
Use the database access client to connect to the database server as the
rootuser:$ mysql -u root -pCreate the
nova_api,nova, andnova_cell0databases:MariaDB [(none)]> CREATE DATABASE nova_api; MariaDB [(none)]> CREATE DATABASE nova; MariaDB [(none)]> CREATE DATABASE nova_cell0;Grant proper access to the databases:
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';Replace
NOVA_DBPASSwith a suitable password.Exit the database access client.
Source the
admincredentials to gain access to admin-only CLI commands:$ . admin-openrcCreate the Compute service credentials:
Create the
novauser:$ 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
adminrole to thenovauser:$ openstack role add --project service --user nova adminNote
This command provides no output.
Create the
novaservice entity:$ 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:
$ 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 | +--------------+-------------------------------------------+Install Placement service and configure user and endpoints:
- Refer to the
Placement service install guide <install/install-rdo.html#configure-user-and-endpoints>for more information.
- Refer to the
Install and configure components
Install the packages:
# yum install openstack-nova-api openstack-nova-conductor \ openstack-nova-novncproxy openstack-nova-schedulerEdit the
/etc/nova/nova.conffile and complete the following actions:In the
[DEFAULT]section, enable only the compute and metadata APIs:[DEFAULT] # ... enabled_apis = osapi_compute,metadataIn the
[api_database]and[database]sections, configure database access:[api_database] # ... connection = mysql+pymysql://nova:NOVA_DBPASS@controller/nova_api [database] # ... connection = mysql+pymysql://nova:NOVA_DBPASS@controller/novaReplace
NOVA_DBPASSwith the password you chose for the Compute databases.In the
[DEFAULT]section, configureRabbitMQmessage queue access:[DEFAULT] # ... transport_url = rabbit://openstack:RABBIT_PASS@controller:5672/Replace
RABBIT_PASSwith the password you chose for theopenstackaccount inRabbitMQ.In the
[api]and[keystone_authtoken]sections, configure Identity service access:[api] # ... auth_strategy = keystone [keystone_authtoken] # ... www_authenticate_uri = http://controller:5000/ auth_url = http://controller:5000/ memcached_servers = controller:11211 auth_type = password project_domain_name = Default user_domain_name = Default project_name = service username = nova password = NOVA_PASSReplace
NOVA_PASSwith the password you chose for thenovauser in the Identity service.Note
Comment out or remove any other options in the
[keystone_authtoken]section.In the
[DEFAULT]section, configure themy_ipoption to use the management interface IP address of the controller node:[DEFAULT] # ... my_ip = 10.0.0.11Configure the
[neutron]section of /etc/nova/nova.conf. Refer to theNetworking service install guide <install/compute-install-rdo.html>for more details.In the
[vnc]section, configure the VNC proxy to use the management interface IP address of the controller node:[vnc] enabled = true # ... server_listen = $my_ip server_proxyclient_address = $my_ipIn the
[glance]section, configure the location of the Image service API:[glance] # ... api_servers = http://controller:9292In the
[oslo_concurrency]section, configure the lock path:[oslo_concurrency] # ... lock_path = /var/lib/nova/tmpIn the
[placement]section, configure access to the Placement service:[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_PASSReplace
PLACEMENT_PASSwith the password you choose for theplacementservice user created when installingPlacement <install/>. Comment out or remove any other options in the[placement]section.
Populate the
nova-apidatabase:# su -s /bin/sh -c "nova-manage api_db sync" novaNote
Ignore any deprecation messages in this output.
Register the
cell0database:# su -s /bin/sh -c "nova-manage cell_v2 map_cell0" novaCreate the
cell1cell:# su -s /bin/sh -c "nova-manage cell_v2 create_cell --name=cell1 --verbose" novaPopulate the nova database:
# su -s /bin/sh -c "nova-manage db sync" novaVerify nova cell0 and cell1 are registered correctly:
# su -s /bin/sh -c "nova-manage cell_v2 list_cells" nova +-------+--------------------------------------+----------------------------------------------------+--------------------------------------------------------------+----------+ | Name | UUID | Transport URL | Database Connection | Disabled | +-------+--------------------------------------+----------------------------------------------------+--------------------------------------------------------------+----------+ | cell0 | 00000000-0000-0000-0000-000000000000 | none:/ | mysql+pymysql://nova:****@controller/nova_cell0?charset=utf8 | False | | cell1 | f690f4fd-2bc5-4f15-8145-db561a7b9d3d | rabbit://openstack:****@controller:5672/nova_cell1 | mysql+pymysql://nova:****@controller/nova_cell1?charset=utf8 | False | +-------+--------------------------------------+----------------------------------------------------+--------------------------------------------------------------+----------+
Finalize installation
Start the Compute services and configure them to start when the system boots:
# 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