after creating the service entity for Identity service and compute service. Change-Id: I79bc67ae0dd14e8f67273502228844babbbf7a94 Closes-Bug: #1604723
13 KiB
Install and configure controller node
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_apiandnovadatabases:CREATE DATABASE nova_api; CREATE DATABASE nova;Grant proper access to the databases:
GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'localhost' \ IDENTIFIED BY 'NOVA_DBPASS'; GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'%' \ IDENTIFIED BY 'NOVA_DBPASS'; GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' \ IDENTIFIED BY 'NOVA_DBPASS'; GRANT ALL PRIVILEGES ON nova.* 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-openrcTo create the service credentials, complete these steps:
Create the
novauser:$ openstack user create --domain default \ --password-prompt nova User Password: Repeat User Password: +-----------+----------------------------------+ | Field | Value | +-----------+----------------------------------+ | domain_id | e0353a670a9e496da891347c589539e9 | | enabled | True | | id | 8c46e4760902464b889293a74a0c90a8 | | name | nova | +-----------+----------------------------------+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 service API endpoints:
$ openstack endpoint create --region RegionOne \ compute public http://controller:8774/v2.1/%\(tenant_id\)s +--------------+-------------------------------------------+ | 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/%(tenant_id)s | +--------------+-------------------------------------------+ $ openstack endpoint create --region RegionOne \ compute internal http://controller:8774/v2.1/%\(tenant_id\)s +--------------+-------------------------------------------+ | 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/%(tenant_id)s | +--------------+-------------------------------------------+ $ openstack endpoint create --region RegionOne \ compute admin http://controller:8774/v2.1/%\(tenant_id\)s +--------------+-------------------------------------------+ | 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/%(tenant_id)s | +--------------+-------------------------------------------+
Install and configure components
obs
Install the packages:
# zypper install openstack-nova-api openstack-nova-scheduler \ openstack-nova-conductor openstack-nova-consoleauth \ openstack-nova-novncproxy iptables
rdo
Install the packages:
# yum install openstack-nova-api openstack-nova-conductor \ openstack-nova-console openstack-nova-novncproxy \ openstack-nova-scheduler
ubuntu
Install the packages:
# apt-get install nova-api nova-conductor nova-consoleauth \ nova-novncproxy nova-scheduler
debian
Install the packages:
# apt-get install nova-api nova-conductor nova-consoleauth \ nova-consoleproxy nova-schedulerNote
nova-api-metadatais included in thenova-apipackage, and can be selected through debconf.Note
A unique
nova-consoleproxypackage provides thenova-novncproxy,nova-spicehtml5proxy, andnova-xvpvncproxypackages. To select packages, edit the/etc/default/nova-consoleproxyfile or use the debconf interface. You can also manually edit the/etc/default/nova-consoleproxyfile, and stop and start the console daemons.
Edit 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]and[oslo_messaging_rabbit]sections, configureRabbitMQmessage queue access:[DEFAULT] ... rpc_backend = rabbit [oslo_messaging_rabbit] ... rabbit_host = controller rabbit_userid = openstack rabbit_password = RABBIT_PASSReplace
RABBIT_PASSwith the password you chose for theopenstackaccount inRabbitMQ.In the
[DEFAULT]and[keystone_authtoken]sections, configure Identity service access:[DEFAULT] ... auth_strategy = keystone [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 = 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.11
debian
The
.configand.postinstmaintainer scripts of thenova-commonpackage detect automatically the IP address which goes in themy_ipdirective of the[DEFAULT]section. This value will normally still be prompted, and you can check that it is correct in the nova.conf afternova-commonis installed:[DEFAULT] ... my_ip = 10.0.0.11
In the
[DEFAULT]section, enable support for the Networking service:[DEFAULT] ... use_neutron = True firewall_driver = nova.virt.firewall.NoopFirewallDriverNote
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.NoopFirewallDriverfirewall driver.In the
[vnc]section, configure the VNC proxy to use the management interface IP address of the controller node:[vnc] ... vncserver_listen = $my_ip vncserver_proxyclient_address = $my_ipIn the
[glance]section, configure the location of the Image service API:[glance] ... api_servers = http://controller:9292
obs
In the
[oslo_concurrency]section, configure the lock path:[oslo_concurrency] ... lock_path = /var/run/nova
rdo
In the
[oslo_concurrency]section, configure the lock path:[oslo_concurrency] ... lock_path = /var/lib/nova/tmp
ubuntu
In the
[oslo_concurrency]section, configure the lock path:[oslo_concurrency] ... lock_path = /var/lib/nova/tmp
ubuntu
- Due to a packaging bug, remove the
logdiroption from the[DEFAULT]section.
rdo or ubuntu or debian
Populate the Compute databases:
# su -s /bin/sh -c "nova-manage api_db sync" nova # su -s /bin/sh -c "nova-manage db sync" novaNote
Ignore any deprecation messages in this output.
Finalize installation
obs
Start the Compute services and configure them to start when the system boots:
# systemctl enable openstack-nova-api.service \ openstack-nova-consoleauth.service openstack-nova-scheduler.service \ openstack-nova-conductor.service openstack-nova-novncproxy.service # systemctl start openstack-nova-api.service \ openstack-nova-consoleauth.service openstack-nova-scheduler.service \ openstack-nova-conductor.service openstack-nova-novncproxy.service
rdo
Start the Compute services and configure them to start when the system boots:
# systemctl enable openstack-nova-api.service \ openstack-nova-consoleauth.service openstack-nova-scheduler.service \ openstack-nova-conductor.service openstack-nova-novncproxy.service # systemctl start openstack-nova-api.service \ openstack-nova-consoleauth.service openstack-nova-scheduler.service \ openstack-nova-conductor.service openstack-nova-novncproxy.service
ubuntu or debian
Restart the Compute services:
# service nova-api restart # service nova-consoleauth restart # service nova-scheduler restart # service nova-conductor restart # service nova-novncproxy restart