openstack pike版本安装笔记8(Orchestration Server:heat组件,模板服务)
Orchestration Server模板服务(heat): 创建用户(heat) openstack user create --domain default --password-prompt heat 将用户heat关联至租户(项目service)和role上: openstack role add --project service --user heat admin 创建heat和heat-cfn服务实体: openstack service create --name heat --description "Orchestration" orchestration openstack service create --name heat-cfn --description "Orchestration" cloudformation 创建heat服务和heat-cfn端点(endpoint): openstack endpoint create --region RegionOne orchestration public http://con.colinshi.top:8004/v1/%\(tenant_id\)s openstack endpoint create --region RegionOne orchestration internal http://con.colinshi.top:8004/v1/%\(tenant_id\)s openstack endpoint create --region RegionOne orchestration admin http://con.colinshi.top:8004/v1/%\(tenant_id\)s openstack endpoint create --region RegionOne cloudformation public http://con.colinshi.top:8000/v1 openstack endpoint create --region RegionOne cloudformation internal http://con.colinshi.top:8000/v1 openstack endpoint create --region RegionOne cloudformation admin http://con.colinshi.top:8000/v1 创建heat domain: openstack domain create --description "Stack projects and users" heat 创建heat domain内的用户: openstack user create --domain heat --password-prompt heat_domain_admin 将用户heat关联至租户(heat domain)和role上并赋予管理堆栈管理权限: openstack role add --domain heat --user-domain heat --user heat_domain_admin admin 创建heat_stack_owner角色(role): openstack role create heat_stack_owner 将heat_stack_owner角色添加到demo项目和用户,启用用户的堆栈管理demo openstack role add --project demo --user demo heat_stack_owner 创建heat_stack_user角色(role): openstack role create heat_stack_user 注:Orchestration服务自动将heat_stack_user角色分配给在堆栈部署期间创建的用户。默认情况下,此角色限制API操作。为避免冲突,请勿将此角色添加到具有该heat_stack_owner角色的用户。 安装heat服务: yum install openstack-heat-api openstack-heat-api-cfn openstack-heat-engine 编辑配置文件/etc/heat/heat.conf: [DEFAULT] transport_url = rabbit://rabbit:rabbit@con.colinshi.top heat_metadata_server_url = http://con.colinshi.top:8000 heat_waitcondition_server_url = http://con.colinshi.top:8000/v1/waitcondition stack_domain_admin = heat_domain_admin stack_domain_admin_password = heat_domain_admin stack_user_domain_name = heat [database] connection = mysql+pymysql://root:123456@con.colinshi.top/heat [keystone_authtoken] auth_uri = http://con.colinshi.top:5000 auth_url = http://con.colinshi.top:35357 memcached_servers = con.colinshi.top:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = heat password = heat [trustee] auth_type = password auth_url = http://con.colinshi.top:35357 username = heat password = heat user_domain_name = default [clients_keystone] auth_uri = http://con.colinshi.top:35357 [ec2authtoken] auth_uri = http://con.colinshi.top:5000/v3 初始化heat服务的数据库: su -s /bin/sh -c "heat-manage db_sync" heat 启动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 验证操作: 列出服务组件以验证每个进程的成功启动和注册: openstack orchestration service list +------------------+-------------+--------------------------------------+------------------+--------+----------------------------+--------+ | Hostname | Binary | Engine ID | Host | Topic | Updated At | Status | +------------------+-------------+--------------------------------------+------------------+--------+----------------------------+--------+ | con.colinshi.top | heat-engine | 6df53a83-28f6-4b3f-8c0b-27b9f2d051ee | con.colinshi.top | engine | 2018-08-07T07:09:40.000000 | up | | con.colinshi.top | heat-engine | 67b72bfd-f4c9-4f64-b759-a4a71a0ec6d3 | con.colinshi.top | engine | 2018-08-07T07:09:40.000000 | up | | con.colinshi.top | heat-engine | 594cbfa6-c73f-4ea0-b4d0-2eff060facfc | con.colinshi.top | engine | 2018-08-07T07:09:40.000000 | up | | con.colinshi.top | heat-engine | 3c79abfe-56a5-442d-a339-b22ed3800029 | con.colinshi.top | engine | 2018-08-07T07:09:40.000000 | up | +------------------+-------------+--------------------------------------+------------------+--------+----------------------------+--------+ 注:此输出应指示heat-engine控制器节点上的四个组件(默认为4或主机上的CPU数量,以较大者为准)。