Create a stack from an example template file

  1. To create a stack, or template, from an example template file, run following command:

    $ heat stack-create mystack --template-file=/path/to/heat/templates/WordPress_Single_Instance.template \
            --parameters="InstanceType=m1.large;DBUsername=wp;DBPassword=verybadpassword;KeyName=heat_key;LinuxDistribution=F17"

    The --parameters values that you specify depend on which parameters are defined in the template. If the template file is hosted on a website, you can specify the URL with --template-url parameter instead of the --template-file parameter.

    The command returns the following output:

    +--------------------------------------+---------------+--------------------+----------------------+
    | id                                   | stack_name    | stack_status       | creation_time        |
    +--------------------------------------+---------------+--------------------+----------------------+
    | 4c712026-dcd5-4664-90b8-0915494c1332 | mystack       | CREATE_IN_PROGRESS | 2013-04-03T23:22:08Z |
    +--------------------------------------+---------------+--------------------+----------------------+
  2. You can also use the stack-create command to validate a template file without creating a stack from it.

    To do so, run the following command:

    $ heat stack-create mystack --template-file=/path/to/heat/templates/WordPress_Single_Instance.template

    If validation fails, the response returns an error message.

Log a bug against this page

loading table of contents...