OpenStack Rocky : Configure Nova#12018/09/17 |
Install and Configure OpenStack Compute Service (Nova).
This example is based on the environment like follows.
eth0|10.0.0.30 +-----------+-----------+ | [ Control Node ] | | | | MariaDB RabbitMQ | | Memcached httpd | | Keystone Glance | +-----------------------+ |
[1] | Add users and others for Nova in Keystone. |
# add nova user (set in service project) root@dlp ~(keystone)# openstack user create --domain default --project service --password servicepassword nova +---------------------+----------------------------------+ | Field | Value | +---------------------+----------------------------------+ | default_project_id | aaeee626080841a491235fb06e77f10c | | domain_id | default | | enabled | True | | id | 6709d0369ead4c808810215a41f0e530 | | name | nova | | options | {} | | password_expires_at | None | +---------------------+----------------------------------+ # add nova user in admin role root@dlp ~(keystone)# openstack role add --project service --user nova admin
# add placement user (set in service project) root@dlp ~(keystone)# openstack user create --domain default --project service --password servicepassword placement +---------------------+----------------------------------+ | Field | Value | +---------------------+----------------------------------+ | default_project_id | aaeee626080841a491235fb06e77f10c | | domain_id | default | | enabled | True | | id | 1f6db679a17444d8a47d71ec73c4faa3 | | name | placement | | options | {} | | password_expires_at | None | +---------------------+----------------------------------+ # add placement user in admin role root@dlp ~(keystone)# openstack role add --project service --user placement admin
# add service entry for nova root@dlp ~(keystone)# openstack service create --name nova --description "OpenStack Compute service" compute +-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | description | OpenStack Compute service | | enabled | True | | id | 97286644826441c9ae2e42795730e2da | | name | nova | | type | compute | +-------------+----------------------------------+ # add service entry for placement root@dlp ~(keystone)# openstack service create --name placement --description "OpenStack Compute Placement service" placement +-------------+-------------------------------------+ | Field | Value | +-------------+-------------------------------------+ | description | OpenStack Compute Placement service | | enabled | True | | id | f00e23ac9f334ec29ef8d8c1fff5751c | | name | placement | | type | placement | +-------------+-------------------------------------+ # define keystone host root@dlp ~(keystone)# export controller=10.0.0.30
# add endpoint for nova (public) root@dlp ~(keystone)# openstack endpoint create --region RegionOne compute public http://$controller:8774/v2.1/%\(tenant_id\)s +--------------+------------------------------------------+ | Field | Value | +--------------+------------------------------------------+ | enabled | True | | id | 412d511ed4fc41169322d769ce90bd40 | | interface | public | | region | RegionOne | | region_id | RegionOne | | service_id | 97286644826441c9ae2e42795730e2da | | service_name | nova | | service_type | compute | | url | http://10.0.0.30:8774/v2.1/%(tenant_id)s | +--------------+------------------------------------------+ # add endpoint for nova (internal) root@dlp ~(keystone)# openstack endpoint create --region RegionOne compute internal http://$controller:8774/v2.1/%\(tenant_id\)s +--------------+------------------------------------------+ | Field | Value | +--------------+------------------------------------------+ | enabled | True | | id | 5705d5ba89c5484598739a0096e7b923 | | interface | internal | | region | RegionOne | | region_id | RegionOne | | service_id | 97286644826441c9ae2e42795730e2da | | service_name | nova | | service_type | compute | | url | http://10.0.0.30:8774/v2.1/%(tenant_id)s | +--------------+------------------------------------------+ # add endpoint for nova (admin) root@dlp ~(keystone)# openstack endpoint create --region RegionOne compute admin http://$controller:8774/v2.1/%\(tenant_id\)s +--------------+------------------------------------------+ | Field | Value | +--------------+------------------------------------------+ | enabled | True | | id | 9cda4e6ab87d448fa3e7b0e0a483d184 | | interface | admin | | region | RegionOne | | region_id | RegionOne | | service_id | 97286644826441c9ae2e42795730e2da | | service_name | nova | | service_type | compute | | url | http://10.0.0.30:8774/v2.1/%(tenant_id)s | +--------------+------------------------------------------+ # add endpoint for placement (public) root@dlp ~(keystone)# openstack endpoint create --region RegionOne placement public http://$controller:8778 +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | enabled | True | | id | 2491d065cf6e4dde9a6aadfff26641c7 | | interface | public | | region | RegionOne | | region_id | RegionOne | | service_id | f00e23ac9f334ec29ef8d8c1fff5751c | | service_name | placement | | service_type | placement | | url | http://10.0.0.30:8778 | +--------------+----------------------------------+ # add endpoint for placement (internal) root@dlp ~(keystone)# openstack endpoint create --region RegionOne placement internal http://$controller:8778 +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | enabled | True | | id | 0e62427c316e4081a50d97dce8817b49 | | interface | internal | | region | RegionOne | | region_id | RegionOne | | service_id | f00e23ac9f334ec29ef8d8c1fff5751c | | service_name | placement | | service_type | placement | | url | http://10.0.0.30:8778 | +--------------+----------------------------------+ # add endpoint for placement (admin) root@dlp ~(keystone)# openstack endpoint create --region RegionOne placement admin http://$controller:8778 +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | enabled | True | | id | 667fabe482a54da490bfba45d6bbd9a5 | | interface | admin | | region | RegionOne | | region_id | RegionOne | | service_id | f00e23ac9f334ec29ef8d8c1fff5751c | | service_name | placement | | service_type | placement | | url | http://10.0.0.30:8778 | +--------------+----------------------------------+ |
[2] | Add a User and Database on MariaDB for Nova. |
root@dlp ~(keystone)# mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 48 Server version: 10.1.34-MariaDB-0ubuntu0.18.04.1 Ubuntu 18.04 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; Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on nova.* to nova@'localhost' identified by 'password'; Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on nova.* to nova@'%' identified by 'password'; Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
create database nova_api; Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on nova_api.* to nova@'localhost' identified by 'password'; Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on nova_api.* to nova@'%' identified by 'password'; Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
create database nova_placement; Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on nova_placement.* to nova@'localhost' identified by 'password'; Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on nova_placement.* to nova@'%' identified by 'password'; Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
create database nova_cell0; Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on nova_cell0.* to nova@'localhost' identified by 'password'; Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on nova_cell0.* to nova@'%' identified by 'password'; Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
MariaDB [(none)]> flush privileges; Query OK, 0 rows affected (0.00 sec) exit Bye |
Sponsored Link |
|