In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
The whole OpenStack is composed of four parts: control node, computing node, network node and storage node. The previous blog post described in detail the keystone components in the control node service controller. This blog will analyze the deployment of nova components, which is divided into two parts: the control node and the computing node need to be set up.
Compute node architecture
The compute node contains three services of Nova,Neutron,Telemeter
1) basic services
Nova: provide virtual machine creation, operation, migration, snapshot and other services around the virtual machine, and provide API docking with the control node, and tasks issued by the control node
Neutron: provides communication services between computing nodes and network nodes
2) extend the service
Telmeter: provides the monitoring agent of the computing node and feeds back the situation of the virtual machine to the control node. It is the agent service of Centimeter.
The compute node contains at least two network ports
Eth0: communicate with the control node, and the controlled node is uniformly deployed
Eth2: communicate with network nodes and storage nodes
Experimental process of host system IP address roles controllerCentOS7192.168.37.128keystone, nova, ntp, mariadb, rabbitmq, memcached, etcd, apachecomputeCentOS7192.168.37.130nova, ntpcinderCentOS7192.168.37.131cinder, ntp in experimental environment
+ + controller node + +
I. deployment of nova services
1. Create nova_api, nova and nova_cell0 databases
Mysql-u root-p
CREATE DATABASE nova_api
CREATE DATABASE nova
CREATE DATABASE nova_cell0
2. Database login authorization
Grant all privileges on nova_api. To 'nova'@'localhost' identified by' 123456'
Grant all privileges on nova_api. To 'nova'@'%' identified by' 123456'
Grant all privileges on nova. To 'nova'@'localhost' identified by' 123456'
Grant all privileges on nova. To 'nova'@'%' identified by' 123456'
Grant all privileges on nova_cell0. To 'nova'@'localhost' identified by' 123456'
Grant all privileges on nova_cell0. To 'nova'@'%' identified by' 123456'
3. Create nova users
Source ~ / admin-openrc
Openstack user create-domain default-password-prompt nova
Password: 123456
4. Add admin users as nova users
Openstack role add-project service-user nova admin
5. Create a nova service endpoint
Openstack service create-name nova-description "OpenStack Compute" compute
6. Create a compute API service endpoint
Openstack endpoint create-- API endpoint openstack endpoint create of region RegionOne compute public http://controller:8774/v2.1 # public-- API endpoint openstack endpoint create of region RegionOne compute internal http://controller:8774/v2.1 # internal-- API endpoint of region RegionOne compute admin http://controller:8774/v2.1 # admin II. Create placement service users (monitoring resources)
A resource provider can be a compute node, a shared storage pool, or an IP allocation pool.
The placement service tracks the inventory and usage of each vendor.
For example, to create an instance of consumable resources on a compute node, such as the CPU and memory of the resource provider of the compute node, the disk shares the storage pool resource provider and the IP address from the external IP resource provider.
1. Create a placement user
Openstack user create-domain default-password-prompt placement
# password: 123456
2. Add placement users to serve the project admin role
Openstack role add-project service-user placement admin
3. Create a Placement API service
Openstack service create-name placement-description "Placement API" placement
4. Create a Placement API service endpoint
Openstack endpoint create-- API endpoint openstack endpoint create of region RegionOne placement public http://controller:8778 # public-- API endpoint openstack endpoint create of region RegionOne placement internal http://controller:8778 # internal-- API endpoint of region RegionOne placement admin http://controller:8778 # admin III. Nova related configuration
1. Install the software package
Yum install openstack-nova-api openstack-nova-conductor openstack-nova-console openstack-nova-novncproxy openstack-nova-scheduler openstack-nova-placement-api-y
2. Edit the nova configuration file
Vim / etc/nova/nova.conf
[DEFAULT] # 2756 Line enabled_apis=osapi_compute Metadata # enable API#3156 Line transport_url=rabbit://openstack:123456@controller # message queuing # 1291 Line my_ip=192.168.37.128 # Host IP#1755 Line use_neutron=true # Open Network Network component # 2417 Line firewall_driver=nova.virt.firewall.NoopFirewallDriver # Firewall Settings [api_database] # 3513 Line connection=mysql+pymysql://nova:123456@controller/nova_ API # 4637 Line connection=mysql+pymysql://nova:123456@controller/nova [api] # 3221 Line auth_strategy=keystone # Authorization Registration [keystone_authtoken] # token Module # 6149 Line auth_uri= http://controller:5000auth_url=http://controller:35357#6200 Line memcached _ servers=controller:11211#6307 line: add the following line number setting auth_type=passwordproject_domain_name = defaultuser_domain_name = defaultproject_name = serviceusername = novapassword = 123456 [vnc] # 10292 line enabled=true#10316 line server_listen=$my_ip#10329 line server_proxyclient_address=$my_ [glance] # 5342 line api_servers= http://controller:9292[oslo_concurrency]#7920 line lock_path=/var/lib/nova/ TMP [placement] # 8819 line os_region_name=RegionOne#8859 line auth_type=password#8865 line auth _ url= http://controller:35357/v3#8880 line project_name=service#8886 line project_domain_name=Default#8906 line username=placement#8912 line user_domain_name=Default#8915 line password=123456
# Note: the configuration file is updated in real time, and the number of lines may not be accurate, so you need to carefully compare the modified contents. In addition, there are many modified entries, which can be viewed with the following command:
Grep-v "#" / etc/nova/nova.conf | grep-v "^ $"
3. Due to package error, you must enable access to Placement API and add the following at the end of the file
Vim / etc/httpd/conf.d/00-nova-placement-api.conf = 2.4 > Require all granted Order allow,deny Allow from all IV. Operations on the database
1. Due to the modification of the httpd configuration file, you need to restart the service.
Systemctl restart httpd.service
2. Synchronize nova-api database
Su-s / bin/sh-c "nova-manage api_db sync" nova
3. Register the cell0 database
Su-s / bin/sh-c "nova-manage cell_v2 map_cell0" nova
4. Register the cell1 cell database
Su-s / bin/sh-c "nova-manage cell_v2 create_cell-name=cell1-verbose" nova
5. Synchronize nova database
Su-s / bin/sh-c "nova-manage db sync" nova
6. Verify whether the nova, cell0 and cell1 databases are registered correctly
Nova-manage cell_v2 list_cells
7. Open all nova service modules on controller and set boot self-startup.
Systemctl enable openstack-nova-api.servicesystemctl enable openstack-nova-consoleauth.servicesystemctl enable openstack-nova-scheduler.servicesystemctl enable openstack-nova-conductor.servicesystemctl enable openstack-nova-novncproxy.servicesystemctl start openstack-nova-api.servicesystemctl start openstack-nova-consoleauth.servicesystemctl start openstack-nova-scheduler.servicesystemctl start openstack-nova-conductor.servicesystemctl start openstack-nova-novncproxy.service
+ + compute node + +
1. Yum installs the nova node package
Yum install openstack-nova-compute-y
2. Modify the configuration file
Vim / etc/nova/nova.conf
[DEFAULT] # 1291my_ip = 192.168.37.130mm 1755 use_neutron=true#2417 firewall_driver=nova.virt.firewall.NoopFirewallDriver#2756enabled_apis = osapi_compute Metadata#3156transport_url = rabbit://openstack:123456@controller [api] # 3221 auth_strategy= Keystone [Keystone _ authtoken] # 6148auth_uri = http://192.168.37.128:5000auth_url = http://controller:35357#6199memcached_servers=controller:11211#6306 auth_type=passwordproject_domain_name=defaultuser_domain_name=defaultproject_name=serviceusername=novapassword= 123456 [VNC] # 10291 enabled=true#10315 server_listen=0.0.0.0#10328 server_proxyclient_address=$my_ip#10346novncproxy_base_url= http://controller:6080/vnc_auto. Html [glance] # 5341 api_servers= http://controller:9292[oslo_concurrency]#7919lock_path=/var/lib/nova/tmp[placement]#8818 os_region_name=RegionOne#8858auth_type = password#8864auth_url= http://controller:35357/v3#8879project_name = service#8885project_domain_name = Default#8911user_domain_name = Default#8905username = placement#8914password = 123456
# Note: the configuration file is updated in real time, the number of lines is not necessarily accurate, and the module is the same as on controller. You need to carefully compare the modified content. In addition, there are many modified entries, which can be viewed with the following command:
Grep-v "#" / etc/nova/nova.conf | grep-v "^ $"
3. Enable related services and set boot self-startup
Systemctl enable libvirtd.service
Systemctl enable openstack-nova-compute.service
Systemctl stop libvirtd
Systemctl start libvirtd
Systemctl enable openstack-nova-compute.service
Systemctl start openstack-nova-compute.service
+ + controller node + +
1. Verify that there are several computing nodes in the database
Source ~ / admin-openrc
Openstack compute service list-service nova-compute
2. View the compute node
Su-s / bin/sh-c "nova-manage cell_v2 discover_hosts-verbose" nova
3. List compute node services
Openstack compute service list
4. List the API endpoints in the identity service and verify the connection with the identity service
Openstack catalog list
5. List the images
Openstack image list
+-+
| | ID | Name | Status | |
+-+
| | 204c1831-4abf-481b-80ab-609eb9b06f2d | cirros | active | |
+-+
6. Check whether cells and placement API are normal
Nova-status upgrade check
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.