desedese

目录

  • OpenStack-nova组件部署
    • nova组件部署位置
    • 计算节点Nova服务配置(CT配置)
    • 计算节点配置Nova服务-c1节点配置
    • 计算节点-c2(与c1相同)(除了IP地址)
    • controller节点操作
  • 总结

 

OpenStack-nova组件部署

继之前Placement部署之后,继续部署nova

nova组件部署位置

  • 控制节点ct
    ​nova-api(nova主服务)
    ​nova-scheduler(nova调度服务)
    ​nova-conductor(nova数据库服务,提供数据库访问)
    ​nova-novncproxy(nova的vnc服务,提供实例的控制台)

  • 计算节点c1、c2
    nova-compute(nova计算服务)

计算节点Nova服务配置(CT配置)

1. 创建nova数据库,并执行授权操作

[root@ct ~]# mysql -uroot -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 55
Server version: 10.3.20-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

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

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

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

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

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

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

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

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

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

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

MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.000 sec)

MariaDB [(none)]> exit
Bye

2. 管理Nova用户及服务

[root@ct ~]# openstack user create --domain default --password NOVA_PASS nova
+---------------------+----------------------------------+
| Field               | Value                            |
+---------------------+----------------------------------+
| domain_id           | default                          |
| enabled             | True                             |
| id                  | 93e904c4063545de83350cd21b7c6b44 |
| name                | nova                             |
| options             | {}                               |
| password_expires_at | None                             |
+---------------------+----------------------------------+
//把nova用户添加到service项目,拥有admin权限

[root@ct ~]# openstack role add --project service --user nova admin
[root@ct ~]# openstack service create --name nova --description "OpenStack Compute" compute
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | OpenStack Compute                |
| enabled     | True                             |
| id          | 721156ee0ff54b468f8e9ff1b65af18c |
| name        | nova                             |
| type        | compute                          |
+-------------+----------------------------------+
[root@ct ~]# openstack endpoint create --region RegionOne compute public http://ct:8774/v2.1
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | cb13f505671a453ab7c1be84e8774bfc |
| interface    | public                           |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 721156ee0ff54b468f8e9ff1b65af18c |
| service_name | nova                             |
| service_type | compute                          |
| url          | http://ct:8774/v2.1              |
+--------------+----------------------------------+

[root@ct ~]# openstack endpoint create --region RegionOne compute internal http://ct:8774/v2.1
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | f769cea83d5343a787203bb5da4de4b0 |
| interface    | internal                         |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 721156ee0ff54b468f8e9ff1b65af18c |
| service_name | nova                             |
| service_type | compute                          |
| url          | http://ct:8774/v2.1              |
+----

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-04-14
  • 2021-11-17
  • 2021-12-22
  • 2022-12-23
  • 2021-11-10
猜你喜欢
  • 2021-07-09
  • 2021-12-04
  • 2021-08-19
  • 2021-11-12
  • 2021-09-07
  • 2021-10-19
相关资源
相似解决方案