Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
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 Link kopierenLink in die Zwischenablage kopiert!
/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
# mysql -u root -p
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Create the
heat
database:mysql> CREATE DATABASE heat;
mysql> CREATE DATABASE heat;
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Create a database user named
heat
and grant the user access to theheat
database:mysql> GRANT ALL ON heat.* TO 'heat'@'%' IDENTIFIED BY 'PASSWORD'; mysql> GRANT ALL ON heat.* TO 'heat'@'localhost' IDENTIFIED BY 'PASSWORD';
mysql> GRANT ALL ON heat.* TO 'heat'@'%' IDENTIFIED BY 'PASSWORD'; mysql> GRANT ALL ON heat.* TO 'heat'@'localhost' IDENTIFIED BY 'PASSWORD';
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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;
mysql> FLUSH PRIVILEGES;
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Exit the mysql client:
mysql> quit
mysql> quit
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Set the value of the
sql_connection
configuration key:openstack-config --set /etc/heat/heat.conf \ DEFAULT sql_connection mysql://heat:PASSWORD@IP/heat
# openstack-config --set /etc/heat/heat.conf \ DEFAULT sql_connection mysql://heat:PASSWORD@IP/heat
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace the following values:- Replace PASSWORD with the password of the
heat
database user. - Replace IP with the IP address or host name of the database server.
- As the
heat
user, sync the database:runuser -s /bin/sh heat -c "heat-manage db_sync"
# runuser -s /bin/sh heat -c "heat-manage db_sync"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Important
9.2.2. Restrict the Bind Addresses of Each Orchestration API Service Link kopierenLink in die Zwischenablage kopiert!
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:
9.2.3. Create the Orchestration Service Identity Records Link kopierenLink in die Zwischenablage kopiert!
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
# source ~/keystonerc_admin
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Create the
heat
user:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace PASSWORD with a password that will be used by the Orchestration service when authenticating with the Identity service. - Link the
heat
user and theadmin
role together within the context of theservices
tenant:[(keystone_admin)]# keystone user-role-add --user heat --role admin --tenant services
[(keystone_admin)]# keystone user-role-add --user heat --role admin --tenant services
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Create the
heat
andheat-cfn
service entries:[(keystone_admin)]# keystone service-create --name heat \ --type orchestration # keystone service-create --name heat-cfn \ --type cloudformation
[(keystone_admin)]# keystone service-create --name heat \ --type orchestration # keystone service-create --name heat-cfn \ --type cloudformation
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Create endpoint entries for the
heat
service and theheat-cfn
service:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace the following values:- Replace HEAT_CFN_IP with the IP or host name of the system hosting the
heat-cfn
service. - Replace HEAT_IP with the IP or host name of the system hosting the
heat
service.
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 Link kopierenLink in die Zwischenablage kopiert!
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_token
configuration key in the/etc/keystone/keystone.conf
file of the Identity server:cat /etc/keystone/keystone.conf | grep admin_token admin_token = 0292d404a88c4f269383ff28a3839ab4
# cat /etc/keystone/keystone.conf | grep admin_token admin_token = 0292d404a88c4f269383ff28a3839ab4
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The 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-openstackclient
# yum install python-openstackclient
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run the rest of the steps in this procedure from the Red Hat Enterprise Linux 7.1 host. - Create the
heat
domain: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"
# 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"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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 theheat
domain. This ID (HEAT_DOMAIN_ID) is used in the next step. - Create a user named
heat_domain_admin
that can have administrative rights within theheat
domain: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
# 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"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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_admin
user administrative rights within theheat
domain: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
# 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
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - On the server hosting the Orchestration service, configure the service to use the
heat
domain and user:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
9.2.4. Configure Orchestration Service Authentication Link kopierenLink in die Zwischenablage kopiert!
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 services
# openstack-config --set /etc/heat/heat.conf \ keystone_authtoken admin_tenant_name services
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace 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
heat
administrative user account:openstack-config --set /etc/heat/heat.conf \ keystone_authtoken admin_user heat
# openstack-config --set /etc/heat/heat.conf \ keystone_authtoken admin_user heat
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Set the Orchestration services to use the correct
heat
administrative user account password:openstack-config --set /etc/heat/heat.conf \ keystone_authtoken admin_password PASSWORD
# openstack-config --set /etc/heat/heat.conf \ keystone_authtoken admin_password PASSWORD
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace PASSWORD with the password set when theheat
user was created. - Set the Identity service host that the Orchestration services must use:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace 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-cfn
andheat-api-cloudwatch
service host names to which virtual machine instances will connect:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace the following values:- Replace HEAT_CFN_HOST with the IP address or host name of the server hosting the
heat-api-cfn
service. - Replace HEAT_CLOUDWATCH_HOST with the IP address or host name of the server hosting the
heat-api-cloudwatch
service.
Important
Even if all services are hosted on the same system, do not use127.0.0.1
for 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
# openstack-config --set /etc/heat/heat.conf \ DEFAULT heat_stack_user_role heat_stack_user
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
9.2.5. Configure RabbitMQ Message Broker Settings for the Orchestration Service Link kopierenLink in die Zwischenablage kopiert!
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
# openstack-config --set /etc/heat/heat.conf \ DEFAULT rpc_backend heat.openstack.common.rpc.impl_kombu
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Set the Orchestration service to connect to the RabbitMQ host:
openstack-config --set /etc/heat/heat.conf \ DEFAULT rabbit_host RABBITMQ_HOST
# openstack-config --set /etc/heat/heat.conf \ DEFAULT rabbit_host RABBITMQ_HOST
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace 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
# openstack-config --set /etc/heat/heat.conf \ DEFAULT rabbit_port 5672
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 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_PASS
# openstack-config --set /etc/heat/heat.conf \ DEFAULT rabbit_userid heat # openstack-config --set /etc/heat/heat.conf \ DEFAULT rabbit_password HEAT_PASS
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replaceheat
and HEAT_PASS with the RabbitMQ user name and password created for the Orchestration service. - When RabbitMQ was launched, the
heat
user 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 /
# openstack-config --set /etc/heat/heat.conf \ DEFAULT rabbit_virtual_host /
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
9.2.6. Enable SSL Communication Between the Orchestration Service and the Message Broker Link kopierenLink in die Zwischenablage kopiert!
Procedure 9.6. Enabling SSL Communication Between the Orchestration Service and the RabbitMQ Message Broker
- Enable SSL communication with the message broker:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace 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.crt
# openstack-config --set /etc/heat/heat.conf \ DEFAULT kombu_ssl_ca_certs /path/to/ca.crt
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace /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).