openstack-manuals/doc/install-guide/section_heat-verify.xml
Gauvain Pocentek fc35c1e61b [install-guide] Use the admin tenant to test heat
If nova-network is used, getting the network ID to run the heat example
stack requires admin rights. For simplicity, use the admin credentials
for both nova and neutron scenarios.

Change-Id: Ic2c5477154e608f94e8023e6d2a237d9879fc74b
Closes-Bug: #1437194
2015-04-27 16:26:03 +02:00

73 lines
3.3 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="5.0"
xml:id="heat-verify">
<title>Verify operation</title>
<para>This section describes how to verify operation of the Orchestration
module (heat).</para>
<procedure>
<step>
<para>Source the <literal>admin</literal> tenant credentials:</para>
<screen><prompt>$</prompt> <userinput>source admin-openrc.sh</userinput></screen>
</step>
<step>
<para>The Orchestration module uses templates to describe stacks. To learn
about the template language, see <link
xlink:href="http://docs.openstack.org/developer/heat/template_guide/index.html"
>the Template Guide</link> in the <link
xlink:href="http://docs.openstack.org/developer/heat/">Heat developer
documentation</link>.</para>
<para>Create a test template in the <filename>test-stack.yml</filename>
file with the following content:</para>
<programlisting language="yml">heat_template_version: 2014-10-16
description: A simple server.
parameters:
ImageID:
type: string
description: Image use to boot a server
NetID:
type: string
description: Network ID for the server
resources:
server:
type: OS::Nova::Server
properties:
image: { get_param: ImageID }
flavor: m1.tiny
networks:
- network: { get_param: NetID }
outputs:
private_ip:
description: IP address of the server in the private network
value: { get_attr: [ server, first_address ] }</programlisting>
</step>
<step>
<para>Use the <command>heat stack-create</command> command to create a
stack from the template:</para>
<screen><prompt>$</prompt> <userinput>NET_ID=$(nova net-list | awk '/ demo-net / { print $2 }')</userinput>
<prompt>$</prompt> <userinput>heat stack-create -f test-stack.yml \
-P "ImageID=cirros-0.3.3-x86_64;NetID=$NET_ID" testStack</userinput>
<computeroutput>+--------------------------------------+------------+--------------------+----------------------+
| id | stack_name | stack_status | creation_time |
+--------------------------------------+------------+--------------------+----------------------+
| 477d96b4-d547-4069-938d-32ee990834af | testStack | CREATE_IN_PROGRESS | 2014-04-06T15:11:01Z |
+--------------------------------------+------------+--------------------+----------------------+</computeroutput></screen>
</step>
<step>
<para>Use the <command>heat stack-list</command> command to verify
successful creation of the stack:</para>
<screen><prompt>$</prompt> <userinput>heat stack-list</userinput>
<computeroutput>+--------------------------------------+------------+-----------------+----------------------+
| id | stack_name | stack_status | creation_time |
+--------------------------------------+------------+-----------------+----------------------+
| 477d96b4-d547-4069-938d-32ee990834af | testStack | CREATE_COMPLETE | 2014-04-06T15:11:01Z |
+--------------------------------------+------------+-----------------+----------------------+</computeroutput></screen>
</step>
</procedure>
</section>