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 label: Test network name
47 description: The name of the stack's network
51 label: Test subnet name
52 description: The name of the stack's subnet
56 label: Test router name
57 description: The name of the stack's router
62 description: The name of the stack's keypair
66 label: Security Group name
67 description: The name of the stack's security group
68 default: security_group_name
72 description: The name of the first VM to be spawned
77 description: The name of the second VM to be spawned
81 description: Name of the external network which management network will connect to
86 type: OS::Nova::Flavor
92 type: OS::Nova::Flavor
99 type: OS::Neutron::Net
101 name: { get_param: net_name }
104 type: OS::Neutron::Subnet
106 name: { get_param: subnet_name }
109 network: { get_resource: network }
112 type: OS::Neutron::Router
114 name: { get_param: router_name }
115 external_gateway_info:
116 network: { get_param: external_net_name }
118 management_router_interface:
119 type: OS::Neutron::RouterInterface
121 router: { get_resource: management_router }
122 subnet: { get_resource: subnet }
124 server_security_group:
125 type: OS::Neutron::SecurityGroup
127 description: Add security group rules for server
128 name: { get_param: security_group_name }
130 - remote_ip_prefix: 0.0.0.0/0
134 - remote_ip_prefix: 0.0.0.0/0
138 type: OS::Neutron::FloatingIP
140 floating_network: { get_param: external_net_name }
142 floating_ip_association:
143 type: OS::Nova::FloatingIPAssociation
145 floating_ip: { get_resource: floating_ip }
146 server_id: {get_resource: vm1}
149 type: OS::Nova::KeyPair
151 name: { get_param: keypair_name }
152 save_private_key: True
155 type: OS::Nova::Server
156 depends_on: [subnet, keypair, flavor1]
158 name: { get_param: inst1_name }
159 image: { get_param: image1_name }
160 flavor: { get_resource: flavor1 }
161 key_name: {get_resource: keypair}
162 security_groups: [{ get_resource: server_security_group }]
164 - network: { get_resource: network }
167 type: OS::Nova::Server
168 depends_on: [subnet, flavor2]
170 name: { get_param: inst2_name }
171 image: { get_param: image2_name }
172 flavor: { get_resource: flavor2 }
173 key_name: {get_resource: keypair}
175 - network: { get_resource: network }
179 description: "SSH Private Key"
180 value: { get_attr: [ keypair, private_key ]}