Ubuntu 20.04
Sponsored Link

OpenStack Yoga : Heat 設定 (Control ノード)2022/04/06

 
OpenStack Orchestration Service(Heat)をインストールします。
当例では以下のような環境を例に Orchestration サービスをインストールします。
------------+---------------------------+---------------------------+------------
            |                           |                           |
        eth0|10.0.0.30              eth0|10.0.0.50              eth0|10.0.0.51
+-----------+-----------+   +-----------+-----------+   +-----------+-----------+
|    [ Control Node ]   |   |    [ Storage Node ]   |   |    [ Compute Node ]   |
|                       |   |                       |   |                       |
|  MariaDB    RabbitMQ  |   |      Open vSwitch     |   |        Libvirt        |
|  Memcached  httpd     |   |     Neutron Server    |   |     Nova Compute      |
|  Keystone   Glance    |   |       OVN-Northd      |   |      Open vSwitch     |
|  Nova API             |   |     Cinder Volume     |   |   OVN Metadata Agent  |
|  Cinder API           |   |     iSCSI Target      |   |     OVN-Controller    |
|                       |   |    Heat API/Engine    |   |                       |
+-----------------------+   +-----------------------+   +-----------------------+

[1] Control ノードの Keystone に Heat 用のユーザー等々を登録しておきます。
# [service] プロジェクト所属で [heat] ユーザーを作成

root@dlp ~(keystone)#
openstack user create --domain default --project service --password servicepassword heat

+---------------------+----------------------------------+
| Field               | Value                            |
+---------------------+----------------------------------+
| default_project_id  | c043fb355eff47e69642adfcd7a55620 |
| domain_id           | default                          |
| enabled             | True                             |
| id                  | 4922ef9d42f44be097324b38c6454ab8 |
| name                | heat                             |
| options             | {}                               |
| password_expires_at | None                             |
+---------------------+----------------------------------+

# [heat] ユーザーを [admin] ロール に加える

root@dlp ~(keystone)#
openstack role add --project service --user heat admin
# [heat] 用ロール作成

root@dlp ~(keystone)#
openstack role create heat_stack_owner

+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | None                             |
| domain_id   | None                             |
| id          | 18131267bfb04d78a58221442aecc388 |
| name        | heat_stack_owner                 |
| options     | {}                               |
+-------------+----------------------------------+

root@dlp ~(keystone)#
openstack role create heat_stack_user

+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | None                             |
| domain_id   | None                             |
| id          | 2d9d1a4b052d402795c8bf5f9f83a1b7 |
| name        | heat_stack_user                  |
| options     | {}                               |
+-------------+----------------------------------+

# [admin] ユーザーを [heat_stack_owner] ロール に加える

root@dlp ~(keystone)#
openstack role add --project admin --user admin heat_stack_owner
# [heat] 用サービスエントリ作成

root@dlp ~(keystone)#
openstack service create --name heat --description "Openstack Orchestration" orchestration

+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | Openstack Orchestration          |
| enabled     | True                             |
| id          | 76b649fb508a4f3a95210e2eb5e3dee9 |
| name        | heat                             |
| type        | orchestration                    |
+-------------+----------------------------------+

root@dlp ~(keystone)#
openstack service create --name heat-cfn --description "Openstack Orchestration" cloudformation

+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | Openstack Orchestration          |
| enabled     | True                             |
| id          | 7b23f4839d644a5d8c424fb3bcb491bb |
| name        | heat-cfn                         |
| type        | cloudformation                   |
+-------------+----------------------------------+

# Heat API ホストを定義

root@dlp ~(keystone)#
heat_api=10.0.0.50
# [orchestration] 用エンドポイント作成 (public)

root@dlp ~(keystone)#
openstack endpoint create --region RegionOne orchestration public http://$heat_api:8004/v1/%\(tenant_id\)s

+--------------+----------------------------------------+
| Field        | Value                                  |
+--------------+----------------------------------------+
| enabled      | True                                   |
| id           | 9c777c5ecaae48e98559a64760c883a8       |
| interface    | public                                 |
| region       | RegionOne                              |
| region_id    | RegionOne                              |
| service_id   | 76b649fb508a4f3a95210e2eb5e3dee9       |
| service_name | heat                                   |
| service_type | orchestration                          |
| url          | http://10.0.0.50:8004/v1/%(tenant_id)s |
+--------------+----------------------------------------+

# [orchestration] 用エンドポイント作成 (internal)

root@dlp ~(keystone)#
openstack endpoint create --region RegionOne orchestration internal http://$heat_api:8004/v1/%\(tenant_id\)s

