CentOS 7
Sponsored Link

OpenStack Kilo : Heat 設定#12015/06/20

 
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] 必要なパッケージをインストールしておきます。
# RDO, EPEL からインストール

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

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

+------------+----------------------------------+
| Field      | Value                            |
+------------+----------------------------------+
| email      | None                             |
| enabled    | True                             |
| id         | daa9499ce0f8427ca5c6dfe8d48da1b0 |
| name       | heat                             |
| project_id | 4e84300cbeeb4a68a0e1864ea0ae1869 |
| username   | heat                             |
+------------+----------------------------------+

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

[root@dlp ~(keystone)]#
openstack role add --project service --user heat admin

+-------+----------------------------------+
| Field | Value                            |
+-------+----------------------------------+
| id    | 2100956a1c974cae8c81308845c174a8 |
| name  | admin                            |
+-------+----------------------------------+

# heat 用ロール作成

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

+-------+----------------------------------+
| Field | Value                            |
+-------+----------------------------------+
| id    | 77f9223a354740268aafbcc9e25d19bc |
| name  | heat_stack_owner                 |
+-------+----------------------------------+

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

+-------+----------------------------------+
| Field | Value                            |
+-------+----------------------------------+
| id    | 13b844cab6f84e1c9f8aa88ad5cf68b1 |
| name  | heat_stack_user                  |
+-------+----------------------------------+

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

[root@dlp ~(keystone)]#
openstack role add --project admin --user admin heat_stack_owner
+-------+----------------------------------+
| Field | Value                            |
+-------+----------------------------------+
| id    | 77f9223a354740268aafbcc9e25d19bc |
| name  | heat_stack_owner                 |
+-------+----------------------------------+

# heat 用サービスエントリ作成

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

+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | Openstack Orchestration          |
| enabled     | True                             |
| id          | 27ca1a331b094b0e9564ba1d3727c92c |
| 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          | 2306ba0683ac4d7d9b300eab803d67a3 |
| name        | heat-cfn                         |
| type        | cloudformation                   |
+-------------+----------------------------------+

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

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

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

+--------------+----------------------------------------+
| Field        | Value                                  |
+--------------+----------------------------------------+
| adminurl     | http://10.0.0.50:8004/v1/%(tenant_id)s |
| id           | d2957bc7f79a4832b9fee90fd13f840a       |
| internalurl  | http://10.0.0.50:8004/v1/%(tenant_id)s |
| publicurl    | http://10.0.0.50:8004/v1/%(tenant_id)s |
| region       | RegionOne                              |
| service_id   | 27ca1a331b094b0e9564ba1d3727c92c       |
| service_name | heat                                   |
| service_type | orchestration                          |
+--------------+----------------------------------------+

[root@dlp ~(keystone)]#
openstack endpoint create \
--publicurl http://$heat_api:8000/v1 \
--internalurl http://$heat_api:8000/v1 \
--adminurl http://$heat_api:8000/v1 \
--region RegionOne \
cloudformation

+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| adminurl     | http://10.0.0.50:8000/v1         |
| id           | 970aea8e957d438389d7bc437e539575 |
| internalurl  | http://10.0.0.50:8000/v1         |
| publicurl    | http://10.0.0.50:8000/v1         |
| region       | RegionOne                        |
| service_id   | 2306ba0683ac4d7d9b300eab803d67a3 |
| service_name | heat-cfn                         |
| service_type | cloudformation                   |
+--------------+----------------------------------+

# Heat ドメイン作成

[root@dlp ~(keystone)]#
heat-keystone-setup-domain \
--stack-user-domain-name heat_user_domain \
--stack-domain-admin heat_domain_admin \
--stack-domain-admin-password domainpassword

Please update your heat.conf with the following in [DEFAULT]

stack_user_domain_id=bd07e0b9203640798b22a8845bb4a465
stack_domain_admin=heat_domain_admin
stack_domain_admin_password=domainpassword
[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 57
Server version: 5.5.41-MariaDB MariaDB Server

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