当前位置: 代码迷 >> 综合 >> 基于centos7.8 ____openstack ____(train版)手动部署 (五.nova--controller节点)
  详细解决方案

基于centos7.8 ____openstack ____(train版)手动部署 (五.nova--controller节点)

热度:48   发布时间:2024-02-12 22:00:08.0

nova服务安装配置(controller)

###1.创建数据库
mysqlCREATE DATABASE nova_api;
CREATE DATABASE nova;
CREATE DATABASE nova_cell0;GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'localhost' IDENTIFIED BY 'NOVA_DBPASS';
GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'%' IDENTIFIED BY 'NOVA_DBPASS';
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' IDENTIFIED BY 'NOVA_DBPASS';
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%'  IDENTIFIED BY 'NOVA_DBPASS';
GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'localhost'  IDENTIFIED BY 'NOVA_DBPASS';
GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'%' IDENTIFIED BY 'NOVA_DBPASS';flush privileges;
exit###2.创建compute server
openstack user create --domain default --password-prompt novaUser Password:          (nova)
Repeat User Password:   (nova)+---------------------+----------------------------------+
| Field               | Value                            |
+---------------------+----------------------------------+
| domain_id           | default                          |
| enabled             | True                             |
| id                  | 764a5e882a954e7b9c5a34d24135f3ee |
| name                | nova                             |
| options             | {}                               |
| password_expires_at | None                             |
+---------------------+----------------------------------+###3. 增加权限
openstack role add --project service --user nova admin###4.创建nova service
openstack service create --name nova --description "OpenStack Compute" compute+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | OpenStack Compute                |
| enabled     | True                             |
| id          | 8a1af936eb114fe5af8302d3daded345 |
| name        | nova                             |
| type        | compute                          |
+-------------+----------------------------------+###5.创建nova api
openstack endpoint create --region RegionOne compute public http://controller:8774/v2.1openstack endpoint create --region RegionOne  compute internal http://controller:8774/v2.1openstack endpoint create --region RegionOne compute admin http://controller:8774/v2.1[root@controller ~(keystone)]# openstack endpoint list | grep compute
| 1ccdcc96aa7c4d66b7baa1b5112671fd | RegionOne | nova         | compute      | True    | public    | http://controller:8774/v2.1 |
| 68bf9a5e4a6b4ce792f36ec818aafc8c | RegionOne | nova         | compute      | True    | internal  | http://controller:8774/v2.1 |
| f7aa3905f6e54fe08d5b0e02907a5c11 | RegionOne | nova         | compute      | True    | admin     | http://controller:8774/v2.1 |###6.安装nova 软件包(controller节点)
yum --enablerepo=centos-openstack-train,epel -y install openstack-nova-api openstack-nova-conductor  openstack-nova-novncproxy openstack-nova-scheduler###7.更改nova.conf[root@controller ~(keystone)]# egrep -v "^$|^#" /etc/nova/nova.conf 
[DEFAULT]
enabled_apis = osapi_compute,metadata
transport_url = rabbit://openstack:password@controller:5672/
my_ip = 10.0.0.10
[api]
auth_strategy = keystone
[api_database]
connection = mysql+pymysql://nova:NOVA_DBPASS@controller/nova_api
[barbican]
[cache]
[cinder]
[compute]
[conductor]
[console]
[consoleauth]
[cors]
[database]
connection = mysql+pymysql://nova:NOVA_DBPASS@controller/nova
[devices]
[ephemeral_storage_encryption]
[filter_scheduler]
[glance]
api_servers = http://controller:9292
[guestfs]
[healthcheck]
[hyperv]
[ironic]
[key_manager]
[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
[libvirt]
[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_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
[powervm]
[privsep]
[profiler]
[quota]
[rdp]
[remote_debug]
[scheduler]
discover_hosts_in_cells_interval = 300
[serial_console]
[service_user]
[spice]
[upgrade_levels]
[vault]
[vendordata_dynamic_auth]
[vmware]
[vnc]
enabled = true
server_listen = $my_ip
server_proxyclient_address = $my_ip
[workarounds]
[wsgi]
[xenserver]
[xvp]
[zvm]###8. 填充数据库
su -s /bin/sh -c "nova-manage api_db sync" novasu -s /bin/sh -c "nova-manage cell_v2 map_cell0" novasu -s /bin/sh -c "nova-manage cell_v2 create_cell --name=cell1 --verbose" novasu -s /bin/sh -c "nova-manage db sync" novasu -s /bin/sh -c "nova-manage cell_v2 list_cells" nova[root@controller ~(keystone)]# su -s /bin/sh -c "nova-manage cell_v2 list_cells" nova
+-------+--------------------------------------+------------------------------------------+-------------------------------------------------+----------+
|  Name |                 UUID                 |              Transport URL               |               Database Connection               | Disabled |
+-------+--------------------------------------+------------------------------------------+-------------------------------------------------+----------+
| cell0 | 00000000-0000-0000-0000-000000000000 |                  none:/                  | mysql+pymysql://nova:****@controller/nova_cell0 |  False   |
| cell1 | eeac8347-289b-40e4-b51d-9d80eda3ce70 | rabbit://openstack:****@controller:5672/ |    mysql+pymysql://nova:****@controller/nova    |  False   |
+-------+--------------------------------------+------------------------------------------+-------------------------------------------------+----------+###9.重启服务
systemctl enable openstack-nova-api.service  openstack-nova-scheduler.service  openstack-nova-conductor.service openstack-nova-novncproxy.servicesystemctl start openstack-nova-api.service  openstack-nova-scheduler.service  openstack-nova-conductor.service openstack-nova-novncproxy.service###10.验证controller节点[root@controller ~(keystone)]# openstack compute service list 
+----+----------------+------------+----------+---------+-------+----------------------------+
| ID | Binary         | Host       | Zone     | Status  | State | Updated At                 |
+----+----------------+------------+----------+---------+-------+----------------------------+
|  1 | nova-conductor | controller | internal | enabled | up    | 2020-08-20T08:36:02.000000 |
|  3 | nova-scheduler | controller | internal | enabled | up    | 2020-08-20T08:36:00.000000 |

nova controller节点,ok!

  相关解决方案