diff --git a/doc/common/section_getstart_orchestration.xml b/doc/common/section_getstart_orchestration.xml index 47ce148c33..bc9486f199 100644 --- a/doc/common/section_getstart_orchestration.xml +++ b/doc/common/section_getstart_orchestration.xml @@ -2,7 +2,7 @@ xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" xml:id="orchestration-service"> - Orchestration module + Orchestration module concepts The Orchestration module provides a template-based orchestration for describing a cloud application, by running OpenStack API calls to generate running cloud applications. The diff --git a/doc/install-guide/ch_heat.xml b/doc/install-guide/ch_heat.xml index 13e1a9a186..14a5983ac3 100644 --- a/doc/install-guide/ch_heat.xml +++ b/doc/install-guide/ch_heat.xml @@ -3,10 +3,9 @@ xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" xml:id="ch_heat"> - Add the Orchestration service - Use the Orchestration module to create cloud resources using a - template language called HOT. The integrated project name is - Heat. + Add the Orchestration module + The Orchestration module (heat) uses a heat orchestration template + (HOT) to create and manage cloud resources. diff --git a/doc/install-guide/section_heat-install.xml b/doc/install-guide/section_heat-install.xml index ff60c6f4c4..3c5049130a 100644 --- a/doc/install-guide/section_heat-install.xml +++ b/doc/install-guide/section_heat-install.xml @@ -2,198 +2,186 @@
- Install the Orchestration service - + Install and configure Orchestration + This section describes how to install and configure the + Orchestration module (heat) on the controller node. + + To configure prerequisites + Before you install and configure Orchestration, you must create a + database and Identity service credentials including endpoints. - Install the Orchestration module on the controller - node: - # apt-get install heat-api heat-api-cfn heat-engine + Connect to the database server as the root user: + $ mysql -u root -p + Create the heat database: + mysql> CREATE DATABASE heat; + Grant the + proper access to the database: + mysql> GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'localhost' IDENTIFIED BY 'HEAT_DBPASS'; +mysql> GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'%' IDENTIFIED BY 'HEAT_DBPASS'; +mysql> exit + Replace HEAT_DBPASS with a suitable + password. - Respond to prompts for database - management, [keystone_authtoken] - settings, RabbitMQ - credentials and API endpoint registration. - - - - - Install the Orchestration module on the controller - node: - # apt-get install heat-api heat-api-cfn heat-engine - # yum install openstack-heat-api openstack-heat-engine \ - openstack-heat-api-cfn - # zypper install openstack-heat-api openstack-heat-api-cfn \ - openstack-heat-engine - - - In the configuration file, specify the location of the - database where the Orchestration service stores data. These - examples use a MySQL database with a - heat user on the controller node. Replace - HEAT_DBPASS with the password for - the database user: - # openstack-config --set /etc/heat/heat.conf \ - database connection mysql://heat:HEAT_DBPASS@controller/heat - Edit - /etc/heat/heat.conf and modify the - [database] section: - [database] -# The SQLAlchemy connection string used to connect to the database -connection = mysql://heat:HEAT_DBPASS@controller/heat - - - By default, the Ubuntu packages create an SQLite database. - Delete the heat.sqlite file that was created in - the /var/lib/heat/ directory so that it - does not get used by mistake: - # rm /var/lib/heat/heat.sqlite - - - Use the password that you set previously to log in as root and - create a heat database user: - $ mysql -u root -p -mysql> CREATE DATABASE heat; -mysql> GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'localhost' \ -IDENTIFIED BY 'HEAT_DBPASS'; -mysql> GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'%' \ -IDENTIFIED BY 'HEAT_DBPASS'; - - - Create the heat service tables: - # su -s /bin/sh -c "heat-manage db_sync" heat - - Ignore DeprecationWarning - errors. - - - - The Ubuntu packages do not correctly set up logging. Edit - the /etc/heat/heat.conf file and change - the [DEFAULT] section: - [DEFAULT] -... -# Print more verbose output (set logging level to INFO instead -# of default WARNING level). (boolean value) -verbose = True -... -# (Optional) The base directory used for relative --log-file -# paths (string value) -log_dir=/var/log/heat - - - Configure the Orchestration Service to use the RabbitMQ - message broker. - Edit /etc/heat/heat.conf - and modify the [DEFAULT] section: - rabbit_host = controller -rabbit_password = RABBIT_PASS - Run the following commands: - # openstack-config --set /etc/heat/heat.conf DEFAULT rabbit_host controller -# openstack-config --set /etc/heat/heat.conf DEFAULT rabbit_password RABBIT_PASS - - - Create a heat user that the - Orchestration service can use to authenticate with the - Identity Service. Use the service tenant - and give the user the admin role: - $ keystone user-create --name=heat --pass=HEAT_PASS \ - --email=heat@example.com -$ keystone user-role-add --user=heat --tenant=service --role=admin - - - Edit the /etc/heat/heat.conf file to - change the [keystone_authtoken] and - [ec2authtoken] sections to add - credentials to the Orchestration Service: - [keystone_authtoken] -auth_host = controller -auth_port = 35357 -auth_protocol = http -auth_uri = http://controller:5000/v2.0 -admin_tenant_name = service -admin_user = heat -admin_password = HEAT_PASS - -[ec2authtoken] -auth_uri = http://controller:5000/v2.0 - - - Edit the /etc/heat/heat.conf file to - change the [ec2authtoken] sections: - [ec2authtoken] -auth_uri = http://controller:5000/v2.0 - - - Register the Heat and CloudFormation APIs with the - Identity Service so that other OpenStack services can locate - these APIs. Register the services and specify the - endpoints: - $ keystone service-create --name=heat --type=orchestration \ + Create Identity service credentials: + + + Create the heat user: + $ keystone user-create --name heat --pass HEAT_PASS --email EMAIL_ADDRESS + Replace HEAT_PASS with a suitable + password and EMAIL_ADDRESS with + a suitable e-mail address. + + + Link the heat user to the + service tenant and admin + role: + $ keystone user-role-add --user heat --tenant service --role admin + + + Create the heat and + heat-cfn services: + $ keystone service-create --name=heat --type=orchestration \ --description="Orchestration" -$ keystone endpoint-create \ +$ keystone service-create --name=heat-cfn --type=cloudformation \ + --description="Orchestration CloudFormation" + + + Create the heat_stack_user role: + By default, users created by Orchestration use this role. + $ keystone role-create --name heat_stack_user + + + + + Create the Identity service endpoints: + $ keystone endpoint-create \ --service-id=$(keystone service-list | awk '/ orchestration / {print $2}') \ --publicurl=http://controller:8004/v1/%\(tenant_id\)s \ --internalurl=http://controller:8004/v1/%\(tenant_id\)s \ --adminurl=http://controller:8004/v1/%\(tenant_id\)s -$ keystone service-create --name=heat-cfn --type=cloudformation \ - --description="Orchestration CloudFormation" $ keystone endpoint-create \ --service-id=$(keystone service-list | awk '/ cloudformation / {print $2}') \ --publicurl=http://controller:8000/v1 \ --internalurl=http://controller:8000/v1 \ --adminurl=http://controller:8000/v1 + + + To install and configure the Orchestration components - Create the heat_stack_user role. - This role is used as the default role for users created by the - Orchestration module. - Run the following command to create the - heat_stack_user role: - $ keystone role-create --name heat_stack_user + Run the following commands to install the packages: + # apt-get install heat-api heat-api-cfn heat-engine + # yum install openstack-heat-api openstack-heat-engine openstack-heat-api-cfn + # zypper install openstack-heat-api openstack-heat-engine openstack-heat-api-cfn - Configure the metadata and waitcondition servers' URLs. - Edit the /etc/heat/heat.conf file - and modify the following options in the [DEFAULT] - section: - [DEFAULT] + Edit the /etc/heat/heat.conf file. + + + In the [database] section, configure + database access: + [database] ... -# URL of the Heat metadata server. (string value) -heat_metadata_server_url = http://10.0.0.11:8000 +connection = mysql://heat:HEAT_DBPASS@controller/heat + Replace HEAT_DBPASS with the password + you chose for the Orchestration database. + + + In the [DEFAULT] section, configure + RabbitMQ message broker access: + [DEFAULT] +... +rpc_backend = heat.openstack.common.rpc.impl_kombu +rabbit_host = controller +rabbit_password = RABBIT_PASS + Replace RABBIT_PASS with the password + you chose for the guest account in + RabbitMQ. + + + In the [keystone_authtoken] and + [ec2authtoken] sections, configure Identity + service access: + [keystone_authtoken] +... +auth_uri = http://controller:5000/v2.0 +auth_host = controller +auth_port = 35357 +auth_protocol = http +admin_tenant_name = service +admin_user = heat +admin_password = HEAT_PASS -# URL of the Heat waitcondition server. (string value) -heat_waitcondition_server_url = http://10.0.0.11:8000/v1/waitcondition - Run the following commands to modify the - [DEFAULT] section of the - /etc/heat/heat.conf file: - # openstack-config --set /etc/heat/heat.conf \ - DEFAULT heat_metadata_server_url http://10.0.0.11:8000 -# openstack-config --set /etc/heat/heat.conf \ - DEFAULT heat_waitcondition_server_url http://10.0.0.11:8000/v1/waitcondition - - The example uses the IP address of the controller (10.0.0.11) - instead of the controller host name since our - example architecture does not include a DNS setup. Make sure that - the instances can resolve the controller host name if you choose to - use it in the URLs. - +[ec2authtoken] +... +auth_uri = http://controller:5000/v2.0 + Replace HEAT_PASS with the + password you chose for the heat user + in the Identity service. + + + In the [DEFAULT] section, configure + the metadata and wait condition URLs: + [DEFAULT] +... +heat_metadata_server_url = http://controller:8000 +heat_waitcondition_server_url = http://controller:8000/v1/waitcondition + + + Configure the log directory in the [DEFAULT] + section: + [DEFAULT] +... +log_dir = /var/log/heat + + - - Restart the service with its new settings: + + + To install and configure the Orchestration components + + Run the following commands to install the packages: + # apt-get install heat-api heat-api-cfn heat-engine + + + Respond to prompts for + database management, + Identity service + credentials, + service endpoint + registration, and + message broker + credentials. + + + Respond to the debconf configuration + tool prompts. + + + Edit the /etc/heat/heat.conf file. + + + In the [ec2authtoken] section, configure + Identity service access for EC2 operations: + [ec2authtoken] +... +auth_uri = http://controller:5000/v2.0 + + + + + + To finalize installation + + Restart the Orchestration services: # service heat-api restart # service heat-api-cfn restart # service heat-engine restart - Start the heat-api, heat-api-cfn and heat-engine services and configure them to - start when the system boots: + Start the Orchestration services and configure them to start when + the system boots: # service openstack-heat-api start # service openstack-heat-api-cfn start # service openstack-heat-engine start @@ -201,5 +189,11 @@ heat_waitcondition_server_url = http://10.0.0.11:8000 # chkconfig openstack-heat-api-cfn on # chkconfig openstack-heat-engine on + + By default, the Ubuntu packages create a SQLite database. + Because this configuration uses a SQL database server, you + can remove the SQLite database file: + # rm /var/lib/heat/heat.sqlite +
diff --git a/doc/install-guide/section_heat-verify.xml b/doc/install-guide/section_heat-verify.xml index ad234dde30..b263128a9e 100644 --- a/doc/install-guide/section_heat-verify.xml +++ b/doc/install-guide/section_heat-verify.xml @@ -2,28 +2,29 @@
- - Verify the Orchestration service installation - - To verify that the Orchestration service is installed and configured - correctly, make sure that your credentials are set up correctly in the - demo-openrc.sh file. Source the file, as follows: - - $ source demo-openrc.sh - - The Orchestration Module uses templates to describe stacks. To learn - about the template languages, see Verify operation + This section describes how to verify operation of the Orchestration + module (heat). + + + Source the demo tenant credentials: + $ source demo-openrc.sh + + + The Orchestration module uses templates to describe stacks. To learn + about the template language, see the Template Guide in the the Template Guide in the Heat developer - documentation. - Create a test template in the test-stack.yml - file with the following content: - - - Use the heat stack-create command to create a stack - from this template: - $ NET_ID=$(nova net-list | awk '/ demo-net / { print $2 }') + documentation. + Create a test template in the test-stack.yml + file with the following content: + + + + Use the heat stack-create command to create a + stack from the template: + $ NET_ID=$(nova net-list | awk '/ demo-net / { print $2 }') $ heat stack-create -f test-stack.yml \ -P "ImageID=cirros-0.3.2-x86_64;NetID=$NET_ID" testStack +--------------------------------------+------------+--------------------+----------------------+ @@ -31,13 +32,16 @@ +--------------------------------------+------------+--------------------+----------------------+ | 477d96b4-d547-4069-938d-32ee990834af | testStack | CREATE_IN_PROGRESS | 2014-04-06T15:11:01Z | +--------------------------------------+------------+--------------------+----------------------+ - - Verify that the stack was created successfully with the heat stack-list command: - $ heat stack-list + + + Use the heat stack-list command to verify + successful creation of the stack: + $ heat stack-list +--------------------------------------+------------+-----------------+----------------------+ | id | stack_name | stack_status | creation_time | +--------------------------------------+------------+-----------------+----------------------+ | 477d96b4-d547-4069-938d-32ee990834af | testStack | CREATE_COMPLETE | 2014-04-06T15:11:01Z | +--------------------------------------+------------+-----------------+----------------------+ - + +