Run k8s orchestration plane in dedicated VM
[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 resources:
91   random-str:
92     type: OS::Heat::RandomString
93     properties:
94       length: 4
95
96   # ONAP security group
97   onap_sg:
98     type: OS::Neutron::SecurityGroup
99     properties:
100       name:
101         str_replace:
102           template: base_rand
103           params:
104             base: onap_sg
105             rand: { get_resource: random-str }
106       description: security group used by ONAP
107       rules:
108         # All egress traffic
109         - direction: egress
110           ethertype: IPv4
111         - direction: egress
112           ethertype: IPv6
113         # ingress traffic
114         # ICMP
115         - protocol: icmp
116         - protocol: udp
117           port_range_min: 1
118           port_range_max: 65535
119         - protocol: tcp
120           port_range_min: 1
121           port_range_max: 65535
122
123
124   # ONAP management private network
125   oam_network:
126     type: OS::Neutron::Net
127     properties:
128       name:
129         str_replace:
130           template: oam_network_rand
131           params:
132             rand: { get_resource: random-str }
133
134   oam_subnet:
135     type: OS::Neutron::Subnet
136     properties:
137       name:
138         str_replace:
139           template: oam_network_rand
140           params:
141             rand: { get_resource: random-str }
142       network_id: { get_resource: oam_network }
143       cidr: { get_param: oam_network_cidr }
144       dns_nameservers: [ "8.8.8.8" ]
145
146   router:
147     type: OS::Neutron::Router
148     properties:
149       name:
150         list_join: ['-', [{ get_param: 'OS::stack_name' }, 'router']]
151       external_gateway_info:
152         network: { get_param: public_net_id }
153
154   router_interface:
155     type: OS::Neutron::RouterInterface
156     properties:
157       router_id: { get_resource: router }
158       subnet_id: { get_resource: oam_subnet }
159
160   rancher_private_port:
161     type: OS::Neutron::Port
162     properties:
163       network: { get_resource: oam_network }
164       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
165       security_groups:
166       - { get_resource: onap_sg }
167
168   rancher_floating_ip:
169     type: OS::Neutron::FloatingIP
170     properties:
171       floating_network_id: { get_param: public_net_id }
172       port_id: { get_resource: rancher_private_port }
173
174   rancher_vm:
175     type: OS::Nova::Server
176     properties:
177       name:
178         list_join: ['-', [{ get_param: 'OS::stack_name' }, 'rancher']]
179       image: { get_param: ubuntu_1604_image }
180       flavor: { get_param: rancher_vm_flavor }
181       key_name: { get_param: key_name }
182       networks:
183       - port: { get_resource: rancher_private_port }
184       user_data_format: RAW
185       user_data:
186         str_replace:
187           template:
188             get_file: rancher_vm_entrypoint.sh
189           params:
190             __docker_proxy__: { get_param: docker_proxy }
191             __apt_proxy__: { get_param: apt_proxy }
192             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
193             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
194             __integration_override_yaml__: { get_param: integration_override_yaml }
195             __integration_gerrit_branch__: { get_param: integration_gerrit_branch }
196             __integration_gerrit_refspec__: { get_param: integration_gerrit_refspec }
197             __oom_gerrit_branch__: { get_param: oom_gerrit_branch }
198             __oom_gerrit_refspec__: { get_param: oom_gerrit_refspec }
199             __docker_manifest__: { get_param: docker_manifest }
200             __docker_version__: { get_param: docker_version }
201             __rancher_version__: { get_param: rancher_version }
202             __rancher_agent_version__: { get_param: rancher_agent_version }
203             __kubectl_version__: { get_param: kubectl_version }
204             __helm_version__: { get_param: helm_version }
205             __public_net_id__: { get_param: public_net_id }
206             __oam_network_cidr__: { get_param: oam_network_cidr }
207             __oam_network_id__: { get_resource: oam_network }
208             __oam_subnet_id__: { get_resource: oam_subnet }
209             __sec_group__: { get_resource: onap_sg }
210             __k8s_1_vm_ip__: { get_attr: [k8s_1_floating_ip, floating_ip_address] }
211             __k8s_vm_ips__: [
212               get_attr: [k8s_1_floating_ip, floating_ip_address],
213               get_attr: [k8s_2_floating_ip, floating_ip_address],
214               get_attr: [k8s_3_floating_ip, floating_ip_address],
215               get_attr: [k8s_4_floating_ip, floating_ip_address],
216               get_attr: [k8s_5_floating_ip, floating_ip_address],
217               get_attr: [k8s_6_floating_ip, floating_ip_address],
218               get_attr: [k8s_7_floating_ip, floating_ip_address],
219               get_attr: [k8s_8_floating_ip, floating_ip_address],
220               get_attr: [k8s_9_floating_ip, floating_ip_address],
221               get_attr: [k8s_10_floating_ip, floating_ip_address],
222             ]
223             __k8s_private_ips__: [
224               get_attr: [k8s_1_floating_ip, fixed_ip_address],
225               get_attr: [k8s_2_floating_ip, fixed_ip_address],
226               get_attr: [k8s_3_floating_ip, fixed_ip_address],
227               get_attr: [k8s_4_floating_ip, fixed_ip_address],
228               get_attr: [k8s_5_floating_ip, fixed_ip_address],
229               get_attr: [k8s_6_floating_ip, fixed_ip_address],
230               get_attr: [k8s_7_floating_ip, fixed_ip_address],
231               get_attr: [k8s_8_floating_ip, fixed_ip_address],
232               get_attr: [k8s_9_floating_ip, fixed_ip_address],
233               get_attr: [k8s_10_floating_ip, fixed_ip_address],
234             ]
235   k8s_1_private_port:
236     type: OS::Neutron::Port
237     properties:
238       network: { get_resource: oam_network }
239       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
240       security_groups:
241       - { get_resource: onap_sg }
242
243   k8s_1_floating_ip:
244     type: OS::Neutron::FloatingIP
245     properties:
246       floating_network_id: { get_param: public_net_id }
247       port_id: { get_resource: k8s_1_private_port }
248
249   k8s_1_vm:
250     type: OS::Nova::Server
251     properties:
252       name:
253         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '1' ] ]
254       image: { get_param: ubuntu_1604_image }
255       flavor: { get_param: k8s_vm_flavor }
256       key_name: { get_param: key_name }
257       networks:
258       - port: { get_resource: k8s_1_private_port }
259       user_data_format: RAW
260       user_data:
261         str_replace:
262           params:
263             __docker_proxy__: { get_param: docker_proxy }
264             __apt_proxy__: { get_param: apt_proxy }
265             __docker_version__: { get_param: docker_version }
266             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
267             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
268             __host_label__: 'compute'
269           template:
270             get_file: k8s_vm_entrypoint.sh
271
272   k8s_2_private_port:
273     type: OS::Neutron::Port
274     properties:
275       network: { get_resource: oam_network }
276       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
277       security_groups:
278       - { get_resource: onap_sg }
279
280   k8s_2_floating_ip:
281     type: OS::Neutron::FloatingIP
282     properties:
283       floating_network_id: { get_param: public_net_id }
284       port_id: { get_resource: k8s_2_private_port }
285
286   k8s_2_vm:
287     type: OS::Nova::Server
288     properties:
289       name:
290         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '2' ] ]
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_2_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             __docker_version__: { get_param: docker_version }
303             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
304             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
305             __host_label__: 'compute'
306           template:
307             get_file: k8s_vm_entrypoint.sh
308
309   k8s_3_private_port:
310     type: OS::Neutron::Port
311     properties:
312       network: { get_resource: oam_network }
313       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
314       security_groups:
315       - { get_resource: onap_sg }
316
317   k8s_3_floating_ip:
318     type: OS::Neutron::FloatingIP
319     properties:
320       floating_network_id: { get_param: public_net_id }
321       port_id: { get_resource: k8s_3_private_port }
322
323   k8s_3_vm:
324     type: OS::Nova::Server
325     properties:
326       name:
327         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '3' ] ]
328       image: { get_param: ubuntu_1604_image }
329       flavor: { get_param: k8s_vm_flavor }
330       key_name: { get_param: key_name }
331       networks:
332       - port: { get_resource: k8s_3_private_port }
333       user_data_format: RAW
334       user_data:
335         str_replace:
336           params:
337             __docker_proxy__: { get_param: docker_proxy }
338             __apt_proxy__: { get_param: apt_proxy }
339             __docker_version__: { get_param: docker_version }
340             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
341             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
342             __host_label__: 'compute'
343           template:
344             get_file: k8s_vm_entrypoint.sh
345
346   k8s_4_private_port:
347     type: OS::Neutron::Port
348     properties:
349       network: { get_resource: oam_network }
350       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
351       security_groups:
352       - { get_resource: onap_sg }
353
354   k8s_4_floating_ip:
355     type: OS::Neutron::FloatingIP
356     properties:
357       floating_network_id: { get_param: public_net_id }
358       port_id: { get_resource: k8s_4_private_port }
359
360   k8s_4_vm:
361     type: OS::Nova::Server
362     properties:
363       name:
364         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '4' ] ]
365       image: { get_param: ubuntu_1604_image }
366       flavor: { get_param: k8s_vm_flavor }
367       key_name: { get_param: key_name }
368       networks:
369       - port: { get_resource: k8s_4_private_port }
370       user_data_format: RAW
371       user_data:
372         str_replace:
373           params:
374             __docker_proxy__: { get_param: docker_proxy }
375             __apt_proxy__: { get_param: apt_proxy }
376             __docker_version__: { get_param: docker_version }
377             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
378             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
379             __host_label__: 'compute'
380           template:
381             get_file: k8s_vm_entrypoint.sh
382
383   k8s_5_private_port:
384     type: OS::Neutron::Port
385     properties:
386       network: { get_resource: oam_network }
387       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
388       security_groups:
389       - { get_resource: onap_sg }
390
391   k8s_5_floating_ip:
392     type: OS::Neutron::FloatingIP
393     properties:
394       floating_network_id: { get_param: public_net_id }
395       port_id: { get_resource: k8s_5_private_port }
396
397   k8s_5_vm:
398     type: OS::Nova::Server
399     properties:
400       name:
401         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '5' ] ]
402       image: { get_param: ubuntu_1604_image }
403       flavor: { get_param: k8s_vm_flavor }
404       key_name: { get_param: key_name }
405       networks:
406       - port: { get_resource: k8s_5_private_port }
407       user_data_format: RAW
408       user_data:
409         str_replace:
410           params:
411             __docker_proxy__: { get_param: docker_proxy }
412             __apt_proxy__: { get_param: apt_proxy }
413             __docker_version__: { get_param: docker_version }
414             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
415             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
416             __host_label__: 'compute'
417           template:
418             get_file: k8s_vm_entrypoint.sh
419
420   k8s_6_private_port:
421     type: OS::Neutron::Port
422     properties:
423       network: { get_resource: oam_network }
424       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
425       security_groups:
426       - { get_resource: onap_sg }
427
428   k8s_6_floating_ip:
429     type: OS::Neutron::FloatingIP
430     properties:
431       floating_network_id: { get_param: public_net_id }
432       port_id: { get_resource: k8s_6_private_port }
433
434   k8s_6_vm:
435     type: OS::Nova::Server
436     properties:
437       name:
438         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '6' ] ]
439       image: { get_param: ubuntu_1604_image }
440       flavor: { get_param: k8s_vm_flavor }
441       key_name: { get_param: key_name }
442       networks:
443       - port: { get_resource: k8s_6_private_port }
444       user_data_format: RAW
445       user_data:
446         str_replace:
447           params:
448             __docker_proxy__: { get_param: docker_proxy }
449             __apt_proxy__: { get_param: apt_proxy }
450             __docker_version__: { get_param: docker_version }
451             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
452             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
453             __host_label__: 'compute'
454           template:
455             get_file: k8s_vm_entrypoint.sh
456
457   k8s_7_private_port:
458     type: OS::Neutron::Port
459     properties:
460       network: { get_resource: oam_network }
461       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
462       security_groups:
463       - { get_resource: onap_sg }
464
465   k8s_7_floating_ip:
466     type: OS::Neutron::FloatingIP
467     properties:
468       floating_network_id: { get_param: public_net_id }
469       port_id: { get_resource: k8s_7_private_port }
470
471   k8s_7_vm:
472     type: OS::Nova::Server
473     properties:
474       name:
475         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '7' ] ]
476       image: { get_param: ubuntu_1604_image }
477       flavor: { get_param: k8s_vm_flavor }
478       key_name: { get_param: key_name }
479       networks:
480       - port: { get_resource: k8s_7_private_port }
481       user_data_format: RAW
482       user_data:
483         str_replace:
484           params:
485             __docker_proxy__: { get_param: docker_proxy }
486             __apt_proxy__: { get_param: apt_proxy }
487             __docker_version__: { get_param: docker_version }
488             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
489             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
490             __host_label__: 'compute'
491           template:
492             get_file: k8s_vm_entrypoint.sh
493
494   k8s_8_private_port:
495     type: OS::Neutron::Port
496     properties:
497       network: { get_resource: oam_network }
498       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
499       security_groups:
500       - { get_resource: onap_sg }
501
502   k8s_8_floating_ip:
503     type: OS::Neutron::FloatingIP
504     properties:
505       floating_network_id: { get_param: public_net_id }
506       port_id: { get_resource: k8s_8_private_port }
507
508   k8s_8_vm:
509     type: OS::Nova::Server
510     properties:
511       name:
512         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '8' ] ]
513       image: { get_param: ubuntu_1604_image }
514       flavor: { get_param: k8s_vm_flavor }
515       key_name: { get_param: key_name }
516       networks:
517       - port: { get_resource: k8s_8_private_port }
518       user_data_format: RAW
519       user_data:
520         str_replace:
521           params:
522             __docker_proxy__: { get_param: docker_proxy }
523             __apt_proxy__: { get_param: apt_proxy }
524             __docker_version__: { get_param: docker_version }
525             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
526             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
527             __host_label__: 'compute'
528           template:
529             get_file: k8s_vm_entrypoint.sh
530
531   k8s_9_private_port:
532     type: OS::Neutron::Port
533     properties:
534       network: { get_resource: oam_network }
535       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
536       security_groups:
537       - { get_resource: onap_sg }
538
539   k8s_9_floating_ip:
540     type: OS::Neutron::FloatingIP
541     properties:
542       floating_network_id: { get_param: public_net_id }
543       port_id: { get_resource: k8s_9_private_port }
544
545   k8s_9_vm:
546     type: OS::Nova::Server
547     properties:
548       name:
549         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '9' ] ]
550       image: { get_param: ubuntu_1604_image }
551       flavor: { get_param: k8s_vm_flavor }
552       key_name: { get_param: key_name }
553       networks:
554       - port: { get_resource: k8s_9_private_port }
555       user_data_format: RAW
556       user_data:
557         str_replace:
558           params:
559             __docker_proxy__: { get_param: docker_proxy }
560             __apt_proxy__: { get_param: apt_proxy }
561             __docker_version__: { get_param: docker_version }
562             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
563             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
564             __host_label__: 'compute'
565           template:
566             get_file: k8s_vm_entrypoint.sh
567
568   k8s_10_private_port:
569     type: OS::Neutron::Port
570     properties:
571       network: { get_resource: oam_network }
572       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
573       security_groups:
574       - { get_resource: onap_sg }
575
576   k8s_10_floating_ip:
577     type: OS::Neutron::FloatingIP
578     properties:
579       floating_network_id: { get_param: public_net_id }
580       port_id: { get_resource: k8s_10_private_port }
581
582   k8s_10_vm:
583     type: OS::Nova::Server
584     properties:
585       name:
586         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '10' ] ]
587       image: { get_param: ubuntu_1604_image }
588       flavor: { get_param: k8s_vm_flavor }
589       key_name: { get_param: key_name }
590       networks:
591       - port: { get_resource: k8s_10_private_port }
592       user_data_format: RAW
593       user_data:
594         str_replace:
595           params:
596             __docker_proxy__: { get_param: docker_proxy }
597             __apt_proxy__: { get_param: apt_proxy }
598             __docker_version__: { get_param: docker_version }
599             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
600             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
601             __host_label__: 'compute'
602           template:
603             get_file: k8s_vm_entrypoint.sh
604
605   etcd_1_private_port:
606     type: OS::Neutron::Port
607     properties:
608       network: { get_resource: oam_network }
609       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
610       security_groups:
611       - { get_resource: onap_sg }
612
613   etcd_1_floating_ip:
614     type: OS::Neutron::FloatingIP
615     properties:
616       floating_network_id: { get_param: public_net_id }
617       port_id: { get_resource: etcd_1_private_port }
618
619   etcd_1_vm:
620     type: OS::Nova::Server
621     properties:
622       name:
623         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'etcd', '1' ] ]
624       image: { get_param: ubuntu_1604_image }
625       flavor: { get_param: etcd_vm_flavor }
626       key_name: { get_param: key_name }
627       networks:
628       - port: { get_resource: etcd_1_private_port }
629       user_data_format: RAW
630       user_data:
631         str_replace:
632           params:
633             __docker_proxy__: { get_param: docker_proxy }
634             __apt_proxy__: { get_param: apt_proxy }
635             __docker_version__: { get_param: docker_version }
636             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
637             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
638             __host_label__: 'etcd'
639           template:
640             get_file: k8s_vm_entrypoint.sh
641
642   etcd_2_private_port:
643     type: OS::Neutron::Port
644     properties:
645       network: { get_resource: oam_network }
646       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
647       security_groups:
648       - { get_resource: onap_sg }
649
650   etcd_2_floating_ip:
651     type: OS::Neutron::FloatingIP
652     properties:
653       floating_network_id: { get_param: public_net_id }
654       port_id: { get_resource: etcd_2_private_port }
655
656   etcd_2_vm:
657     type: OS::Nova::Server
658     properties:
659       name:
660         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'etcd', '2' ] ]
661       image: { get_param: ubuntu_1604_image }
662       flavor: { get_param: etcd_vm_flavor }
663       key_name: { get_param: key_name }
664       networks:
665       - port: { get_resource: etcd_2_private_port }
666       user_data_format: RAW
667       user_data:
668         str_replace:
669           params:
670             __docker_proxy__: { get_param: docker_proxy }
671             __apt_proxy__: { get_param: apt_proxy }
672             __docker_version__: { get_param: docker_version }
673             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
674             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
675             __host_label__: 'etcd'
676           template:
677             get_file: k8s_vm_entrypoint.sh
678
679   etcd_3_private_port:
680     type: OS::Neutron::Port
681     properties:
682       network: { get_resource: oam_network }
683       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
684       security_groups:
685       - { get_resource: onap_sg }
686
687   etcd_3_floating_ip:
688     type: OS::Neutron::FloatingIP
689     properties:
690       floating_network_id: { get_param: public_net_id }
691       port_id: { get_resource: etcd_3_private_port }
692
693   etcd_3_vm:
694     type: OS::Nova::Server
695     properties:
696       name:
697         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'etcd', '3' ] ]
698       image: { get_param: ubuntu_1604_image }
699       flavor: { get_param: etcd_vm_flavor }
700       key_name: { get_param: key_name }
701       networks:
702       - port: { get_resource: etcd_3_private_port }
703       user_data_format: RAW
704       user_data:
705         str_replace:
706           params:
707             __docker_proxy__: { get_param: docker_proxy }
708             __apt_proxy__: { get_param: apt_proxy }
709             __docker_version__: { get_param: docker_version }
710             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
711             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
712             __host_label__: 'etcd'
713           template:
714             get_file: k8s_vm_entrypoint.sh
715
716   orch_1_private_port:
717     type: OS::Neutron::Port
718     properties:
719       network: { get_resource: oam_network }
720       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
721       security_groups:
722       - { get_resource: onap_sg }
723
724   orch_1_floating_ip:
725     type: OS::Neutron::FloatingIP
726     properties:
727       floating_network_id: { get_param: public_net_id }
728       port_id: { get_resource: orch_1_private_port }
729
730   orch_1_vm:
731     type: OS::Nova::Server
732     properties:
733       name:
734         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'orch', '1' ] ]
735       image: { get_param: ubuntu_1604_image }
736       flavor: { get_param: orch_vm_flavor }
737       key_name: { get_param: key_name }
738       networks:
739       - port: { get_resource: orch_1_private_port }
740       user_data_format: RAW
741       user_data:
742         str_replace:
743           params:
744             __docker_proxy__: { get_param: docker_proxy }
745             __apt_proxy__: { get_param: apt_proxy }
746             __docker_version__: { get_param: docker_version }
747             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
748             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
749             __host_label__: 'orchestration'
750           template:
751             get_file: k8s_vm_entrypoint.sh
752
753 outputs:
754   rancher_vm_ip:
755     description: The IP address of the rancher instance
756     value: { get_attr: [rancher_floating_ip, floating_ip_address] }
757
758   k8s_1_vm_ip:
759     description: The IP address of the k8s_1 instance
760     value: { get_attr: [k8s_1_floating_ip, floating_ip_address] }
761
762   k8s_2_vm_ip:
763     description: The IP address of the k8s_2 instance
764     value: { get_attr: [k8s_2_floating_ip, floating_ip_address] }
765
766   k8s_3_vm_ip:
767     description: The IP address of the k8s_3 instance
768     value: { get_attr: [k8s_3_floating_ip, floating_ip_address] }
769
770   k8s_4_vm_ip:
771     description: The IP address of the k8s_4 instance
772     value: { get_attr: [k8s_4_floating_ip, floating_ip_address] }
773
774   k8s_5_vm_ip:
775     description: The IP address of the k8s_5 instance
776     value: { get_attr: [k8s_5_floating_ip, floating_ip_address] }
777
778   k8s_6_vm_ip:
779     description: The IP address of the k8s_6 instance
780     value: { get_attr: [k8s_6_floating_ip, floating_ip_address] }
781
782   k8s_7_vm_ip:
783     description: The IP address of the k8s_7 instance
784     value: { get_attr: [k8s_7_floating_ip, floating_ip_address] }
785
786   k8s_8_vm_ip:
787     description: The IP address of the k8s_8 instance
788     value: { get_attr: [k8s_8_floating_ip, floating_ip_address] }
789
790   k8s_9_vm_ip:
791     description: The IP address of the k8s_9 instance
792     value: { get_attr: [k8s_9_floating_ip, floating_ip_address] }
793
794   k8s_10_vm_ip:
795     description: The IP address of the k8s_10 instance
796     value: { get_attr: [k8s_10_floating_ip, floating_ip_address] }
797