在控制节点安装
1、首先进入数据库创建heat数据库,并且赋予权限
mysql -u root -pCREATE DATABASE heat;
GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'localhost' \
IDENTIFIED BY 'HEAT_DBPASS';
GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'%' \
IDENTIFIED BY 'HEAT_DBPASS';
2、创建heat用户并且添加规则
openstack user create --domain default --password-prompt heatopenstack role add --project service --user heat admin
3、创建heat和heat-cfn服务
openstack service create --name heat \--description "Orchestration" orchestration
openstack service create --name heat-cfn \
--description "Orchestration" cloudformation
4、创建heat服务API端口
openstack endpoint create --region RegionOne \orchestration public http://controller:8004/v1/%\(tenant_id\)s
openstack endpoint create --region RegionOne \
orchestration internal http://controller:8004/v1/%\(tenant_id\)s
openstack endpoint create --region RegionOne \
orchestration admin http://controller:8004/v1/%\(tenant_id\)s
openstack endpoint create --region RegionOne \
cloudformation public http://controller:8000/v1
openstack endpoint create --region RegionOne \
cloudformation internal http://controller:8000/v1
openstack endpoint create --region RegionOne \
cloudformation admin http://controller:8000/v1
5、创建包含项目和用户的heat域
openstack domain create --description "Stack projects and users" heat6、创建heat_domain_admin用户来管理heat域中的项目和用户,并且添加规则
openstack user create --domain heat --password-prompt heat_domain_adminpenstack role add --domain heat --user-domain heat --user heat_domain_admin admin
7、创建heat_stack_owner用户,并且添加规则
openstack role create heat_stack_owneropenstack role add --project demo --user demo heat_stack_owner
8、创建heat_stack_user规则
openstack role create heat_stack_user9、安装heat软件包
yum install openstack-heat-api openstack-heat-api-cfn \openstack-heat-engine
10、修改配置文件/etc/heat/heat.conf
[database]connection = mysql+pymysql://heat:HEAT_DBPASS@controller/heat
[DEFAULT]
transport_url = rabbit://openstack:RABBIT_PASS@controller
[keystone_authtoken]
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 = HEAT_PASS
[trustee]
auth_type = password
auth_url = http://controller:35357
username = heat
password = HEAT_PASS
user_domain_name = default
[clients_keystone]
auth_uri = http://controller:35357
[ec2authtoken]
auth_uri = http://controller:5000/v3
[DEFAULT]
heat_metadata_server_url = http://controller:8000
heat_waitcondition_server_url = http://controller:8000/v1/waitcondition
[DEFAULT]
stack_domain_admin = heat_domain_admin
stack_domain_admin_password = HEAT_DOMAIN_PASS
stack_user_domain_name = heat
11、同步数据看
su -s /bin/sh -c "heat-manage db_sync" heat12、启动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