~ubuntu-branches/ubuntu/trusty/heat/trusty-security

« back to all changes in this revision

Viewing changes to doc/source/template_guide/hot_guide.rst

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2013-10-03 09:43:04 UTC
  • mto: This revision was merged to the branch mainline in revision 15.
  • Revision ID: package-import@ubuntu.com-20131003094304-zhhr2brapzlpvjmm
Tags: upstream-2013.2~rc1
ImportĀ upstreamĀ versionĀ 2013.2~rc1

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
 
55
55
  resources:
56
56
    my_instance:
57
 
      type: OS::Nova::Compute
 
57
      type: OS::Nova::Server
58
58
      properties:
59
 
        KeyName: my_key
60
 
        ImageId: F18-x86_64-cfntools
61
 
        InstanceType: m1.small
 
59
        key_name: my_key
 
60
        image: F18-x86_64-cfntools
 
61
        flavor: m1.small
62
62
 
63
63
Each HOT template has to include the *heat_template_version* key with value
64
64
'2013-05-23' (the current version of HOT). While the *description* is optional,
74
74
 
75
75
The *resources* section is required and must contain at least one resource
76
76
definition. In the example above, a compute instance is defined with fixed
77
 
values for the 'KeyName', 'ImageId' and 'InstanceType' parameters.
 
77
values for the 'key_name', 'image' and 'flavor' parameters.
78
78
 
79
79
Note that all those elements, i.e. a key-pair with the given name, the image and
80
80
the flavor have to exist in the OpenStack environment where the template is
115
115
 
116
116
  resources:
117
117
    my_instance:
118
 
      type: OS::Nova::Compute
 
118
      type: OS::Nova::Server
119
119
      properties:
120
 
        KeyName: { get_param: key_name }
121
 
        ImageId: { get_param: image_id }
122
 
        InstanceType: { get_param: instance_type }
 
120
        key_name: { get_param: key_name }
 
121
        image: { get_param: image_id }
 
122
        flavor: { get_param: instance_type }
123
123
 
124
124
In the example above, three input parameters have been defined that have to be
125
125
provided by the user upon deployment. The fixed values for the respective
216
216
  outputs:
217
217
    instance_ip:
218
218
      description: The IP address of the deployed instance
219
 
      value: { get_attr: [my_instance, PublicIp] }
 
219
      value: { get_attr: [my_instance, first_address] }
220
220
 
221
221
Output values are typically resolved using intrinsic function such as
222
222
the *get_attr* function in the example above (see also