OpenStack Liberty : Configure Heat#12015/11/19 |
Install OpenStack Orchestration Service (Heat).
This example shows to install Orchestration Services on the existing environment like follows.
For example, install and configure Orchestration Services on the Network Node. | +------------------+ | +------------------------+ | [ 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 | +--------------------+ |
Add users or databases for Heat services on the Control Node on this section.
|
|
[1] | Install required packages first. |
[root@dlp ~(keystone)]# yum --enablerepo=centos-openstack-liberty,epel -y install openstack-heat-common
|
[2] | Add users and so on for Heat services in Keystone on the Control Node. |
# add Heat user [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 | +--------------------+----------------------------------+ # add Heat user to admin role [root@dlp ~(keystone)]# openstack role add --project service --user heat admin
# create a role for 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 | +-------+----------------------------------+ # add admin user to heat_stack_owner role [root@dlp ~(keystone)]# openstack role add --project admin --user admin heat_stack_owner
# create service entry for 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 | +-------------+----------------------------------+ # define Heat API server's IP [root@dlp ~(keystone)]# heat_api=10.0.0.50
# create endpoint entry for 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 | +--------------+----------------------------------------+ # create endpoint entry for 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 | +--------------+----------------------------------------+ # create endpoint entry for 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 | +--------------+----------------------------------------+ # create endpoint entry for 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 | +--------------+----------------------------------+ # create endpoint entry for 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 | +--------------+----------------------------------+ # create endpoint entry for 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 | +--------------+----------------------------------+ # create Heat domain [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 | +-------------+----------------------------------+ # create "heat_domain_admin" user [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 | +-----------+----------------------------------+ # add "heat_domain_admin" user to admin role [root@dlp ~(keystone)]# openstack role add --domain heat --user heat_domain_admin admin
|
[3] | Create a database for Heat to 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)]>
MariaDB [(none)]> flush privileges; Query OK, 0 rows affected (0.00 sec) exit Bye |
Sponsored Link |
|