Ubuntu 14.04
Sponsored Link

OpenStack Liberty : Configure Heat#12015/12/28

 
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)#
apt-get -y install 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 | ba3f5997c2474c13b36e6f6bc47a264c |
| domain_id          | default                          |
| enabled            | True                             |
| id                 | c18a6f879637400195971948e5e3f2f3 |
| 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    | 20e98d8d382a4e6dbaa17acc18c90396 |
| name  | heat_stack_owner                 |
+-------+----------------------------------+

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

+-------+----------------------------------+
| Field | Value                            |
+-------+----------------------------------+
| id    | fdd6a18108c84594b55aef28fbcc80fc |
| 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          | b2eac8e5cad84aee82c371a07668ac79 |
| 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          | ca138f370d7048d69d113d31bfda9a01 |
| 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           | 2bd3073b892f499781d798a1e6f4218b       |
| interface    | public                                 |
| region       | RegionOne                              |
| region_id    | RegionOne                              |
| service_id   | b2eac8e5cad84aee82c371a07668ac79       |
| 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           | 6cee932be43d46afb3fa78c98c7570ca       |
| interface    | internal                               |
| region       | RegionOne                              |
| region_id    | RegionOne                              |
| service_id   | b2eac8e5cad84aee82c371a07668ac79       |
| 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           | d880dbbc547b429da79d9ef2f20042f4       |
| interface    | admin                                  |
| region       | RegionOne                              |
| region_id    | RegionOne                              |
| service_id   | b2eac8e5cad84aee82c371a07668ac79       |
| 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           | e1df300d57614cd8bbeed5a183565ef0 |
| interface    | public                           |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | ca138f370d7048d69d113d31bfda9a01 |
| 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           | 6fdf7d24d43e4f70b2c2e981c0b14295 |
| interface    | internal                         |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | ca138f370d7048d69d113d31bfda9a01 |
| 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           | 11b112056e8641e1918a19772fa55f69 |
| interface    | admin                            |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | ca138f370d7048d69d113d31bfda9a01 |
| 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          | c971bfd39ea148e79a139fb30f9b4d82 |
| name        | heat                             |
+-------------+----------------------------------+

# create "heat_domain_admin" user

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

+-----------+----------------------------------+
| Field     | Value                            |
+-----------+----------------------------------+
| domain_id | c971bfd39ea148e79a139fb30f9b4d82 |
| enabled   | True                             |
| id        | d91802a2f4bb4c64a1c6a7073d9b6b34 |
| 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 47
Server version: 5.5.46-MariaDB-1ubuntu0.14.04.2 (Ubuntu)

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
Matched Content