openstack Cloud Computing: Openstack rocky Deployment Three nova Computing Node Deployment

Keywords: OpenStack yum SELinux EPEL

Openstack Cloud Computing (2): Openstack Rocky Deployment Tri nova Deployment and Validation (Computing Node)

Tags (space delimited): openstack series

  • First: nova compute node initialization
  • 2: nova Computing Node Configuration

First: nova compute node initialization

1.1 Configuration Host Name

login: 10.0.0.31 

cat /etc/hosts 
---
10.0.0.11   controller
10.0.0.31   computer1
10.0.0.41   block1
10.0.0.51       object1
10.0.0.52       object2
---

1.2 Turn off firewalls and selinux

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

//Close selinux

setenforce 0
getenforce
sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/sysconfig/selinux
grep SELINUX=disabled /etc/sysconfig/selinux

1.3 Configure time synchronization

1)Configuring Time Synchronization Service on Computing Nodes
# Install Time Synchronization Package

yum install chrony -y
2)Edit the profile to confirm the following configuration
vim /etc/chrony.conf
-------------------------------------
# Modify IP of reference control node controller
server 10.0.0.11 iburst
-------------------------------------
3)restart chronyd Service and configure boot-up self-start
systemctl restart chronyd.service
systemctl status chronyd.service
systemctl enable chronyd.service
systemctl list-unit-files |grep chronyd.service
4)Set time zone, first synchronization time
timedatectl set-timezone Asia/Shanghai
chronyc sources -v 
timedatectl status
# The time synchronization configuration is now complete

1.4 Configure related yum sources

Configure Ali Yun's base and epel source

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

//Install warehouse for openstack-rocky
yum install centos-release-openstack-rocky -y
yum clean all
yum makecache
yum update -y
//Install openstack client-side related software
yum install python-openstackclient openstack-selinux -y
yum install openstack-nova-compute python-openstackclient openstack-utils -y

1.5 Profile (/etc/nova/nova.conf)

openstack-config --set  /etc/nova/nova.conf DEFAULT my_ip 10.0.0.31
openstack-config --set  /etc/nova/nova.conf DEFAULT use_neutron True
openstack-config --set  /etc/nova/nova.conf DEFAULT firewall_driver nova.virt.firewall.NoopFirewallDriver
openstack-config --set  /etc/nova/nova.conf DEFAULT enabled_apis  osapi_compute,metadata
openstack-config --set  /etc/nova/nova.conf DEFAULT transport_url  rabbit://openstack:openstack@controller
openstack-config --set  /etc/nova/nova.conf api auth_strategy  keystone 
openstack-config --set  /etc/nova/nova.conf keystone_authtoken auth_url http://controller:5000/v3
openstack-config --set  /etc/nova/nova.conf keystone_authtoken memcached_servers controller:11211
openstack-config --set  /etc/nova/nova.conf keystone_authtoken auth_type password
openstack-config --set  /etc/nova/nova.conf keystone_authtoken project_domain_name default
openstack-config --set  /etc/nova/nova.conf keystone_authtoken user_domain_name default
openstack-config --set  /etc/nova/nova.conf keystone_authtoken project_name  service
openstack-config --set  /etc/nova/nova.conf keystone_authtoken username nova
openstack-config --set  /etc/nova/nova.conf keystone_authtoken password nova
openstack-config --set  /etc/nova/nova.conf vnc enabled True
openstack-config --set  /etc/nova/nova.conf vnc server_listen 0.0.0.0
openstack-config --set  /etc/nova/nova.conf vnc server_proxyclient_address  '$my_ip'
openstack-config --set  /etc/nova/nova.conf vnc novncproxy_base_url  http://controller:6080/vnc_auto.html
openstack-config --set  /etc/nova/nova.conf glance api_servers http://controller:9292
openstack-config --set  /etc/nova/nova.conf oslo_concurrency lock_path /var/lib/nova/tmp
openstack-config --set  /etc/nova/nova.conf placement region_name RegionOne
openstack-config --set  /etc/nova/nova.conf placement project_domain_name Default
openstack-config --set  /etc/nova/nova.conf placement project_name service
openstack-config --set  /etc/nova/nova.conf placement auth_type password
openstack-config --set  /etc/nova/nova.conf placement user_domain_name Default
openstack-config --set  /etc/nova/nova.conf placement auth_url http://controller:5000/v3
openstack-config --set  /etc/nova/nova.conf placement username placement
openstack-config --set  /etc/nova/nova.conf placement password placement

