ee146d0112
Updates also clouddocs-maven-plugin to 1.11.1 Change-Id: Id5b325d5ad7d33f0b5e1bb1a63d9b48178aa45f4 author: diane fleming
127 lines
8.2 KiB
XML
127 lines
8.2 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<section xmlns="http://docbook.org/ns/docbook"
|
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
xmlns:xi="http://www.w3.org/2001/XInclude"
|
|
xmlns:svg="http://www.w3.org/2000/svg"
|
|
xmlns:html="http://www.w3.org/1999/xhtml" version="5.0"
|
|
xml:id="heat-stack-create">
|
|
<?dbhtml stop-chunking?>
|
|
<title>Create and manage stacks</title>
|
|
<section xml:id="create_stack">
|
|
<title>Create a stack from an example template file</title>
|
|
<procedure>
|
|
<step>
|
|
<para>To create a stack, or template, from an <link
|
|
xlink:href="https://github.com/openstack/heat-templates"
|
|
>example template file</link>, run the following
|
|
command:</para>
|
|
<screen><prompt>$</prompt> <userinput>heat stack-create mystack --template-file=/<replaceable>PATH_TO_HEAT_TEMPLATES</replaceable>/WordPress_Single_Instance.template</userinput>
|
|
<userinput>--parameters="InstanceType=m1.large;DBUsername=<replaceable>USERNAME</replaceable>;DBPassword=<replaceable>PASSWORD</replaceable>;KeyName=<replaceable>HEAT_KEY</replaceable>;LinuxDistribution=F17"</userinput></screen>
|
|
<para>The <literal>--parameters</literal> values that
|
|
you specify depend on the parameters that are defined
|
|
in the template. If a website hosts the template file, you can specify the URL with the
|
|
<literal>--template-url</literal> parameter
|
|
instead of the <literal>--template-file</literal>
|
|
parameter.</para>
|
|
<para>The command returns the following output:</para>
|
|
<screen><computeroutput>+--------------------------------------+---------------+--------------------+----------------------+
|
|
| id | stack_name | stack_status | creation_time |
|
|
+--------------------------------------+---------------+--------------------+----------------------+
|
|
| 4c712026-dcd5-4664-90b8-0915494c1332 | mystack | CREATE_IN_PROGRESS | 2013-04-03T23:22:08Z |
|
|
+--------------------------------------+---------------+--------------------+----------------------+</computeroutput></screen>
|
|
</step>
|
|
<step>
|
|
<para>You can also use the
|
|
<command>stack-create</command> command to
|
|
validate a template file without creating a stack
|
|
from it.</para>
|
|
<para>To do so, run the following command:</para>
|
|
<screen><prompt>$</prompt> <userinput>heat stack-create mystack --template-file=/<replaceable>PATH_TO_HEAT_TEMPLATES</replaceable>/WordPress_Single_Instance.template</userinput></screen>
|
|
<para>If validation fails, the response returns an
|
|
error message.</para>
|
|
</step>
|
|
</procedure>
|
|
</section>
|
|
<section xml:id="stack_info">
|
|
<title>Get information about stacks</title>
|
|
<para>To explore the state and history of a particular stack,
|
|
you can run a number of commands.</para>
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para>To see which stacks are visible to the current
|
|
user, run the following command:</para>
|
|
<screen><prompt>$</prompt> <userinput>heat stack-list</userinput>
|
|
<computeroutput>+--------------------------------------+---------------+-----------------+----------------------+
|
|
| id | stack_name | stack_status | creation_time |
|
|
+--------------------------------------+---------------+-----------------+----------------------+
|
|
| 4c712026-dcd5-4664-90b8-0915494c1332 | mystack | CREATE_COMPLETE | 2013-04-03T23:22:08Z |
|
|
| 7edc7480-bda5-4e1c-9d5d-f567d3b6a050 | my-otherstack | CREATE_FAILED | 2013-04-03T23:28:20Z |
|
|
+--------------------------------------+---------------+-----------------+----------------------+</computeroutput></screen>
|
|
</listitem>
|
|
<listitem>
|
|
<para>To show the details of a stack, run the
|
|
following command:</para>
|
|
<screen><prompt>$</prompt> <userinput>heat stack-show mystack</userinput></screen>
|
|
</listitem>
|
|
<listitem>
|
|
<para>A stack consists of a collection of
|
|
resources.</para>
|
|
<para>To list the resources and their status, run the
|
|
following command:</para>
|
|
<screen><prompt>$</prompt> <userinput>heat resource-list mystack</userinput>
|
|
<computeroutput>+---------------------+--------------------+-----------------+----------------------+
|
|
| logical_resource_id | resource_type | resource_status | updated_time |
|
|
+---------------------+--------------------+-----------------+----------------------+
|
|
| WikiDatabase | AWS::EC2::Instance | CREATE_COMPLETE | 2013-04-03T23:25:56Z |
|
|
+---------------------+--------------------+-----------------+----------------------+</computeroutput></screen>
|
|
</listitem>
|
|
<listitem>
|
|
<para>To show the details for the specified resource
|
|
in a stack, run the following command:</para>
|
|
<screen><prompt>$</prompt> <userinput>heat resource-show mystack WikiDatabase</userinput></screen>
|
|
<para>Some resources have associated metadata which
|
|
can change throughout the life-cycle of a
|
|
resource:</para>
|
|
<screen><prompt>$</prompt> <userinput>heat resource-metadata mystack WikiDatabase</userinput></screen>
|
|
</listitem>
|
|
<listitem>
|
|
<para>A series of events is generated during the
|
|
life-cycle of a stack.</para>
|
|
<para>To display life-cycle events, run::</para>
|
|
<screen><prompt>$</prompt> <userinput>heat event-list mystack</userinput>
|
|
<computeroutput>+---------------------+----+------------------------+-----------------+----------------------+
|
|
| logical_resource_id | id | resource_status_reason | resource_status | event_time |
|
|
+---------------------+----+------------------------+-----------------+----------------------+
|
|
| WikiDatabase | 1 | state changed | IN_PROGRESS | 2013-04-03T23:22:09Z |
|
|
| WikiDatabase | 2 | state changed | CREATE_COMPLETE | 2013-04-03T23:25:56Z |
|
|
+---------------------+----+------------------------+-----------------+----------------------+</computeroutput></screen>
|
|
</listitem>
|
|
<listitem>
|
|
<para>To show the details for a particular event, run
|
|
the following command:</para>
|
|
<screen><prompt>$</prompt> <userinput>heat event-show WikiDatabase 1</userinput></screen>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</section>
|
|
<section xml:id="update_stack">
|
|
<title>Update a stack</title>
|
|
<procedure xml:id="heat-stack-update">
|
|
<step>
|
|
<para>To update an existing stack from a modified
|
|
template file, run a command like the following
|
|
command:</para>
|
|
<screen><prompt>$</prompt> <userinput>heat stack-update mystack --template-file=/path/to/heat/templates/WordPress_Single_Instance_v2.template</userinput>
|
|
<userinput>--parameters="InstanceType=m1.large;DBUsername=wp;DBPassword=verybadpassword;KeyName=heat_key;LinuxDistribution=F17"</userinput>
|
|
<computeroutput>+--------------------------------------+---------------+-----------------+----------------------+
|
|
| id | stack_name | stack_status | creation_time |
|
|
+--------------------------------------+---------------+-----------------+----------------------+
|
|
| 4c712026-dcd5-4664-90b8-0915494c1332 | mystack | UPDATE_COMPLETE | 2013-04-03T23:22:08Z |
|
|
| 7edc7480-bda5-4e1c-9d5d-f567d3b6a050 | my-otherstack | CREATE_FAILED | 2013-04-03T23:28:20Z |
|
|
+--------------------------------------+---------------+-----------------+----------------------+</computeroutput></screen>
|
|
<para>Some resources are updated in-place, while
|
|
others are replaced with new resources.</para>
|
|
</step>
|
|
</procedure>
|
|
</section>
|
|
</section>
|