Heat安裝
-
- 一、資料庫配置
- 二、建立服務憑證和API端點
- 三、安裝并配置Heat
- 四、驗證操作
一、資料庫配置
Controller節點
# mysql -uroot -p123456
MariaDB [(none)]> create database heat;
MariaDB [(none)]> grant all privileges on heat.* to 'heat'@'localhost' identified by '123456';
MariaDB [(none)]> grant all privileges on heat.* to 'heat'@'%' identified by '123456';
MariaDB [(none)]> exit
二、建立服務憑證和API端點
Controller節點
1.建立服務憑證
# . /root/admin-openrc
# openstack user create --domain default --password-prompt heat
User Password:
Repeat User Password:
# openstack role add --project service --user heat admin
# openstack service create --name heat --description "Orchestration" orchestration
# openstack service create --name heat-cfn --description "Orchestration" cloudformation
2.建立API端點
# openstack endpoint create --region RegionOne orchestration public http://controller:8004/v1/%\(tenant_id\)s
# openstack endpoint create --region RegionOne cloudformation public http://controller:8000/v1
# openstack endpoint create --region RegionOne orchestration internal http://controller:8004/v1/%\(tenant_id\)s
# openstack endpoint create --region RegionOne cloudformation internal http://controller:8000/v1
# openstack endpoint create --region RegionOne orchestration admin http://controller:8004/v1/%\(tenant_id\)s
# openstack endpoint create --region RegionOne cloudformation admin http://controller:8000/v1
3.配置Heat身份管理服務
# openstack domain create --description "Stack projects and users" heat
# openstack user create --domain heat --password-prompt heat_domain_admin
User Password:
Repeat User Password:
# openstack role add --domain heat --user-domain heat --user heat_domain_admin admin
# openstack role create heat_stack_owner
# openstack role add --project demo --user demo heat_stack_owner
# openstack role create heat_stack_user
三、安裝并配置Heat
Controller節點
1.安裝Heat所需元件
# yum install -y openstack-heat-api openstack-heat-api-cfn openstack-heat-engine
2.配置Heat所需元件
編輯/etc/heat/heat.conf檔案
# vi /etc/heat/heat.conf
[DEFAULT]
rpc_backend = rabbit
heat_metadata_server_url = http://controller:8000
heat_waitcondition_server_url = http://controller:8000/v1/waitcondition
stack_domain_admin = heat_domain_admin
stack_domain_admin_password = 123456
stack_user_domain_name = heat
[keystone_authtoken] (keystone選項需要自己添加)
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = heat
password = 123456
[database]
connection = mysql+pymysql://heat:[email protected]/heat
[oslo_messaging_rabbit]
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = 123456
[trustee]
auth_plugin = password
auth_url = http://controller:35357
username = heat
password = 123456
user_domain_name = default
[clients_keystone]
auth_uri = http://controller:35357
[ec2authtoken]
auth_uri = http://controller:5000/v2.0
3.同步資料庫
# su -s /bin/sh -c "heat-manage db_sync" heat
4.啟動Heat服務并設定開機自啟
# systemctl enable openstack-heat-api.service openstack-heat-api-cfn.service openstack-heat-engine.service
# systemctl start openstack-heat-api.service openstack-heat-api-cfn.service openstack-heat-engine.service
四、驗證操作
# . /root/admin-openrc
# openstack orchestration service list