Ubuntu 16.04
Sponsored Link

OpenStack Mitaka : Configure Heat#1
2016/06/08
 
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 | 004097e8a2da45e6a68f6474b5bd7207 |
| domain_id          | 780b41cee03242da9ec0c73e1a76dc6e |
| enabled            | True                             |
| id                 | 00f27a8be32e4abb890eddfbafcc1d69 |
| 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                            |
+-----------+----------------------------------+
| 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                  |
+-----------+----------------------------------+

# 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          | 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                   |
+-------------+----------------------------------+

# 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           | 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 |
+--------------+----------------------------------------+

# 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           | 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 |
+--------------+----------------------------------------+

# 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           | 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 |
+--------------+----------------------------------------+

# 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           | 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         |
+--------------+----------------------------------+

# 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           | 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         |
+--------------+----------------------------------+

# 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           | 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         |
+--------------+----------------------------------+

# 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          | 0f12bf87be5a4e01b93afed5d8200408 |
| name        | heat                             |
+-------------+----------------------------------+

# create "heat_domain_admin" user

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                |
+-----------+----------------------------------+

# 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 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)]>
flush privileges;

Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
exit

Bye
Matched Content
 
Tweet