补的第九节:9 安装Heat编配服务

9.1通过脚本安装heat服务

9.2-9.8编配服务的操作命令已经编写成shell脚本,通过脚本进行一键安装。如下:

#Controller节点

执行脚本iaas-install-heat.sh进行安装

9.2安装heat编配服务软件包

# yum install openstack-heat-api openstack-heat-api-cfn openstack-heat-engine openstack-heat-ui -y

9.3创建数据库

# mysql -u root -p

mysql> CREATE DATABASE heat;

mysql> GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'localhost' IDENTIFIED BY '$HEAT_DBPASS';

    mysql> GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'%' IDENTIFIED BY  '$HEAT_DBPASS';

9.4创建用户

# openstack user create --domain $DOMAIN_NAME --password $HEAT_PASS heat

# openstack role add --project service --user heat admin

# openstack domain create --description "Stack projects and users" heat

# openstack user create --domain heat  --password $HEAT_PASS 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

9.5创建EndpointAPI端点

# 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://$HOST_NAME:8004/v1/%\(tenant_id\)s

# openstack endpoint create --region RegionOne orchestration internal http://$HOST_NAME:8004/v1/%\(tenant_id\)s

# openstack endpoint create --region RegionOne orchestration admin http://$HOST_NAME:8004/v1/%\(tenant_id\)s

# openstack endpoint create --region RegionOne cloudformation public http://$HOST_NAME:8000/v1

# openstack endpoint create --region RegionOne cloudformation internal http://$HOST_NAME:8000/v1

# openstack endpoint create --region RegionOne cloudformation admin http://$HOST_NAME:8000/v1

9.6配置Heat服务

# crudini --set /etc/heat/heat.conf database connection mysql+pymysql://heat:$HEAT_DBPASS@$HOST_NAME/heat

# crudini --set /etc/heat/heat.conf DEFAULT transport_url rabbit://$RABBIT_USER:$RABBIT_PASS@$HOST_NAME

# crudini --set /etc/heat/heat.conf keystone_authtoken auth_uri  http://$HOST_NAME:5000

# crudini --set /etc/heat/heat.conf keystone_authtoken auth_url  http://$HOST_NAME:35357

# crudini --set /etc/heat/heat.conf keystone_authtoken memcached_servers  $HOST_NAME:11211

# crudini --set /etc/heat/heat.conf keystone_authtoken auth_type  password

# crudini --set /etc/heat/heat.conf keystone_authtoken project_domain_name  $DOMAIN_NAME

# crudini --set /etc/heat/heat.conf keystone_authtoken user_domain_name $DOMAIN_NAME

# crudini --set /etc/heat/heat.conf keystone_authtoken project_name  service

# crudini --set /etc/heat/heat.conf keystone_authtoken username  heat

# crudini --set /etc/heat/heat.conf keystone_authtoken password  $HEAT_PASS

# crudini --set /etc/heat/heat.conf trustee auth_plugin password

# crudini --set /etc/heat/heat.conf trustee auth_url http://$HOST_NAME:35357

# crudini --set /etc/heat/heat.conf trustee username heat

# crudini --set /etc/heat/heat.conf trustee password $HEAT_PASS

# crudini --set /etc/heat/heat.conf trustee user_domain_name $DOMAIN_NAME

# crudini --set /etc/heat/heat.conf clients_keystone auth_uri http://$HOST_NAME:35357

# crudini --set /etc/heat/heat.conf DEFAULT heat_metadata_server_url http://$HOST_NAME:8000

# crudini --set /etc/heat/heat.conf DEFAULT heat_waitcondition_server_url http://$HOST_NAME:8000/v1/waitcondition

# crudini --set /etc/heat/heat.conf DEFAULT stack_domain_admin heat_domain_admin

# crudini --set /etc/heat/heat.conf DEFAULT stack_domain_admin_password $HEAT_PASS

# crudini --set /etc/heat/heat.conf DEFAULT stack_user_domain_name heat

9.7创建数据库

# su -s /bin/sh -c "heat-manage db_sync" heat

9.8启动服务

# systemctl enable openstack-heat-api.service openstack-heat-api-cfn.service openstack-heat-engine.service

# systemctl restart openstack-heat-api.service openstack-heat-api-cfn.service openstack-heat-engine.service

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

离陌殇殃

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值