In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
1. Create the database and authorize the database. The database name is: nova_api user name: nova password: devops
[root@controller] # mysql-uroot-pdevops
MariaDB [(none)] > CREATE DATABASE nova_api
MariaDB [(none)] > CREATE DATABASE nova
MariaDB [(none)] > CREATE DATABASE nova_cell0
MariaDB [(none)] > GRANT ALL PRIVILEGES ON nova_api. TO 'nova'@ "localhost" IDENTIFIED BY "devops'
MariaDB [(none)] > GRANT ALL PRIVILEGES ON nova_api. TO 'nova'@ "%" IDENTIFIED BY' devops'
MariaDB [(none)] > GRANT ALL PRIVILEGES ON nova. TO 'nova'@ "localhost" IDENTIFIED BY "devops'
MariaDB [(none)] > GRANT ALL PRIVILEGES ON nova. TO 'nova'@ "%" IDENTIFIED BY' devops'
MariaDB [(none)] > GRANT ALL PRIVILEGES ON nova_cell0. TO 'nova'@ "localhost" IDENTIFIED BY "devops'
MariaDB [(none)] > GRANT ALL PRIVILEGES ON nova_cell0. TO 'nova'@ "%" IDENTIFIED BY' devops'
MariaDB [(none)] > GRANT ALL PRIVILEGES ON. TO 'root'@'controller' IDENTIFIED BY' devops'
MariaDB [(none)] > FLUSH PRIVILEGES
2. [root@controller ~] # source admin-openrc
3. Create keystone users for nova
[root@controller] # openstack user create-- domain default nova-- password devops
User Password: password: devops
Repeat User Password: password: devops
+-- +
| | Field | Value |
+-- +
| | domain_id | default |
| | enabled | True |
| | id | e651779d03cf4d53b14527bfaffa818a |
| | name | nova |
| | options | {} | |
| | password_expires_at | None |
+-- +
[root@controller] # openstack role add-- project service-- user nova admin
Create a computer service
[root@controller] # openstack service create-- name nova-- description "OpenStack Compute" compute
[root@controller ~] # openstack endpoint create-- region RegionOne compute public http://controller:8774/v2.1/%\(tenant_id\)s
[root@controller ~] # openstack endpoint create-- region RegionOne compute internal http://controller:8774/v2.1/%\(tenant_id\)s
[root@controller ~] # openstack endpoint create-- region RegionOne compute internal http://controller:8774/v2.1/%\(tenant_id\)s
4. Install the package for nova
[root@controller ~] # yum install-y openstack-nova-api openstack-nova-conductor openstack-nova-cert openstack-nova-console openstack-nova-novncproxy openstack-nova-scheduler
Modify nova configuration file
[root@controller ~] # cp / etc/nova/nova.conf / etc/nova/nova.conf.bak
[root@controller ~] # > / etc/nova/nova.conf
[root@controller~] # cat / etc/nova/nova.conf
[DEFAULT]
Enabled_apis = osapi_compute,metadata
Auth_strategy = keystone
My_ip = 192.168.0.111
Use_neutron = True
Firewall_driver = nova.virt.firewall.NoopFirewallDriver
Transport_url = rabbit://openstack:devops@controller
[database]
Connection = mysql+pymysql://nova:devops@controller/nova
[api_database]
Connection = mysql+pymysql://nova:devops@controller/nova_api
[scheduler]
Discover_hosts_in_cells_interval =-1
[keystone_authtoken]
Auth_uri = http://controller:5000
Auth_url = http://controller:35357
Memcached_servers = controller:11211
Auth_type = password
Project_domain_name = default
User_domain_name = default
Project_name = service
Username = nova
Password = devops
Service_token_roles_required = True
[vnc]
Vncserver_listen = 192.168.0.111
Vncserver_proxyclient_address = 192.168.0.111
[glance]
Api_servers = http://controller:9292
[oslo_concurrency]
Lock_path = / var/lib/nova/tmp
5. Synchronize database
[root@controller] # su-s / bin/sh-c "nova-manage api_db sync" nova
[root@controller] # su-s / bin/sh-c "nova-manage db sync" nova
6. Set the database nova_cell0 created on the cell_v2 association
[root@controller] # nova-manage cell_v2 map_cell0-- database_connection mysql+pymysql://root:devops@controller/nova_cell0
7. Create a regular cell called cell1, which will contain compute nodes
[root@controller] # nova-manage cell_v2 create_cell-verbose-name cell1-database_connection mysql+pymysql://root:devops@controller/nova_cell0-transport-url rabbit://openstack:devops@controller:5672/
8. Check whether the deployment is normal
# nova-status upgrade check
9. Create and map cell0, and map existing computing hosts and instances to cells
[root@controller ~] # nova-manage cell_v2 simple_cell_setup
10. View a list of cells that have been created
[root@controller] # nova-manage cell_v2 list_cells-- verbose
Note that if there is a newly added compute node, you need to run the following command to find it and add it to the cell
# nova-manage cell_v2 discover_hosts
[root@controller ~] # nova-status upgrade check
11. To create placement users and placement services, starting with Ocata, you need to install and configure placement to participate in nova scheduling, otherwise the virtual machine will not be created!
[root@controller ~] # yum install-y openstack-nova-placement-api
[root@controller] # openstack user create-- domain default placement-- password devops
[root@controller] # openstack role add-- project service-- user placement admin
[root@controller] # openstack service create-- name placement-- description "OpenStack Placement" placement
Create placement endpoint
[root@controller ~] # openstack endpoint create-- region RegionOne placement public http://controller:8778
[root@controller ~] # openstack endpoint create-- region RegionOne placement admin http://controller:8778
[root@controller ~] # openstack endpoint create-- region RegionOne placement internal http://controller:8778
Integrate placement into nova.conf
[placement]
Auth_url = http://controller:35357
Memcached_servers = controller:11211
Auth_type = password
Project_domain_name = default
User_domain_name = default
Project_name = service
Username = nova
Password = devops
Os_region_name = RegionOne
twelve。 Configure and modify the 00-nova-placement-api.conf file. If you do not do this step, there will be a problem of prohibiting access to resources when creating a virtual machine.
[root@controller ~] # cd / etc/httpd/conf.d/
[root@controller ~] # cp 00-nova-placement-api.conf 00-nova-placement-api.conf.bak
[root@controller ~] # > 00-nova-placement-api.conf
[root@controller conf.d] # cat 00-nova-placement-api.conf
Listen 8778
WSGIProcessGroup nova-placement-api
WSGIApplicationGroup% {GLOBAL}
WSGIPassAuthorization On
WSGIDaemonProcess nova-placement-api processes=3 threads=1 user=nova group=nova
WSGIScriptAlias / / usr/bin/nova-placement-api
Order allow,deny
Allow from all
Require all granted
= 2.4 >
ErrorLogFormat "% M"
ErrorLog / var/log/nova/nova-placement-api.log
Alias / nova-placement-api / usr/bin/nova-placement-api
SetHandler wsgi-script
Options + ExecCGI
WSGIProcessGroup nova-placement-api
WSGIApplicationGroup% {GLOBAL}
WSGIPassAuthorization On
13. Restart the httpd service
[root@controller ~] # systemctl restart httpd
Check whether the configuration is successful
# nova-status upgrade check
14. Start the 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
[root@controller ~] # systemctl restart 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 status 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 list-unit-files | grep openstack-nova-
15. Verify the nova service
[root@controller ~] # unset OS_TOKEN OS_URL
[root@controller ~] # source / root/admin-openrc
[root@controller ~] # nova service-list
[root@controller ~] # openstack endpoint list View endpoint list
All the configuration files are in Baidu Cloud disk:
Link: https://pan.baidu.com/s/1CnmKkFMTemv199ctgb5Oig
Extraction code: 27om
After copying this content, open the Baidu network disk mobile phone App, which is more convenient to operate.
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.