Tweak k8s deployment footprint
[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   etcd_vm_flavor:
35     type: string
36     description: VM flavor for etcd hosts
37
38   orch_vm_flavor:
39     type: string
40     description: VM flavor for orch hosts
41
42   integration_override_yaml:
43     type: string
44     description: Content for integration_override.yaml
45
46   integration_gerrit_branch:
47     type: string
48     default: "master"
49
50   integration_gerrit_refspec:
51     type: string
52     default: "refs/heads/master"
53
54   oom_gerrit_branch:
55     type: string
56     default: "master"
57
58   oom_gerrit_refspec:
59     type: string
60     default: "refs/heads/master"
61
62   docker_manifest:
63     type: string
64     default: ""
65
66   key_name:
67     type: string
68     default: "onap_key"
69
70   docker_version:
71     type: string
72     default: "17.03.2"
73
74   rancher_version:
75     type: string
76     default: "1.6.22"
77
78   rancher_agent_version:
79     type: string
80     default: "1.2.11"
81
82   kubectl_version:
83     type: string
84     default: "1.11.2"
85
86   helm_version:
87     type: string
88     default: "2.9.1"
89
90   helm_deploy_delay:
91     type: string
92     default: "2m"
93
94   use_ramdisk:
95     type: string
96     description: Set to "true" if you want to use a RAM disk for /dockerdata-nfs/.
97     default: "false"
98
99 resources:
100   random-str:
101     type: OS::Heat::RandomString
102     properties:
103       length: 4
104
105   # ONAP security group
106   onap_sg:
107     type: OS::Neutron::SecurityGroup
108     properties:
109       name:
110         str_replace:
111           template: base_rand
112           params:
113             base: onap_sg
114             rand: { get_resource: random-str }
115       description: security group used by ONAP
116       rules:
117         # All egress traffic
118         - direction: egress
119           ethertype: IPv4
120         - direction: egress
121           ethertype: IPv6
122         # ingress traffic
123         # ICMP
124         - protocol: icmp
125         - protocol: udp
126           port_range_min: 1
127           port_range_max: 65535
128         - protocol: tcp
129           port_range_min: 1
130           port_range_max: 65535
131
132
133   # ONAP management private network
134   oam_network:
135     type: OS::Neutron::Net
136     properties:
137       name:
138         str_replace:
139           template: oam_network_rand
140           params:
141             rand: { get_resource: random-str }
142
143   oam_subnet:
144     type: OS::Neutron::Subnet
145     properties:
146       name:
147         str_replace:
148           template: oam_network_rand
149           params:
150             rand: { get_resource: random-str }
151       network_id: { get_resource: oam_network }
152       cidr: { get_param: oam_network_cidr }
153       dns_nameservers: [ "8.8.8.8" ]
154
155   router:
156     type: OS::Neutron::Router
157     properties:
158       name:
159         list_join: ['-', [{ get_param: 'OS::stack_name' }, 'router']]
160       external_gateway_info:
161         network: { get_param: public_net_id }
162
163   router_interface:
164     type: OS::Neutron::RouterInterface
165     properties:
166       router_id: { get_resource: router }
167       subnet_id: { get_resource: oam_subnet }
168
169   rancher_private_port:
170     type: OS::Neutron::Port
171     properties:
172       network: { get_resource: oam_network }
173       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
174       security_groups:
175       - { get_resource: onap_sg }
176
177   rancher_floating_ip:
178     type: OS::Neutron::FloatingIP
179     properties:
180       floating_network_id: { get_param: public_net_id }
181       port_id: { get_resource: rancher_private_port }
182
183   rancher_vm:
184     type: OS::Nova::Server
185     properties:
186       name:
187         list_join: ['-', [{ get_param: 'OS::stack_name' }, 'rancher']]
188       image: { get_param: ubuntu_1604_image }
189       flavor: { get_param: rancher_vm_flavor }
190       key_name: { get_param: key_name }
191       networks:
192       - port: { get_resource: rancher_private_port }
193       user_data_format: RAW
194       user_data:
195         str_replace:
196           template:
197             get_file: rancher_vm_entrypoint.sh
198           params:
199             __docker_proxy__: { get_param: docker_proxy }
200             __apt_proxy__: { get_param: apt_proxy }
201             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
202             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
203             __integration_override_yaml__: { get_param: integration_override_yaml }
204             __integration_gerrit_branch__: { get_param: integration_gerrit_branch }
205             __integration_gerrit_refspec__: { get_param: integration_gerrit_refspec }
206             __oom_gerrit_branch__: { get_param: oom_gerrit_branch }
207             __oom_gerrit_refspec__: { get_param: oom_gerrit_refspec }
208             __docker_manifest__: { get_param: docker_manifest }
209             __docker_version__: { get_param: docker_version }
210             __rancher_version__: { get_param: rancher_version }
211             __rancher_agent_version__: { get_param: rancher_agent_version }
212             __kubectl_version__: { get_param: kubectl_version }
213             __helm_version__: { get_param: helm_version }
214             __helm_deploy_delay__: { get_param: helm_deploy_delay }
215             __use_ramdisk__: { get_param: use_ramdisk }
216             __public_net_id__: { get_param: public_net_id }
217             __oam_network_cidr__: { get_param: oam_network_cidr }
218             __oam_network_id__: { get_resource: oam_network }
219             __oam_subnet_id__: { get_resource: oam_subnet }
220             __sec_group__: { get_resource: onap_sg }
221             __k8s_01_vm_ip__: { get_attr: [k8s_01_floating_ip, floating_ip_address] }
222             __k8s_vm_ips__: [
223               get_attr: [k8s_01_floating_ip, floating_ip_address],
224               get_attr: [k8s_02_floating_ip, floating_ip_address],
225               get_attr: [k8s_03_floating_ip, floating_ip_address],
226               get_attr: [k8s_04_floating_ip, floating_ip_address],
227               get_attr: [k8s_05_floating_ip, floating_ip_address],
228               get_attr: [k8s_06_floating_ip, floating_ip_address],
229               get_attr: [k8s_07_floating_ip, floating_ip_address],
230               get_attr: [k8s_08_floating_ip, floating_ip_address],
231               get_attr: [k8s_09_floating_ip, floating_ip_address],
232               get_attr: [k8s_10_floating_ip, floating_ip_address],
233               get_attr: [k8s_11_floating_ip, floating_ip_address],
234               get_attr: [k8s_12_floating_ip, floating_ip_address],
235             ]
236             __k8s_private_ips__: [
237               get_attr: [k8s_01_floating_ip, fixed_ip_address],
238               get_attr: [k8s_02_floating_ip, fixed_ip_address],
239               get_attr: [k8s_03_floating_ip, fixed_ip_address],
240               get_attr: [k8s_04_floating_ip, fixed_ip_address],
241               get_attr: [k8s_05_floating_ip, fixed_ip_address],
242               get_attr: [k8s_06_floating_ip, fixed_ip_address],
243               get_attr: [k8s_07_floating_ip, fixed_ip_address],
244               get_attr: [k8s_08_floating_ip, fixed_ip_address],
245               get_attr: [k8s_09_floating_ip, fixed_ip_address],
246               get_attr: [k8s_10_floating_ip, fixed_ip_address],
247               get_attr: [k8s_11_floating_ip, fixed_ip_address],
248               get_attr: [k8s_12_floating_ip, fixed_ip_address],
249             ]
250   k8s_01_private_port:
251     type: OS::Neutron::Port
252     properties:
253       network: { get_resource: oam_network }
254       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
255       security_groups:
256       - { get_resource: onap_sg }
257
258   k8s_01_floating_ip:
259     type: OS::Neutron::FloatingIP
260     properties:
261       floating_network_id: { get_param: public_net_id }
262       port_id: { get_resource: k8s_01_private_port }
263
264   k8s_01_vm:
265     type: OS::Nova::Server
266     properties:
267       name:
268         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '01' ] ]
269       image: { get_param: ubuntu_1604_image }
270       flavor: { get_param: k8s_vm_flavor }
271       key_name: { get_param: key_name }
272       networks:
273       - port: { get_resource: k8s_01_private_port }
274       user_data_format: RAW
275       user_data:
276         str_replace:
277           params:
278             __docker_proxy__: { get_param: docker_proxy }
279             __apt_proxy__: { get_param: apt_proxy }
280             __docker_version__: { get_param: docker_version }
281             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
282             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
283             __host_label__: 'compute'
284           template:
285             get_file: k8s_vm_entrypoint.sh
286
287   k8s_02_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_02_floating_ip:
296     type: OS::Neutron::FloatingIP
297     properties:
298       floating_network_id: { get_param: public_net_id }
299       port_id: { get_resource: k8s_02_private_port }
300
301   k8s_02_vm:
302     type: OS::Nova::Server
303     properties:
304       name:
305         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '02' ] ]
306       image: { get_param: ubuntu_1604_image }
307       flavor: { get_param: k8s_vm_flavor }
308       key_name: { get_param: key_name }
309       networks:
310       - port: { get_resource: k8s_02_private_port }
311       user_data_format: RAW
312       user_data:
313         str_replace:
314           params:
315             __docker_proxy__: { get_param: docker_proxy }
316             __apt_proxy__: { get_param: apt_proxy }
317             __docker_version__: { get_param: docker_version }
318             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
319             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
320             __host_label__: 'compute'
321           template:
322             get_file: k8s_vm_entrypoint.sh
323
324   k8s_03_private_port:
325     type: OS::Neutron::Port
326     properties:
327       network: { get_resource: oam_network }
328       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
329       security_groups:
330       - { get_resource: onap_sg }
331
332   k8s_03_floating_ip:
333     type: OS::Neutron::FloatingIP
334     properties:
335       floating_network_id: { get_param: public_net_id }
336       port_id: { get_resource: k8s_03_private_port }
337
338   k8s_03_vm:
339     type: OS::Nova::Server
340     properties:
341       name:
342         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '03' ] ]
343       image: { get_param: ubuntu_1604_image }
344       flavor: { get_param: k8s_vm_flavor }
345       key_name: { get_param: key_name }
346       networks:
347       - port: { get_resource: k8s_03_private_port }
348       user_data_format: RAW
349       user_data:
350         str_replace:
351           params:
352             __docker_proxy__: { get_param: docker_proxy }
353             __apt_proxy__: { get_param: apt_proxy }
354             __docker_version__: { get_param: docker_version }
355             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
356             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
357             __host_label__: 'compute'
358           template:
359             get_file: k8s_vm_entrypoint.sh
360
361   k8s_04_private_port:
362     type: OS::Neutron::Port
363     properties:
364       network: { get_resource: oam_network }
365       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
366       security_groups:
367       - { get_resource: onap_sg }
368
369   k8s_04_floating_ip:
370     type: OS::Neutron::FloatingIP
371     properties:
372       floating_network_id: { get_param: public_net_id }
373       port_id: { get_resource: k8s_04_private_port }
374
375   k8s_04_vm:
376     type: OS::Nova::Server
377     properties:
378       name:
379         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '04' ] ]
380       image: { get_param: ubuntu_1604_image }
381       flavor: { get_param: k8s_vm_flavor }
382       key_name: { get_param: key_name }
383       networks:
384       - port: { get_resource: k8s_04_private_port }
385       user_data_format: RAW
386       user_data:
387         str_replace:
388           params:
389             __docker_proxy__: { get_param: docker_proxy }
390             __apt_proxy__: { get_param: apt_proxy }
391             __docker_version__: { get_param: docker_version }
392             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
393             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
394             __host_label__: 'compute'
395           template:
396             get_file: k8s_vm_entrypoint.sh
397
398   k8s_05_private_port:
399     type: OS::Neutron::Port
400     properties:
401       network: { get_resource: oam_network }
402       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
403       security_groups:
404       - { get_resource: onap_sg }
405
406   k8s_05_floating_ip:
407     type: OS::Neutron::FloatingIP
408     properties:
409       floating_network_id: { get_param: public_net_id }
410       port_id: { get_resource: k8s_05_private_port }
411
412   k8s_05_vm:
413     type: OS::Nova::Server
414     properties:
415       name:
416         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '05' ] ]
417       image: { get_param: ubuntu_1604_image }
418       flavor: { get_param: k8s_vm_flavor }
419       key_name: { get_param: key_name }
420       networks:
421       - port: { get_resource: k8s_05_private_port }
422       user_data_format: RAW
423       user_data:
424         str_replace:
425           params:
426             __docker_proxy__: { get_param: docker_proxy }
427             __apt_proxy__: { get_param: apt_proxy }
428             __docker_version__: { get_param: docker_version }
429             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
430             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
431             __host_label__: 'compute'
432           template:
433             get_file: k8s_vm_entrypoint.sh
434
435   k8s_06_private_port:
436     type: OS::Neutron::Port
437     properties:
438       network: { get_resource: oam_network }
439       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
440       security_groups:
441       - { get_resource: onap_sg }
442
443   k8s_06_floating_ip:
444     type: OS::Neutron::FloatingIP
445     properties:
446       floating_network_id: { get_param: public_net_id }
447       port_id: { get_resource: k8s_06_private_port }
448
449   k8s_06_vm:
450     type: OS::Nova::Server
451     properties:
452       name:
453         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '06' ] ]
454       image: { get_param: ubuntu_1604_image }
455       flavor: { get_param: k8s_vm_flavor }
456       key_name: { get_param: key_name }
457       networks:
458       - port: { get_resource: k8s_06_private_port }
459       user_data_format: RAW
460       user_data:
461         str_replace:
462           params:
463             __docker_proxy__: { get_param: docker_proxy }
464             __apt_proxy__: { get_param: apt_proxy }
465             __docker_version__: { get_param: docker_version }
466             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
467             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
468             __host_label__: 'compute'
469           template:
470             get_file: k8s_vm_entrypoint.sh
471
472   k8s_07_private_port:
473     type: OS::Neutron::Port
474     properties:
475       network: { get_resource: oam_network }
476       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
477       security_groups:
478       - { get_resource: onap_sg }
479
480   k8s_07_floating_ip:
481     type: OS::Neutron::FloatingIP
482     properties:
483       floating_network_id: { get_param: public_net_id }
484       port_id: { get_resource: k8s_07_private_port }
485
486   k8s_07_vm:
487     type: OS::Nova::Server
488     properties:
489       name:
490         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '07' ] ]
491       image: { get_param: ubuntu_1604_image }
492       flavor: { get_param: k8s_vm_flavor }
493       key_name: { get_param: key_name }
494       networks:
495       - port: { get_resource: k8s_07_private_port }
496       user_data_format: RAW
497       user_data:
498         str_replace:
499           params:
500             __docker_proxy__: { get_param: docker_proxy }
501             __apt_proxy__: { get_param: apt_proxy }
502             __docker_version__: { get_param: docker_version }
503             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
504             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
505             __host_label__: 'compute'
506           template:
507             get_file: k8s_vm_entrypoint.sh
508
509   k8s_08_private_port:
510     type: OS::Neutron::Port
511     properties:
512       network: { get_resource: oam_network }
513       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
514       security_groups:
515       - { get_resource: onap_sg }
516
517   k8s_08_floating_ip:
518     type: OS::Neutron::FloatingIP
519     properties:
520       floating_network_id: { get_param: public_net_id }
521       port_id: { get_resource: k8s_08_private_port }
522
523   k8s_08_vm:
524     type: OS::Nova::Server
525     properties:
526       name:
527         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '08' ] ]
528       image: { get_param: ubuntu_1604_image }
529       flavor: { get_param: k8s_vm_flavor }
530       key_name: { get_param: key_name }
531       networks:
532       - port: { get_resource: k8s_08_private_port }
533       user_data_format: RAW
534       user_data:
535         str_replace:
536           params:
537             __docker_proxy__: { get_param: docker_proxy }
538             __apt_proxy__: { get_param: apt_proxy }
539             __docker_version__: { get_param: docker_version }
540             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
541             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
542             __host_label__: 'compute'
543           template:
544             get_file: k8s_vm_entrypoint.sh
545
546   k8s_09_private_port:
547     type: OS::Neutron::Port
548     properties:
549       network: { get_resource: oam_network }
550       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
551       security_groups:
552       - { get_resource: onap_sg }
553
554   k8s_09_floating_ip:
555     type: OS::Neutron::FloatingIP
556     properties:
557       floating_network_id: { get_param: public_net_id }
558       port_id: { get_resource: k8s_09_private_port }
559
560   k8s_09_vm:
561     type: OS::Nova::Server
562     properties:
563       name:
564         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '09' ] ]
565       image: { get_param: ubuntu_1604_image }
566       flavor: { get_param: k8s_vm_flavor }
567       key_name: { get_param: key_name }
568       networks:
569       - port: { get_resource: k8s_09_private_port }
570       user_data_format: RAW
571       user_data:
572         str_replace:
573           params:
574             __docker_proxy__: { get_param: docker_proxy }
575             __apt_proxy__: { get_param: apt_proxy }
576             __docker_version__: { get_param: docker_version }
577             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
578             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
579             __host_label__: 'compute'
580           template:
581             get_file: k8s_vm_entrypoint.sh
582
583   k8s_10_private_port:
584     type: OS::Neutron::Port
585     properties:
586       network: { get_resource: oam_network }
587       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
588       security_groups:
589       - { get_resource: onap_sg }
590
591   k8s_10_floating_ip:
592     type: OS::Neutron::FloatingIP
593     properties:
594       floating_network_id: { get_param: public_net_id }
595       port_id: { get_resource: k8s_10_private_port }
596
597   k8s_10_vm:
598     type: OS::Nova::Server
599     properties:
600       name:
601         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '10' ] ]
602       image: { get_param: ubuntu_1604_image }
603       flavor: { get_param: k8s_vm_flavor }
604       key_name: { get_param: key_name }
605       networks:
606       - port: { get_resource: k8s_10_private_port }
607       user_data_format: RAW
608       user_data:
609         str_replace:
610           params:
611             __docker_proxy__: { get_param: docker_proxy }
612             __apt_proxy__: { get_param: apt_proxy }
613             __docker_version__: { get_param: docker_version }
614             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
615             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
616             __host_label__: 'compute'
617           template:
618             get_file: k8s_vm_entrypoint.sh
619
620   k8s_11_private_port:
621     type: OS::Neutron::Port
622     properties:
623       network: { get_resource: oam_network }
624       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
625       security_groups:
626       - { get_resource: onap_sg }
627
628   k8s_11_floating_ip:
629     type: OS::Neutron::FloatingIP
630     properties:
631       floating_network_id: { get_param: public_net_id }
632       port_id: { get_resource: k8s_11_private_port }
633
634   k8s_11_vm:
635     type: OS::Nova::Server
636     properties:
637       name:
638         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '11' ] ]
639       image: { get_param: ubuntu_1604_image }
640       flavor: { get_param: k8s_vm_flavor }
641       key_name: { get_param: key_name }
642       networks:
643       - port: { get_resource: k8s_11_private_port }
644       user_data_format: RAW
645       user_data:
646         str_replace:
647           params:
648             __docker_proxy__: { get_param: docker_proxy }
649             __apt_proxy__: { get_param: apt_proxy }
650             __docker_version__: { get_param: docker_version }
651             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
652             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
653             __host_label__: 'compute'
654           template:
655             get_file: k8s_vm_entrypoint.sh
656
657   k8s_12_private_port:
658     type: OS::Neutron::Port
659     properties:
660       network: { get_resource: oam_network }
661       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
662       security_groups:
663       - { get_resource: onap_sg }
664
665   k8s_12_floating_ip:
666     type: OS::Neutron::FloatingIP
667     properties:
668       floating_network_id: { get_param: public_net_id }
669       port_id: { get_resource: k8s_12_private_port }
670
671   k8s_12_vm:
672     type: OS::Nova::Server
673     properties:
674       name:
675         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '12' ] ]
676       image: { get_param: ubuntu_1604_image }
677       flavor: { get_param: k8s_vm_flavor }
678       key_name: { get_param: key_name }
679       networks:
680       - port: { get_resource: k8s_12_private_port }
681       user_data_format: RAW
682       user_data:
683         str_replace:
684           params:
685             __docker_proxy__: { get_param: docker_proxy }
686             __apt_proxy__: { get_param: apt_proxy }
687             __docker_version__: { get_param: docker_version }
688             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
689             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
690             __host_label__: 'compute'
691           template:
692             get_file: k8s_vm_entrypoint.sh
693
694   etcd_1_private_port:
695     type: OS::Neutron::Port
696     properties:
697       network: { get_resource: oam_network }
698       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
699       security_groups:
700       - { get_resource: onap_sg }
701
702   etcd_1_floating_ip:
703     type: OS::Neutron::FloatingIP
704     properties:
705       floating_network_id: { get_param: public_net_id }
706       port_id: { get_resource: etcd_1_private_port }
707
708   etcd_1_vm:
709     type: OS::Nova::Server
710     properties:
711       name:
712         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'etcd', '1' ] ]
713       image: { get_param: ubuntu_1604_image }
714       flavor: { get_param: etcd_vm_flavor }
715       key_name: { get_param: key_name }
716       networks:
717       - port: { get_resource: etcd_1_private_port }
718       user_data_format: RAW
719       user_data:
720         str_replace:
721           params:
722             __docker_proxy__: { get_param: docker_proxy }
723             __apt_proxy__: { get_param: apt_proxy }
724             __docker_version__: { get_param: docker_version }
725             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
726             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
727             __host_label__: 'etcd'
728           template:
729             get_file: k8s_vm_entrypoint.sh
730
731   etcd_2_private_port:
732     type: OS::Neutron::Port
733     properties:
734       network: { get_resource: oam_network }
735       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
736       security_groups:
737       - { get_resource: onap_sg }
738
739   etcd_2_floating_ip:
740     type: OS::Neutron::FloatingIP
741     properties:
742       floating_network_id: { get_param: public_net_id }
743       port_id: { get_resource: etcd_2_private_port }
744
745   etcd_2_vm:
746     type: OS::Nova::Server
747     properties:
748       name:
749         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'etcd', '2' ] ]
750       image: { get_param: ubuntu_1604_image }
751       flavor: { get_param: etcd_vm_flavor }
752       key_name: { get_param: key_name }
753       networks:
754       - port: { get_resource: etcd_2_private_port }
755       user_data_format: RAW
756       user_data:
757         str_replace:
758           params:
759             __docker_proxy__: { get_param: docker_proxy }
760             __apt_proxy__: { get_param: apt_proxy }
761             __docker_version__: { get_param: docker_version }
762             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
763             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
764             __host_label__: 'etcd'
765           template:
766             get_file: k8s_vm_entrypoint.sh
767
768   etcd_3_private_port:
769     type: OS::Neutron::Port
770     properties:
771       network: { get_resource: oam_network }
772       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
773       security_groups:
774       - { get_resource: onap_sg }
775
776   etcd_3_floating_ip:
777     type: OS::Neutron::FloatingIP
778     properties:
779       floating_network_id: { get_param: public_net_id }
780       port_id: { get_resource: etcd_3_private_port }
781
782   etcd_3_vm:
783     type: OS::Nova::Server
784     properties:
785       name:
786         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'etcd', '3' ] ]
787       image: { get_param: ubuntu_1604_image }
788       flavor: { get_param: etcd_vm_flavor }
789       key_name: { get_param: key_name }
790       networks:
791       - port: { get_resource: etcd_3_private_port }
792       user_data_format: RAW
793       user_data:
794         str_replace:
795           params:
796             __docker_proxy__: { get_param: docker_proxy }
797             __apt_proxy__: { get_param: apt_proxy }
798             __docker_version__: { get_param: docker_version }
799             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
800             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
801             __host_label__: 'etcd'
802           template:
803             get_file: k8s_vm_entrypoint.sh
804
805   orch_1_private_port:
806     type: OS::Neutron::Port
807     properties:
808       network: { get_resource: oam_network }
809       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
810       security_groups:
811       - { get_resource: onap_sg }
812
813   orch_1_floating_ip:
814     type: OS::Neutron::FloatingIP
815     properties:
816       floating_network_id: { get_param: public_net_id }
817       port_id: { get_resource: orch_1_private_port }
818
819   orch_1_vm:
820     type: OS::Nova::Server
821     properties:
822       name:
823         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'orch', '1' ] ]
824       image: { get_param: ubuntu_1604_image }
825       flavor: { get_param: orch_vm_flavor }
826       key_name: { get_param: key_name }
827       networks:
828       - port: { get_resource: orch_1_private_port }
829       user_data_format: RAW
830       user_data:
831         str_replace:
832           params:
833             __docker_proxy__: { get_param: docker_proxy }
834             __apt_proxy__: { get_param: apt_proxy }
835             __docker_version__: { get_param: docker_version }
836             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
837             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
838             __host_label__: 'orchestration'
839           template:
840             get_file: k8s_vm_entrypoint.sh
841
842 outputs:
843   rancher_vm_ip:
844     description: The IP address of the rancher instance
845     value: { get_attr: [rancher_floating_ip, floating_ip_address] }
846
847   k8s_01_vm_ip:
848     description: The IP address of the k8s_01 instance
849     value: { get_attr: [k8s_01_floating_ip, floating_ip_address] }
850
851   k8s_02_vm_ip:
852     description: The IP address of the k8s_02 instance
853     value: { get_attr: [k8s_02_floating_ip, floating_ip_address] }
854
855   k8s_03_vm_ip:
856     description: The IP address of the k8s_03 instance
857     value: { get_attr: [k8s_03_floating_ip, floating_ip_address] }
858
859   k8s_04_vm_ip:
860     description: The IP address of the k8s_04 instance
861     value: { get_attr: [k8s_04_floating_ip, floating_ip_address] }
862
863   k8s_05_vm_ip:
864     description: The IP address of the k8s_05 instance
865     value: { get_attr: [k8s_05_floating_ip, floating_ip_address] }
866
867   k8s_06_vm_ip:
868     description: The IP address of the k8s_06 instance
869     value: { get_attr: [k8s_06_floating_ip, floating_ip_address] }
870
871   k8s_07_vm_ip:
872     description: The IP address of the k8s_07 instance
873     value: { get_attr: [k8s_07_floating_ip, floating_ip_address] }
874
875   k8s_08_vm_ip:
876     description: The IP address of the k8s_08 instance
877     value: { get_attr: [k8s_08_floating_ip, floating_ip_address] }
878
879   k8s_09_vm_ip:
880     description: The IP address of the k8s_09 instance
881     value: { get_attr: [k8s_09_floating_ip, floating_ip_address] }
882
883   k8s_10_vm_ip:
884     description: The IP address of the k8s_10 instance
885     value: { get_attr: [k8s_10_floating_ip, floating_ip_address] }
886
887   k8s_11_vm_ip:
888     description: The IP address of the k8s_11 instance
889     value: { get_attr: [k8s_11_floating_ip, floating_ip_address] }
890
891   k8s_12_vm_ip:
892     description: The IP address of the k8s_12 instance
893     value: { get_attr: [k8s_12_floating_ip, floating_ip_address] }
894