安装heat
在控制节点上执行
controller-heat(){
mysql -uroot -p${MYSQL_PASSWD} << EOF
DROP DATABASE IF EXISTS heat;
CREATE DATABASE heat;
GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'localhost' IDENTIFIED BY '${HEAT_PASSWD}';
GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'%' IDENTIFIED BY '${HEAT_PASSWD}';
EOF
source ~/admin-openrc
openstack user create --domain default --password ${HEAT_PASSWD} heat
openstack role add --project service --user heat admin
openstack service create --name heat --description "Orchestration" orchestration
openstack endpoint create --region RegionOne orchestration public http://${controllerHost}:8004/v1/%\(tenant_id\)s
openstack endpoint create --region RegionOne orchestration internal http://${controllerHost}:8004/v1/%\(tenant_id\)s
openstack endpoint create --region RegionOne orchestration admin http://${controllerHost}:8004/v1/%\(tenant_id\)s
openstack service create --name heat-cfn --description "Orchestration" cloudformation
openstack endpoint create --region RegionOne cloudformation public http://${controllerHost}:8000/v1
openstack endpoint create --region RegionOne cloudformation internal http://${controllerHost}:8000/v1
openstack endpoint create --region RegionOne cloudformation admin http://${controllerHost}:8000/v1
openstack domain create --description "Stack projects and users" heat
openstack user create --domain heat --password ${HEAT_PASSWD} heat_domain_admin
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
yum -y install openstack-heat-api openstack-heat-api-cfn openstack-heat-engine
openstack-config --set /etc/heat/heat.conf database connection mysql+pymysql://heat:${HEAT_PASSWD}@${controllerHost}/heat
openstack-config --set /etc/heat/heat.conf DEFAULT transport_url rabbit://openstack:${RABBIT_PASSWD}@${controllerHost}:5672
openstack-config --set /etc/heat/heat.conf keystone_authtoken auth_uri http://${controllerHost}:5000
openstack-config --set /etc/heat/heat.conf keystone_authtoken auth_url http://${controllerHost}:35357
openstack-config --set /etc/heat/heat.conf keystone_authtoken memcached_servers ${controllerHost}:11211
openstack-config --set /etc/heat/heat.conf keystone_authtoken auth_type password
openstack-config --set /etc/heat/heat.conf keystone_authtoken project_domain_name default
openstack-config --set /etc/heat/heat.conf keystone_authtoken user_domain_name default
openstack-config --set /etc/heat/heat.conf keystone_authtoken project_name service
openstack-config --set /etc/heat/heat.conf keystone_authtoken username heat
openstack-config --set /etc/heat/heat.conf keystone_authtoken password ${HEAT_PASSWD}
openstack-config --set /etc/heat/heat.conf trustee auth_type password
openstack-config --set /etc/heat/heat.conf trustee auth_url http://${controllerHost}:35357
openstack-config --set /etc/heat/heat.conf trustee username heat
openstack-config --set /etc/heat/heat.conf trustee password ${HEAT_PASSWD}
openstack-config --set /etc/heat/heat.conf trustee user_domain_name default
openstack-config --set /etc/heat/heat.conf clients_keystone auth_uri http://${controllerHost}:5000
openstack-config --set /etc/heat/heat.conf DEFAULT heat_metadata_server_url http://${controllerHost}:8000
openstack-config --set /etc/heat/heat.conf DEFAULT heat_waitcondition_server_url http://${controllerHost}:8000/v1/waitcondition
openstack-config --set /etc/heat/heat.conf DEFAULT stack_domain_admin heat_domain_admin
openstack-config --set /etc/heat/heat.conf DEFAULT stack_domain_admin_password ${HEAT_PASSWD}
openstack-config --set /etc/heat/heat.conf DEFAULT stack_user_domain_name heat
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
systemctl status openstack-heat-api.service openstack-heat-api-cfn.service openstack-heat-engine.service
}
本文作者:努力提高自己才是硬道理。
本文链接:https://www.cnblogs.com/jipinglong/p/11223207.html
版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步