General Contents

Nova details and installation

1. Component description

1. What is Nova?

Openstack is a cloud computing platform jointly developed by Rackspace and NASA. Nova is a cloud infrastructure service similar to AmazonEC2 and S3 that provides cloud computing services in Openstack. More than 140 enterprises and 18,470 developers participated in the development

2. Nova components

Nova-api Service receives and responds to end user computing API calls. The service supports the OpenStack computing API, Amazon EC2, and the special administrative privilege API nova-api-Metadata service to accept requests from instance metadata. The nova-network service runs the same daemon as the Nova-network service in multi-host installation mode to create and terminate VM instances through the API of the virtualization layer. For example: the XenAPIforXenServer/XCP, libvirtforKVM or QEMU, VMwareAPIforThe Vmware OVA-Scheduler Service obtains the VM instance request from the queue and determines which computing service is running the VM nova-conductormoduleCoordinates the interaction data between the nova-compute service and the database. Avoid nova-compute service accessing the cloud database directly. Do not deploy this module on nova-compute nodes where nova-compute runs. The nova-network worker daemon is similar to the nova-compute service that accepts network tasks from queues and manipulates networks. The nova-consoleauth Daemon provides user authorization tokens on the console proxy. Nova-novncproxy Daemon provides a proxy to access running virtual machine instances over VNC connections. Nova-spicehtml5proxy Daemon supports the browser-based NOVNC client nova-Spicehtml5Proxy Daemon, which provides a proxy to access running virtual machine instances through spice connections. The browser-based HTML5 client nova-xvpNvncProxy Daemon provides a proxy to access running virtual machine instances over VNC connections. Support for openstack-specific Java client nova-cert Daemon x509 nova-ObjectStore daemon Nova client Nova command line tool The Queue Is used to transfer messages between processes. RabbitMQ SQL Database is usually used to store the status information when the cloud infrastructure setup is up and runningCopy the code

2. Component workflow

1. Position order

The engine sends it to Libvirt, a virtualization management platform that creates virtual machines using Libvirt

2. Nova internal communication

3. Nova communicates with other components

3. Construction experiment

1[root@compute ~]# cat /etc/hosts127.0. 01.   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168222.. 5 controller.nice.com
192.168222.6. network.nice.com
192.168222.10. compute1.nice.com
192.168222.20. block1.nice.com
2[root@compute ~]# yum install -y ntpdate [root@compute ~]# ntpdate -u controller.nice.com24 Jul 09:07:13 ntpdate[11003]: step time server 192.168222.. 5 offset 9415.809954SEC [root@compute ~]# crontab -e # min, hour, day, month, week, year */1 * * * * ntpdate -u controller.nice.com &> /dev/null

[root@compute ~]# systemctl restart crond
[root@compute ~]# systemctl enable crond
Copy the code
1. Configure the Controller node
1[root@controller ~]# mysql-uroot -pa Welcome to the MariaDB monitor. Commands endwith ; or \g.
Your MariaDB connection id is 22
Server version: 5.537.-MariaDB MariaDB Server

Copyright (c) 2000.2014, Oracle, Monty Program Ab and others.

Type 'help; ' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> CREATE DATABASE nova;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' IDENTIFIED BY 'NOVA_DBPASS';
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova.* TO 'nova'@The '%' IDENTIFIED BY 'NOVA_DBPASS';
Query OK, 0 rows affected (0.00sec) MariaDB [(none)]> exit Bye [root@controller ~]# source admin-openrc.sh [root@controller ~]# keystone user-create --name nova --pass NOVA_PASS +----------+----------------------------------+ | Property | Value | +----------+----------------------------------+ | email | | | enabled | True | | id | dc2dd2a42a84495d9f6373465ffbd971 |  | name | nova | | username | nova | +----------+----------------------------------+ [root@controller ~]# keystone user-role-add --user nova --tenant service --role admin [root@controller ~]# keystone service-create --name nova --type compute --description"OpenStackCompute"+-------------+----------------------------------+ | Property | Value | +-------------+----------------------------------+ | description | OpenStackCompute | | enabled | True | | id | 83dffa8f523446b3b39066bca8039d96 | | name | nova | | type | compute | +-------------+----------------------------------+  [root@controller ~]# keystone endpoint-create \ > --service-id $(keystone service-list |awk'/compute/{print $2}')\
> --publicurl http://controller.nice.com:8774/v2/%\(tenant_id\)s \
> --internalurl http://controller.nice.com:8774/v2/%\(tenant_id\)s \
> --adminurl http://controller.nice.com:8774/v2/%\(tenant_id\)s \
> --region regionOne
+-------------+--------------------------------------------------+
|   Property  |                      Value                       |
+-------------+--------------------------------------------------+
|   adminurl  | http://controller.nice.com:8774/v2/%(tenant_id)s |
|      id     |         6c9721728da34340bec08af358f418e3         |
| internalurl | http://controller.nice.com:8774/v2/%(tenant_id)s |
|  publicurl  | http://controller.nice.com:8774/v2/%(tenant_id)s |
|    region   |                    regionOne                     |
|  service_id |         83dffa8f523446b3b39066bca8039d96         |
+-------------+--------------------------------------------------+

[root@controller ~]# yum install openstack-nova-api openstack-nova-cert openstack-nova-conductor openstack-nova-console openstack-nova-novncproxy openstack-nova-scheduler python-novaclient

