Notes from Simon, quietly converted to html by using "awk 1 ORS='<br>\n' heat.txt > heat.html".

https://docs.openstack.org/heat/train/install/install.html

[on osbase]
# mysql
> CREATE DATABASE heat;
Query OK, 1 row affected (0.033 sec)
> GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'localhost' IDENTIFIED BY '[Redacted]';
Query OK, 0 rows affected (0.111 sec)
> GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'%' IDENTIFIED BY '[Redacted]';
Query OK, 0 rows affected (0.001 sec)
> quit
Bye
# source admin-openrc
# openstack user create --domain default --password-prompt heat
User Password: HEAT_PASS
Repeat User Password: HEAT_PASS
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| domain_id | default |
| enabled | True |
| id | c02f020fa6914a9cabcd7c3f6b54a878 |
| name | heat |
| options | {} |
| password_expires_at | None |
+---------------------+----------------------------------+
# openstack role add --project service --user heat admin


# openstack service create --name heat --description "Orchestration" orchestration
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | Orchestration |
| enabled | True |
| id | f4b8983f011e4e3daed97f5a5f0b929d |
| name | heat |
| type | orchestration |
+-------------+----------------------------------+
# openstack service create --name heat-cfn --description "Orchestration" cloudformation
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | Orchestration |
| enabled | True |
| id | 0498a89c09974e7a8285af57d93d3edc |
| name | heat-cfn |
| type | cloudformation |
+-------------+----------------------------------+
# openstack endpoint create --region RegionOne orchestration public https://osheat.grid.hep.ph.ic.ac.uk:8004/v1/%\(tenant_id\)s
+--------------+-----------------------------------------------------------+
| Field | Value |
+--------------+-----------------------------------------------------------+
| enabled | True |
| id | 42135557eb2249619b676b837263bf65 |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | f4b8983f011e4e3daed97f5a5f0b929d |
| service_name | heat |
| service_type | orchestration |
| url | https://osheat.grid.hep.ph.ic.ac.uk:8004/v1/%(tenant_id)s |
+--------------+-----------------------------------------------------------+
# openstack endpoint create --region RegionOne orchestration internal https://osheat.grid.hep.ph.ic.ac.uk:8004/v1/%\(tenant_id\)s
+--------------+-----------------------------------------------------------+
| Field | Value |
+--------------+-----------------------------------------------------------+
| enabled | True |
| id | 9f1fd4986944437296c7aba98006a56b |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | f4b8983f011e4e3daed97f5a5f0b929d |
| service_name | heat |
| service_type | orchestration |
| url | https://osheat.grid.hep.ph.ic.ac.uk:8004/v1/%(tenant_id)s |
+--------------+-----------------------------------------------------------+
# openstack endpoint create --region RegionOne orchestration admin https://osheat.grid.hep.ph.ic.ac.uk:8004/v1/%\(tenant_id\)s
+--------------+-----------------------------------------------------------+
| Field | Value |
+--------------+-----------------------------------------------------------+
| enabled | True |
| id | 4cf369d965884b5fbe4592763b807b4d |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | f4b8983f011e4e3daed97f5a5f0b929d |
| service_name | heat |
| service_type | orchestration |
| url | https://osheat.grid.hep.ph.ic.ac.uk:8004/v1/%(tenant_id)s |
+--------------+-----------------------------------------------------------+
# openstack endpoint create --region RegionOne cloudformation public https://osheat.grid.hep.ph.ic.ac.uk:8000/v1
+--------------+---------------------------------------------+
| Field | Value |
+--------------+---------------------------------------------+
| enabled | True |
| id | 0fdbd0011dc74df583235d155c5e9127 |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 0498a89c09974e7a8285af57d93d3edc |
| service_name | heat-cfn |
| service_type | cloudformation |
| url | https://osheat.grid.hep.ph.ic.ac.uk:8000/v1 |
+--------------+---------------------------------------------+
# openstack endpoint create --region RegionOne cloudformation internal https://osheat.grid.hep.ph.ic.ac.uk:8000/v1
+--------------+---------------------------------------------+
| Field | Value |
+--------------+---------------------------------------------+
| enabled | True |
| id | 1aeee0835d024d89bf7031ae95d29189 |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 0498a89c09974e7a8285af57d93d3edc |
| service_name | heat-cfn |
| service_type | cloudformation |
| url | https://osheat.grid.hep.ph.ic.ac.uk:8000/v1 |
+--------------+---------------------------------------------+
# openstack endpoint create --region RegionOne cloudformation admin https://osheat.grid.hep.ph.ic.ac.uk:8000/v1
+--------------+---------------------------------------------+
| Field | Value |
+--------------+---------------------------------------------+
| enabled | True |
| id | 14198043437f4c92acaeca6b3940da95 |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 0498a89c09974e7a8285af57d93d3edc |
| service_name | heat-cfn |
| service_type | cloudformation |
| url | https://osheat.grid.hep.ph.ic.ac.uk:8000/v1 |
+--------------+---------------------------------------------+

