9.2. Configure the Orchestration Service
- Configure a database for the Orchestration service.
- Bind each Orchestration API service to a corresponding IP address.
- Create and configure the Orchestration service Identity records.
- Configure how Orchestration services authenticate with the Identity service.
9.2.1. Create the Orchestration Service Database
/etc/heat/heat.conf file. It must be updated to point to a valid database server before the service is started. All steps in this procedure must be performed on the database server, while logged in as the root user.
Procedure 9.1. Configuring the Orchestration Service Database
- Connect to the database service:
#mysql -u root -p - Create the
heatdatabase:mysql>CREATE DATABASE heat; - Create a database user named
heatand grant the user access to theheatdatabase:mysql>GRANT ALL ON heat.* TO 'heat'@'%' IDENTIFIED BY 'PASSWORD';mysql>GRANT ALL ON heat.* TO 'heat'@'localhost' IDENTIFIED BY 'PASSWORD';Replace PASSWORD with a secure password that will be user to authenticate with the database server as this user. - Flush the database privileges to ensure that they take effect immediately:
mysql>FLUSH PRIVILEGES; - Exit the mysql client:
mysql>quit - Set the value of the
sql_connectionconfiguration key:#openstack-config --set /etc/heat/heat.conf \DEFAULT sql_connection mysql://heat:PASSWORD@IP/heatReplace the following values:- Replace PASSWORD with the password of the
heatdatabase user. - Replace IP with the IP address or host name of the database server.
- As the
heatuser, sync the database:#runuser -s /bin/sh heat -c "heat-manage db_sync"
Important
9.2.2. Restrict the Bind Addresses of Each Orchestration API Service
bind_host setting of each Orchestration API service. This setting controls which IP address a service should use for incoming connections.
bind_host setting for each Orchestration API service:
#openstack-config --set /etc/heat/heat.confheat_api bind_host IP#openstack-config --set /etc/heat/heat.confheat_api_cfn bind_host IP#openstack-config --set /etc/heat/heat.confheat_api_cloudwatch bind_host IP
9.2.3. Create the Orchestration Service Identity Records
services tenant. For more information, see:
keystonerc_admin file and on which the keystone command-line utility is installed.
Procedure 9.2. Creating Identity Records for the Orchestration Service
- Set up the shell to access Keystone as the administrative user:
#source ~/keystonerc_admin - Create the
heatuser:[(keystone_admin)]#keystone user-create --name heat --pass PASSWORD+----------+----------------------------------+ | Property | Value | +----------+----------------------------------+ | email | | | enabled | True | | id | 96cd855e5bfe471ce4066794bbafb615 | | name | heat | | username | heat | +----------+----------------------------------+Replace PASSWORD with a password that will be used by the Orchestration service when authenticating with the Identity service. - Link the
heatuser and theadminrole together within the context of theservicestenant:[(keystone_admin)]#keystone user-role-add --user heat --role admin --tenant services - Create the
heatandheat-cfnservice entries:[(keystone_admin)]#keystone service-create --name heat \--type orchestration#keystone service-create --name heat-cfn \--type cloudformation - Create endpoint entries for the
heatservice and theheat-cfnservice:[(keystone_admin)]#keystone endpoint-create \--service heat-cfn \--publicurl 'HEAT_CFN_IP:8000/v1' \--adminurl 'HEAT_CFN_IP:8000/v1' \--internalurl 'HEAT_CFN_IP:8000/v1' \--region 'RegionOne'[(keystone_admin)]#keystone endpoint-create \--service heat \--publicurl 'HEAT_IP:8004/v1/%(tenant_id)s' \--adminurl 'HEAT_IP:8004/v1/%(tenant_id)s' \--internalurl 'HEAT_IP:8004/v1/%(tenant_id)s' \--region 'RegionOne'Replace the following values:- Replace HEAT_CFN_IP with the IP or host name of the system hosting the
heat-cfnservice. - Replace HEAT_IP with the IP or host name of the system hosting the
heatservice.
Important
Include thehttp://prefix for HEAT_CFN_IP and HEAT_IP values.
9.2.3.1. Create the Required Identity Domain for the Orchestration Service
heat stacks. Using a separate domain allows for separation between the instances and the user deploying the stack. This allows regular users without administrative rights to deploy heat stacks that require such credentials.
Procedure 9.3. Creating an Identity Service Domain for the Orchestration Service
- Obtain the administrative token used by the Identity service. This token is the value of the
admin_tokenconfiguration key in the/etc/keystone/keystone.conffile of the Identity server:#cat /etc/keystone/keystone.conf | grep admin_tokenadmin_token = 0292d404a88c4f269383ff28a3839ab4The administrative token is used to perform all actions requiring administrative credentials. - Install the python-openstackclient package on the Red Hat Enterprise Linux 7.1 host you will use to create and configure the domain:
#yum install python-openstackclientRun the rest of the steps in this procedure from the Red Hat Enterprise Linux 7.1 host. - Create the
heatdomain:#openstack --os-token ADMIN_TOKEN --os-url=IDENTITY_IP:5000/v3 \--os-identity-api-version=3 domain create heat \--description "Owns users and projects created by heat"Replace the following values:- Replace ADMIN_TOKEN with the administrative token.
- Replace IDENTITY_IP with the IP or host name of the server hosting the Identity service.
This command returns the domain ID of theheatdomain. This ID (HEAT_DOMAIN_ID) is used in the next step. - Create a user named
heat_domain_adminthat can have administrative rights within theheatdomain:#openstack --os-token ADMIN_TOKEN --os-url=IDENTITY_IP:5000/v3 \--os-identity-api-version=3 user create heat_domain_admin \--password PASSWORD \--domain HEAT_DOMAIN_ID--description "Manages users and projects created by heat"Replace PASSWORD with a password for this user. This command returns a user ID (DOMAIN_ADMIN_ID), which is used in the next step. - Grant the
heat_domain_adminuser administrative rights within theheatdomain:#openstack --os-token ADMIN_TOKEN --os-url=IDENTITY_IP:5000/v3 \--os-identity-api-version=3 role add --user DOMAIN_ADMIN_ID \--domain HEAT_DOMAIN_ID admin - On the server hosting the Orchestration service, configure the service to use the
heatdomain and user:#openstack-config --set /etc/heat/heat.conf \DEFAULT stack_domain_admin_password DOMAIN_PASSWORD#openstack-config --set /etc/heat/heat.conf \DEFAULT stack_domain_admin heat_domain_admin#openstack-config --set /etc/heat/heat.conf \DEFAULT stack_user_domain HEAT_DOMAIN_ID
9.2.4. Configure Orchestration Service Authentication
root user.
Procedure 9.4. Configuring the Orchestration Service to Authenticate Through the Identity Service
- Set the Orchestration services to authenticate as the correct tenant:
#openstack-config --set /etc/heat/heat.conf \keystone_authtoken admin_tenant_name servicesReplace services is the name of the tenant created for the use of the Orchestration service. Examples in this guide useservices. - Set the Orchestration services to authenticate using the
heatadministrative user account:#openstack-config --set /etc/heat/heat.conf \keystone_authtoken admin_user heat - Set the Orchestration services to use the correct
heatadministrative user account password:#openstack-config --set /etc/heat/heat.conf \keystone_authtoken admin_password PASSWORDReplace PASSWORD with the password set when theheatuser was created. - Set the Identity service host that the Orchestration services must use:
#openstack-config --set /etc/heat/heat.conf \keystone_authtoken service_host KEYSTONE_HOST#openstack-config --set /etc/heat/heat.conf \keystone_authtoken auth_host KEYSTONE_HOST#openstack-config --set /etc/heat/heat.conf \keystone_authtoken auth_uri http://KEYSTONE_HOST:35357/v2.0#openstack-config --set /etc/heat/heat.conf \keystone_authtoken keystone_ec2_uri http://KEYSTONE_HOST:35357/v2.0Replace KEYSTONE_HOST with the IP address or host name of the server hosting the Identity service. If the Identity service is hosted on the same system, use127.0.0.1. - Configure the
heat-api-cfnandheat-api-cloudwatchservice host names to which virtual machine instances will connect:#openstack-config --set /etc/heat/heat.conf \DEFAULT heat_metadata_server_url HEAT_CFN_HOST:8000#openstack-config --set /etc/heat/heat.conf \DEFAULT heat_waitcondition_server_url HEAT_CFN_HOST:8000/v1/waitcondition#openstack-config --set /etc/heat/heat.conf \DEFAULT heat_watch_server_url HEAT_CLOUDWATCH_HOST:8003Replace the following values:- Replace HEAT_CFN_HOST with the IP address or host name of the server hosting the
heat-api-cfnservice. - Replace HEAT_CLOUDWATCH_HOST with the IP address or host name of the server hosting the
heat-api-cloudwatchservice.
Important
Even if all services are hosted on the same system, do not use127.0.0.1for either service host name. This IP address refers to the local host of each instance, and would therefore prevent the instance from reaching the actual service. - Application templates use wait conditions and signaling for orchestration. Define the Identity role for users that should receive progress data. By default, this role is
heat_stack_user:#openstack-config --set /etc/heat/heat.conf \DEFAULT heat_stack_user_role heat_stack_user
9.2.5. Configure RabbitMQ Message Broker Settings for the Orchestration Service
root user.
Procedure 9.5. Configuring the Orchestration Service to use the RabbitMQ Message Broker
- Set RabbitMQ as the RPC back end:
#openstack-config --set /etc/heat/heat.conf \DEFAULT rpc_backend heat.openstack.common.rpc.impl_kombu - Set the Orchestration service to connect to the RabbitMQ host:
#openstack-config --set /etc/heat/heat.conf \DEFAULT rabbit_host RABBITMQ_HOSTReplace RABBITMQ_HOST with the IP address or host name of the message broker. - Set the message broker port to
5672:#openstack-config --set /etc/heat/heat.conf \DEFAULT rabbit_port 5672 - Set the RabbitMQ user name and password created for the Orchestration service when RabbitMQ was configured:
#openstack-config --set /etc/heat/heat.conf \DEFAULT rabbit_userid heat#openstack-config --set /etc/heat/heat.conf \DEFAULT rabbit_password HEAT_PASSReplaceheatand HEAT_PASS with the RabbitMQ user name and password created for the Orchestration service. - When RabbitMQ was launched, the
heatuser was granted read and write permissions to all resources: specifically, through the virtual host/. Configure the Orchestration service to connect to this virtual host:#openstack-config --set /etc/heat/heat.conf \DEFAULT rabbit_virtual_host /
9.2.6. Enable SSL Communication Between the Orchestration Service and the Message Broker
Procedure 9.6. Enabling SSL Communication Between the Orchestration Service and the RabbitMQ Message Broker
- Enable SSL communication with the message broker:
#openstack-config --set /etc/heat/heat.conf \DEFAULT rabbit_use_ssl True#openstack-config --set /etc/heat/heat.conf \DEFAULT kombu_ssl_certfile /path/to/client.crt#openstack-config --set /etc/heat/heat.conf \DEFAULT kombu_ssl_keyfile /path/to/clientkeyfile.keyReplace the following values:- Replace /path/to/client.crt with the absolute path to the exported client certificate.
- Replace /path/to/clientkeyfile.key with the absolute path to the exported client key file.
- If your certificates were signed by a third-party Certificate Authority (CA), you must also run the following command:
#openstack-config --set /etc/heat/heat.conf \DEFAULT kombu_ssl_ca_certs /path/to/ca.crtReplace /path/to/ca.crt with the absolute path to the CA file provided by the third-party CA (see Section 2.3.4, “Enable SSL on the RabbitMQ Message Broker” for more information).

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.