Este conteúdo não está disponível no idioma selecionado.
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 Copiar o linkLink copiado para a área de transferência!
/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 -pCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Create the
heatdatabase:mysql> CREATE DATABASE heat;
mysql> CREATE DATABASE heat;Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 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';
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> quitCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Set the value of the
sql_connectionconfiguration 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/heatCopy to Clipboard Copied! Toggle word wrap Toggle overflow Replace 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"
# 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 Copiar o linkLink copiado para a área de transferência!
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 Copiar o linkLink copiado para a área de transferência!
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_adminCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Create the
heatuser: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
heatuser and theadminrole together within the context of theservicestenant:[(keystone_admin)]# openstack role add --project services --user heat admin
[(keystone_admin)]# openstack role add --project services --user heat adminCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Create the
heatandheat-cfnservice entries:[(keystone_admin)]# openstack service create --name heat orchestration [(keystone_admin)]# openstack service create --name heat-cfn cloudformation
[(keystone_admin)]# openstack service create --name heat orchestration [(keystone_admin)]# openstack service create --name heat-cfn cloudformationCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Create endpoint entries for the
heatservice and theheat-cfnservice: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-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 Copiar o linkLink copiado para a área de transferência!
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
- Create the
heatdomain:openstack --os-url=http://IDENTITY_IP:5000/v3 \ --os-identity-api-version=3 \ --description "Owns users and projects created by heat"
# openstack --os-url=http://IDENTITY_IP:5000/v3 \ --os-identity-api-version=3 \ --description "Owns users and projects created by heat" domain create heatCopy to Clipboard Copied! Toggle word wrap Toggle overflow 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-url=http://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"
# openstack --os-url=http://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_adminuser administrative rights within theheatdomain:openstack --os-url=http://IDENTITY_IP:5000/v3 \ --os-identity-api-version=3 role add --user DOMAIN_ADMIN_ID \ --domain HEAT_DOMAIN_ID admin
# openstack --os-url=http://IDENTITY_IP:5000/v3 \ --os-identity-api-version=3 role add --user DOMAIN_ADMIN_ID \ --domain HEAT_DOMAIN_ID adminCopy to Clipboard Copied! Toggle word wrap Toggle overflow - On the server hosting the Orchestration service, configure the service to use the
heatdomain and user:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
9.2.4. Configure Orchestration Service Authentication Copiar o linkLink copiado para a área de transferência!
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 servicesCopy 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
heatadministrative 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 heatCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Set the Orchestration services to use the correct
heatadministrative 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 PASSWORDCopy to Clipboard Copied! Toggle word wrap Toggle overflow Replace PASSWORD with the password set when theheatuser 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-cfnandheat-api-cloudwatchservice 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-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
# openstack-config --set /etc/heat/heat.conf \ DEFAULT heat_stack_user_role heat_stack_userCopy to Clipboard Copied! Toggle word wrap Toggle overflow
9.2.5. Configure RabbitMQ Message Broker Settings for the Orchestration Service Copiar o linkLink copiado para a área de transferência!
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_kombuCopy 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_HOSTCopy 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 5672Copy 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_PASSCopy to Clipboard Copied! Toggle word wrap Toggle overflow Replaceheatand 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 /
# 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 Copiar o linkLink copiado para a área de transferência!
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.crtCopy 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).