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 the Template Guide in the Heat developer documentation.
Create a test template in the test-stack.yml
file with the following content:
heat_template_version: 2013-05-23 description: Test Template parameters: ImageID: type: string description: Image use to boot a server NetID: type: string description: Network ID for the server resources: server1: type: OS::Nova::Server properties: name: "Test server" image: { get_param: ImageID } flavor: "m1.tiny" networks: - network: { get_param: NetID } outputs: server1_private_ip: description: IP address of the server in the private network value: { get_attr: [ server1, first_address ] }
Use the heat stack-create command to create a stack from this 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 +--------------------------------------+------------+--------------------+----------------------+ | id | stack_name | stack_status | creation_time | +--------------------------------------+------------+--------------------+----------------------+ | 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 +--------------------------------------+------------+-----------------+----------------------+ | id | stack_name | stack_status | creation_time | +--------------------------------------+------------+-----------------+----------------------+ | 477d96b4-d547-4069-938d-32ee990834af | testStack | CREATE_COMPLETE | 2014-04-06T15:11:01Z | +--------------------------------------+------------+-----------------+----------------------+