1 ##############################################################################
2 # Copyright (c) 2017 Cable Television Laboratories, Inc. ("CableLabs")
3 # and others. All rights reserved.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at:
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 ##############################################################################
17 heat_template_version: 2015-04-30
20 Sample template with two VMs instantiated against different images and
21 flavors on the same network and the first one has a floating IP
26 label: Image ID for first VM
27 description: Image name to be used for first instance
31 label: Image ID for second VM
32 description: Image name to be used for second instance
36 label: Instance Flavor for first VM
37 description: Flavor name for the first instance
41 label: Instance Flavor for second VM
42 description: Flavor name for the second instance
46 description: Instance Flavor extra specs
50 label: Test network name
51 description: The name of the stack's network
55 label: Test subnet name
56 description: The name of the stack's subnet
60 label: Test router name
61 description: The name of the stack's router
66 description: The name of the stack's keypair
70 label: Security Group name
71 description: The name of the stack's security group
72 default: security_group_name
76 description: The name of the first VM to be spawned
81 description: The name of the second VM to be spawned
85 description: Name of the external network which management network will connect to
90 type: OS::Nova::Flavor
95 extra_specs: { get_param: flavor_extra_specs }
97 type: OS::Nova::Flavor
102 extra_specs: { get_param: flavor_extra_specs }
105 type: OS::Neutron::Net
107 name: { get_param: net_name }
110 type: OS::Neutron::Subnet
112 name: { get_param: subnet_name }
115 network: { get_resource: network }
118 type: OS::Neutron::Router
120 name: { get_param: router_name }
121 external_gateway_info:
122 network: { get_param: external_net_name }
124 management_router_interface:
125 type: OS::Neutron::RouterInterface
127 router: { get_resource: management_router }
128 subnet: { get_resource: subnet }
130 server_security_group:
131 type: OS::Neutron::SecurityGroup
133 description: Add security group rules for server
134 name: { get_param: security_group_name }
136 - remote_ip_prefix: 0.0.0.0/0
140 - remote_ip_prefix: 0.0.0.0/0
144 type: OS::Neutron::FloatingIP
146 floating_network: { get_param: external_net_name }
148 floating_ip_association:
149 type: OS::Neutron::FloatingIPAssociation
151 floatingip_id: { get_resource: floating_ip }
152 port_id: {get_resource: port1}
155 type: OS::Nova::KeyPair
157 name: { get_param: keypair_name }
158 save_private_key: True
161 type: OS::Neutron::Port
163 network: { get_resource: network }
164 security_groups: [{ get_resource: server_security_group }]
166 - subnet_id: { get_resource: subnet }
169 type: OS::Nova::Server
170 depends_on: [subnet, keypair, flavor1, port1]
172 name: { get_param: inst1_name }
173 image: { get_param: image1_name }
174 flavor: { get_resource: flavor1 }
175 key_name: {get_resource: keypair}
177 - port: { get_resource: port1 }
180 type: OS::Nova::Server
181 depends_on: [subnet, keypair, flavor2]
183 name: { get_param: inst2_name }
184 image: { get_param: image2_name }
185 flavor: { get_resource: flavor2 }
186 key_name: {get_resource: keypair}
188 - network: { get_resource: network }
192 description: "SSH Private Key"
193 value: { get_attr: [ keypair, private_key ]}