# openstack domain create --description "Stack projects and users" heat
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | Stack projects and users |
| enabled | True |
| id | 92c7fedf987f4abc8ebf2c372653d215 |
| name | heat |
| options | {} |
| tags | [] |
+-------------+----------------------------------+
openstack user create --domain heat --password-prompt heat_domain_admin
User Password: [HEAT_PASS]
Repeat User Password: [HEAT_PASS]
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| domain_id | 92c7fedf987f4abc8ebf2c372653d215 |
| enabled | True |
| id | d09040edf25f43499d725a95608aa611 |
| name | heat_domain_admin |
| options | {} |
| password_expires_at | None |
+---------------------+----------------------------------+

# openstack role add --domain heat --user-domain heat --user heat_domain_admin admin
# openstack role create heat_stack_owner
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | None |
| domain_id | None |
| id | a0d4c5a8352a488a87639d9a389aabfa |
| name | heat_stack_owner |
| options | {} |
+-------------+----------------------------------+
# openstack role create heat_stack_user
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | None |
| domain_id | None |
| id | 45a0df0cc8fb4c2aadbc9528af924653 |
| name | heat_stack_user |
| options | {} |
+-------------+----------------------------------+



[on osheat]
* /etc/grid-security/hostcert.pem & hostkey.pem are already installed.
* CentOS-OpenStack-train.repo also already exists
* epel.repo needs exclude=python2-zmq,python2-pyngus adding like neutron nodes

# yum install openstack-heat-api openstack-heat-api-cfn openstack-heat-engine
# edit /etc/heat/heat.conf
* [database] connection = mysql+pymysql://heat:[Redacted]@osbase.cloud/heat
* [DEFAULT] transport_url = rabbit://openstack:[Redacted]@osbase.cloud
* keystone_authtoken section missing, add it at the end, same as other services
* [trustee]:
auth_type = password
auth_url = https://oskeystone.grid.hep.ph.ic.ac.uk:5000
username = heat
password = [Redacted]
user_domain_name = default
* [clients_keystone] auth_uri = https://oskeystone.grid.hep.ph.ic.ac.uk:5000
* [DEFAULT]
heat_metadata_server_url = https://osheat.grid.hep.ph.ic.ac.uk:8000
heat_waitcondition_server_url = https://osheat.grid.hep.ph.ic.ac.uk:8000/v1/waitcondition
stack_user_domain_name = heat
stack_domain_admin = heat_domain_admin
stack_domain_admin_password = [Redacted]
* [ssl]
cert_file = /etc/grid-security/hostcert.pem
key_file = /etc/grid-security/hostkey.pem
* [heat_api]
cert_file = /etc/grid-security/hostcert.pem
key_file = /etc/grid-security/hostkey.pem
* [heat_api_cfn]
cert_file = /etc/grid-security/hostcert.pem
key_file = /etc/grid-security/hostkey.pem

# chown heat:heat /etc/grid-security/hostkey.pem
# su -s /bin/sh -c "heat-manage db_sync" heat
2020-01-30 11:09:34.648 15526 INFO migrate.versioning.api [-] 70 -> 71...
2020-01-30 11:09:35.428 15526 INFO migrate.versioning.api [-] done
...
# systemctl enable openstack-heat-api.service openstack-heat-api-cfn.service openstack-heat-engine.service
Created symlink from /etc/systemd/system/multi-user.target.wants/openstack-heat-api.service to /usr/lib/systemd/system/openstack-heat-api.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/openstack-heat-api-cfn.service to /usr/lib/systemd/system/openstack-heat-api-cfn.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/openstack-heat-engine.service to /usr/lib/systemd/system/openstack-heat-engine.service.
# systemctl start openstack-heat-api.service openstack-heat-api-cfn.service openstack-heat-engine.service
# Open ports 8000 & 8004 on the firewall


