OpenStack Mitaka (三鷹) : Heat 設定#12016/06/08 |
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] | 必要なパッケージをインストールしておきます。 |
root@dlp ~(keystone)# apt-get -y install 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 | 004097e8a2da45e6a68f6474b5bd7207 | | domain_id | 780b41cee03242da9ec0c73e1a76dc6e | | enabled | True | | id | 00f27a8be32e4abb890eddfbafcc1d69 | | 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 | fada96bc188948fdb11251efaf5f2024 | | name | heat_stack_owner | +-----------+----------------------------------+root@dlp ~(keystone)# openstack role create heat_stack_user +-----------+----------------------------------+ | Field | Value | +-----------+----------------------------------+ | domain_id | None | | id | 026acf60c74a430b9173fd1c0c9fecae | | 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 | f95d59b672b044d5befa082bb595876e | | 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 | 4e386bea53f94ea0b8d182c3da839a8c | | 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 | 871adba82460413ebd1dd8b819cdad8f | | interface | public | | region | RegionOne | | region_id | RegionOne | | service_id | f95d59b672b044d5befa082bb595876e | | 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 | 27ecd1d27d874709b57880fac1cc0fff | | interface | internal | | region | RegionOne | | region_id | RegionOne | | service_id | f95d59b672b044d5befa082bb595876e | | 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 | 7b854a8788d44bfb814a485b6fd2e0ba | | interface | admin | | region | RegionOne | | region_id | RegionOne | | service_id | f95d59b672b044d5befa082bb595876e | | 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 | 5f93ea7cbad14f539cf8d4948748f57c | | interface | public | | region | RegionOne | | region_id | RegionOne | | service_id | 4e386bea53f94ea0b8d182c3da839a8c | | 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 | 8ac398199a254c0b9ab201997723402f | | interface | internal | | region | RegionOne | | region_id | RegionOne | | service_id | 4e386bea53f94ea0b8d182c3da839a8c | | 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 | 96015887a5224b5e9c0196213c441e8e | | interface | admin | | region | RegionOne | | region_id | RegionOne | | service_id | 4e386bea53f94ea0b8d182c3da839a8c | | 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 | 0f12bf87be5a4e01b93afed5d8200408 | | name | heat | +-------------+----------------------------------+ # heat_domain_admin ユーザー作成 root@dlp ~(keystone)# openstack user create --domain heat --password servicepassword heat_domain_admin +-----------+----------------------------------+ | Field | Value | +-----------+----------------------------------+ | domain_id | 0f12bf87be5a4e01b93afed5d8200408 | | enabled | True | | id | 566b76ab865441d0bc0032f38abde2cf | | 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 65 Server version: 10.0.24-MariaDB-7 Ubuntu 16.04 Copyright (c) 2000, 2016, 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)]>
MariaDB [(none)]> flush privileges; Query OK, 0 rows affected (0.00 sec) exit Bye |
Sponsored Link |