1 ##############################################################################
2 # Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
10 heat_template_version: 2013-05-23
12 This template is used for creating a new environment on the Openstack Release L ,
13 and the deployment will create three virtual machine on the compute node, one manager
14 and two agent vm included. Each vm will has a nic on the controlplane switch and two
15 agent vms will has a additional nic on the dataplane.
17 #nova keypair-list to query available key pair
20 description: Name of keypair to assign to servers
21 default: bottlenecks_vstf_keypair
22 #nova image-list to query available images
25 description: Name of image to use for servers
26 default: bottlenecks-trusty-server
27 #new addition image for the actual deployment
30 description: Name of image to use for servers
31 default: bottlenecks_vstf_manager
34 description: Name of image to use for servers
35 default: bottlenecks_vstf_tester
38 description: Name of image to use for servers
39 default: bottlenecks_vstf_target
40 #nova flavor-list to query available flavors
43 description: Flavor to use for servers
45 #nova net-list to query available
49 ID or name of public network for which floating IP addresses will be allocated
55 description: Name of private network to be created
59 description: Private network address (CIDR notation)
60 default: "10.0.11.0/24"
63 description: Private network gateway address
65 private_net_pool_start:
67 description: Start of private network IP address allocation pool
71 description: End of private network IP address allocation pool
72 default: "10.0.11.199"
77 description: Name of private network to be created
78 default: bottlenecks-testing
81 description: Private network address (CIDR notation)
82 default: "10.0.20.0/24"
85 description: Private network gateway address
87 testing_net_pool_start:
89 description: Start of private network IP address allocation pool
93 description: End of private network IP address allocation pool
94 default: "10.0.20.199"
100 type: OS::Neutron::Net
102 name: { get_param: private_net_name }
104 type: OS::Neutron::Subnet
106 network_id: { get_resource: private_net }
107 cidr: { get_param: private_net_cidr }
108 gateway_ip: { get_param: private_net_gateway }
110 - start: { get_param: private_net_pool_start }
111 end: { get_param: private_net_pool_end }
115 type: OS::Neutron::Net
117 name: { get_param: testing_net_name }
119 type: OS::Neutron::Subnet
121 network_id: { get_resource: testing_net }
122 cidr: { get_param: testing_net_cidr }
123 gateway_ip: { get_param: testing_net_gateway }
125 - start: { get_param: testing_net_pool_start }
126 end: { get_param: testing_net_pool_end }
130 type: OS::Neutron::Router
132 external_gateway_info:
133 network: { get_param: public_net }
135 type: OS::Neutron::RouterInterface
137 router_id: { get_resource: router }
138 subnet_id: { get_resource: private_subnet }
141 server_security_group:
142 type: OS::Neutron::SecurityGroup
144 description: vstf group for servers access.
145 name: vstf-security-group
147 {remote_ip_prefix: 0.0.0.0/0,
150 port_range_max: 65535},
151 {remote_ip_prefix: 0.0.0.0/0,
154 port_range_max: 65535},
155 {remote_ip_prefix: 0.0.0.0/0,
158 #nova server vstf manager definition info
160 type: OS::Nova::Server
163 image: { get_param: image_vstf_manager }
164 flavor: { get_param: flavor }
165 key_name: { get_param: key_name }
167 - port: { get_resource: manager_control_port }
168 manager_control_port:
169 type: OS::Neutron::Port
171 network_id: { get_resource: private_net }
173 - subnet_id: { get_resource: private_subnet }
174 security_groups: [{ get_resource: server_security_group }]
175 manager_control_floating_ip:
176 type: OS::Neutron::FloatingIP
178 floating_network: { get_param: public_net }
179 port_id: { get_resource: manager_control_port }
181 #nova server vstf target definition info
183 type: OS::Nova::Server
186 image: { get_param: image_vstf_target }
187 flavor: { get_param: flavor }
188 key_name: { get_param: key_name }
190 - port: { get_resource: target_control_port }
191 - port: { get_resource: target_testing_port }
193 type: OS::Neutron::Port
195 network_id: { get_resource: private_net }
197 - subnet_id: { get_resource: private_subnet }
198 security_groups: [{ get_resource: server_security_group }]
200 type: OS::Neutron::Port
202 network_id: { get_resource: testing_net }
204 - subnet_id: { get_resource: testing_subnet }
205 security_groups: [{ get_resource: server_security_group }]
206 target_control_floating_ip:
207 type: OS::Neutron::FloatingIP
209 floating_network: { get_param: public_net }
210 port_id: { get_resource: target_control_port }
212 #nova server vstf tester definition info
214 type: OS::Nova::Server
217 image: { get_param: image_vstf_tester }
218 flavor: { get_param: flavor }
219 key_name: { get_param: key_name }
221 - port: { get_resource: tester_control_port }
222 - port: { get_resource: tester_testing_port }
224 type: OS::Neutron::Port
226 network_id: { get_resource: private_net }
228 - subnet_id: { get_resource: private_subnet }
229 security_groups: [{ get_resource: server_security_group }]
231 type: OS::Neutron::Port
233 network_id: { get_resource: testing_net }
235 - subnet_id: { get_resource: testing_subnet }
236 security_groups: [{ get_resource: server_security_group }]
237 tester_control_floating_ip:
238 type: OS::Neutron::FloatingIP
240 floating_network: { get_param: public_net }
241 port_id: { get_resource: tester_control_port }
244 manager_control_private_ip:
245 description: IP address of manager_control in private network
246 value: { get_attr: [ vstf-manager, first_address ] }
247 manager_control_public_ip:
248 description: Floating IP address of manager_control in public network
249 value: { get_attr: [ manager_control_floating_ip, floating_ip_address ] }
250 target_control_private_ip:
251 description: IP address of manager_control in private network
252 value: { get_attr: [ vstf-target, first_address ] }
253 target_control_public_ip:
254 description: Floating IP address of manager_control in public network
255 value: { get_attr: [ target_control_floating_ip, floating_ip_address ] }
256 tester_control_private_ip:
257 description: IP address of manager_control in private network
258 value: { get_attr: [ vstf-tester, first_address ] }
259 tester_control_public_ip:
260 description: Floating IP address of manager_control in public network
261 value: { get_attr: [ tester_control_floating_ip, floating_ip_address ] }