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