CentOS 7
Sponsored Link

OpenStack Liberty : Heat 設定#12015/11/19

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

[root@dlp ~(keystone)]#
yum --enablerepo=centos-openstack-liberty,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 | 11a4bfa2b8c748ad860efb34b5fefb7f |
| domain_id          | default                          |
| enabled            | True                             |
| id                 | f2cc953c5cf6464b8299c1fe9fbcc135 |
| 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                            |
+-------+----------------------------------+
| id    | c892df1f84de4f3ba231725d23636d9e |
| name  | heat_stack_owner                 |
+-------+----------------------------------+

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

+-------+----------------------------------+
| Field | Value                            |
+-------+----------------------------------+
| id    | 31e4ea25ff7041aba0609654eaa6105b |
| 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          | d01aa523aa5a4d93b29dba1ed00a83d8 |
| 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          | 46cfb1c5374e4c7da8336b7e7468cc11 |
| 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           | 982433c00f61408288bcab4649db2b74       |
| interface    | public                                 |
| region       | RegionOne                              |
| region_id    | RegionOne                              |
| service_id   | d01aa523aa5a4d93b29dba1ed00a83d8       |
| 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           | 64c6c1a4ba8945368e6d73b3d2e08b54       |
| interface    | internal                               |
| region       | RegionOne                              |
| region_id    | RegionOne                              |
| service_id   | d01aa523aa5a4d93b29dba1ed00a83d8       |
| 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           | c706baa4bc4d4b2b87ddb92170f141d0       |
| interface    | admin                                  |
| region       | RegionOne                              |
| region_id    | RegionOne                              |
| service_id   | d01aa523aa5a4d93b29dba1ed00a83d8       |
| 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           | ba932769668a4eb4b930e91c9947c78c |
| interface    | public                           |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 46cfb1c5374e4c7da8336b7e7468cc11 |
| 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           | 43636d69f00f436e8c7c37dd80a9c9b7 |
| interface    | internal                         |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 46cfb1c5374e4c7da8336b7e7468cc11 |
| 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           | 332798532d514a62b24ad90203979373 |
| interface    | admin                            |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 46cfb1c5374e4c7da8336b7e7468cc11 |
| 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          | adc0223833d349c0925cea35f694a555 |
| name        | heat                             |
+-------------+----------------------------------+

# heat_domain_admin ユーザー作成

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

+-----------+----------------------------------+
| Field     | Value                            |
+-----------+----------------------------------+
| domain_id | adc0223833d349c0925cea35f694a555 |
| enabled   | True                             |
| id        | e96524af60ec4585a270a83c0ad3b26f |
| 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 22
Server version: 5.5.44-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
関連コンテンツ