1 heat_template_version: 2013-05-23
4 HOT template to create a new neutron network plus a router to the public
5 network, and for deploying nine servers into the new network. The template also
6 assigns floating IP addresses to rubbos_control server so it is routable from the
11 description: Name of keypair to assign to servers
12 default: bottlenecks_rubbos_keypair
15 description: Name of image to use for servers
16 default: bottlenecks-trusty-server
19 description: Flavor to use for servers
20 default: bottlenecks_rubbos_flavor
24 ID or name of public network for which floating IP addresses will be allocated
28 description: Name of private network to be created
29 default: bottlenecks-private
32 description: Private network address (CIDR notation)
33 default: "10.0.10.0/24"
36 description: Private network gateway address
38 private_net_pool_start:
40 description: Start of private network IP address allocation pool
44 description: End of private network IP address allocation pool
45 default: "10.0.10.199"
48 description: User data for the server with master role
52 description: User data for the server with agent role
57 type: OS::Neutron::Net
59 name: { get_param: private_net_name }
62 type: OS::Neutron::Subnet
64 network_id: { get_resource: private_net }
65 cidr: { get_param: private_net_cidr }
66 gateway_ip: { get_param: private_net_gateway }
68 - start: { get_param: private_net_pool_start }
69 end: { get_param: private_net_pool_end }
70 dns_nameservers: [ "8.8.8.8" ]
73 type: OS::Neutron::Router
75 external_gateway_info:
76 network: { get_param: public_net }
79 type: OS::Neutron::RouterInterface
81 router_id: { get_resource: router }
82 subnet_id: { get_resource: private_subnet }
85 type: OS::Nova::Server
88 image: { get_param: image }
89 flavor: { get_param: flavor }
90 key_name: { get_param: key_name }
92 - port: { get_resource: rubbos_control_port }
94 user_data: { get_param: master_user_data }
98 type: OS::Neutron::Port
100 network_id: { get_resource: private_net }
102 - subnet_id: { get_resource: private_subnet }
103 security_groups: [{ get_resource: server_security_group }]
105 rubbos_control_floating_ip:
106 type: OS::Neutron::FloatingIP
108 floating_network: { get_param: public_net }
109 port_id: { get_resource: rubbos_control_port }
112 type: OS::Nova::Server
115 image: { get_param: image }
116 flavor: { get_param: flavor }
117 key_name: { get_param: key_name }
119 - port: { get_resource: rubbos_httpd_port }
121 user_data: { get_param: agent_user_data }
122 user_data_format: RAW
125 type: OS::Neutron::Port
127 network_id: { get_resource: private_net }
129 - subnet_id: { get_resource: private_subnet }
130 security_groups: [{ get_resource: server_security_group }]
133 type: OS::Nova::Server
136 image: { get_param: image }
137 flavor: { get_param: flavor }
138 key_name: { get_param: key_name }
140 - port: { get_resource: rubbos_mysql1_port }
142 user_data: { get_param: agent_user_data }
143 user_data_format: RAW
146 type: OS::Neutron::Port
148 network_id: { get_resource: private_net }
150 - subnet_id: { get_resource: private_subnet }
151 security_groups: [{ get_resource: server_security_group }]
154 type: OS::Nova::Server
157 image: { get_param: image }
158 flavor: { get_param: flavor }
159 key_name: { get_param: key_name }
161 - port: { get_resource: rubbos_tomcat1_port }
163 user_data: { get_param: agent_user_data }
164 user_data_format: RAW
167 type: OS::Neutron::Port
169 network_id: { get_resource: private_net }
171 - subnet_id: { get_resource: private_subnet }
172 security_groups: [{ get_resource: server_security_group }]
175 type: OS::Nova::Server
178 image: { get_param: image }
179 flavor: { get_param: flavor }
180 key_name: { get_param: key_name }
182 - port: { get_resource: rubbos_tomcat2_port }
184 user_data: { get_param: agent_user_data }
185 user_data_format: RAW
188 type: OS::Neutron::Port
190 network_id: { get_resource: private_net }
192 - subnet_id: { get_resource: private_subnet }
193 security_groups: [{ get_resource: server_security_group }]
196 type: OS::Nova::Server
199 image: { get_param: image }
200 flavor: { get_param: flavor }
201 key_name: { get_param: key_name }
203 - port: { get_resource: rubbos_client1_port }
205 user_data: { get_param: agent_user_data }
206 user_data_format: RAW
209 type: OS::Neutron::Port
211 network_id: { get_resource: private_net }
213 - subnet_id: { get_resource: private_subnet }
214 security_groups: [{ get_resource: server_security_group }]
217 type: OS::Nova::Server
220 image: { get_param: image }
221 flavor: { get_param: flavor }
222 key_name: { get_param: key_name }
224 - port: { get_resource: rubbos_client2_port }
226 user_data: { get_param: agent_user_data }
227 user_data_format: RAW
230 type: OS::Neutron::Port
232 network_id: { get_resource: private_net }
234 - subnet_id: { get_resource: private_subnet }
235 security_groups: [{ get_resource: server_security_group }]
238 type: OS::Nova::Server
241 image: { get_param: image }
242 flavor: { get_param: flavor }
243 key_name: { get_param: key_name }
245 - port: { get_resource: rubbos_client3_port }
247 user_data: { get_param: agent_user_data }
248 user_data_format: RAW
251 type: OS::Neutron::Port
253 network_id: { get_resource: private_net }
255 - subnet_id: { get_resource: private_subnet }
256 security_groups: [{ get_resource: server_security_group }]
259 type: OS::Nova::Server
262 image: { get_param: image }
263 flavor: { get_param: flavor }
264 key_name: { get_param: key_name }
266 - port: { get_resource: rubbos_client4_port }
268 user_data: { get_param: agent_user_data }
269 user_data_format: RAW
272 type: OS::Neutron::Port
274 network_id: { get_resource: private_net }
276 - subnet_id: { get_resource: private_subnet }
277 security_groups: [{ get_resource: server_security_group }]
280 type: OS::Nova::Server
283 image: { get_param: image }
284 flavor: { get_param: flavor }
285 key_name: { get_param: key_name }
287 - port: { get_resource: rubbos_client5_port }
289 user_data: { get_param: agent_user_data }
290 user_data_format: RAW
293 type: OS::Neutron::Port
295 network_id: { get_resource: private_net }
297 - subnet_id: { get_resource: private_subnet }
298 security_groups: [{ get_resource: server_security_group }]
300 server_security_group:
301 type: OS::Neutron::SecurityGroup
303 description: Rubbos group for servers access.
304 name: rubbos-security-group
306 {remote_ip_prefix: 0.0.0.0/0,
309 port_range_max: 65535},
310 {remote_ip_prefix: 0.0.0.0/0,
313 port_range_max: 65535},
314 {remote_ip_prefix: 0.0.0.0/0,
318 rubbos_control_private_ip:
319 description: IP address of rubbos_control in private network
320 value: { get_attr: [ rubbos_control, first_address ] }
321 rubbos_control_public_ip:
322 description: Floating IP address of rubbos_control in public network
323 value: { get_attr: [ rubbos_control_floating_ip, floating_ip_address ] }
324 rubbos_httpd_private_ip:
325 description: IP address of rubbos_httpd in private network
326 value: { get_attr: [ rubbos_httpd, first_address ] }
327 rubbos_mysql1_private_ip:
328 description: IP address of rubbos_mysql1 in private network
329 value: { get_attr: [ rubbos_mysql1, first_address ] }
330 rubbos_tomcat1_private_ip:
331 description: IP address of rubbos_tomcat1 in private network
332 value: { get_attr: [ rubbos_tomcat1, first_address ] }
333 rubbos_tomcat2_private_ip:
334 description: IP address of rubbos_tomcat2 in private network
335 value: { get_attr: [ rubbos_tomcat2, first_address ] }
336 rubbos_client1_private_ip:
337 description: IP address of rubbos_client1 in private network
338 value: { get_attr: [ rubbos_client1, first_address ] }
339 rubbos_client2_private_ip:
340 description: IP address of rubbos_client2 in private network
341 value: { get_attr: [ rubbos_client2, first_address ] }
342 rubbos_client3_private_ip:
343 description: IP address of rubbos_client3 in private network
344 value: { get_attr: [ rubbos_client3, first_address ] }
345 rubbos_client4_private_ip:
346 description: IP address of rubbos_client4 in private network
347 value: { get_attr: [ rubbos_client4, first_address ] }
348 rubbos_client5_private_ip:
349 description: IP address of rubbos_client5 in private network
350 value: { get_attr: [ rubbos_client5, first_address ] }