Rate This Document
Findability
Accuracy
Completeness
Readability

Installing, Configuring, and Verifying Heat

The Heat orchestration service uses the OpenStack-native Rest API and CloudFormation-compatible Query API to install the Heat orchestration template (HOT) or CloudFormation templates to orchestrate service components.

Install, configure, and verify Heat on controller nodes.

Creating the Heat Database

  1. Use a database access client to connect to the database server as user root.
    1
    mysql -u root -p
    
  2. Create a database for Heat.
    1
    CREATE DATABASE heat;
    
  3. Grant proper access to the Heat database.
    1
    2
    3
    4
    GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'localhost' \
    IDENTIFIED BY '<PASSWORD>';
    GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'%' \
    IDENTIFIED BY '<PASSWORD>';
    
  4. Exit the database.

Configuring Environment

  1. Source the admin credentials to gain access to admin-only CLI commands.
    1
    source /etc/keystone/admin-openrc
    
  2. Create the service credentials.
    1. Create the heat user.
      1
      openstack user create --domain default --password-prompt heat
      
    2. Add the admin role to the heat user.
      1
      openstack role add --project service --user heat admin
      
    3. Create the heat and heat-cfn service entities.
      1
      2
      openstack service create --name heat --description "Orchestration" orchestration
      openstack service create --name heat-cfn --description "Orchestration" cloudformation
      

    4. Create API endpoints of the Orchestration service.
       1
       2
       3
       4
       5
       6
       7
       8
       9
      10
      11
      12
      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
      

  3. The Orchestration service needs other information in the Identity service to manage stacks. Perform the following steps to add this information:
    1. Create a heat domain that contains stack projects and users.
      1
      openstack domain create --description "Stack projects and users" heat
      
    2. Create the heat_domain_admin user to manage projects and users in the heat domain and set the password.
      1
      openstack user create --domain heat --password-prompt heat_domain_admin
      
    3. Add the admin role to the heat_domain_admin user in the heat domain to enable stack management rights for the heat_domain_admin user.
      1
      openstack role add --domain heat --user-domain heat --user heat_domain_admin admin
      
    4. In the heat domain, create a common project demo and the demo user.
      1
      2
      openstack project create --domain heat --description "Demo Project" demo
      openstack user create --domain heat --password-prompt demo
      
    5. Create the heat_stack_owner role.
      1
      openstack role create heat_stack_owner
      
    6. Add the heat_stack_owner role to the demo project and user to enable the stack management rights for the demo user.
      1
      openstack role add --project demo --user demo heat_stack_owner
      
    7. Create the heat_stack_user role.
      1
      openstack role create heat_stack_user
      

Installing and Configuring Heat

  1. Install the software packages.
    1
    yum -y install openstack-heat-api openstack-heat-api-cfn openstack-heat-engine
    
  2. Modify the /etc/rabbitmq/rabbitmq.config file.
    1
    {delegate_count, 96}
    
  3. Edit the /etc/heat/heat.conf file and make the following changes:
    1. In the [DEFAULT] section, configure the message queue access port and basic stack management authentication.
      1
      2
      3
      4
      5
      6
      7
      8
      [DEFAULT]
      transport_url = rabbit://openstack:<RABBIT_PASSWORD>@controller
      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 = <HEAT_DOMAIN_PASSWORD>
      stack_user_domain_name = heat
      num_engine_workers = 4
      

      RABBIT_PASSWORD is the password set for the openstack user in the RabbitMQ service, and HEAT_DOMAIN_PASSWORD is the password of the heat domain.

    2. In the [heat_api] section, set the number of Heat APIs that can be called.
      1
      2
      [heat_api]
      workers = 4
      
    3. Configure the database access address.
      1
      2
      [database]
      connection = mysql+pymysql://heat:<PASSWORD>@controller/heat
      
    4. Configure Keystone authentication information.
       1
       2
       3
       4
       5
       6
       7
       8
       9
      10
      [keystone_authtoken]
      www_authenticate_uri = http://controller:5000
      auth_url = http://controller:5000
      memcached_servers = controller:11211
      auth_type = password
      project_domain_name = default
      user_domain_name = default
      project_name = service
      username = heat
      password = <PASSWORD>
      
    5. In the [trustee] section, configure Identity service access.
      1
      2
      3
      4
      5
      6
      [trustee]
      auth_type = password
      auth_url = http://controller:5000
      username = heat
      password = <PASSWORD>
      user_domain_name = default
      
    6. In the [clients_keystone] section, configure Identity service access.
      1
      2
      [clients_keystone]
      auth_uri = http://controller:5000
      
  4. Populate the Orchestration databases.
    1
    su -s /bin/sh -c "heat-manage db_sync" heat
    

Completing the Installation

  1. Enable the Orchestration service and configure it to start as the system boots.
    1
    2
    3
    4
    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
    

Verifying Heat

  1. Log in to the OpenStack CLI as the admin user.
    1
    source /etc/keystone/admin-openrc
    
  2. List service components to verify that each process is successfully started and registered.
    1
    openstack orchestration service list