1 #Template for instances.
2 heat_template_version: 2017-02-24
3 description: "template instantiating and configuring a single instance (any)"
30 #Condition for demo network connection
34 - get_param: demo_network
38 #This is the network port to attach instance to.
40 type: OS::Neutron::Port
42 network: { get_param: network }
43 security_groups: [ { get_param: security_group } ]
45 - { subnet: { get_param: subnet }}
46 #cloudinit configuration stuff.
48 type: OS::Heat::SoftwareConfig
52 template: { get_file: config.yaml }
54 "%{NOTIFY_COMMAND}": { get_param: notify_command }
55 #Actual instance to create.
57 type: OS::Nova::Server
59 name: { get_param: instance_name }
60 image: { get_param: image_name }
61 flavor: { get_param: flavor_name }
62 availability_zone: { get_param: availability_zone }
63 key_name: { get_param: key_name }
68 - - port: { get_resource: port }
69 - network: { get_param: demo_network }
70 - - port: { get_resource: port }
71 user_data_format: SOFTWARE_CONFIG
72 user_data: { get_resource: config }
73 scheduler_hints: { get_param: scheduler_hints }
76 value: { get_resource: instance }
78 value: { get_resource: port }
80 value: { get_attr: ["port", "fixed_ips", 0, "ip_address"] }