egrep -v "^#|^$" /etc/nova/nova.conf
---
[DEFAULT]
my_ip = 10.0.0.31
use_neutron = True
firewall_driver = nova.virt.firewall.NoopFirewallDriver
enabled_apis = osapi_compute,metadata
transport_url = rabbit://openstack:openstack@controller
log_date_format=%Y-%m-%d %H:%M:%S   ### Open split log
log_file=nova-compute.log           ### Open Log
log_dir=/var/log/nova               ###Open Log Directory
[api]
auth_strategy = keystone
[api_database]
[barbican]
[cache]
[cells]
[cinder]
[compute]
[conductor]
[console]
[consoleauth]
[cors]
[database]
[devices]
[ephemeral_storage_encryption]
[filter_scheduler]
[glance]
api_servers = http://controller:9292
[guestfs]
[healthcheck]
[hyperv]
[ironic]
[key_manager]
[keystone]
[keystone_authtoken]
auth_url = http://controller:5000/v3
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = nova
[libvirt]
virt_type=kvm
[matchmaker_redis]
[metrics]
[mks]
[neutron]
[notifications]
[osapi_v21]
[oslo_concurrency]
lock_path = /var/lib/nova/tmp
[oslo_messaging_amqp]
[oslo_messaging_kafka]
[oslo_messaging_notifications]
[oslo_messaging_rabbit]
[oslo_messaging_zmq]
[oslo_middleware]
[oslo_policy]
[pci]
[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
[placement_database]
[powervm]
[profiler]
[quota]
[rdp]
[remote_debug]
[scheduler]
[serial_console]
[service_user]
[spice]
[upgrade_levels]
[vault]
[vendordata_dynamic_auth]
[vmware]
[vnc]
enabled = True
server_listen = 0.0.0.0
server_proxyclient_address = 10.0.0.31
novncproxy_base_url = http://controller:6080/vnc_auto.html
[workarounds]
[wsgi]
[xenserver]
[xvp]
[zvm]
---

1.6 Configure hardware acceleration for virtual machines

# First determine if your computing node supports hardware acceleration for virtual machines.

egrep -c '(vmx|svm)' /proc/cpuinfo
# If bit 0 is returned, the computing node does not support hardware acceleration and libvirt needs to be configured to manage virtual machines using QEMU, using the following commands:

openstack-config --set  /etc/nova/nova.conf libvirt virt_type  qemu
egrep -v "^#|^$" /etc/nova/nova.conf|grep 'virt_type'
# If returning to another value means that the computing node supports hardware acceleration and 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'

Start the nova-related services and configure them to boot and start themselves
 Two 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

1.7 Increase computing nodes to cell database

# The following commands operate on the control node:

cd /openstack
source keystone-admin-pass.sh 
# Check to confirm that the database has new calculation nodes

openstack compute service list --service nova-compute

Manually add new computing nodes to the openstack cluster

su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" nova

Set up tasks for automatic registration of newly created nodes (added to the configuration file)

vim /etc/nova/nova.conf
---
[scheduler]
discover_hosts_in_cells_interval = 300
---
Now that the compute node is installed, you need to test to check the status of the nova node

1.8 Verify at control node

Reference article: https://docs.openstack.org/nova/rocky/install/compute-install-rdo.html

1) Apply administrator environment variable scripts
cd /openstack
source keystone-admin-pass.sh 
2) List of installed nova service components
 #Verify successful registration and start of each process

openstack compute service list

List API endpoints in the authentication service to verify their connectivity

openstack catalog list

List the connectivity of existing mirrored and checked mirrored services in the mirror service
openstack image list

Check the status of each component of nova

Check that the placement API and cell services are working properly

nova-status upgrade check

At this point, the nova compute node is installed and added to the openstack cluster

Posted by AliceH on Sun, 12 May 2019 01:32:15 -0700