29.Heat Orchestration介绍及部署

    • 配置服务步骤:
      1. 创建服务同名的用户,添加到services这个project和admin的role
      2. 创建services和endpoint
      3. 修改配置文件
      4. 更新数据库

 

    • 安装软件

# yum list *heat*

# yum install -y openstack-heat-api.noarch openstack-heat-api-cfn.noarch openstack-heat-api-

cloudwatch.noarch openstack-heat-engine.noarch  openstack-heat-templates.noarch

29.Heat Orchestration介绍及部署

 

    • 创建服务:

openstack user create heat --password redhat

29.Heat Orchestration介绍及部署

openstack role add --user heat --project services admin

29.Heat Orchestration介绍及部署

 

openstack service create --name heat orchestration

29.Heat Orchestration介绍及部署

 

openstack endpoint create --region RegionOne --publicurl 'http://192.168.179.140:8004/v1/%(tenant_id)s'  --internalurl 'http://192.168.179.140:8004/v1/%(tenant_id)s'  --adminurl 'http://192.168.179.140:8004/v1/%(tenant_id)s'  025d2c04de0b4ed2b731588b7f253860

29.Heat Orchestration介绍及部署

 

openstack service create --name heat-cfn cloudformation

29.Heat Orchestration介绍及部署

openstack endpoint create --region RegionOne --publicurl 'http://192.168.179.140:8000/v1'  --internalurl 'http://192.168.179.140:8000/v1'  --adminurl 'http://192.168.179.140:8000/v1'  11cbd712e9a24c2eb8ce1707b00a3241

 

29.Heat Orchestration介绍及部署

 

    • 修改配置文件:

29.Heat Orchestration介绍及部署

 

vim heat.conf

29.Heat Orchestration介绍及部署

 

[[email protected] heat(keystone_adminv2)]# grep ^rabbit /etc/keystone/keystone.conf

rabbit_host = 192.168.179.140

rabbit_port = 5672

rabbit_hosts = $rabbit_host:$rabbit_port

rabbit_use_ssl = false

rabbit_userid = guest

rabbit_password = guest

rabbit_virtual_host = /

 

加入到配置文件中

29.Heat Orchestration介绍及部署

 

29.Heat Orchestration介绍及部署

 

29.Heat Orchestration介绍及部署

 

    • 因为AMQP 用的是rabbitmq,不是qpid,修改即可:

 

29.Heat Orchestration介绍及部署

 

    • 创建数据库:

create database heat;

grant all privileges on heat.* to [email protected]'%' identified by 'redhat';

grant all privileges on heat.* to [email protected]'localhost' identified by 'redhat';

grant all privileges on heat.* to [email protected]'192.168.179.140' identified by 'redhat';

29.Heat Orchestration介绍及部署

 

sh -c 'heat-manage db_sync' heat

29.Heat Orchestration介绍及部署

 

    • 启动服务:

systemctl list-unit-files | grep heat

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

29.Heat Orchestration介绍及部署

 

    • 使用编排功能创建stack:

29.Heat Orchestration介绍及部署

 

29.Heat Orchestration介绍及部署

 

29.Heat Orchestration介绍及部署

 

创建过程中:

29.Heat Orchestration介绍及部署

创建成功:

29.Heat Orchestration介绍及部署

 

新建的网络:

29.Heat Orchestration介绍及部署

 

29.Heat Orchestration介绍及部署

 

29.Heat Orchestration介绍及部署

创建的实例VM:

29.Heat Orchestration介绍及部署