繼以前Placement部署以後,繼續部署novajavascript
控制節點ct
nova-api(nova主服務)
nova-scheduler(nova調度服務)
nova-conductor(nova數據庫服務,提供數據庫訪問)
nova-novncproxy(nova的vnc服務,提供實例的控制檯)html
計算節點c一、c2
nova-compute(nova計算服務)java
1. 建立nova數據庫,並執行受權操做python
[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用戶及服務mysql
[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 | +--------------