1) 安装Heat组件
[root@node1 ~(keystone)]# yum --enablerepo=centos-openstack-train,epel install openstack-heat-common python-heatclient -y
2) 于Keystone注册Heat信息
[root@node1 ~(keystone)]# openstack user create --domain default --project service --password servicepassword heat
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| default_project_id | 7972f61f4a1c4f2592d2bb6dc7711e81 |
| domain_id | default |
| enabled | True |
| id | 2fd508e31a5e4ac8b8193bba42173b50 |
| name | heat |
| options | {} |
| password_expires_at | None |
+---------------------+----------------------------------+
[root@node1 ~(keystone)]# openstack role add --project service --user heat admin
[root@node1 ~(keystone)]# openstack role create heat_stack_owner
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | None |
| domain_id | None |
| id | a95752467a60474a80d20e8279fd12ed |
| name | heat_stack_owner |
| options | {} |
+-------------+----------------------------------+
[root@node1 ~(keystone)]# openstack role create heat_stack_user
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | None |
| domain_id | None |
| id | a4f3c4378bd14e91b7952c0333657b24 |
| name | heat_stack_user |
| options | {} |
+-------------+----------------------------------+
[root@node1 ~(keystone)]# openstack role add --project admin --user admin heat_stack_owner
[root@node1 ~(keystone)]# openstack service create --name heat --description "Openstack Orchestration" orchestration
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | Openstack Orchestration |
| enabled | True |
| id | 8e4a3b97876c4b378f84fb469b505a6f |
| name | heat |
| type | orchestration |
+-------------+----------------------------------+
[root@node1 ~(keystone)]# openstack service create --name heat-cfn --description "Openstack Orchestration" cloudformation
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | Openstack Orchestration |
| enabled | True |
| id | 3cbd34ca6aa64df9b67a23dfdbaf0350 |
| name | heat-cfn |
| type | cloudformation |
+-------------+----------------------------------+
3) 创建Endpoint信息
[root@node1 ~(keystone)]# openstack endpoint create --region RegionOne orchestration public http://192.168.10.13:8004/v1/%\(tenant_id\)s
+--------------+--------------------------------------------+
| Field | Value |
+--------------+--------------------------------------------+
| enabled | True |
| id | e31cae320f12419297ae61f892fa32d3 |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 8e4a3b97876c4b378f84fb469b505a6f |
| service_name | heat |
| service_type | orchestration |
| url | http://192.168.10.13:8004/v1/%(tenant_id)s |
+--------------+--------------------------------------------+
[root@node1 ~(keystone)]# openstack endpoint create --region RegionOne orchestration internal http://192.168.10.13:8004/v1/%\(tenant_id\)s
+--------------+--------------------------------------------+
| Field | Value |
+--------------+--------------------------------------------+
| enabled | True |
| id | db7c59bcbb624c729941f53cc3f84971 |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 8e4a3b97876c4b378f84fb469b505a6f |
| service_name | heat |
| service_type | orchestration |
| url | http://192.168.10.13:8004/v1/%(tenant_id)s |
+--------------+--------------------------------------------+
[root@node1 ~(keystone)]# openstack endpoint create --region RegionOne orchestration admin http://192.168.10.13:8004/v1/%\(tenant_id\)s
+--------------+--------------------------------------------+
| Field | Value |
+--------------+--------------------------------------------+
| enabled | True |
| id | 30e63aa434b34792a82058e5e52299b3 |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 8e4a3b97876c4b378f84fb469b505a6f |
| service_name | heat |
| service_type | orchestration |
| url | http://192.168.10.13:8004/v1/%(tenant_id)s |
+--------------+--------------------------------------------+
[root@node1 ~(keystone)]# openstack endpoint create --region RegionOne cloudformation public http://192.168.10.13:8000/v1
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 1d5ac3d9bd2542518b850672345044e6 |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 3cbd34ca6aa64df9b67a23dfdbaf0350 |
| service_name | heat-cfn |
| service_type | cloudformation |
| url | http://192.168.10.13:8000/v1 |
+--------------+----------------------------------+
[root@node1 ~(keystone)]# openstack endpoint create --region RegionOne cloudformation internal http://192.168.10.13:8000/v1
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 821a8ab821334c9890348015db094949 |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 3cbd34ca6aa64df9b67a23dfdbaf0350 |
| service_name | heat-cfn |
| service_type | cloudformation |
| url | http://192.168.10.13:8000/v1 |
+--------------+----------------------------------+
[root@node1 ~(keystone)]# openstack endpoint create --region RegionOne cloudformation admin http://192.168.10.13:8000/v1
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 117ce7a0fec5411ba428c7c147fd5b5a |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 3cbd34ca6aa64df9b67a23dfdbaf0350 |
| service_name | heat-cfn |
| service_type | cloudformation |
| url | http://192.168.10.13:8000/v1 |
+--------------+----------------------------------+
4) 创建heat_domain并为其添加用户
[root@node1 ~(keystone)]# openstack domain create --description "Stack projects and users" heat
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | Stack projects and users |
| enabled | True |
| id | 901593b258194f3194c7a876cc6e2a06 |
| name | heat |
| options | {} |
| tags | [] |
+-------------+----------------------------------+
[root@node1 ~(keystone)]# openstack user create --domain heat --password servicepassword heat_domain_admin
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| domain_id | 901593b258194f3194c7a876cc6e2a06 |
| enabled | True |
| id | fc3d2a42e5b444a6b605edd9216dde65 |
| name | heat_domain_admin |
| options | {} |
| password_expires_at | None |
+---------------------+----------------------------------+
[root@node1 ~(keystone)]# openstack role add --domain heat --user heat_domain_admin admin
5) 配置数据库
[root@node1 ~(keystone)]# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 129
Server version: 10.1.20-MariaDB MariaDB Server
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
|