Heat提供基于模板的编排服务。请在控制节点安装Heat。
mysql -u root -p
1 2 3 | CREATE 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'; |
将HEAT_DBPASS替换为Heat数据库用户的密码,请根据实际需求进行设置。密码中请勿包含字符“#@$”,支持特殊字符“&=- _ . + ! * ()”
exit
source ~/.admin-openrc openstack user create --domain default --password-prompt heat 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 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
openstack domain create --description "heat stack" heat openstack user create --domain heat --password-prompt heat_domain_admin openstack role add --domain heat --user-domain heat --user heat_domain_admin admin openstack role create heat_stack_owner openstack role create heat_stack_user
密码中请勿包含字符“#@$”,支持特殊字符“&=- _ . + ! * ()”
yum install openstack-heat-api openstack-heat-api-cfn openstack-heat-engine
vi /etc/heat/heat.conf
[DEFAULT] transport_url = rabbit://openstack:RABBIT_PASSWORD@controller 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 = HEAT_DOMAIN_PASSWORD stack_user_domain_name = heat [database] connection = mysql+pymysql://heat:HEAT_DBPASS@controller/heat # 配置Keystone认证信息,配置文件中默认没有[keystone_authtoken]模块参数,需要新增。 [keystone_authtoken] www_authenticate_uri = http://controller:5000 auth_url = http://controller:5000 memcached_servers = controller:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = heat password = HEAT_PASSWORD [trustee] auth_type = password auth_url = http://controller:5000 username = heat password = HEAT_PASSWORD user_domain_name = default [clients_keystone] auth_uri = http://controller:5000
以下参数请根据实际情况修改:
su -s /bin/sh -c "heat-manage db_sync" 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