930032203aa56a95957aa5f825a04a9d4167c993
[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             ]
235             __k8s_private_ips__: [
236               get_attr: [k8s_01_floating_ip, fixed_ip_address],
237               get_attr: [k8s_02_floating_ip, fixed_ip_address],
238               get_attr: [k8s_03_floating_ip, fixed_ip_address],
239               get_attr: [k8s_04_floating_ip, fixed_ip_address],
240               get_attr: [k8s_05_floating_ip, fixed_ip_address],
241               get_attr: [k8s_06_floating_ip, fixed_ip_address],
242               get_attr: [k8s_07_floating_ip, fixed_ip_address],
243               get_attr: [k8s_08_floating_ip, fixed_ip_address],
244               get_attr: [k8s_09_floating_ip, fixed_ip_address],
245               get_attr: [k8s_10_floating_ip, fixed_ip_address],
246               get_attr: [k8s_11_floating_ip, fixed_ip_address],
247             ]
248   k8s_01_private_port:
249     type: OS::Neutron::Port
250     properties:
251       network: { get_resource: oam_network }
252       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
253       security_groups:
254       - { get_resource: onap_sg }
255
256   k8s_01_floating_ip:
257     type: OS::Neutron::FloatingIP
258     properties:
259       floating_network_id: { get_param: public_net_id }
260       port_id: { get_resource: k8s_01_private_port }
261
262   k8s_01_vm:
263     type: OS::Nova::Server
264     properties:
265       name:
266         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '01' ] ]
267       image: { get_param: ubuntu_1604_image }
268       flavor: { get_param: k8s_vm_flavor }
269       key_name: { get_param: key_name }
270       networks:
271       - port: { get_resource: k8s_01_private_port }
272       user_data_format: RAW
273       user_data:
274         str_replace:
275           params:
276             __docker_proxy__: { get_param: docker_proxy }
277             __apt_proxy__: { get_param: apt_proxy }
278             __docker_version__: { get_param: docker_version }
279             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
280             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
281             __host_label__: 'compute'
282           template:
283             get_file: k8s_vm_entrypoint.sh
284
285   k8s_02_private_port:
286     type: OS::Neutron::Port
287     properties:
288       network: { get_resource: oam_network }
289       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
290       security_groups:
291       - { get_resource: onap_sg }
292
293   k8s_02_floating_ip:
294     type: OS::Neutron::FloatingIP
295     properties:
296       floating_network_id: { get_param: public_net_id }
297       port_id: { get_resource: k8s_02_private_port }
298
299   k8s_02_vm:
300     type: OS::Nova::Server
301     properties:
302       name:
303         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '02' ] ]
304       image: { get_param: ubuntu_1604_image }
305       flavor: { get_param: k8s_vm_flavor }
306       key_name: { get_param: key_name }
307       networks:
308       - port: { get_resource: k8s_02_private_port }
309       user_data_format: RAW
310       user_data:
311         str_replace:
312           params:
313             __docker_proxy__: { get_param: docker_proxy }
314             __apt_proxy__: { get_param: apt_proxy }
315             __docker_version__: { get_param: docker_version }
316             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
317             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
318             __host_label__: 'compute'
319           template:
320             get_file: k8s_vm_entrypoint.sh
321
322   k8s_03_private_port:
323     type: OS::Neutron::Port
324     properties:
325       network: { get_resource: oam_network }
326       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
327       security_groups:
328       - { get_resource: onap_sg }
329
330   k8s_03_floating_ip:
331     type: OS::Neutron::FloatingIP
332     properties:
333       floating_network_id: { get_param: public_net_id }
334       port_id: { get_resource: k8s_03_private_port }
335
336   k8s_03_vm:
337     type: OS::Nova::Server
338     properties:
339       name:
340         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '03' ] ]
341       image: { get_param: ubuntu_1604_image }
342       flavor: { get_param: k8s_vm_flavor }
343       key_name: { get_param: key_name }
344       networks:
345       - port: { get_resource: k8s_03_private_port }
346       user_data_format: RAW
347       user_data:
348         str_replace:
349           params:
350             __docker_proxy__: { get_param: docker_proxy }
351             __apt_proxy__: { get_param: apt_proxy }
352             __docker_version__: { get_param: docker_version }
353             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
354             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
355             __host_label__: 'compute'
356           template:
357             get_file: k8s_vm_entrypoint.sh
358
359   k8s_04_private_port:
360     type: OS::Neutron::Port
361     properties:
362       network: { get_resource: oam_network }
363       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
364       security_groups:
365       - { get_resource: onap_sg }
366
367   k8s_04_floating_ip:
368     type: OS::Neutron::FloatingIP
369     properties:
370       floating_network_id: { get_param: public_net_id }
371       port_id: { get_resource: k8s_04_private_port }
372
373   k8s_04_vm:
374     type: OS::Nova::Server
375     properties:
376       name:
377         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '04' ] ]
378       image: { get_param: ubuntu_1604_image }
379       flavor: { get_param: k8s_vm_flavor }
380       key_name: { get_param: key_name }
381       networks:
382       - port: { get_resource: k8s_04_private_port }
383       user_data_format: RAW
384       user_data:
385         str_replace:
386           params:
387             __docker_proxy__: { get_param: docker_proxy }
388             __apt_proxy__: { get_param: apt_proxy }
389             __docker_version__: { get_param: docker_version }
390             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
391             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
392             __host_label__: 'compute'
393           template:
394             get_file: k8s_vm_entrypoint.sh
395
396   k8s_05_private_port:
397     type: OS::Neutron::Port
398     properties:
399       network: { get_resource: oam_network }
400       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
401       security_groups:
402       - { get_resource: onap_sg }
403
404   k8s_05_floating_ip:
405     type: OS::Neutron::FloatingIP
406     properties:
407       floating_network_id: { get_param: public_net_id }
408       port_id: { get_resource: k8s_05_private_port }
409
410   k8s_05_vm:
411     type: OS::Nova::Server
412     properties:
413       name:
414         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '05' ] ]
415       image: { get_param: ubuntu_1604_image }
416       flavor: { get_param: k8s_vm_flavor }
417       key_name: { get_param: key_name }
418       networks:
419       - port: { get_resource: k8s_05_private_port }
420       user_data_format: RAW
421       user_data:
422         str_replace:
423           params:
424             __docker_proxy__: { get_param: docker_proxy }
425             __apt_proxy__: { get_param: apt_proxy }
426             __docker_version__: { get_param: docker_version }
427             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
428             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
429             __host_label__: 'compute'
430           template:
431             get_file: k8s_vm_entrypoint.sh
432
433   k8s_06_private_port:
434     type: OS::Neutron::Port
435     properties:
436       network: { get_resource: oam_network }
437       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
438       security_groups:
439       - { get_resource: onap_sg }
440
441   k8s_06_floating_ip:
442     type: OS::Neutron::FloatingIP
443     properties:
444       floating_network_id: { get_param: public_net_id }
445       port_id: { get_resource: k8s_06_private_port }
446
447   k8s_06_vm:
448     type: OS::Nova::Server
449     properties:
450       name:
451         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '06' ] ]
452       image: { get_param: ubuntu_1604_image }
453       flavor: { get_param: k8s_vm_flavor }
454       key_name: { get_param: key_name }
455       networks:
456       - port: { get_resource: k8s_06_private_port }
457       user_data_format: RAW
458       user_data:
459         str_replace:
460           params:
461             __docker_proxy__: { get_param: docker_proxy }
462             __apt_proxy__: { get_param: apt_proxy }
463             __docker_version__: { get_param: docker_version }
464             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
465             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
466             __host_label__: 'compute'
467           template:
468             get_file: k8s_vm_entrypoint.sh
469
470   k8s_07_private_port:
471     type: OS::Neutron::Port
472     properties:
473       network: { get_resource: oam_network }
474       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
475       security_groups:
476       - { get_resource: onap_sg }
477
478   k8s_07_floating_ip:
479     type: OS::Neutron::FloatingIP
480     properties:
481       floating_network_id: { get_param: public_net_id }
482       port_id: { get_resource: k8s_07_private_port }
483
484   k8s_07_vm:
485     type: OS::Nova::Server
486     properties:
487       name:
488         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '07' ] ]
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_07_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             __docker_version__: { get_param: docker_version }
501             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
502             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
503             __host_label__: 'compute'
504           template:
505             get_file: k8s_vm_entrypoint.sh
506
507   k8s_08_private_port:
508     type: OS::Neutron::Port
509     properties:
510       network: { get_resource: oam_network }
511       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
512       security_groups:
513       - { get_resource: onap_sg }
514
515   k8s_08_floating_ip:
516     type: OS::Neutron::FloatingIP
517     properties:
518       floating_network_id: { get_param: public_net_id }
519       port_id: { get_resource: k8s_08_private_port }
520
521   k8s_08_vm:
522     type: OS::Nova::Server
523     properties:
524       name:
525         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '08' ] ]
526       image: { get_param: ubuntu_1604_image }
527       flavor: { get_param: k8s_vm_flavor }
528       key_name: { get_param: key_name }
529       networks:
530       - port: { get_resource: k8s_08_private_port }
531       user_data_format: RAW
532       user_data:
533         str_replace:
534           params:
535             __docker_proxy__: { get_param: docker_proxy }
536             __apt_proxy__: { get_param: apt_proxy }
537             __docker_version__: { get_param: docker_version }
538             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
539             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
540             __host_label__: 'compute'
541           template:
542             get_file: k8s_vm_entrypoint.sh
543
544   k8s_09_private_port:
545     type: OS::Neutron::Port
546     properties:
547       network: { get_resource: oam_network }
548       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
549       security_groups:
550       - { get_resource: onap_sg }
551
552   k8s_09_floating_ip:
553     type: OS::Neutron::FloatingIP
554     properties:
555       floating_network_id: { get_param: public_net_id }
556       port_id: { get_resource: k8s_09_private_port }
557
558   k8s_09_vm:
559     type: OS::Nova::Server
560     properties:
561       name:
562         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '09' ] ]
563       image: { get_param: ubuntu_1604_image }
564       flavor: { get_param: k8s_vm_flavor }
565       key_name: { get_param: key_name }
566       networks:
567       - port: { get_resource: k8s_09_private_port }
568       user_data_format: RAW
569       user_data:
570         str_replace:
571           params:
572             __docker_proxy__: { get_param: docker_proxy }
573             __apt_proxy__: { get_param: apt_proxy }
574             __docker_version__: { get_param: docker_version }
575             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
576             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
577             __host_label__: 'compute'
578           template:
579             get_file: k8s_vm_entrypoint.sh
580
581   k8s_10_private_port:
582     type: OS::Neutron::Port
583     properties:
584       network: { get_resource: oam_network }
585       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
586       security_groups:
587       - { get_resource: onap_sg }
588
589   k8s_10_floating_ip:
590     type: OS::Neutron::FloatingIP
591     properties:
592       floating_network_id: { get_param: public_net_id }
593       port_id: { get_resource: k8s_10_private_port }
594
595   k8s_10_vm:
596     type: OS::Nova::Server
597     properties:
598       name:
599         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '10' ] ]
600       image: { get_param: ubuntu_1604_image }
601       flavor: { get_param: k8s_vm_flavor }
602       key_name: { get_param: key_name }
603       networks:
604       - port: { get_resource: k8s_10_private_port }
605       user_data_format: RAW
606       user_data:
607         str_replace:
608           params:
609             __docker_proxy__: { get_param: docker_proxy }
610             __apt_proxy__: { get_param: apt_proxy }
611             __docker_version__: { get_param: docker_version }
612             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
613             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
614             __host_label__: 'compute'
615           template:
616             get_file: k8s_vm_entrypoint.sh
617
618   k8s_11_private_port:
619     type: OS::Neutron::Port
620     properties:
621       network: { get_resource: oam_network }
622       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
623       security_groups:
624       - { get_resource: onap_sg }
625
626   k8s_11_floating_ip:
627     type: OS::Neutron::FloatingIP
628     properties:
629       floating_network_id: { get_param: public_net_id }
630       port_id: { get_resource: k8s_11_private_port }
631
632   k8s_11_vm:
633     type: OS::Nova::Server
634     properties:
635       name:
636         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '11' ] ]
637       image: { get_param: ubuntu_1604_image }
638       flavor: { get_param: k8s_vm_flavor }
639       key_name: { get_param: key_name }
640       networks:
641       - port: { get_resource: k8s_11_private_port }
642       user_data_format: RAW
643       user_data:
644         str_replace:
645           params:
646             __docker_proxy__: { get_param: docker_proxy }
647             __apt_proxy__: { get_param: apt_proxy }
648             __docker_version__: { get_param: docker_version }
649             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
650             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
651             __host_label__: 'compute'
652           template:
653             get_file: k8s_vm_entrypoint.sh
654
655   etcd_1_private_port:
656     type: OS::Neutron::Port
657     properties:
658       network: { get_resource: oam_network }
659       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
660       security_groups:
661       - { get_resource: onap_sg }
662
663   etcd_1_floating_ip:
664     type: OS::Neutron::FloatingIP
665     properties:
666       floating_network_id: { get_param: public_net_id }
667       port_id: { get_resource: etcd_1_private_port }
668
669   etcd_1_vm:
670     type: OS::Nova::Server
671     properties:
672       name:
673         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'etcd', '1' ] ]
674       image: { get_param: ubuntu_1604_image }
675       flavor: { get_param: etcd_vm_flavor }
676       key_name: { get_param: key_name }
677       networks:
678       - port: { get_resource: etcd_1_private_port }
679       user_data_format: RAW
680       user_data:
681         str_replace:
682           params:
683             __docker_proxy__: { get_param: docker_proxy }
684             __apt_proxy__: { get_param: apt_proxy }
685             __docker_version__: { get_param: docker_version }
686             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
687             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
688             __host_label__: 'etcd'
689           template:
690             get_file: k8s_vm_entrypoint.sh
691
692   etcd_2_private_port:
693     type: OS::Neutron::Port
694     properties:
695       network: { get_resource: oam_network }
696       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
697       security_groups:
698       - { get_resource: onap_sg }
699
700   etcd_2_floating_ip:
701     type: OS::Neutron::FloatingIP
702     properties:
703       floating_network_id: { get_param: public_net_id }
704       port_id: { get_resource: etcd_2_private_port }
705
706   etcd_2_vm:
707     type: OS::Nova::Server
708     properties:
709       name:
710         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'etcd', '2' ] ]
711       image: { get_param: ubuntu_1604_image }
712       flavor: { get_param: etcd_vm_flavor }
713       key_name: { get_param: key_name }
714       networks:
715       - port: { get_resource: etcd_2_private_port }
716       user_data_format: RAW
717       user_data:
718         str_replace:
719           params:
720             __docker_proxy__: { get_param: docker_proxy }
721             __apt_proxy__: { get_param: apt_proxy }
722             __docker_version__: { get_param: docker_version }
723             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
724             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
725             __host_label__: 'etcd'
726           template:
727             get_file: k8s_vm_entrypoint.sh
728
729   etcd_3_private_port:
730     type: OS::Neutron::Port
731     properties:
732       network: { get_resource: oam_network }
733       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
734       security_groups:
735       - { get_resource: onap_sg }
736
737   etcd_3_floating_ip:
738     type: OS::Neutron::FloatingIP
739     properties:
740       floating_network_id: { get_param: public_net_id }
741       port_id: { get_resource: etcd_3_private_port }
742
743   etcd_3_vm:
744     type: OS::Nova::Server
745     properties:
746       name:
747         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'etcd', '3' ] ]
748       image: { get_param: ubuntu_1604_image }
749       flavor: { get_param: etcd_vm_flavor }
750       key_name: { get_param: key_name }
751       networks:
752       - port: { get_resource: etcd_3_private_port }
753       user_data_format: RAW
754       user_data:
755         str_replace:
756           params:
757             __docker_proxy__: { get_param: docker_proxy }
758             __apt_proxy__: { get_param: apt_proxy }
759             __docker_version__: { get_param: docker_version }
760             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
761             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
762             __host_label__: 'etcd'
763           template:
764             get_file: k8s_vm_entrypoint.sh
765
766   orch_1_private_port:
767     type: OS::Neutron::Port
768     properties:
769       network: { get_resource: oam_network }
770       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
771       security_groups:
772       - { get_resource: onap_sg }
773
774   orch_1_floating_ip:
775     type: OS::Neutron::FloatingIP
776     properties:
777       floating_network_id: { get_param: public_net_id }
778       port_id: { get_resource: orch_1_private_port }
779
780   orch_1_vm:
781     type: OS::Nova::Server
782     properties:
783       name:
784         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'orch', '1' ] ]
785       image: { get_param: ubuntu_1604_image }
786       flavor: { get_param: orch_vm_flavor }
787       key_name: { get_param: key_name }
788       networks:
789       - port: { get_resource: orch_1_private_port }
790       user_data_format: RAW
791       user_data:
792         str_replace:
793           params:
794             __docker_proxy__: { get_param: docker_proxy }
795             __apt_proxy__: { get_param: apt_proxy }
796             __docker_version__: { get_param: docker_version }
797             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
798             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
799             __host_label__: 'orchestration'
800           template:
801             get_file: k8s_vm_entrypoint.sh
802
803 outputs:
804   rancher_vm_ip:
805     description: The IP address of the rancher instance
806     value: { get_attr: [rancher_floating_ip, floating_ip_address] }
807
808   k8s_01_vm_ip:
809     description: The IP address of the k8s_01 instance
810     value: { get_attr: [k8s_01_floating_ip, floating_ip_address] }
811
812   k8s_02_vm_ip:
813     description: The IP address of the k8s_02 instance
814     value: { get_attr: [k8s_02_floating_ip, floating_ip_address] }
815
816   k8s_03_vm_ip:
817     description: The IP address of the k8s_03 instance
818     value: { get_attr: [k8s_03_floating_ip, floating_ip_address] }
819
820   k8s_04_vm_ip:
821     description: The IP address of the k8s_04 instance
822     value: { get_attr: [k8s_04_floating_ip, floating_ip_address] }
823
824   k8s_05_vm_ip:
825     description: The IP address of the k8s_05 instance
826     value: { get_attr: [k8s_05_floating_ip, floating_ip_address] }
827
828   k8s_06_vm_ip:
829     description: The IP address of the k8s_06 instance
830     value: { get_attr: [k8s_06_floating_ip, floating_ip_address] }
831
832   k8s_07_vm_ip:
833     description: The IP address of the k8s_07 instance
834     value: { get_attr: [k8s_07_floating_ip, floating_ip_address] }
835
836   k8s_08_vm_ip:
837     description: The IP address of the k8s_08 instance
838     value: { get_attr: [k8s_08_floating_ip, floating_ip_address] }
839
840   k8s_09_vm_ip:
841     description: The IP address of the k8s_09 instance
842     value: { get_attr: [k8s_09_floating_ip, floating_ip_address] }
843
844   k8s_10_vm_ip:
845     description: The IP address of the k8s_10 instance
846     value: { get_attr: [k8s_10_floating_ip, floating_ip_address] }
847
848   k8s_11_vm_ip:
849     description: The IP address of the k8s_11 instance
850     value: { get_attr: [k8s_11_floating_ip, floating_ip_address] }
851