[ Previous: Placement (4/9) ] [ 5/9 : Nova ] [ Next: Neutron (6/9) ]
Create DB for nova services. Execute following in MySQL prompt
create database nova; grant all privileges on nova.* to nova@'localhost' identified by 'password'; grant all privileges on nova.* to nova@'%' identified by 'password'; create database nova_api; grant all privileges on nova_api.* to nova@'localhost' identified by 'password'; grant all privileges on nova_api.* to nova@'%' identified by 'password'; create database nova_cell0; grant all privileges on nova_cell0.* to nova@'localhost' identified by 'password'; grant all privileges on nova_cell0.* to nova@'%' identified by 'password'; flush privileges; exit
Create user account ‘nova’ in the ‘service’ project
openstack user create --domain default --project service --password password nova
Add ‘admin’ role to ‘nova’ user
openstack role add --project service --user nova admin
Create compute service namely ‘nova’
openstack service create --name nova --description "OpenStack Compute Service" compute
Create public, internal, and admin endpoints for computing services
openstack endpoint create --region RegionOne compute public http://10.0.3.1:8774/v2.1/%\(tenant_id\)s openstack endpoint create --region RegionOne compute internal http://10.0.3.1:8774/v2.1/%\(tenant_id\)s openstack endpoint create --region RegionOne compute admin http://10.0.3.1:8774/v2.1/%\(tenant_id\)s
Install packages related to computing service
apt -y install nova-api nova-conductor nova-scheduler nova-novncproxy python3-novaclient
Update the installed default configuration as shown below. You may consider taking a backup of the installed default configuration file /etc/nova/nova.conf and creating a new one with only the following configuration.
[DEFAULT] my_ip = 10.0.3.1 state_path = /var/lib/nova enabled_apis = osapi_compute,metadata log_dir = /var/log/nova transport_url = rabbit://openstack:password@10.0.3.1:5672/ [api] auth_strategy = keystone [glance] api_servers = http://10.0.3.1:9292 [oslo_concurrency] lock_path = $state_path/tmp [api_database] connection = mysql+pymysql://nova:password@10.0.3.1/nova_api [database] connection = mysql+pymysql://nova:password@10.0.3.1/nova [keystone_authtoken] www_authenticate_uri = http://10.0.3.1:5000 auth_url = http://10.0.3.1:5000 memcached_servers = 10.0.3.1:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = nova password = password [placement] auth_url = http://10.0.3.1:5000 os_region_name = RegionOne auth_type = password project_domain_name = default user_domain_name = default project_name = service username = placement password = password [wsgi] api_paste_config = /etc/nova/api-paste.ini [scheduler] discover_hosts_in_cells_interval = 180
If you had created a new configuration file update the access rights
chmod 640 /etc/nova/nova.conf chgrp nova /etc/nova/nova.conf
Populate the nova-api database
su -s /bin/bash nova -c "nova-manage api_db sync"
Create/register cell0 and cell1 DB
su -s /bin/bash nova -c "nova-manage cell_v2 map_cell0" su -s /bin/bash nova -c "nova-manage cell_v2 create_cell --name cell1"
Populate nova DB
su -s /bin/bash nova -c "nova-manage db sync"
Verify registration of cell0 and cell1 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:****@10.0.3.1/nova_cell0 | False | | cell1 | 742af8ac-13c9-43fb-97c6-8eb1f5c22af6 | rabbit://openstack:****@10.0.3.1:5672/ | mysql+pymysql://nova:****@10.0.3.1/nova | False | +-------+--------------------------------------+----------------------------------------+-----------------------------------------------+----------+
Restart nova services and verify
service nova-api restart service nova-scheduler restart service nova-conductor restart openstack compute service list +----+----------------+------------+----------+---------+-------+----------------------------+ | ID | Binary | Host | Zone | Status | State | Updated At | +----+----------------+------------+----------+---------+-------+----------------------------+ | 1 | nova-scheduler | controller | internal | enabled | up | 2021-12-18T05:23:04.000000 | | 2 | nova-conductor | controller | internal | enabled | up | 2021-12-18T05:22:54.000000 | +----+----------------+------------+----------+---------+-------+----------------------------+
Install nova-compute services
apt -y install nova-compute nova-compute-kvm
Amend the nova configuration by updating the [vnc] section with the configuration shown below
[vnc] enabled = True server_listen = 0.0.0.0 server_proxyclient_address = 10.0.3.1 novncproxy_base_url = http://10.0.3.1:6080/vnc_auto.html
Restart nova-compute and vncproxy services
systemctl restart nova-compute nova-novncproxy
Discover the added nova-compute node
su -s /bin/bash nova -c "nova-manage cell_v2 discover_hosts"
Verify
openstack compute service list +----+----------------+------------+----------+---------+-------+----------------------------+ | ID | Binary | Host | Zone | Status | State | Updated At | +----+----------------+------------+----------+---------+-------+----------------------------+ | 1 | nova-scheduler | controller | internal | enabled | up | 2021-12-18T05:28:24.000000 | | 2 | nova-conductor | controller | internal | enabled | up | 2021-12-18T05:28:24.000000 | | 10 | nova-compute | controller | nova | enabled | up | 2021-12-18T05:28:28.000000 | +----+----------------+------------+----------+---------+-------+----------------------------+
[ Previous: Placement (4/9) ] [ 5/9 : Nova ] [ Next: Neutron (6/9) ]