+--------------+----------------------------------------+
| Field        | Value                                  |
+--------------+----------------------------------------+
| enabled      | True                                   |
| id           | 56277cf900a1486580e40549e75bd726       |
| interface    | internal                               |
| region       | RegionOne                              |
| region_id    | RegionOne                              |
| service_id   | 76b649fb508a4f3a95210e2eb5e3dee9       |
| service_name | heat                                   |
| service_type | orchestration                          |
| url          | http://10.0.0.50:8004/v1/%(tenant_id)s |
+--------------+----------------------------------------+

# [orchestration] 用エンドポイント作成 (admin)

root@dlp ~(keystone)#
openstack endpoint create --region RegionOne orchestration admin http://$heat_api:8004/v1/%\(tenant_id\)s

+--------------+----------------------------------------+
| Field        | Value                                  |
+--------------+----------------------------------------+
| enabled      | True                                   |
| id           | aed1f9dd410949ada14c8992d77ae032       |
| interface    | admin                                  |
| region       | RegionOne                              |
| region_id    | RegionOne                              |
| service_id   | 76b649fb508a4f3a95210e2eb5e3dee9       |
| service_name | heat                                   |
| service_type | orchestration                          |
| url          | http://10.0.0.50:8004/v1/%(tenant_id)s |
+--------------+----------------------------------------+

# [cloudformation] 用エンドポイント作成 (public)

root@dlp ~(keystone)#
openstack endpoint create --region RegionOne cloudformation public http://$heat_api:8000/v1

+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | fa7f7e027a32454a8be7c02f50ae0311 |
| interface    | public                           |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 7b23f4839d644a5d8c424fb3bcb491bb |
| service_name | heat-cfn                         |
| service_type | cloudformation                   |
| url          | http://10.0.0.50:8000/v1         |
+--------------+----------------------------------+

# [cloudformation] 用エンドポイント作成 (internal)

root@dlp ~(keystone)#
openstack endpoint create --region RegionOne cloudformation internal http://$heat_api:8000/v1

+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | fe9116d005a14ace919906ce0e66d8bb |
| interface    | internal                         |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 7b23f4839d644a5d8c424fb3bcb491bb |
| service_name | heat-cfn                         |
| service_type | cloudformation                   |
| url          | http://10.0.0.50:8000/v1         |
+--------------+----------------------------------+

# [cloudformation] 用エンドポイント作成 (admin)

root@dlp ~(keystone)#
openstack endpoint create --region RegionOne cloudformation admin http://$heat_api:8000/v1

+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | 76c1c1feeae240e2bef73d6aef80e7e5 |
| interface    | admin                            |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 7b23f4839d644a5d8c424fb3bcb491bb |
| service_name | heat-cfn                         |
| service_type | cloudformation                   |
| url          | http://10.0.0.50:8000/v1         |
+--------------+----------------------------------+

# Heat ドメイン作成

root@dlp ~(keystone)#
openstack domain create --description "Stack projects and users" heat

+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | Stack projects and users         |
| enabled     | True                             |
| id          | 2d2118d765ca444fb7e2640924ed891f |
| name        | heat                             |
| options     | {}                               |
| tags        | []                               |
+-------------+----------------------------------+

# [heat_domain_admin] ユーザー作成

root@dlp ~(keystone)#
openstack user create --domain heat --password servicepassword heat_domain_admin

+---------------------+----------------------------------+
| Field               | Value                            |
+---------------------+----------------------------------+
| domain_id           | 2d2118d765ca444fb7e2640924ed891f |
| enabled             | True                             |
| id                  | 99e220e856b94f29bae9c1f1e7b60ae7 |
| name                | heat_domain_admin                |
| options             | {}                               |
| password_expires_at | None                             |
+---------------------+----------------------------------+

# [heat_domain_admin] ユーザーを [admin] ロール に加える

root@dlp ~(keystone)#
openstack role add --domain heat --user heat_domain_admin admin
[2] Heat 用のユーザーとデータベースを MariaDB に登録しておきます。
root@dlp ~(keystone)#
mysql

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 157
Server version: 10.3.34-MariaDB-0ubuntu0.20.04.1 Ubuntu 20.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 heat; 
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> grant all privileges on heat.* to heat@'localhost' identified by 'password'; 
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> grant all privileges on heat.* to heat@'%' identified by 'password'; 
Query OK, 0 rows affected (0.00 sec)

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

MariaDB [(none)]> exit 
Bye
関連コンテンツ