Increase to 11 k8s VMs for stability
[integration.git] / deployment / heat / onap-oom / onap-oom.yaml
1 #
2 # Generated by scripts/gen-onap-oom-yaml.sh; MANUAL CHANGES WILL BE LOST
3 #
4 heat_template_version: 2015-10-15
5 description: ONAP on Kubernetes using OOM
6
7 parameters:
8   docker_proxy:
9     type: string
10
11   apt_proxy:
12     type: string
13
14   public_net_id:
15     type: string
16     description: The ID of the Public network for floating IP address allocation
17
18   oam_network_cidr:
19     type: string
20     description: CIDR of the OAM ONAP network
21
22   ubuntu_1604_image:
23     type: string
24     description: Name of the Ubuntu 16.04 image
25
26   rancher_vm_flavor:
27     type: string
28     description: VM flavor for Rancher
29
30   k8s_vm_flavor:
31     type: string
32     description: VM flavor for k8s hosts
33
34   integration_override_yaml:
35     type: string
36     description: Content for integration_override.yaml
37
38 resources:
39   random-str:
40     type: OS::Heat::RandomString
41     properties:
42       length: 4
43
44   # ONAP security group
45   onap_sg:
46     type: OS::Neutron::SecurityGroup
47     properties:
48       name:
49         str_replace:
50           template: base_rand
51           params:
52             base: onap_sg
53             rand: { get_resource: random-str }
54       description: security group used by ONAP
55       rules:
56         # All egress traffic
57         - direction: egress
58           ethertype: IPv4
59         - direction: egress
60           ethertype: IPv6
61         # ingress traffic
62         # ICMP
63         - protocol: icmp
64         - protocol: udp
65           port_range_min: 1
66           port_range_max: 65535
67         - protocol: tcp
68           port_range_min: 1
69           port_range_max: 65535
70
71
72   # ONAP management private network
73   oam_network:
74     type: OS::Neutron::Net
75     properties:
76       name:
77         str_replace:
78           template: oam_network_rand
79           params:
80             rand: { get_resource: random-str }
81
82   oam_subnet:
83     type: OS::Neutron::Subnet
84     properties:
85       name:
86         str_replace:
87           template: oam_network_rand
88           params:
89             rand: { get_resource: random-str }
90       network_id: { get_resource: oam_network }
91       cidr: { get_param: oam_network_cidr }
92       dns_nameservers: [ "8.8.8.8" ]
93
94   router:
95     type: OS::Neutron::Router
96     properties:
97       external_gateway_info:
98         network: { get_param: public_net_id }
99
100   router_interface:
101     type: OS::Neutron::RouterInterface
102     properties:
103       router_id: { get_resource: router }
104       subnet_id: { get_resource: oam_subnet }
105
106   rancher_private_port:
107     type: OS::Neutron::Port
108     properties:
109       network: { get_resource: oam_network }
110       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
111       security_groups:
112       - { get_resource: onap_sg }
113
114   rancher_floating_ip:
115     type: OS::Neutron::FloatingIP
116     properties:
117       floating_network_id: { get_param: public_net_id }
118       port_id: { get_resource: rancher_private_port }
119
120   rancher_vm:
121     type: OS::Nova::Server
122     properties:
123       name: rancher
124       image: { get_param: ubuntu_1604_image }
125       flavor: { get_param: rancher_vm_flavor }
126       key_name: onap_key
127       networks:
128       - port: { get_resource: rancher_private_port }
129       user_data_format: RAW
130       user_data:
131         str_replace:
132           template:
133             get_file: rancher_vm_entrypoint.sh
134           params:
135             __docker_proxy__: { get_param: docker_proxy }
136             __apt_proxy__: { get_param: apt_proxy }
137             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
138             __integration_override_yaml__: { get_param: integration_override_yaml }
139             __oam_network_id__: { get_resource: oam_network }
140             __oam_subnet_id__: { get_resource: oam_subnet }
141             __k8s_1_vm_ip__: { get_attr: [k8s_1_floating_ip, floating_ip_address] }
142             __k8s_vm_ips__: [
143               get_attr: [k8s_1_floating_ip, floating_ip_address],
144               get_attr: [k8s_2_floating_ip, floating_ip_address],
145               get_attr: [k8s_3_floating_ip, floating_ip_address],
146               get_attr: [k8s_4_floating_ip, floating_ip_address],
147               get_attr: [k8s_5_floating_ip, floating_ip_address],
148               get_attr: [k8s_6_floating_ip, floating_ip_address],
149               get_attr: [k8s_7_floating_ip, floating_ip_address],
150               get_attr: [k8s_8_floating_ip, floating_ip_address],
151               get_attr: [k8s_9_floating_ip, floating_ip_address],
152               get_attr: [k8s_10_floating_ip, floating_ip_address],
153               get_attr: [k8s_11_floating_ip, floating_ip_address],
154             ]
155   k8s_1_private_port:
156     type: OS::Neutron::Port
157     properties:
158       network: { get_resource: oam_network }
159       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
160       security_groups:
161       - { get_resource: onap_sg }
162
163   k8s_1_floating_ip:
164     type: OS::Neutron::FloatingIP
165     properties:
166       floating_network_id: { get_param: public_net_id }
167       port_id: { get_resource: k8s_1_private_port }
168
169   k8s_1_vm:
170     type: OS::Nova::Server
171     properties:
172       name: k8s_1
173       image: { get_param: ubuntu_1604_image }
174       flavor: { get_param: k8s_vm_flavor }
175       key_name: onap_key
176       networks:
177       - port: { get_resource: k8s_1_private_port }
178       user_data_format: RAW
179       user_data:
180         str_replace:
181           params:
182             __docker_proxy__: { get_param: docker_proxy }
183             __apt_proxy__: { get_param: apt_proxy }
184             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
185           template:
186             get_file: k8s_vm_entrypoint.sh
187
188   k8s_2_private_port:
189     type: OS::Neutron::Port
190     properties:
191       network: { get_resource: oam_network }
192       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
193       security_groups:
194       - { get_resource: onap_sg }
195
196   k8s_2_floating_ip:
197     type: OS::Neutron::FloatingIP
198     properties:
199       floating_network_id: { get_param: public_net_id }
200       port_id: { get_resource: k8s_2_private_port }
201
202   k8s_2_vm:
203     type: OS::Nova::Server
204     properties:
205       name: k8s_2
206       image: { get_param: ubuntu_1604_image }
207       flavor: { get_param: k8s_vm_flavor }
208       key_name: onap_key
209       networks:
210       - port: { get_resource: k8s_2_private_port }
211       user_data_format: RAW
212       user_data:
213         str_replace:
214           params:
215             __docker_proxy__: { get_param: docker_proxy }
216             __apt_proxy__: { get_param: apt_proxy }
217             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
218           template:
219             get_file: k8s_vm_entrypoint.sh
220
221   k8s_3_private_port:
222     type: OS::Neutron::Port
223     properties:
224       network: { get_resource: oam_network }
225       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
226       security_groups:
227       - { get_resource: onap_sg }
228
229   k8s_3_floating_ip:
230     type: OS::Neutron::FloatingIP
231     properties:
232       floating_network_id: { get_param: public_net_id }
233       port_id: { get_resource: k8s_3_private_port }
234
235   k8s_3_vm:
236     type: OS::Nova::Server
237     properties:
238       name: k8s_3
239       image: { get_param: ubuntu_1604_image }
240       flavor: { get_param: k8s_vm_flavor }
241       key_name: onap_key
242       networks:
243       - port: { get_resource: k8s_3_private_port }
244       user_data_format: RAW
245       user_data:
246         str_replace:
247           params:
248             __docker_proxy__: { get_param: docker_proxy }
249             __apt_proxy__: { get_param: apt_proxy }
250             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
251           template:
252             get_file: k8s_vm_entrypoint.sh
253
254   k8s_4_private_port:
255     type: OS::Neutron::Port
256     properties:
257       network: { get_resource: oam_network }
258       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
259       security_groups:
260       - { get_resource: onap_sg }
261
262   k8s_4_floating_ip:
263     type: OS::Neutron::FloatingIP
264     properties:
265       floating_network_id: { get_param: public_net_id }
266       port_id: { get_resource: k8s_4_private_port }
267
268   k8s_4_vm:
269     type: OS::Nova::Server
270     properties:
271       name: k8s_4
272       image: { get_param: ubuntu_1604_image }
273       flavor: { get_param: k8s_vm_flavor }
274       key_name: onap_key
275       networks:
276       - port: { get_resource: k8s_4_private_port }
277       user_data_format: RAW
278       user_data:
279         str_replace:
280           params:
281             __docker_proxy__: { get_param: docker_proxy }
282             __apt_proxy__: { get_param: apt_proxy }
283             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
284           template:
285             get_file: k8s_vm_entrypoint.sh
286
287   k8s_5_private_port:
288     type: OS::Neutron::Port
289     properties:
290       network: { get_resource: oam_network }
291       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
292       security_groups:
293       - { get_resource: onap_sg }
294
295   k8s_5_floating_ip:
296     type: OS::Neutron::FloatingIP
297     properties:
298       floating_network_id: { get_param: public_net_id }
299       port_id: { get_resource: k8s_5_private_port }
300
301   k8s_5_vm:
302     type: OS::Nova::Server
303     properties:
304       name: k8s_5
305       image: { get_param: ubuntu_1604_image }
306       flavor: { get_param: k8s_vm_flavor }
307       key_name: onap_key
308       networks:
309       - port: { get_resource: k8s_5_private_port }
310       user_data_format: RAW
311       user_data:
312         str_replace:
313           params:
314             __docker_proxy__: { get_param: docker_proxy }
315             __apt_proxy__: { get_param: apt_proxy }
316             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
317           template:
318             get_file: k8s_vm_entrypoint.sh
319
320   k8s_6_private_port:
321     type: OS::Neutron::Port
322     properties:
323       network: { get_resource: oam_network }
324       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
325       security_groups:
326       - { get_resource: onap_sg }
327
328   k8s_6_floating_ip:
329     type: OS::Neutron::FloatingIP
330     properties:
331       floating_network_id: { get_param: public_net_id }
332       port_id: { get_resource: k8s_6_private_port }
333
334   k8s_6_vm:
335     type: OS::Nova::Server
336     properties:
337       name: k8s_6
338       image: { get_param: ubuntu_1604_image }
339       flavor: { get_param: k8s_vm_flavor }
340       key_name: onap_key
341       networks:
342       - port: { get_resource: k8s_6_private_port }
343       user_data_format: RAW
344       user_data:
345         str_replace:
346           params:
347             __docker_proxy__: { get_param: docker_proxy }
348             __apt_proxy__: { get_param: apt_proxy }
349             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
350           template:
351             get_file: k8s_vm_entrypoint.sh
352
353   k8s_7_private_port:
354     type: OS::Neutron::Port
355     properties:
356       network: { get_resource: oam_network }
357       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
358       security_groups:
359       - { get_resource: onap_sg }
360
361   k8s_7_floating_ip:
362     type: OS::Neutron::FloatingIP
363     properties:
364       floating_network_id: { get_param: public_net_id }
365       port_id: { get_resource: k8s_7_private_port }
366
367   k8s_7_vm:
368     type: OS::Nova::Server
369     properties:
370       name: k8s_7
371       image: { get_param: ubuntu_1604_image }
372       flavor: { get_param: k8s_vm_flavor }
373       key_name: onap_key
374       networks:
375       - port: { get_resource: k8s_7_private_port }
376       user_data_format: RAW
377       user_data:
378         str_replace:
379           params:
380             __docker_proxy__: { get_param: docker_proxy }
381             __apt_proxy__: { get_param: apt_proxy }
382             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
383           template:
384             get_file: k8s_vm_entrypoint.sh
385
386   k8s_8_private_port:
387     type: OS::Neutron::Port
388     properties:
389       network: { get_resource: oam_network }
390       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
391       security_groups:
392       - { get_resource: onap_sg }
393
394   k8s_8_floating_ip:
395     type: OS::Neutron::FloatingIP
396     properties:
397       floating_network_id: { get_param: public_net_id }
398       port_id: { get_resource: k8s_8_private_port }
399
400   k8s_8_vm:
401     type: OS::Nova::Server
402     properties:
403       name: k8s_8
404       image: { get_param: ubuntu_1604_image }
405       flavor: { get_param: k8s_vm_flavor }
406       key_name: onap_key
407       networks:
408       - port: { get_resource: k8s_8_private_port }
409       user_data_format: RAW
410       user_data:
411         str_replace:
412           params:
413             __docker_proxy__: { get_param: docker_proxy }
414             __apt_proxy__: { get_param: apt_proxy }
415             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
416           template:
417             get_file: k8s_vm_entrypoint.sh
418
419   k8s_9_private_port:
420     type: OS::Neutron::Port
421     properties:
422       network: { get_resource: oam_network }
423       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
424       security_groups:
425       - { get_resource: onap_sg }
426
427   k8s_9_floating_ip:
428     type: OS::Neutron::FloatingIP
429     properties:
430       floating_network_id: { get_param: public_net_id }
431       port_id: { get_resource: k8s_9_private_port }
432
433   k8s_9_vm:
434     type: OS::Nova::Server
435     properties:
436       name: k8s_9
437       image: { get_param: ubuntu_1604_image }
438       flavor: { get_param: k8s_vm_flavor }
439       key_name: onap_key
440       networks:
441       - port: { get_resource: k8s_9_private_port }
442       user_data_format: RAW
443       user_data:
444         str_replace:
445           params:
446             __docker_proxy__: { get_param: docker_proxy }
447             __apt_proxy__: { get_param: apt_proxy }
448             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
449           template:
450             get_file: k8s_vm_entrypoint.sh
451
452   k8s_10_private_port:
453     type: OS::Neutron::Port
454     properties:
455       network: { get_resource: oam_network }
456       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
457       security_groups:
458       - { get_resource: onap_sg }
459
460   k8s_10_floating_ip:
461     type: OS::Neutron::FloatingIP
462     properties:
463       floating_network_id: { get_param: public_net_id }
464       port_id: { get_resource: k8s_10_private_port }
465
466   k8s_10_vm:
467     type: OS::Nova::Server
468     properties:
469       name: k8s_10
470       image: { get_param: ubuntu_1604_image }
471       flavor: { get_param: k8s_vm_flavor }
472       key_name: onap_key
473       networks:
474       - port: { get_resource: k8s_10_private_port }
475       user_data_format: RAW
476       user_data:
477         str_replace:
478           params:
479             __docker_proxy__: { get_param: docker_proxy }
480             __apt_proxy__: { get_param: apt_proxy }
481             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
482           template:
483             get_file: k8s_vm_entrypoint.sh
484
485   k8s_11_private_port:
486     type: OS::Neutron::Port
487     properties:
488       network: { get_resource: oam_network }
489       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
490       security_groups:
491       - { get_resource: onap_sg }
492
493   k8s_11_floating_ip:
494     type: OS::Neutron::FloatingIP
495     properties:
496       floating_network_id: { get_param: public_net_id }
497       port_id: { get_resource: k8s_11_private_port }
498
499   k8s_11_vm:
500     type: OS::Nova::Server
501     properties:
502       name: k8s_11
503       image: { get_param: ubuntu_1604_image }
504       flavor: { get_param: k8s_vm_flavor }
505       key_name: onap_key
506       networks:
507       - port: { get_resource: k8s_11_private_port }
508       user_data_format: RAW
509       user_data:
510         str_replace:
511           params:
512             __docker_proxy__: { get_param: docker_proxy }
513             __apt_proxy__: { get_param: apt_proxy }
514             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
515           template:
516             get_file: k8s_vm_entrypoint.sh
517
518 outputs:
519   rancher_vm_ip:
520     description: The IP address of the rancher instance
521     value: { get_attr: [rancher_floating_ip, floating_ip_address] }
522
523   k8s_1_vm_ip:
524     description: The IP address of the k8s_1 instance
525     value: { get_attr: [k8s_1_floating_ip, floating_ip_address] }
526
527   k8s_2_vm_ip:
528     description: The IP address of the k8s_2 instance
529     value: { get_attr: [k8s_2_floating_ip, floating_ip_address] }
530
531   k8s_3_vm_ip:
532     description: The IP address of the k8s_3 instance
533     value: { get_attr: [k8s_3_floating_ip, floating_ip_address] }
534
535   k8s_4_vm_ip:
536     description: The IP address of the k8s_4 instance
537     value: { get_attr: [k8s_4_floating_ip, floating_ip_address] }
538
539   k8s_5_vm_ip:
540     description: The IP address of the k8s_5 instance
541     value: { get_attr: [k8s_5_floating_ip, floating_ip_address] }
542
543   k8s_6_vm_ip:
544     description: The IP address of the k8s_6 instance
545     value: { get_attr: [k8s_6_floating_ip, floating_ip_address] }
546
547   k8s_7_vm_ip:
548     description: The IP address of the k8s_7 instance
549     value: { get_attr: [k8s_7_floating_ip, floating_ip_address] }
550
551   k8s_8_vm_ip:
552     description: The IP address of the k8s_8 instance
553     value: { get_attr: [k8s_8_floating_ip, floating_ip_address] }
554
555   k8s_9_vm_ip:
556     description: The IP address of the k8s_9 instance
557     value: { get_attr: [k8s_9_floating_ip, floating_ip_address] }
558
559   k8s_10_vm_ip:
560     description: The IP address of the k8s_10 instance
561     value: { get_attr: [k8s_10_floating_ip, floating_ip_address] }
562
563   k8s_11_vm_ip:
564     description: The IP address of the k8s_11 instance
565     value: { get_attr: [k8s_11_floating_ip, floating_ip_address] }
566