install puppet service when creating OS instances
[bottlenecks.git] / testsuites / rubbos / testcase_cfg / rubbos_1-1-0-1.yaml
1 heat_template_version: 2013-05-23
2
3 description: >
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
7   public network.
8 parameters:
9   key_name:
10     type: string
11     description: Name of keypair to assign to servers
12     default: bottlenecks_rubbos_keypair
13   image:
14     type: string
15     description: Name of image to use for servers
16     default: bottlenecks-trusty-server
17   flavor:
18     type: string
19     description: Flavor to use for servers
20     default: bottlenecks_rubbos_flavor
21   public_net:
22     type: string
23     description: >
24       ID or name of public network for which floating IP addresses will be allocated
25     default: net04_ext
26   private_net_name:
27     type: string
28     description: Name of private network to be created
29     default: bottlenecks-private
30   private_net_cidr:
31     type: string
32     description: Private network address (CIDR notation)
33     default: "10.0.10.0/24"
34   private_net_gateway:
35     type: string
36     description: Private network gateway address
37     default: "10.0.10.1"
38   private_net_pool_start:
39     type: string
40     description: Start of private network IP address allocation pool
41     default: "10.0.10.2"
42   private_net_pool_end:
43     type: string
44     description: End of private network IP address allocation pool
45     default: "10.0.10.199"
46   master_user_data:
47     type: string
48     description: User data for the server with master role
49     default: ""
50   agent_user_data:
51     type: string
52     description: User data for the server with agent role
53     default: ""
54
55 resources:
56   private_net:
57     type: OS::Neutron::Net
58     properties:
59       name: { get_param: private_net_name }
60
61   private_subnet:
62     type: OS::Neutron::Subnet
63     properties:
64       network_id: { get_resource: private_net }
65       cidr: { get_param: private_net_cidr }
66       gateway_ip: { get_param: private_net_gateway }
67       allocation_pools:
68         - start: { get_param: private_net_pool_start }
69           end: { get_param: private_net_pool_end }
70
71   router:
72     type: OS::Neutron::Router
73     properties:
74       external_gateway_info:
75         network: { get_param: public_net }
76
77   router_interface:
78     type: OS::Neutron::RouterInterface
79     properties:
80       router_id: { get_resource: router }
81       subnet_id: { get_resource: private_subnet }
82
83   rubbos_control:
84     type: OS::Nova::Server
85     properties:
86       name: rubbos_control
87       image: { get_param: image }
88       flavor: { get_param: flavor }
89       key_name: { get_param: key_name }
90       networks:
91         - port: { get_resource: rubbos_control_port }
92       admin_user: ubuntu
93       user_data: { get_param: master_user_data }
94       user_data_format: RAW
95
96   rubbos_control_port:
97     type: OS::Neutron::Port
98     properties:
99       network_id: { get_resource: private_net }
100       fixed_ips:
101         - subnet_id: { get_resource: private_subnet }
102       security_groups: [{ get_resource: server_security_group }]
103
104   rubbos_control_floating_ip:
105     type: OS::Neutron::FloatingIP
106     properties:
107       floating_network: { get_param: public_net }
108       port_id: { get_resource: rubbos_control_port }
109
110   rubbos_httpd:
111     type: OS::Nova::Server
112     properties:
113       name: rubbos_httpd
114       image: { get_param: image }
115       flavor: { get_param: flavor }
116       key_name: { get_param: key_name }
117       networks:
118         - port: { get_resource: rubbos_httpd_port }
119       admin_user: ubuntu
120       user_data: { get_param: agent_user_data }
121       user_data_format: RAW
122
123   rubbos_httpd_port:
124     type: OS::Neutron::Port
125     properties:
126       network_id: { get_resource: private_net }
127       fixed_ips:
128         - subnet_id: { get_resource: private_subnet }
129       security_groups: [{ get_resource: server_security_group }]
130
131   rubbos_mysql1:
132     type: OS::Nova::Server
133     properties:
134       name: rubbos_mysql1
135       image: { get_param: image }
136       flavor: { get_param: flavor }
137       key_name: { get_param: key_name }
138       networks:
139         - port: { get_resource: rubbos_mysql1_port }
140       admin_user: ubuntu
141       user_data: { get_param: agent_user_data }
142       user_data_format: RAW
143
144   rubbos_mysql1_port:
145     type: OS::Neutron::Port
146     properties:
147       network_id: { get_resource: private_net }
148       fixed_ips:
149         - subnet_id: { get_resource: private_subnet }
150       security_groups: [{ get_resource: server_security_group }]
151
152   rubbos_tomcat1:
153     type: OS::Nova::Server
154     properties:
155       name: rubbos_tomcat1
156       image: { get_param: image }
157       flavor: { get_param: flavor }
158       key_name: { get_param: key_name }
159       networks:
160         - port: { get_resource: rubbos_tomcat1_port }
161       admin_user: ubuntu
162       user_data: { get_param: agent_user_data }
163       user_data_format: RAW
164
165   rubbos_tomcat1_port:
166     type: OS::Neutron::Port
167     properties:
168       network_id: { get_resource: private_net }
169       fixed_ips:
170         - subnet_id: { get_resource: private_subnet }
171       security_groups: [{ get_resource: server_security_group }]
172
173   rubbos_client1:
174     type: OS::Nova::Server
175     properties:
176       name: rubbos_client1
177       image: { get_param: image }
178       flavor: { get_param: flavor }
179       key_name: { get_param: key_name }
180       networks:
181         - port: { get_resource: rubbos_client1_port }
182       admin_user: ubuntu
183       user_data: { get_param: agent_user_data }
184       user_data_format: RAW
185
186   rubbos_client1_port:
187     type: OS::Neutron::Port
188     properties:
189       network_id: { get_resource: private_net }
190       fixed_ips:
191         - subnet_id: { get_resource: private_subnet }
192       security_groups: [{ get_resource: server_security_group }]
193
194   rubbos_client2:
195     type: OS::Nova::Server
196     properties:
197       name: rubbos_client2
198       image: { get_param: image }
199       flavor: { get_param: flavor }
200       key_name: { get_param: key_name }
201       networks:
202         - port: { get_resource: rubbos_client2_port }
203       admin_user: ubuntu
204       user_data: { get_param: agent_user_data }
205       user_data_format: RAW
206
207   rubbos_client2_port:
208     type: OS::Neutron::Port
209     properties:
210       network_id: { get_resource: private_net }
211       fixed_ips:
212         - subnet_id: { get_resource: private_subnet }
213       security_groups: [{ get_resource: server_security_group }]
214
215   rubbos_client3:
216     type: OS::Nova::Server
217     properties:
218       name: rubbos_client3
219       image: { get_param: image }
220       flavor: { get_param: flavor }
221       key_name: { get_param: key_name }
222       networks:
223         - port: { get_resource: rubbos_client3_port }
224       admin_user: ubuntu
225       user_data: { get_param: agent_user_data }
226       user_data_format: RAW
227
228   rubbos_client3_port:
229     type: OS::Neutron::Port
230     properties:
231       network_id: { get_resource: private_net }
232       fixed_ips:
233         - subnet_id: { get_resource: private_subnet }
234       security_groups: [{ get_resource: server_security_group }]
235
236   rubbos_client4:
237     type: OS::Nova::Server
238     properties:
239       name: rubbos_client4
240       image: { get_param: image }
241       flavor: { get_param: flavor }
242       key_name: { get_param: key_name }
243       networks:
244         - port: { get_resource: rubbos_client4_port }
245       admin_user: ubuntu
246       user_data: { get_param: agent_user_data }
247       user_data_format: RAW
248
249   rubbos_client4_port:
250     type: OS::Neutron::Port
251     properties:
252       network_id: { get_resource: private_net }
253       fixed_ips:
254         - subnet_id: { get_resource: private_subnet }
255       security_groups: [{ get_resource: server_security_group }]
256
257   rubbos_client5:
258     type: OS::Nova::Server
259     properties:
260       name: rubbos_client5
261       image: { get_param: image }
262       flavor: { get_param: flavor }
263       key_name: { get_param: key_name }
264       networks:
265         - port: { get_resource: rubbos_client5_port }
266       admin_user: ubuntu
267       user_data: { get_param: agent_user_data }
268       user_data_format: RAW
269
270   rubbos_client5_port:
271     type: OS::Neutron::Port
272     properties:
273       network_id: { get_resource: private_net }
274       fixed_ips:
275         - subnet_id: { get_resource: private_subnet }
276       security_groups: [{ get_resource: server_security_group }]
277
278   server_security_group:
279     type: OS::Neutron::SecurityGroup
280     properties:
281       description: Rubbos group for servers access.
282       name: rubbos-security-group
283       rules: [
284         {remote_ip_prefix: 0.0.0.0/0,
285         protocol: tcp,
286         port_range_min: 1,
287         port_range_max: 65535},
288         {remote_ip_prefix: 0.0.0.0/0,
289         protocol: udp,
290         port_range_min: 1,
291         port_range_max: 65535},
292         {remote_ip_prefix: 0.0.0.0/0,
293         protocol: icmp}]
294
295 outputs:
296   rubbos_control_private_ip:
297     description: IP address of rubbos_control in private network
298     value: { get_attr: [ rubbos_control, first_address ] }
299   rubbos_control_public_ip:
300     description: Floating IP address of rubbos_control in public network
301     value: { get_attr: [ rubbos_control_floating_ip, floating_ip_address ] }
302   rubbos_httpd_private_ip:
303     description: IP address of rubbos_httpd in private network
304     value: { get_attr: [ rubbos_httpd, first_address ] }
305   rubbos_mysql1_private_ip:
306     description: IP address of rubbos_mysql1 in private network
307     value: { get_attr: [ rubbos_mysql1, first_address ] }
308   rubbos_tomcat1_private_ip:
309     description: IP address of rubbos_tomcat1 in private network
310     value: { get_attr: [ rubbos_tomcat1, first_address ] }
311   rubbos_client1_private_ip:
312     description: IP address of rubbos_client1 in private network
313     value: { get_attr: [ rubbos_client1, first_address ] }
314   rubbos_client2_private_ip:
315     description: IP address of rubbos_client2 in private network
316     value: { get_attr: [ rubbos_client2, first_address ] }
317   rubbos_client3_private_ip:
318     description: IP address of rubbos_client3 in private network
319     value: { get_attr: [ rubbos_client3, first_address ] }
320   rubbos_client4_private_ip:
321     description: IP address of rubbos_client4 in private network
322     value: { get_attr: [ rubbos_client4, first_address ] }
323   rubbos_client5_private_ip:
324     description: IP address of rubbos_client5 in private network
325     value: { get_attr: [ rubbos_client5, first_address ] }
326