On the controller node :
Create the databases for Nova services
CREATE DATABASE nova_api;
CREATE DATABASE nova;
CREATE DATABASE nova_cell0;
GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'%' IDENTIFIED BY 'password';
exit
Create the nova
user account and assign admin role
. admin-openrc
openstack user create --domain default --password-prompt nova openstack role add --project homelab --user nova admin
Create service entitry and service end points
openstack service create --name nova --description "OpenStack Compute" compute
openstack endpoint create --region RegionOne compute public http://controller:8774/v2.1
openstack endpoint create --region RegionOne compute internal http://controller:8774/v2.1
openstack endpoint create --region RegionOne compute admin http://controller:8774/v2.1
Install the packages
apt install -y nova-api nova-conductor nova-novncproxy nova-scheduler
Update /etc/nova/nova.conf
with following configurations in respective sections
[api_database]
connection = mysql+pymysql://nova:password@controller/nova_api
[database]
connection = mysql+pymysql://nova:password@controller/nova
[DEFAULT]
transport_url = rabbit://openstack:password@controller:5672/
my_ip = 10.99.1.3
use_neutron = true
firewall_driver = nova.virt.firewall.NoopFirewallDriver
[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 = homelab
username = nova
password = password
[vnc]
enabled = true
server_listen = 0.0.0.0
server_proxyclient_address = $my_ip
novncproxy_base_url = http://controller:6080/vnc_auto.html
[glance]
api_servers = http://controller:9292
[oslo_concurrency]
lock_path = /var/lib/nova/tmp
[placement]
region_name = RegionOne
project_domain_name = Default
project_name = homelab
auth_type = password
user_domain_name = Default
auth_url = http://controller:5000/v3
username = placement
password = password
Note : Had to remove all the other commented lines to avoid a parse error in placement section.
Populate the nova-api, cell0, cell1 and nova
databases
su -s /bin/sh -c "nova-manage cell_v2 map_cell0" nova
su -s /bin/sh -c "nova-manage cell_v2 create_cell --name=cell1 --verbose" nova
su -s /bin/sh -c "nova-manage db sync" nova
su -s /bin/sh -c "nova-manage cell_v2 list_cells" nova
Restart the services
service nova-api restart
service nova-scheduler restart
service nova-conductor restart
service nova-novncproxy restart
Enable nova services to start on host startup.
systemctl enable nova-api nova-scheduler nova-conductor nova-novncproxy
On the compute node :
Note : You could make your controller node also to be a compute -node.
Install nova-compute service
apt install -y nova-compute
If server does not support hardware acceleration update the following configuration in /etc/nova/nova-compute.conf
In my case server supported – hence no configuration changes were done.
[libvirt]
virt_type = qemu
If you are installing nova-compute on a separate host other than the controller node, then update /etc/nova/nova.conf
with following configurations in respective sections
[api_database]
connection = mysql+pymysql://nova:password@controller/nova_api
[database]
connection = mysql+pymysql://nova:password@controller/nova
[DEFAULT]
transport_url = rabbit://openstack:password@controller:5672/
# The IP should be the management IP of the hosting node.
# Typically if you are reading this section then you are installing on a node other than controller node
# and hence the Ip should be of the compute node.
my_ip = 10.99.1.4
use_neutron = true
firewall_driver = nova.virt.firewall.NoopFirewallDriver
[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 = homelab
username = nova
password = password
[vnc]
enabled = true
server_listen = 0.0.0.0
server_proxyclient_address = $my_ip
novncproxy_base_url = http://controller:6080/vnc_auto.html
[glance]
api_servers = http://controller:9292
[oslo_concurrency]
lock_path = /var/lib/nova/tmp
[placement]
region_name = RegionOne
project_domain_name = Default
project_name = homelab
auth_type = password
user_domain_name = Default
auth_url = http://controller:5000/v3
username = placement
password = password
Restart nova-compute service
service nova-compute restart
On the controller node :
Let the compute node be added to cell database and then discover compute hosts
. admin-openrc
su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" nova
openstack compute service list --service nova-compute