[Draft Version - Continuous Update] OpenStack Ussuri Version Installation Series - 6.2 Compute Node - Nova Compute Service Component

Compute node computing service Nova installation

Official reference link:

OpenStack Installation Guide: Install OpenStack services

OpenStack Ussuri Installation Guides

Compute service

CSDN link:

8 Openstack-Ussuri-Nova computing node deployment-centos8

6.2 Compute Node - Nova Compute Service Component

1. Installation and configuration of Nova related software

1. Install nova software

yum install openstack-nova-compute -y
yum install python3-openstackclient openstack-selinux -y
#for quick configuration
#yum install openstack-utils -y 

2. Configuration file modification

/etc/nova/nova.conf
Back up the configuration file before modifying the file

cd
cp /etc/nova/nova.conf /etc/nova/nova.conf.bak
egrep -v "^$|^#" /etc/nova/nova.conf.bak >/etc/nova/nova.conf

/etc/nova/nova.conf file content

vim /etc/nova/nova.conf
[DEFAULT]
# ...
enabled_apis = osapi_compute,metadata
my_ip = 192.168.139.111
transport_url =rabbit://openstack:openstack@controller:5672/
use_neutron = true 
firewall_driver = nova.virt.firewall.NoopFirewallDriver

#osapi_compute_listen=$my_ip
#osapi_compute_listen_port=8774
#metadata_listen=$my_ip
#metadata_listen_port=8775

[api_database]
# ...
connection = mysql+pymysql://nova:nova@controller/nova_api

[database]
# ...
connection = mysql+pymysql://nova:nova@controller/nova

[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

[vnc]
enabled = true
server_listen = 0.0.0.0
server_proxyclient_address = $my_ip
novncproxy_base_url = http://controller:6080/vnc_auto.html
#novncproxy_host=$my_ip
#novncproxy_port=6080

[glance]
# ...
api_servers = http://controller:9292

[oslo_concurrency]
# ...
lock_path = /var/lib/nova/tmp

[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
echo "Result of Configuration"
egrep -v "^#|^$" /etc/nova/nova.conf

Note: Configure the [neutron] section of /etc/nova/nova.conf. Refer to the Networking service install guide for more details.
The server component listens to the IP addresses of all network cards of the local machine, and the proxy component only listens to the IP address of the local machine as the management network interface of the computing node.
After the installation is complete, pay attention to the modification: novncproxy_base_url is the IP address, and the IP address is the provider address. When there are multiple IP addresses other than the management network, select the appropriate one as the external access address.

openstack-config --set  /etc/nova/nova.conf vnc novncproxy_base_url  http://192.168.232.101:6080/vnc_auto.html

3. Confirm whether the computing node supports hardware acceleration of virtual machines

First determine whether your compute node supports hardware acceleration of virtual machines,

egrep -c '(vmx|svm)' /proc/cpuinfo

①If the return value is 0, it means that the computing node does not support hardware acceleration, and you need to configure libvirt to use QEMU, use the following command:

openstack-config --set  /etc/nova/nova.conf libvirt virt_type  qemu
egrep -v "^#|^$" /etc/nova/nova.conf|grep 'virt_type'

In addition, if you build OpenStack in VMware, you also need to configure libvirt as qemu.
②If the return value is another value, it means that the computing node supports hardware acceleration and usually does not require additional configuration, use the following command:

openstack-config --set  /etc/nova/nova.conf libvirt virt_type  kvm 
egrep -v "^#|^$" /etc/nova/nova.conf|grep 'virt_type'
vim /etc/nova/nova.conf
-----
[libvirt]
# ...
virt_type = kvm
----

4. Start the computing service and configure it to start automatically after booting

2 services need to be started

systemctl start libvirtd.service openstack-nova-compute.service 
systemctl status libvirtd.service openstack-nova-compute.service
systemctl enable libvirtd.service openstack-nova-compute.service
systemctl list-unit-files |grep libvirtd.service
systemctl list-unit-files |grep openstack-nova-compute.service

Notice:
(1) If the nova-compute service fails to start, please check /var/log/nova/nova-compute.log.
This error message may indicate that the firewall on the controller node is blocking access to port 5672. Configure the controller node firewall to open port 5672 on the controller node and restart the service on the compute node.
(2) Control node

systemctl stop firewalld.service
systemctl disable firewalld.service
systemctl status firewalld.service

systemctl restart rabbit_server.service
systemctl restart rabbitmq-server.service
systemctl status rabbitmq-server.service
firewall-cmd --zone=public --add-port=5672/tcp --permanent
systemctl restart firewalld
firewall-cmd --zone=public --query-port=5672/tcp

2. Add the compute node to the unit database

Please open the next installation tutorial document.

Tags: OpenStack cloud serving iaas

Posted by xtops on Fri, 03 Jun 2022 21:21:43 +0530