↓↓↓↓↓↓↓↓视频已上线B站↓↓↓↓↓↓↓↓
本章节仅在Controller节点执行
1.Controller节点执行安装和配置
1.创建数据库
# mysql -uroot -p000000
> create database heat;
> grant all privileges on heat.* to 'heat'@'localhost' identified by '000000';
> grant all privileges on heat.* to 'heat'@'%' identified by '000000';
2.获取管理员凭证并创建服务
# . /root/admin-openrc
# openstack user create --domain default --password 000000 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
3.创建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
4.为了管理栈,在认证服务中Orchestration需要更多信息。为了添加这些信息,完成下面的步骤:
# openstack domain create --description "Stack projects and users" heat
# openstack user create --domain heat --password 000000 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
5.安装软件包
# yum -y install openstack-heat-api openstack-heat-api-cfn openstack-heat-engine
6.编辑文件 /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 = 000000
stack_user_domain_name = heat
在 [database] 部分,配置数据库访问:
connection = mysql+pymysql://heat:000000@controller/heat
在[oslo_messaging_rabbit]”部分,配置 “RabbitMQ” 消息队列访问:
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = 000000
`这里的[keystone_authtoken] 需要手动添加``
在``[keystone_authtoken]部分,配置认证服务访问:`
[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 = 000000
在[trustee]部分,配置认证服务访问:
auth_plugin = password
auth_url = http://controller:35357
username = heat
password = 000000
user_domain_name = default
在[clients_keystone]部分,配置认证服务访问:
auth_uri = http://controller:35357
在[ec2authtoken]部分,配置认证服务访问:
auth_uri = http://controller:5000/v2.0
7.同步数据库
# su -s /bin/sh -c "heat-manage db_sync" heat
8.启动并设置开机启动
# systemctl start openstack-heat-api.service openstack-heat-api-cfn.service openstack-heat-engine.service
# systemctl enable openstack-heat-api.service openstack-heat-api-cfn.service openstack-heat-engine.service
2.验证操作
1.source 租户`admin
的凭证脚本:
# . /root/admin-openrc
2.列出服务组件,以验证是否成功启动并注册了每个进程
# openstack orchestration service list