2[root@controller ~]# vim /etc/nova/nova.conf a Edit the [Database] section to configure database access: [database]... connection = mysql://nova:[email protected]/novaB. Edit [DEFAULT] to configure RabbitMQ message queue access: [DEFAULT]... rpc_backend= rabbitrabbit_host= controller.nice.com rabbit_password= RABBIT_PASS c. Edit [DEFAULT] and [keystone_AuthToken] sections to configure the authentication service [DEFAULT]... auth_strategy= keystone [keystone_authtoken] ... auth_uri= http:/ / controller.nice.com: 5000 / v2.0
identity_uri= http://controller.nice.com:35357admin_tenant_name= service admin_user= nova admin_password= NOVA_PASS d. Edit the [DEFAULT] section and set the my_IP option to the management interface IP address of the Controller node :[DEFAULT]... my_ip=192.1681.. 5E. Edit [DEFAULT] to configure the management interface IP address for the Controller node to use the VNCdialing Service. vncserver_listen=192.1681.. 5
vncserver_proxyclient_address= 192.1681.. 5F. Edit the [Glance] section to configure the image server location: [glance]... Host = controller.nice.comg. (Optional) Configure detailed log output in section [DEFAULT]. Convenient for sorting errors. [DEFAULT] ... verbose = True3[root@controller ~]# su -s /bin/sh -c"nova-manage db sync"[root@controller ~]# systemctl start openstack-nova-api.service openstack-nova-cert.service openstack-nova-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.service [root@controller ~]# systemctl enable openstack-nova-api.service openstack-nova-cert.service openstack-nova-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.service ln -s'/usr/lib/systemd/system/openstack-nova-api.service' '/etc/systemd/system/multi-user.target.wants/openstack-nova-api.service'
ln -s '/usr/lib/systemd/system/openstack-nova-cert.service' '/etc/systemd/system/multi-user.target.wants/openstack-nova-cert.service'
ln -s '/usr/lib/systemd/system/openstack-nova-consoleauth.service' '/etc/systemd/system/multi-user.target.wants/openstack-nova-consoleauth.service'
ln -s '/usr/lib/systemd/system/openstack-nova-scheduler.service' '/etc/systemd/system/multi-user.target.wants/openstack-nova-scheduler.service'
ln -s '/usr/lib/systemd/system/openstack-nova-conductor.service' '/etc/systemd/system/multi-user.target.wants/openstack-nova-conductor.service'
ln -s '/usr/lib/systemd/system/openstack-nova-novncproxy.service' '/etc/systemd/system/multi-user.target.wants/openstack-nova-novncproxy.service'
Copy the code
2. Configure the compute node
1# yum install openstack-nova-compute sysfsutils [root@controller ~]# vim /etc/nova/nova.conf Edit the [DEFAULT] section to configure RabbitMQ message queue access: [DEFAULT]... rpc_backend= rabbit rabbit_host= controller.nice.com rabbit_password= RABBIT_PASS b. Edit the [DEFAULT] and [keystone_authToken] sections to configure authentication service access: [DEFAULT]... auth_strategy= keystone [keystone_authtoken] ... auth_uri= http:/ / controller.nice.com: 5000 / v2.0
identity_uri= http://controller.nice.com:35357admin_tenant_name= service admin_user= nova admin_password= NOVA_PASS c. Edit the [DEFAULT] section to configure the my_ip configuration item: [DEFAULT]... my_ip= MANAGEMENT_INTERFACE_IP_ADDRESS d. Edit the [DEFAULT] section to enable and configure remote console access to [DEFAULT]... vnc_enabled= True vncserver_listen=0.0. 0. 0
vncserver_proxyclient_address= MANAGEMENT_INTERFACE_IP_ADDRESS
novncproxy_base_url= http://controller.nice.com:6080/vnc_auto.htmlE. Edit the [glance] section to configure the image server location [glance]... Host = controller.nice.com f. (Optional) Configure detailed log output in section [DEFAULT]. Convenient for sorting errors. [DEFAULT] ... Verbose = True Completes the installation1Check whether your compute node supports hardware virtualization'(vmx|svm)'/proc/cpuinfo If >= is returned1"Indicates that the hardware of your compute node supports virtualization and no additional configuration is required. If the return value =0If your compute node hardware does not support virtualization, you must configure libvirt to use QEMU instead of KVM. Edit [libvirt] in the [libvirt] section [libvirt] in /etc/nova.conf. virt_type= qemu2, start computing services and dependent services, and set them to start automatically upon startup. # systemctlenable libvirtd.serviceopenstack-nova-compute.service# systemctlstart libvirtd.service# systemctlstart openstack-nova-compute.serviceCopy the code

4, test,

[root@controller ~]# source admin-openrc.sh [root@controller ~]# nova service-list +----+------------------+---------------------+----------+---------+-------+----------------------------+--------------- --+ | Id | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason | +----+------------------+---------------------+----------+---------+-------+----------------------------+--------------- --+ |1  | nova-scheduler   | controller.nice.com | internal | enabled | up    | 2020-07-24T14:36:43.000000 | -               |
| 2  | nova-consoleauth | controller.nice.com | internal | enabled | up    | 2020-07-24T14:36:43.000000 | -               |
| 3  | nova-conductor   | controller.nice.com | internal | enabled | up    | 2020-07-24T14:36:43.000000 | -               |
| 4  | nova-cert        | controller.nice.com | internal | enabled | up    | 2020-07-24T14:36:44.000000 | -               |
| 5  | nova-compute     | compute1.nice.com   | nova     | enabled | up    | 2020-07-24T14:36:46.000000| - | +----+------------------+---------------------+----------+---------+-------+----------------------------+--------------- --+ [root@controller ~]# nova image-list +--------------------------------------+---------------------+--------+--------+ | ID | Name | Status | Server | +--------------------------------------+---------------------+--------+--------+ | 807f460b-566a-4989-b166-dc83248d4a40 | cirros-0.33.-x86_64 | ACTIVE |        |
+--------------------------------------+---------------------+--------+--------+
Copy the code