CentOS 7
Sponsored Link

OpenStack Mitaka (三鷹) : Heat 設定#12016/05/12

 
OpenStack Orchestration Service(Heat)をインストールします。
ここでは以下のような構築済みの環境に Heat を追加インストールして設定します。
例として、Network Node に Orchestration サービス一式をインストールして設定します。
                                |
+------------------+            |            +------------------------+
| [ Control Node ] |            |            |    [ Network Node ]    |
|     Keystone     |10.0.0.30   |   10.0.0.50|    DHCP,L3,L2 Agent    |
|      Glance      |------------+------------|     Metadata Agent     |
|     Nova API     |eth0        |        eth0|    Heat API,API-CFN    |
|  Neutron Server  |            |            |       Heat Engine      |
+------------------+            |            +------------------------+
                            eth0|10.0.0.51
                      +--------------------+
                      |  [ Compute Node ]  |
                      |    Nova Compute    |
                      |      L2 Agent      |
                      +--------------------+

 
Heat の設定前に必要なユーザーやデータベースを Control Node に登録しておきます。
[1] 必要なパッケージをインストールしておきます。
# Mitaka, EPEL からインストール

[root@dlp ~(keystone)]#
yum --enablerepo=centos-openstack-mitaka,epel -y install openstack-heat-common
[2] Control ノードの Keystone に Heat 用のユーザー等々を登録しておきます。
# heat ユーザー作成 (service プロジェクト所属)

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

+--------------------+----------------------------------+
| Field              | Value                            |
+--------------------+----------------------------------+
| default_project_id | 4a80b177558b49d7a58038770a344aeb |
| domain_id          | dc18e12756a54ce7aea35e99f01decd8 |
| enabled            | True                             |
| id                 | 2c55950ff5b542a28d0a9155b78d640f |
| name               | heat                             |
+--------------------+----------------------------------+

# 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                            |
+-----------+----------------------------------+
| domain_id | None                             |
| id        | b0e0ce0251544cdb85c5c316ae8a9df1 |
| name      | heat_stack_owner                 |
+-----------+----------------------------------+

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

+-----------+----------------------------------+
| Field     | Value                            |
+-----------+----------------------------------+
| domain_id | None                             |
| id        | 4ffcb170e6bc4ce6ad6fe481153bc7e9 |
| name      | heat_stack_user                  |
+-----------+----------------------------------+

# 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          | 0f563f5d121d46c99ae5cb0c480f2d71 |
| 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          | 941667fe78ce446db5471358afe6ce78 |
| name        | heat-cfn                         |
| type        | cloudformation                   |
+-------------+----------------------------------+

# Heat API サーバーの IPアドレスを定義

[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           | 83c57dabc180446e9c969216f51c561b       |
| interface    | public                                 |
| region       | RegionOne                              |
| region_id    | RegionOne                              |
| service_id   | 0f563f5d121d46c99ae5cb0c480f2d71       |
| 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           | f49b97f254dd4c96a347bd8b452cbfc4       |
| interface    | internal                               |
| region       | RegionOne                              |
| region_id    | RegionOne                              |
| service_id   | 0f563f5d121d46c99ae5cb0c480f2d71       |
| 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           | 11d237b9bdac4e5595987c6b465f5e05       |
| interface    | admin                                  |
| region       | RegionOne                              |
| region_id    | RegionOne                              |
| service_id   | 0f563f5d121d46c99ae5cb0c480f2d71       |
| 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           | 2229c38423b549fe81d44802404adb75 |
| interface    | public                           |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 941667fe78ce446db5471358afe6ce78 |
| 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           | 40275ed9374f4bc2ba544ed0431d3093 |
| interface    | internal                         |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 941667fe78ce446db5471358afe6ce78 |
| 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           | 0270f42932cf43889d993150b2f107bb |
| interface    | admin                            |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 941667fe78ce446db5471358afe6ce78 |
| 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          | 7712f42ca8fd41888d02cafaa2cf6b53 |
| name        | heat                             |
+-------------+----------------------------------+

# heat_domain_admin ユーザー作成

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

+-----------+----------------------------------+
| Field     | Value                            |
+-----------+----------------------------------+
| domain_id | 7712f42ca8fd41888d02cafaa2cf6b53 |
| enabled   | True                             |
| id        | bea81848cd0d4775baf23e73a34042e0 |
| name      | heat_domain_admin                |
+-----------+----------------------------------+

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

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

Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 38
Server version: 5.5.47-MariaDB MariaDB Server

Copyright (c) 2000, 2015, 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
関連コンテンツ