[Back on osbase]
# source admin-openrc
# yum install python2-heatclient
# openstack orchestration service list
+-----------------------------+-------------+--------------------------------------+-----------------------------+-------- +----------------------------+--------+
| Hostname | Binary | Engine ID | Host | Topic | Updated At | Status |
+-----------------------------+-------------+--------------------------------------+-----------------------------+-------- +----------------------------+--------+
| osheat.grid.hep.ph.ic.ac.uk | heat-engine | 937d46d3-3dc6-44cb-bd2d-c5c0b9f11b4b | osheat.grid.hep.ph.ic.ac.uk | engine | 2020-01-30T11:11:53.000000 | down |
| osheat.grid.hep.ph.ic.ac.uk | heat-engine | 76cc6a5b-03d7-4131-a473-d4aab096597d | osheat.grid.hep.ph.ic.ac.uk | engine | 2020-01-30T11:11:53.000000 | down |
| osheat.grid.hep.ph.ic.ac.uk | heat-engine | 64acc51c-2e42-4b67-96fd-3cca113a0490 | osheat.grid.hep.ph.ic.ac.uk | engine | 2020-01-30T11:16:30.000000 | up |
| osheat.grid.hep.ph.ic.ac.uk | heat-engine | 7e0351a3-2e9e-4615-8797-0a119afe9e4c | osheat.grid.hep.ph.ic.ac.uk | engine | 2020-01-30T11:16:30.000000 | up |
| osheat.grid.hep.ph.ic.ac.uk | heat-engine | ed9952cb-0257-45e0-a426-1eabb1bcb112 | osheat.grid.hep.ph.ic.ac.uk | engine | 2020-01-30T11:16:30.000000 | up |
| osheat.grid.hep.ph.ic.ac.uk | heat-engine | 9346445c-bfd2-43cf-b908-04b580ae6014 | osheat.grid.hep.ph.ic.ac.uk | engine | 2020-01-30T11:11:53.000000 | down |
| osheat.grid.hep.ph.ic.ac.uk | heat-engine | 75beb5b8-a56d-4936-9fdc-ace835b314d7 | osheat.grid.hep.ph.ic.ac.uk | engine | 2020-01-30T11:16:30.000000 | up |
| osheat.grid.hep.ph.ic.ac.uk | heat-engine | 0cb8efb7-42c7-4a1f-a1f5-315d86e636b1 | osheat.grid.hep.ph.ic.ac.uk | engine | 2020-01-30T11:11:53.000000 | down |
+-----------------------------+-------------+--------------------------------------+-----------------------------+--------+----------------------------+--------+
* 4 engines running (other 4 are probably from when it was restarted during configuration)

* Test engine (https://docs.openstack.org/heat/train/install/launch-instance.html)
# Create demo-template.yml from instuctions
# Edit demo-template.yml, make sure image, flavor and key_name actually exist on OpenStack.
# openstack network list (# Get provider network ID)
# export NET_ID=ca4dc934-e53d-441b-8b68-735d11f88844
# openstack stack create -t demo-template.yml --parameter "NetID=$NET_ID" stack
+---------------------+----------------------------------------------------------------------------------------------------------+
| Field | Value |
+---------------------+----------------------------------------------------------------------------------------------------------+
| id | 2fb5597a-9266-4449-b015-0e74f8911cee |
| stack_name | stack |
| description | Launch a basic instance with CirrOS image using the ``m1.tiny`` flavor, ``mykey`` key, and one network. |
| creation_time | 2020-01-30T11:29:08Z |
| updated_time | None |
| stack_status | CREATE_IN_PROGRESS |
| stack_status_reason | Stack CREATE started |
+---------------------+----------------------------------------------------------------------------------------------------------+
# openstack stack list
+--------------------------------------+------------+--------------------+----------------------+--------------+
| ID | Stack Name | Stack Status | Creation Time | Updated Time |
+--------------------------------------+------------+--------------------+----------------------+--------------+
| 2fb5597a-9266-4449-b015-0e74f8911cee | stack | CREATE_IN_PROGRESS | 2020-01-30T11:29:08Z | None |
+--------------------------------------+------------+--------------------+----------------------+--------------+
* Some time later:
# openstack stack list
+--------------------------------------+------------+-----------------+----------------------+--------------+
| ID | Stack Name | Stack Status | Creation Time | Updated Time |
+--------------------------------------+------------+-----------------+----------------------+--------------+
| 2fb5597a-9266-4449-b015-0e74f8911cee | stack | CREATE_COMPLETE | 2020-01-30T11:29:08Z | None |
+--------------------------------------+------------+-----------------+----------------------+--------------+
# openstack stack output show --all stack
+---------------+-------------------------------------------------+
| Field | Value |
+---------------+-------------------------------------------------+
| instance_name | { |
| | "output_value": "stack-server-fnvdscsh7uqc", |
| | "output_key": "instance_name", |
| | "description": "Name of the instance." |
| | } |
| instance_ip | { |
| | "output_value": "146.179.236.7", |
| | "output_key": "instance_ip", |
| | "description": "IP address of the instance." |
| | } |
+---------------+-------------------------------------------------+
# openstack stack delete stack
Are you sure you want to delete this stack(s) [y/N]? y
[on oshorizon]
# yum install openstack-heat-ui
# systemctl restart httpd.service

Now we have the Orchestration panel on the web interface :-)

Nice!
Yay!
Great!