blob: 4699bca13314e55634d837737d7a08e9f71f5e1d [file] [log] [blame]
Gary Wu11c98742018-05-02 16:19:04 -07001#
2# Generated by scripts/gen-onap-oom-yaml.sh; MANUAL CHANGES WILL BE LOST
3#
Gary Wuccd529b2018-01-16 18:31:01 -08004heat_template_version: 2015-10-15
5description: ONAP on Kubernetes using OOM
6
7parameters:
Gary Wuccd529b2018-01-16 18:31:01 -08008 docker_proxy:
9 type: string
10
11 apt_proxy:
12 type: string
13
Gary Wuc98156d2018-01-18 12:03:26 -080014 public_net_id:
15 type: string
16 description: The ID of the Public network for floating IP address allocation
17
Gary Wuc98156d2018-01-18 12:03:26 -080018 oam_network_cidr:
19 type: string
20 description: CIDR of the OAM ONAP network
21
Gary Wu60dd0d82018-01-18 14:54:47 -080022 ubuntu_1604_image:
23 type: string
24 description: Name of the Ubuntu 16.04 image
25
Gary Wu60dd0d82018-01-18 14:54:47 -080026 rancher_vm_flavor:
27 type: string
Gary Wu11c98742018-05-02 16:19:04 -070028 description: VM flavor for Rancher
Gary Wu60dd0d82018-01-18 14:54:47 -080029
30 k8s_vm_flavor:
31 type: string
Gary Wu11c98742018-05-02 16:19:04 -070032 description: VM flavor for k8s hosts
33
Gary Wu3fd6c2a2018-10-28 21:44:00 -070034 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
Gary Wu11c98742018-05-02 16:19:04 -070042 integration_override_yaml:
43 type: string
44 description: Content for integration_override.yaml
Gary Wu60dd0d82018-01-18 14:54:47 -080045
Gary Wu87aa8b52018-08-09 08:10:24 -070046 integration_gerrit_branch:
Gary Wu81836d22018-06-22 13:48:50 -070047 type: string
48 default: "master"
49
Gary Wu87aa8b52018-08-09 08:10:24 -070050 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:
Gary Wu81836d22018-06-22 13:48:50 -070059 type: string
60 default: "refs/heads/master"
61
62 docker_manifest:
63 type: string
Gary Wu87aa8b52018-08-09 08:10:24 -070064 default: ""
Gary Wu81836d22018-06-22 13:48:50 -070065
gwu10db4622018-07-17 22:11:39 -070066 key_name:
67 type: string
68 default: "onap_key"
69
Gary Wu7a04b3d2018-08-15 12:31:46 -070070 docker_version:
71 type: string
Gary Wu3fd6c2a2018-10-28 21:44:00 -070072 default: "17.03.2"
Gary Wu7a04b3d2018-08-15 12:31:46 -070073
74 rancher_version:
75 type: string
Gary Wu3fd6c2a2018-10-28 21:44:00 -070076 default: "1.6.22"
Gary Wu7a04b3d2018-08-15 12:31:46 -070077
78 rancher_agent_version:
79 type: string
Gary Wu3fd6c2a2018-10-28 21:44:00 -070080 default: "1.2.11"
Gary Wu7a04b3d2018-08-15 12:31:46 -070081
82 kubectl_version:
83 type: string
Gary Wu3fd6c2a2018-10-28 21:44:00 -070084 default: "1.11.2"
Gary Wu7a04b3d2018-08-15 12:31:46 -070085
86 helm_version:
87 type: string
88 default: "2.9.1"
89
Gary Wu48a32942018-11-08 07:34:49 -080090 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
Gary Wuccd529b2018-01-16 18:31:01 -080099resources:
Gary Wuc98156d2018-01-18 12:03:26 -0800100 random-str:
101 type: OS::Heat::RandomString
102 properties:
103 length: 4
104
Gary Wubc11e5d2018-02-07 10:23:27 -0800105 # 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
Marco Platania2a6faaa2018-11-12 15:00:08 -0500131 # Protocols used for vLB/vDNS use case
132 - protocol: 47
133 - protocol: 53
134 - protocol: 132
Gary Wubc11e5d2018-02-07 10:23:27 -0800135
136
Gary Wu52dfdcb2018-01-25 11:02:48 -0800137 # ONAP management private network
138 oam_network:
139 type: OS::Neutron::Net
140 properties:
141 name:
142 str_replace:
143 template: oam_network_rand
144 params:
145 rand: { get_resource: random-str }
146
147 oam_subnet:
148 type: OS::Neutron::Subnet
149 properties:
150 name:
151 str_replace:
152 template: oam_network_rand
153 params:
154 rand: { get_resource: random-str }
155 network_id: { get_resource: oam_network }
156 cidr: { get_param: oam_network_cidr }
Gary Wu14a6b302018-05-01 15:59:28 -0700157 dns_nameservers: [ "8.8.8.8" ]
Gary Wu52dfdcb2018-01-25 11:02:48 -0800158
159 router:
160 type: OS::Neutron::Router
161 properties:
eHanan97b7a9c2018-09-05 14:09:19 +0100162 name:
163 list_join: ['-', [{ get_param: 'OS::stack_name' }, 'router']]
Gary Wu52dfdcb2018-01-25 11:02:48 -0800164 external_gateway_info:
165 network: { get_param: public_net_id }
166
167 router_interface:
168 type: OS::Neutron::RouterInterface
169 properties:
170 router_id: { get_resource: router }
171 subnet_id: { get_resource: oam_subnet }
172
Gary Wu374498a2018-02-06 17:31:04 -0800173 rancher_private_port:
174 type: OS::Neutron::Port
175 properties:
176 network: { get_resource: oam_network }
177 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
Gary Wubc11e5d2018-02-07 10:23:27 -0800178 security_groups:
179 - { get_resource: onap_sg }
Gary Wu374498a2018-02-06 17:31:04 -0800180
181 rancher_floating_ip:
182 type: OS::Neutron::FloatingIP
183 properties:
184 floating_network_id: { get_param: public_net_id }
185 port_id: { get_resource: rancher_private_port }
186
Gary Wuccd529b2018-01-16 18:31:01 -0800187 rancher_vm:
188 type: OS::Nova::Server
189 properties:
eHanan97b7a9c2018-09-05 14:09:19 +0100190 name:
191 list_join: ['-', [{ get_param: 'OS::stack_name' }, 'rancher']]
Gary Wu558ac6e2018-01-19 14:53:12 -0800192 image: { get_param: ubuntu_1604_image }
Gary Wu60dd0d82018-01-18 14:54:47 -0800193 flavor: { get_param: rancher_vm_flavor }
gwu10db4622018-07-17 22:11:39 -0700194 key_name: { get_param: key_name }
Gary Wuccd529b2018-01-16 18:31:01 -0800195 networks:
Gary Wu374498a2018-02-06 17:31:04 -0800196 - port: { get_resource: rancher_private_port }
Gary Wuccd529b2018-01-16 18:31:01 -0800197 user_data_format: RAW
198 user_data:
199 str_replace:
Gary Wu1ff56672018-01-17 20:51:45 -0800200 template:
201 get_file: rancher_vm_entrypoint.sh
Gary Wu14a6b302018-05-01 15:59:28 -0700202 params:
Gary Wu14a6b302018-05-01 15:59:28 -0700203 __docker_proxy__: { get_param: docker_proxy }
204 __apt_proxy__: { get_param: apt_proxy }
205 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
Gary Wuad513722018-07-26 13:08:47 -0700206 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
Gary Wu11c98742018-05-02 16:19:04 -0700207 __integration_override_yaml__: { get_param: integration_override_yaml }
Gary Wu87aa8b52018-08-09 08:10:24 -0700208 __integration_gerrit_branch__: { get_param: integration_gerrit_branch }
209 __integration_gerrit_refspec__: { get_param: integration_gerrit_refspec }
210 __oom_gerrit_branch__: { get_param: oom_gerrit_branch }
211 __oom_gerrit_refspec__: { get_param: oom_gerrit_refspec }
Gary Wu81836d22018-06-22 13:48:50 -0700212 __docker_manifest__: { get_param: docker_manifest }
Gary Wu7a04b3d2018-08-15 12:31:46 -0700213 __docker_version__: { get_param: docker_version }
214 __rancher_version__: { get_param: rancher_version }
215 __rancher_agent_version__: { get_param: rancher_agent_version }
216 __kubectl_version__: { get_param: kubectl_version }
217 __helm_version__: { get_param: helm_version }
Gary Wu48a32942018-11-08 07:34:49 -0800218 __helm_deploy_delay__: { get_param: helm_deploy_delay }
219 __use_ramdisk__: { get_param: use_ramdisk }
Gary Wu978171e2018-07-24 11:56:01 -0700220 __public_net_id__: { get_param: public_net_id }
221 __oam_network_cidr__: { get_param: oam_network_cidr }
Gary Wu11c98742018-05-02 16:19:04 -0700222 __oam_network_id__: { get_resource: oam_network }
223 __oam_subnet_id__: { get_resource: oam_subnet }
Gary Wu17440fe2018-10-22 15:12:07 -0700224 __sec_group__: { get_resource: onap_sg }
Gary Wu48a32942018-11-08 07:34:49 -0800225 __k8s_01_vm_ip__: { get_attr: [k8s_01_floating_ip, floating_ip_address] }
Gary Wu14a6b302018-05-01 15:59:28 -0700226 __k8s_vm_ips__: [
Gary Wu48a32942018-11-08 07:34:49 -0800227 get_attr: [k8s_01_floating_ip, floating_ip_address],
228 get_attr: [k8s_02_floating_ip, floating_ip_address],
229 get_attr: [k8s_03_floating_ip, floating_ip_address],
230 get_attr: [k8s_04_floating_ip, floating_ip_address],
231 get_attr: [k8s_05_floating_ip, floating_ip_address],
232 get_attr: [k8s_06_floating_ip, floating_ip_address],
233 get_attr: [k8s_07_floating_ip, floating_ip_address],
234 get_attr: [k8s_08_floating_ip, floating_ip_address],
235 get_attr: [k8s_09_floating_ip, floating_ip_address],
Gary Wudc2351b2018-09-24 13:37:53 -0700236 get_attr: [k8s_10_floating_ip, floating_ip_address],
Gary Wu48a32942018-11-08 07:34:49 -0800237 get_attr: [k8s_11_floating_ip, floating_ip_address],
Gary Wu4b79dbb2018-11-08 20:04:33 -0800238 get_attr: [k8s_12_floating_ip, floating_ip_address],
Gary Wu14a6b302018-05-01 15:59:28 -0700239 ]
Gary Wuad513722018-07-26 13:08:47 -0700240 __k8s_private_ips__: [
Gary Wu48a32942018-11-08 07:34:49 -0800241 get_attr: [k8s_01_floating_ip, fixed_ip_address],
242 get_attr: [k8s_02_floating_ip, fixed_ip_address],
243 get_attr: [k8s_03_floating_ip, fixed_ip_address],
244 get_attr: [k8s_04_floating_ip, fixed_ip_address],
245 get_attr: [k8s_05_floating_ip, fixed_ip_address],
246 get_attr: [k8s_06_floating_ip, fixed_ip_address],
247 get_attr: [k8s_07_floating_ip, fixed_ip_address],
248 get_attr: [k8s_08_floating_ip, fixed_ip_address],
249 get_attr: [k8s_09_floating_ip, fixed_ip_address],
Gary Wudc2351b2018-09-24 13:37:53 -0700250 get_attr: [k8s_10_floating_ip, fixed_ip_address],
Gary Wu48a32942018-11-08 07:34:49 -0800251 get_attr: [k8s_11_floating_ip, fixed_ip_address],
Gary Wu4b79dbb2018-11-08 20:04:33 -0800252 get_attr: [k8s_12_floating_ip, fixed_ip_address],
Gary Wuad513722018-07-26 13:08:47 -0700253 ]
Gary Wu48a32942018-11-08 07:34:49 -0800254 k8s_01_private_port:
Gary Wu52dfdcb2018-01-25 11:02:48 -0800255 type: OS::Neutron::Port
256 properties:
257 network: { get_resource: oam_network }
258 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
Gary Wubc11e5d2018-02-07 10:23:27 -0800259 security_groups:
260 - { get_resource: onap_sg }
Gary Wu52dfdcb2018-01-25 11:02:48 -0800261
Gary Wu48a32942018-11-08 07:34:49 -0800262 k8s_01_floating_ip:
Gary Wu52dfdcb2018-01-25 11:02:48 -0800263 type: OS::Neutron::FloatingIP
264 properties:
265 floating_network_id: { get_param: public_net_id }
Gary Wu48a32942018-11-08 07:34:49 -0800266 port_id: { get_resource: k8s_01_private_port }
Gary Wu52dfdcb2018-01-25 11:02:48 -0800267
Gary Wub7189982018-11-14 10:01:37 -0800268 k8s_01_vm_scripts:
269 type: OS::Heat::CloudConfig
270 properties:
271 cloud_config:
272 power_state:
273 mode: reboot
274 runcmd:
275 - [ /opt/k8s_vm_install.sh ]
276 write_files:
277 - path: /opt/k8s_vm_install.sh
278 permissions: '0755'
279 content:
280 str_replace:
281 params:
282 __docker_proxy__: { get_param: docker_proxy }
283 __apt_proxy__: { get_param: apt_proxy }
284 __docker_version__: { get_param: docker_version }
285 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
286 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
287 __host_private_ip_addr__: { get_attr: [k8s_01_floating_ip, fixed_ip_address] }
288 template:
289 get_file: k8s_vm_install.sh
290 - path: /opt/k8s_vm_init.sh
291 permissions: '0755'
292 content:
293 str_replace:
294 params:
295 __host_private_ip_addr__: { get_attr: [k8s_01_floating_ip, fixed_ip_address] }
296 __host_label__: 'compute'
297 template:
298 get_file: k8s_vm_init.sh
299 - path: /etc/init.d/k8s_vm_init_serv
300 permissions: '0755'
301 content:
302 get_file: k8s_vm_init_serv.sh
303
304 k8s_01_vm_config:
305 type: OS::Heat::MultipartMime
306 properties:
307 parts:
308 - config: { get_resource: k8s_01_vm_scripts }
309
Gary Wu48a32942018-11-08 07:34:49 -0800310 k8s_01_vm:
Gary Wuccd529b2018-01-16 18:31:01 -0800311 type: OS::Nova::Server
312 properties:
eHanan97b7a9c2018-09-05 14:09:19 +0100313 name:
Gary Wu48a32942018-11-08 07:34:49 -0800314 list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '01' ] ]
Gary Wu558ac6e2018-01-19 14:53:12 -0800315 image: { get_param: ubuntu_1604_image }
Gary Wu60dd0d82018-01-18 14:54:47 -0800316 flavor: { get_param: k8s_vm_flavor }
gwu10db4622018-07-17 22:11:39 -0700317 key_name: { get_param: key_name }
Gary Wuccd529b2018-01-16 18:31:01 -0800318 networks:
Gary Wu48a32942018-11-08 07:34:49 -0800319 - port: { get_resource: k8s_01_private_port }
Gary Wub7189982018-11-14 10:01:37 -0800320 user_data_format: SOFTWARE_CONFIG
321 user_data: { get_resource: k8s_01_vm_config }
Gary Wu14a6b302018-05-01 15:59:28 -0700322
Gary Wu48a32942018-11-08 07:34:49 -0800323 k8s_02_private_port:
Gary Wu14a6b302018-05-01 15:59:28 -0700324 type: OS::Neutron::Port
325 properties:
326 network: { get_resource: oam_network }
327 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
328 security_groups:
329 - { get_resource: onap_sg }
330
Gary Wu48a32942018-11-08 07:34:49 -0800331 k8s_02_floating_ip:
Gary Wu14a6b302018-05-01 15:59:28 -0700332 type: OS::Neutron::FloatingIP
333 properties:
334 floating_network_id: { get_param: public_net_id }
Gary Wu48a32942018-11-08 07:34:49 -0800335 port_id: { get_resource: k8s_02_private_port }
Gary Wu14a6b302018-05-01 15:59:28 -0700336
Gary Wub7189982018-11-14 10:01:37 -0800337 k8s_02_vm_scripts:
338 type: OS::Heat::CloudConfig
339 properties:
340 cloud_config:
341 power_state:
342 mode: reboot
343 runcmd:
344 - [ /opt/k8s_vm_install.sh ]
345 write_files:
346 - path: /opt/k8s_vm_install.sh
347 permissions: '0755'
348 content:
349 str_replace:
350 params:
351 __docker_proxy__: { get_param: docker_proxy }
352 __apt_proxy__: { get_param: apt_proxy }
353 __docker_version__: { get_param: docker_version }
354 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
355 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
356 __host_private_ip_addr__: { get_attr: [k8s_02_floating_ip, fixed_ip_address] }
357 template:
358 get_file: k8s_vm_install.sh
359 - path: /opt/k8s_vm_init.sh
360 permissions: '0755'
361 content:
362 str_replace:
363 params:
364 __host_private_ip_addr__: { get_attr: [k8s_02_floating_ip, fixed_ip_address] }
365 __host_label__: 'compute'
366 template:
367 get_file: k8s_vm_init.sh
368 - path: /etc/init.d/k8s_vm_init_serv
369 permissions: '0755'
370 content:
371 get_file: k8s_vm_init_serv.sh
372
373 k8s_02_vm_config:
374 type: OS::Heat::MultipartMime
375 properties:
376 parts:
377 - config: { get_resource: k8s_02_vm_scripts }
378
Gary Wu48a32942018-11-08 07:34:49 -0800379 k8s_02_vm:
Gary Wu14a6b302018-05-01 15:59:28 -0700380 type: OS::Nova::Server
381 properties:
eHanan97b7a9c2018-09-05 14:09:19 +0100382 name:
Gary Wu48a32942018-11-08 07:34:49 -0800383 list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '02' ] ]
Gary Wu14a6b302018-05-01 15:59:28 -0700384 image: { get_param: ubuntu_1604_image }
385 flavor: { get_param: k8s_vm_flavor }
gwu10db4622018-07-17 22:11:39 -0700386 key_name: { get_param: key_name }
Gary Wu14a6b302018-05-01 15:59:28 -0700387 networks:
Gary Wu48a32942018-11-08 07:34:49 -0800388 - port: { get_resource: k8s_02_private_port }
Gary Wub7189982018-11-14 10:01:37 -0800389 user_data_format: SOFTWARE_CONFIG
390 user_data: { get_resource: k8s_02_vm_config }
Gary Wu14a6b302018-05-01 15:59:28 -0700391
Gary Wu48a32942018-11-08 07:34:49 -0800392 k8s_03_private_port:
Gary Wu14a6b302018-05-01 15:59:28 -0700393 type: OS::Neutron::Port
394 properties:
395 network: { get_resource: oam_network }
396 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
397 security_groups:
398 - { get_resource: onap_sg }
399
Gary Wu48a32942018-11-08 07:34:49 -0800400 k8s_03_floating_ip:
Gary Wu14a6b302018-05-01 15:59:28 -0700401 type: OS::Neutron::FloatingIP
402 properties:
403 floating_network_id: { get_param: public_net_id }
Gary Wu48a32942018-11-08 07:34:49 -0800404 port_id: { get_resource: k8s_03_private_port }
Gary Wu14a6b302018-05-01 15:59:28 -0700405
Gary Wub7189982018-11-14 10:01:37 -0800406 k8s_03_vm_scripts:
407 type: OS::Heat::CloudConfig
408 properties:
409 cloud_config:
410 power_state:
411 mode: reboot
412 runcmd:
413 - [ /opt/k8s_vm_install.sh ]
414 write_files:
415 - path: /opt/k8s_vm_install.sh
416 permissions: '0755'
417 content:
418 str_replace:
419 params:
420 __docker_proxy__: { get_param: docker_proxy }
421 __apt_proxy__: { get_param: apt_proxy }
422 __docker_version__: { get_param: docker_version }
423 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
424 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
425 __host_private_ip_addr__: { get_attr: [k8s_03_floating_ip, fixed_ip_address] }
426 template:
427 get_file: k8s_vm_install.sh
428 - path: /opt/k8s_vm_init.sh
429 permissions: '0755'
430 content:
431 str_replace:
432 params:
433 __host_private_ip_addr__: { get_attr: [k8s_03_floating_ip, fixed_ip_address] }
434 __host_label__: 'compute'
435 template:
436 get_file: k8s_vm_init.sh
437 - path: /etc/init.d/k8s_vm_init_serv
438 permissions: '0755'
439 content:
440 get_file: k8s_vm_init_serv.sh
441
442 k8s_03_vm_config:
443 type: OS::Heat::MultipartMime
444 properties:
445 parts:
446 - config: { get_resource: k8s_03_vm_scripts }
447
Gary Wu48a32942018-11-08 07:34:49 -0800448 k8s_03_vm:
Gary Wu14a6b302018-05-01 15:59:28 -0700449 type: OS::Nova::Server
450 properties:
eHanan97b7a9c2018-09-05 14:09:19 +0100451 name:
Gary Wu48a32942018-11-08 07:34:49 -0800452 list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '03' ] ]
Gary Wu14a6b302018-05-01 15:59:28 -0700453 image: { get_param: ubuntu_1604_image }
454 flavor: { get_param: k8s_vm_flavor }
gwu10db4622018-07-17 22:11:39 -0700455 key_name: { get_param: key_name }
Gary Wu14a6b302018-05-01 15:59:28 -0700456 networks:
Gary Wu48a32942018-11-08 07:34:49 -0800457 - port: { get_resource: k8s_03_private_port }
Gary Wub7189982018-11-14 10:01:37 -0800458 user_data_format: SOFTWARE_CONFIG
459 user_data: { get_resource: k8s_03_vm_config }
Gary Wu14a6b302018-05-01 15:59:28 -0700460
Gary Wu48a32942018-11-08 07:34:49 -0800461 k8s_04_private_port:
Gary Wu14a6b302018-05-01 15:59:28 -0700462 type: OS::Neutron::Port
463 properties:
464 network: { get_resource: oam_network }
465 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
466 security_groups:
467 - { get_resource: onap_sg }
468
Gary Wu48a32942018-11-08 07:34:49 -0800469 k8s_04_floating_ip:
Gary Wu14a6b302018-05-01 15:59:28 -0700470 type: OS::Neutron::FloatingIP
471 properties:
472 floating_network_id: { get_param: public_net_id }
Gary Wu48a32942018-11-08 07:34:49 -0800473 port_id: { get_resource: k8s_04_private_port }
Gary Wu14a6b302018-05-01 15:59:28 -0700474
Gary Wub7189982018-11-14 10:01:37 -0800475 k8s_04_vm_scripts:
476 type: OS::Heat::CloudConfig
477 properties:
478 cloud_config:
479 power_state:
480 mode: reboot
481 runcmd:
482 - [ /opt/k8s_vm_install.sh ]
483 write_files:
484 - path: /opt/k8s_vm_install.sh
485 permissions: '0755'
486 content:
487 str_replace:
488 params:
489 __docker_proxy__: { get_param: docker_proxy }
490 __apt_proxy__: { get_param: apt_proxy }
491 __docker_version__: { get_param: docker_version }
492 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
493 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
494 __host_private_ip_addr__: { get_attr: [k8s_04_floating_ip, fixed_ip_address] }
495 template:
496 get_file: k8s_vm_install.sh
497 - path: /opt/k8s_vm_init.sh
498 permissions: '0755'
499 content:
500 str_replace:
501 params:
502 __host_private_ip_addr__: { get_attr: [k8s_04_floating_ip, fixed_ip_address] }
503 __host_label__: 'compute'
504 template:
505 get_file: k8s_vm_init.sh
506 - path: /etc/init.d/k8s_vm_init_serv
507 permissions: '0755'
508 content:
509 get_file: k8s_vm_init_serv.sh
510
511 k8s_04_vm_config:
512 type: OS::Heat::MultipartMime
513 properties:
514 parts:
515 - config: { get_resource: k8s_04_vm_scripts }
516
Gary Wu48a32942018-11-08 07:34:49 -0800517 k8s_04_vm:
Gary Wu14a6b302018-05-01 15:59:28 -0700518 type: OS::Nova::Server
519 properties:
eHanan97b7a9c2018-09-05 14:09:19 +0100520 name:
Gary Wu48a32942018-11-08 07:34:49 -0800521 list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '04' ] ]
Gary Wu14a6b302018-05-01 15:59:28 -0700522 image: { get_param: ubuntu_1604_image }
523 flavor: { get_param: k8s_vm_flavor }
gwu10db4622018-07-17 22:11:39 -0700524 key_name: { get_param: key_name }
Gary Wu14a6b302018-05-01 15:59:28 -0700525 networks:
Gary Wu48a32942018-11-08 07:34:49 -0800526 - port: { get_resource: k8s_04_private_port }
Gary Wub7189982018-11-14 10:01:37 -0800527 user_data_format: SOFTWARE_CONFIG
528 user_data: { get_resource: k8s_04_vm_config }
Gary Wu14a6b302018-05-01 15:59:28 -0700529
Gary Wu48a32942018-11-08 07:34:49 -0800530 k8s_05_private_port:
Gary Wu4d2cfb62018-09-07 09:05:33 -0700531 type: OS::Neutron::Port
532 properties:
533 network: { get_resource: oam_network }
534 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
535 security_groups:
536 - { get_resource: onap_sg }
537
Gary Wu48a32942018-11-08 07:34:49 -0800538 k8s_05_floating_ip:
Gary Wu4d2cfb62018-09-07 09:05:33 -0700539 type: OS::Neutron::FloatingIP
540 properties:
541 floating_network_id: { get_param: public_net_id }
Gary Wu48a32942018-11-08 07:34:49 -0800542 port_id: { get_resource: k8s_05_private_port }
Gary Wu4d2cfb62018-09-07 09:05:33 -0700543
Gary Wub7189982018-11-14 10:01:37 -0800544 k8s_05_vm_scripts:
545 type: OS::Heat::CloudConfig
546 properties:
547 cloud_config:
548 power_state:
549 mode: reboot
550 runcmd:
551 - [ /opt/k8s_vm_install.sh ]
552 write_files:
553 - path: /opt/k8s_vm_install.sh
554 permissions: '0755'
555 content:
556 str_replace:
557 params:
558 __docker_proxy__: { get_param: docker_proxy }
559 __apt_proxy__: { get_param: apt_proxy }
560 __docker_version__: { get_param: docker_version }
561 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
562 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
563 __host_private_ip_addr__: { get_attr: [k8s_05_floating_ip, fixed_ip_address] }
564 template:
565 get_file: k8s_vm_install.sh
566 - path: /opt/k8s_vm_init.sh
567 permissions: '0755'
568 content:
569 str_replace:
570 params:
571 __host_private_ip_addr__: { get_attr: [k8s_05_floating_ip, fixed_ip_address] }
572 __host_label__: 'compute'
573 template:
574 get_file: k8s_vm_init.sh
575 - path: /etc/init.d/k8s_vm_init_serv
576 permissions: '0755'
577 content:
578 get_file: k8s_vm_init_serv.sh
579
580 k8s_05_vm_config:
581 type: OS::Heat::MultipartMime
582 properties:
583 parts:
584 - config: { get_resource: k8s_05_vm_scripts }
585
Gary Wu48a32942018-11-08 07:34:49 -0800586 k8s_05_vm:
Gary Wu4d2cfb62018-09-07 09:05:33 -0700587 type: OS::Nova::Server
588 properties:
eHanan97b7a9c2018-09-05 14:09:19 +0100589 name:
Gary Wu48a32942018-11-08 07:34:49 -0800590 list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '05' ] ]
Gary Wu4d2cfb62018-09-07 09:05:33 -0700591 image: { get_param: ubuntu_1604_image }
592 flavor: { get_param: k8s_vm_flavor }
593 key_name: { get_param: key_name }
594 networks:
Gary Wu48a32942018-11-08 07:34:49 -0800595 - port: { get_resource: k8s_05_private_port }
Gary Wub7189982018-11-14 10:01:37 -0800596 user_data_format: SOFTWARE_CONFIG
597 user_data: { get_resource: k8s_05_vm_config }
Gary Wu4d2cfb62018-09-07 09:05:33 -0700598
Gary Wu48a32942018-11-08 07:34:49 -0800599 k8s_06_private_port:
Gary Wu0bf673e2018-09-18 08:24:33 -0700600 type: OS::Neutron::Port
601 properties:
602 network: { get_resource: oam_network }
603 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
604 security_groups:
605 - { get_resource: onap_sg }
606
Gary Wu48a32942018-11-08 07:34:49 -0800607 k8s_06_floating_ip:
Gary Wu0bf673e2018-09-18 08:24:33 -0700608 type: OS::Neutron::FloatingIP
609 properties:
610 floating_network_id: { get_param: public_net_id }
Gary Wu48a32942018-11-08 07:34:49 -0800611 port_id: { get_resource: k8s_06_private_port }
Gary Wu0bf673e2018-09-18 08:24:33 -0700612
Gary Wub7189982018-11-14 10:01:37 -0800613 k8s_06_vm_scripts:
614 type: OS::Heat::CloudConfig
615 properties:
616 cloud_config:
617 power_state:
618 mode: reboot
619 runcmd:
620 - [ /opt/k8s_vm_install.sh ]
621 write_files:
622 - path: /opt/k8s_vm_install.sh
623 permissions: '0755'
624 content:
625 str_replace:
626 params:
627 __docker_proxy__: { get_param: docker_proxy }
628 __apt_proxy__: { get_param: apt_proxy }
629 __docker_version__: { get_param: docker_version }
630 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
631 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
632 __host_private_ip_addr__: { get_attr: [k8s_06_floating_ip, fixed_ip_address] }
633 template:
634 get_file: k8s_vm_install.sh
635 - path: /opt/k8s_vm_init.sh
636 permissions: '0755'
637 content:
638 str_replace:
639 params:
640 __host_private_ip_addr__: { get_attr: [k8s_06_floating_ip, fixed_ip_address] }
641 __host_label__: 'compute'
642 template:
643 get_file: k8s_vm_init.sh
644 - path: /etc/init.d/k8s_vm_init_serv
645 permissions: '0755'
646 content:
647 get_file: k8s_vm_init_serv.sh
648
649 k8s_06_vm_config:
650 type: OS::Heat::MultipartMime
651 properties:
652 parts:
653 - config: { get_resource: k8s_06_vm_scripts }
654
Gary Wu48a32942018-11-08 07:34:49 -0800655 k8s_06_vm:
Gary Wu0bf673e2018-09-18 08:24:33 -0700656 type: OS::Nova::Server
657 properties:
658 name:
Gary Wu48a32942018-11-08 07:34:49 -0800659 list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '06' ] ]
Gary Wu0bf673e2018-09-18 08:24:33 -0700660 image: { get_param: ubuntu_1604_image }
661 flavor: { get_param: k8s_vm_flavor }
662 key_name: { get_param: key_name }
663 networks:
Gary Wu48a32942018-11-08 07:34:49 -0800664 - port: { get_resource: k8s_06_private_port }
Gary Wub7189982018-11-14 10:01:37 -0800665 user_data_format: SOFTWARE_CONFIG
666 user_data: { get_resource: k8s_06_vm_config }
Gary Wu0bf673e2018-09-18 08:24:33 -0700667
Gary Wu48a32942018-11-08 07:34:49 -0800668 k8s_07_private_port:
Gary Wudc2351b2018-09-24 13:37:53 -0700669 type: OS::Neutron::Port
670 properties:
671 network: { get_resource: oam_network }
672 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
673 security_groups:
674 - { get_resource: onap_sg }
675
Gary Wu48a32942018-11-08 07:34:49 -0800676 k8s_07_floating_ip:
Gary Wudc2351b2018-09-24 13:37:53 -0700677 type: OS::Neutron::FloatingIP
678 properties:
679 floating_network_id: { get_param: public_net_id }
Gary Wu48a32942018-11-08 07:34:49 -0800680 port_id: { get_resource: k8s_07_private_port }
Gary Wudc2351b2018-09-24 13:37:53 -0700681
Gary Wub7189982018-11-14 10:01:37 -0800682 k8s_07_vm_scripts:
683 type: OS::Heat::CloudConfig
684 properties:
685 cloud_config:
686 power_state:
687 mode: reboot
688 runcmd:
689 - [ /opt/k8s_vm_install.sh ]
690 write_files:
691 - path: /opt/k8s_vm_install.sh
692 permissions: '0755'
693 content:
694 str_replace:
695 params:
696 __docker_proxy__: { get_param: docker_proxy }
697 __apt_proxy__: { get_param: apt_proxy }
698 __docker_version__: { get_param: docker_version }
699 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
700 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
701 __host_private_ip_addr__: { get_attr: [k8s_07_floating_ip, fixed_ip_address] }
702 template:
703 get_file: k8s_vm_install.sh
704 - path: /opt/k8s_vm_init.sh
705 permissions: '0755'
706 content:
707 str_replace:
708 params:
709 __host_private_ip_addr__: { get_attr: [k8s_07_floating_ip, fixed_ip_address] }
710 __host_label__: 'compute'
711 template:
712 get_file: k8s_vm_init.sh
713 - path: /etc/init.d/k8s_vm_init_serv
714 permissions: '0755'
715 content:
716 get_file: k8s_vm_init_serv.sh
717
718 k8s_07_vm_config:
719 type: OS::Heat::MultipartMime
720 properties:
721 parts:
722 - config: { get_resource: k8s_07_vm_scripts }
723
Gary Wu48a32942018-11-08 07:34:49 -0800724 k8s_07_vm:
Gary Wudc2351b2018-09-24 13:37:53 -0700725 type: OS::Nova::Server
726 properties:
727 name:
Gary Wu48a32942018-11-08 07:34:49 -0800728 list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '07' ] ]
Gary Wudc2351b2018-09-24 13:37:53 -0700729 image: { get_param: ubuntu_1604_image }
730 flavor: { get_param: k8s_vm_flavor }
731 key_name: { get_param: key_name }
732 networks:
Gary Wu48a32942018-11-08 07:34:49 -0800733 - port: { get_resource: k8s_07_private_port }
Gary Wub7189982018-11-14 10:01:37 -0800734 user_data_format: SOFTWARE_CONFIG
735 user_data: { get_resource: k8s_07_vm_config }
Gary Wudc2351b2018-09-24 13:37:53 -0700736
Gary Wu48a32942018-11-08 07:34:49 -0800737 k8s_08_private_port:
Gary Wudc2351b2018-09-24 13:37:53 -0700738 type: OS::Neutron::Port
739 properties:
740 network: { get_resource: oam_network }
741 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
742 security_groups:
743 - { get_resource: onap_sg }
744
Gary Wu48a32942018-11-08 07:34:49 -0800745 k8s_08_floating_ip:
Gary Wudc2351b2018-09-24 13:37:53 -0700746 type: OS::Neutron::FloatingIP
747 properties:
748 floating_network_id: { get_param: public_net_id }
Gary Wu48a32942018-11-08 07:34:49 -0800749 port_id: { get_resource: k8s_08_private_port }
Gary Wudc2351b2018-09-24 13:37:53 -0700750
Gary Wub7189982018-11-14 10:01:37 -0800751 k8s_08_vm_scripts:
752 type: OS::Heat::CloudConfig
753 properties:
754 cloud_config:
755 power_state:
756 mode: reboot
757 runcmd:
758 - [ /opt/k8s_vm_install.sh ]
759 write_files:
760 - path: /opt/k8s_vm_install.sh
761 permissions: '0755'
762 content:
763 str_replace:
764 params:
765 __docker_proxy__: { get_param: docker_proxy }
766 __apt_proxy__: { get_param: apt_proxy }
767 __docker_version__: { get_param: docker_version }
768 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
769 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
770 __host_private_ip_addr__: { get_attr: [k8s_08_floating_ip, fixed_ip_address] }
771 template:
772 get_file: k8s_vm_install.sh
773 - path: /opt/k8s_vm_init.sh
774 permissions: '0755'
775 content:
776 str_replace:
777 params:
778 __host_private_ip_addr__: { get_attr: [k8s_08_floating_ip, fixed_ip_address] }
779 __host_label__: 'compute'
780 template:
781 get_file: k8s_vm_init.sh
782 - path: /etc/init.d/k8s_vm_init_serv
783 permissions: '0755'
784 content:
785 get_file: k8s_vm_init_serv.sh
786
787 k8s_08_vm_config:
788 type: OS::Heat::MultipartMime
789 properties:
790 parts:
791 - config: { get_resource: k8s_08_vm_scripts }
792
Gary Wu48a32942018-11-08 07:34:49 -0800793 k8s_08_vm:
Gary Wudc2351b2018-09-24 13:37:53 -0700794 type: OS::Nova::Server
795 properties:
796 name:
Gary Wu48a32942018-11-08 07:34:49 -0800797 list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '08' ] ]
Gary Wudc2351b2018-09-24 13:37:53 -0700798 image: { get_param: ubuntu_1604_image }
799 flavor: { get_param: k8s_vm_flavor }
800 key_name: { get_param: key_name }
801 networks:
Gary Wu48a32942018-11-08 07:34:49 -0800802 - port: { get_resource: k8s_08_private_port }
Gary Wub7189982018-11-14 10:01:37 -0800803 user_data_format: SOFTWARE_CONFIG
804 user_data: { get_resource: k8s_08_vm_config }
Gary Wudc2351b2018-09-24 13:37:53 -0700805
Gary Wu48a32942018-11-08 07:34:49 -0800806 k8s_09_private_port:
Gary Wudc2351b2018-09-24 13:37:53 -0700807 type: OS::Neutron::Port
808 properties:
809 network: { get_resource: oam_network }
810 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
811 security_groups:
812 - { get_resource: onap_sg }
813
Gary Wu48a32942018-11-08 07:34:49 -0800814 k8s_09_floating_ip:
Gary Wudc2351b2018-09-24 13:37:53 -0700815 type: OS::Neutron::FloatingIP
816 properties:
817 floating_network_id: { get_param: public_net_id }
Gary Wu48a32942018-11-08 07:34:49 -0800818 port_id: { get_resource: k8s_09_private_port }
Gary Wudc2351b2018-09-24 13:37:53 -0700819
Gary Wub7189982018-11-14 10:01:37 -0800820 k8s_09_vm_scripts:
821 type: OS::Heat::CloudConfig
822 properties:
823 cloud_config:
824 power_state:
825 mode: reboot
826 runcmd:
827 - [ /opt/k8s_vm_install.sh ]
828 write_files:
829 - path: /opt/k8s_vm_install.sh
830 permissions: '0755'
831 content:
832 str_replace:
833 params:
834 __docker_proxy__: { get_param: docker_proxy }
835 __apt_proxy__: { get_param: apt_proxy }
836 __docker_version__: { get_param: docker_version }
837 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
838 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
839 __host_private_ip_addr__: { get_attr: [k8s_09_floating_ip, fixed_ip_address] }
840 template:
841 get_file: k8s_vm_install.sh
842 - path: /opt/k8s_vm_init.sh
843 permissions: '0755'
844 content:
845 str_replace:
846 params:
847 __host_private_ip_addr__: { get_attr: [k8s_09_floating_ip, fixed_ip_address] }
848 __host_label__: 'compute'
849 template:
850 get_file: k8s_vm_init.sh
851 - path: /etc/init.d/k8s_vm_init_serv
852 permissions: '0755'
853 content:
854 get_file: k8s_vm_init_serv.sh
855
856 k8s_09_vm_config:
857 type: OS::Heat::MultipartMime
858 properties:
859 parts:
860 - config: { get_resource: k8s_09_vm_scripts }
861
Gary Wu48a32942018-11-08 07:34:49 -0800862 k8s_09_vm:
Gary Wudc2351b2018-09-24 13:37:53 -0700863 type: OS::Nova::Server
864 properties:
865 name:
Gary Wu48a32942018-11-08 07:34:49 -0800866 list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '09' ] ]
Gary Wudc2351b2018-09-24 13:37:53 -0700867 image: { get_param: ubuntu_1604_image }
868 flavor: { get_param: k8s_vm_flavor }
869 key_name: { get_param: key_name }
870 networks:
Gary Wu48a32942018-11-08 07:34:49 -0800871 - port: { get_resource: k8s_09_private_port }
Gary Wub7189982018-11-14 10:01:37 -0800872 user_data_format: SOFTWARE_CONFIG
873 user_data: { get_resource: k8s_09_vm_config }
Gary Wudc2351b2018-09-24 13:37:53 -0700874
875 k8s_10_private_port:
876 type: OS::Neutron::Port
877 properties:
878 network: { get_resource: oam_network }
879 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
880 security_groups:
881 - { get_resource: onap_sg }
882
883 k8s_10_floating_ip:
884 type: OS::Neutron::FloatingIP
885 properties:
886 floating_network_id: { get_param: public_net_id }
887 port_id: { get_resource: k8s_10_private_port }
888
Gary Wub7189982018-11-14 10:01:37 -0800889 k8s_10_vm_scripts:
890 type: OS::Heat::CloudConfig
891 properties:
892 cloud_config:
893 power_state:
894 mode: reboot
895 runcmd:
896 - [ /opt/k8s_vm_install.sh ]
897 write_files:
898 - path: /opt/k8s_vm_install.sh
899 permissions: '0755'
900 content:
901 str_replace:
902 params:
903 __docker_proxy__: { get_param: docker_proxy }
904 __apt_proxy__: { get_param: apt_proxy }
905 __docker_version__: { get_param: docker_version }
906 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
907 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
908 __host_private_ip_addr__: { get_attr: [k8s_10_floating_ip, fixed_ip_address] }
909 template:
910 get_file: k8s_vm_install.sh
911 - path: /opt/k8s_vm_init.sh
912 permissions: '0755'
913 content:
914 str_replace:
915 params:
916 __host_private_ip_addr__: { get_attr: [k8s_10_floating_ip, fixed_ip_address] }
917 __host_label__: 'compute'
918 template:
919 get_file: k8s_vm_init.sh
920 - path: /etc/init.d/k8s_vm_init_serv
921 permissions: '0755'
922 content:
923 get_file: k8s_vm_init_serv.sh
924
925 k8s_10_vm_config:
926 type: OS::Heat::MultipartMime
927 properties:
928 parts:
929 - config: { get_resource: k8s_10_vm_scripts }
930
Gary Wudc2351b2018-09-24 13:37:53 -0700931 k8s_10_vm:
932 type: OS::Nova::Server
933 properties:
934 name:
Gary Wu3fd6c2a2018-10-28 21:44:00 -0700935 list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '10' ] ]
Gary Wudc2351b2018-09-24 13:37:53 -0700936 image: { get_param: ubuntu_1604_image }
937 flavor: { get_param: k8s_vm_flavor }
938 key_name: { get_param: key_name }
939 networks:
940 - port: { get_resource: k8s_10_private_port }
Gary Wub7189982018-11-14 10:01:37 -0800941 user_data_format: SOFTWARE_CONFIG
942 user_data: { get_resource: k8s_10_vm_config }
Gary Wudc2351b2018-09-24 13:37:53 -0700943
Gary Wu48a32942018-11-08 07:34:49 -0800944 k8s_11_private_port:
945 type: OS::Neutron::Port
946 properties:
947 network: { get_resource: oam_network }
948 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
949 security_groups:
950 - { get_resource: onap_sg }
951
952 k8s_11_floating_ip:
953 type: OS::Neutron::FloatingIP
954 properties:
955 floating_network_id: { get_param: public_net_id }
956 port_id: { get_resource: k8s_11_private_port }
957
Gary Wub7189982018-11-14 10:01:37 -0800958 k8s_11_vm_scripts:
959 type: OS::Heat::CloudConfig
960 properties:
961 cloud_config:
962 power_state:
963 mode: reboot
964 runcmd:
965 - [ /opt/k8s_vm_install.sh ]
966 write_files:
967 - path: /opt/k8s_vm_install.sh
968 permissions: '0755'
969 content:
970 str_replace:
971 params:
972 __docker_proxy__: { get_param: docker_proxy }
973 __apt_proxy__: { get_param: apt_proxy }
974 __docker_version__: { get_param: docker_version }
975 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
976 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
977 __host_private_ip_addr__: { get_attr: [k8s_11_floating_ip, fixed_ip_address] }
978 template:
979 get_file: k8s_vm_install.sh
980 - path: /opt/k8s_vm_init.sh
981 permissions: '0755'
982 content:
983 str_replace:
984 params:
985 __host_private_ip_addr__: { get_attr: [k8s_11_floating_ip, fixed_ip_address] }
986 __host_label__: 'compute'
987 template:
988 get_file: k8s_vm_init.sh
989 - path: /etc/init.d/k8s_vm_init_serv
990 permissions: '0755'
991 content:
992 get_file: k8s_vm_init_serv.sh
993
994 k8s_11_vm_config:
995 type: OS::Heat::MultipartMime
996 properties:
997 parts:
998 - config: { get_resource: k8s_11_vm_scripts }
999
Gary Wu48a32942018-11-08 07:34:49 -08001000 k8s_11_vm:
1001 type: OS::Nova::Server
1002 properties:
1003 name:
1004 list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '11' ] ]
1005 image: { get_param: ubuntu_1604_image }
1006 flavor: { get_param: k8s_vm_flavor }
1007 key_name: { get_param: key_name }
1008 networks:
1009 - port: { get_resource: k8s_11_private_port }
Gary Wub7189982018-11-14 10:01:37 -08001010 user_data_format: SOFTWARE_CONFIG
1011 user_data: { get_resource: k8s_11_vm_config }
Gary Wu48a32942018-11-08 07:34:49 -08001012
Gary Wu4b79dbb2018-11-08 20:04:33 -08001013 k8s_12_private_port:
1014 type: OS::Neutron::Port
1015 properties:
1016 network: { get_resource: oam_network }
1017 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
1018 security_groups:
1019 - { get_resource: onap_sg }
1020
1021 k8s_12_floating_ip:
1022 type: OS::Neutron::FloatingIP
1023 properties:
1024 floating_network_id: { get_param: public_net_id }
1025 port_id: { get_resource: k8s_12_private_port }
1026
Gary Wub7189982018-11-14 10:01:37 -08001027 k8s_12_vm_scripts:
1028 type: OS::Heat::CloudConfig
1029 properties:
1030 cloud_config:
1031 power_state:
1032 mode: reboot
1033 runcmd:
1034 - [ /opt/k8s_vm_install.sh ]
1035 write_files:
1036 - path: /opt/k8s_vm_install.sh
1037 permissions: '0755'
1038 content:
1039 str_replace:
1040 params:
1041 __docker_proxy__: { get_param: docker_proxy }
1042 __apt_proxy__: { get_param: apt_proxy }
1043 __docker_version__: { get_param: docker_version }
1044 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
1045 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
1046 __host_private_ip_addr__: { get_attr: [k8s_12_floating_ip, fixed_ip_address] }
1047 template:
1048 get_file: k8s_vm_install.sh
1049 - path: /opt/k8s_vm_init.sh
1050 permissions: '0755'
1051 content:
1052 str_replace:
1053 params:
1054 __host_private_ip_addr__: { get_attr: [k8s_12_floating_ip, fixed_ip_address] }
1055 __host_label__: 'compute'
1056 template:
1057 get_file: k8s_vm_init.sh
1058 - path: /etc/init.d/k8s_vm_init_serv
1059 permissions: '0755'
1060 content:
1061 get_file: k8s_vm_init_serv.sh
1062
1063 k8s_12_vm_config:
1064 type: OS::Heat::MultipartMime
1065 properties:
1066 parts:
1067 - config: { get_resource: k8s_12_vm_scripts }
1068
Gary Wu4b79dbb2018-11-08 20:04:33 -08001069 k8s_12_vm:
1070 type: OS::Nova::Server
1071 properties:
1072 name:
1073 list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '12' ] ]
1074 image: { get_param: ubuntu_1604_image }
1075 flavor: { get_param: k8s_vm_flavor }
1076 key_name: { get_param: key_name }
1077 networks:
1078 - port: { get_resource: k8s_12_private_port }
Gary Wub7189982018-11-14 10:01:37 -08001079 user_data_format: SOFTWARE_CONFIG
1080 user_data: { get_resource: k8s_12_vm_config }
Gary Wu4b79dbb2018-11-08 20:04:33 -08001081
Gary Wu3fd6c2a2018-10-28 21:44:00 -07001082 etcd_1_private_port:
Gary Wu61db1be2018-09-25 08:12:33 -07001083 type: OS::Neutron::Port
1084 properties:
1085 network: { get_resource: oam_network }
1086 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
1087 security_groups:
1088 - { get_resource: onap_sg }
1089
Gary Wu3fd6c2a2018-10-28 21:44:00 -07001090 etcd_1_floating_ip:
Gary Wu61db1be2018-09-25 08:12:33 -07001091 type: OS::Neutron::FloatingIP
1092 properties:
1093 floating_network_id: { get_param: public_net_id }
Gary Wu3fd6c2a2018-10-28 21:44:00 -07001094 port_id: { get_resource: etcd_1_private_port }
Gary Wu61db1be2018-09-25 08:12:33 -07001095
Gary Wub7189982018-11-14 10:01:37 -08001096 etcd_1_vm_scripts:
1097 type: OS::Heat::CloudConfig
1098 properties:
1099 cloud_config:
1100 power_state:
1101 mode: reboot
1102 runcmd:
1103 - [ /opt/k8s_vm_install.sh ]
1104 write_files:
1105 - path: /opt/k8s_vm_install.sh
1106 permissions: '0755'
1107 content:
1108 str_replace:
1109 params:
1110 __docker_proxy__: { get_param: docker_proxy }
1111 __apt_proxy__: { get_param: apt_proxy }
1112 __docker_version__: { get_param: docker_version }
1113 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
1114 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
1115 __host_private_ip_addr__: { get_attr: [etcd_1_floating_ip, fixed_ip_address] }
1116 template:
1117 get_file: k8s_vm_install.sh
1118 - path: /opt/k8s_vm_init.sh
1119 permissions: '0755'
1120 content:
1121 str_replace:
1122 params:
1123 __host_private_ip_addr__: { get_attr: [etcd_1_floating_ip, fixed_ip_address] }
1124 __host_label__: 'etcd'
1125 template:
1126 get_file: k8s_vm_init.sh
1127 - path: /etc/init.d/k8s_vm_init_serv
1128 permissions: '0755'
1129 content:
1130 get_file: k8s_vm_init_serv.sh
1131
1132 etcd_1_vm_config:
1133 type: OS::Heat::MultipartMime
1134 properties:
1135 parts:
1136 - config: { get_resource: etcd_1_vm_scripts }
1137
Gary Wu3fd6c2a2018-10-28 21:44:00 -07001138 etcd_1_vm:
Gary Wu61db1be2018-09-25 08:12:33 -07001139 type: OS::Nova::Server
1140 properties:
1141 name:
Gary Wu3fd6c2a2018-10-28 21:44:00 -07001142 list_join: ['-', [ { get_param: 'OS::stack_name' }, 'etcd', '1' ] ]
Gary Wu61db1be2018-09-25 08:12:33 -07001143 image: { get_param: ubuntu_1604_image }
Gary Wu3fd6c2a2018-10-28 21:44:00 -07001144 flavor: { get_param: etcd_vm_flavor }
Gary Wu61db1be2018-09-25 08:12:33 -07001145 key_name: { get_param: key_name }
1146 networks:
Gary Wu3fd6c2a2018-10-28 21:44:00 -07001147 - port: { get_resource: etcd_1_private_port }
Gary Wub7189982018-11-14 10:01:37 -08001148 user_data_format: SOFTWARE_CONFIG
1149 user_data: { get_resource: etcd_1_vm_config }
Gary Wu3fd6c2a2018-10-28 21:44:00 -07001150
1151 etcd_2_private_port:
1152 type: OS::Neutron::Port
1153 properties:
1154 network: { get_resource: oam_network }
1155 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
1156 security_groups:
1157 - { get_resource: onap_sg }
1158
1159 etcd_2_floating_ip:
1160 type: OS::Neutron::FloatingIP
1161 properties:
1162 floating_network_id: { get_param: public_net_id }
1163 port_id: { get_resource: etcd_2_private_port }
1164
Gary Wub7189982018-11-14 10:01:37 -08001165 etcd_2_vm_scripts:
1166 type: OS::Heat::CloudConfig
1167 properties:
1168 cloud_config:
1169 power_state:
1170 mode: reboot
1171 runcmd:
1172 - [ /opt/k8s_vm_install.sh ]
1173 write_files:
1174 - path: /opt/k8s_vm_install.sh
1175 permissions: '0755'
1176 content:
1177 str_replace:
1178 params:
1179 __docker_proxy__: { get_param: docker_proxy }
1180 __apt_proxy__: { get_param: apt_proxy }
1181 __docker_version__: { get_param: docker_version }
1182 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
1183 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
1184 __host_private_ip_addr__: { get_attr: [etcd_2_floating_ip, fixed_ip_address] }
1185 template:
1186 get_file: k8s_vm_install.sh
1187 - path: /opt/k8s_vm_init.sh
1188 permissions: '0755'
1189 content:
1190 str_replace:
1191 params:
1192 __host_private_ip_addr__: { get_attr: [etcd_2_floating_ip, fixed_ip_address] }
1193 __host_label__: 'etcd'
1194 template:
1195 get_file: k8s_vm_init.sh
1196 - path: /etc/init.d/k8s_vm_init_serv
1197 permissions: '0755'
1198 content:
1199 get_file: k8s_vm_init_serv.sh
1200
1201 etcd_2_vm_config:
1202 type: OS::Heat::MultipartMime
1203 properties:
1204 parts:
1205 - config: { get_resource: etcd_2_vm_scripts }
1206
Gary Wu3fd6c2a2018-10-28 21:44:00 -07001207 etcd_2_vm:
1208 type: OS::Nova::Server
1209 properties:
1210 name:
1211 list_join: ['-', [ { get_param: 'OS::stack_name' }, 'etcd', '2' ] ]
1212 image: { get_param: ubuntu_1604_image }
1213 flavor: { get_param: etcd_vm_flavor }
1214 key_name: { get_param: key_name }
1215 networks:
1216 - port: { get_resource: etcd_2_private_port }
Gary Wub7189982018-11-14 10:01:37 -08001217 user_data_format: SOFTWARE_CONFIG
1218 user_data: { get_resource: etcd_2_vm_config }
Gary Wu3fd6c2a2018-10-28 21:44:00 -07001219
1220 etcd_3_private_port:
1221 type: OS::Neutron::Port
1222 properties:
1223 network: { get_resource: oam_network }
1224 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
1225 security_groups:
1226 - { get_resource: onap_sg }
1227
1228 etcd_3_floating_ip:
1229 type: OS::Neutron::FloatingIP
1230 properties:
1231 floating_network_id: { get_param: public_net_id }
1232 port_id: { get_resource: etcd_3_private_port }
1233
Gary Wub7189982018-11-14 10:01:37 -08001234 etcd_3_vm_scripts:
1235 type: OS::Heat::CloudConfig
1236 properties:
1237 cloud_config:
1238 power_state:
1239 mode: reboot
1240 runcmd:
1241 - [ /opt/k8s_vm_install.sh ]
1242 write_files:
1243 - path: /opt/k8s_vm_install.sh
1244 permissions: '0755'
1245 content:
1246 str_replace:
1247 params:
1248 __docker_proxy__: { get_param: docker_proxy }
1249 __apt_proxy__: { get_param: apt_proxy }
1250 __docker_version__: { get_param: docker_version }
1251 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
1252 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
1253 __host_private_ip_addr__: { get_attr: [etcd_3_floating_ip, fixed_ip_address] }
1254 template:
1255 get_file: k8s_vm_install.sh
1256 - path: /opt/k8s_vm_init.sh
1257 permissions: '0755'
1258 content:
1259 str_replace:
1260 params:
1261 __host_private_ip_addr__: { get_attr: [etcd_3_floating_ip, fixed_ip_address] }
1262 __host_label__: 'etcd'
1263 template:
1264 get_file: k8s_vm_init.sh
1265 - path: /etc/init.d/k8s_vm_init_serv
1266 permissions: '0755'
1267 content:
1268 get_file: k8s_vm_init_serv.sh
1269
1270 etcd_3_vm_config:
1271 type: OS::Heat::MultipartMime
1272 properties:
1273 parts:
1274 - config: { get_resource: etcd_3_vm_scripts }
1275
Gary Wu3fd6c2a2018-10-28 21:44:00 -07001276 etcd_3_vm:
1277 type: OS::Nova::Server
1278 properties:
1279 name:
1280 list_join: ['-', [ { get_param: 'OS::stack_name' }, 'etcd', '3' ] ]
1281 image: { get_param: ubuntu_1604_image }
1282 flavor: { get_param: etcd_vm_flavor }
1283 key_name: { get_param: key_name }
1284 networks:
1285 - port: { get_resource: etcd_3_private_port }
Gary Wub7189982018-11-14 10:01:37 -08001286 user_data_format: SOFTWARE_CONFIG
1287 user_data: { get_resource: etcd_3_vm_config }
Gary Wu3fd6c2a2018-10-28 21:44:00 -07001288
Gary Wu89f67232018-11-01 13:45:31 -07001289 orch_1_private_port:
1290 type: OS::Neutron::Port
1291 properties:
1292 network: { get_resource: oam_network }
1293 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
1294 security_groups:
1295 - { get_resource: onap_sg }
1296
1297 orch_1_floating_ip:
1298 type: OS::Neutron::FloatingIP
1299 properties:
1300 floating_network_id: { get_param: public_net_id }
1301 port_id: { get_resource: orch_1_private_port }
1302
Gary Wub7189982018-11-14 10:01:37 -08001303 orch_1_vm_scripts:
1304 type: OS::Heat::CloudConfig
1305 properties:
1306 cloud_config:
1307 power_state:
1308 mode: reboot
1309 runcmd:
1310 - [ /opt/k8s_vm_install.sh ]
1311 write_files:
1312 - path: /opt/k8s_vm_install.sh
1313 permissions: '0755'
1314 content:
1315 str_replace:
1316 params:
1317 __docker_proxy__: { get_param: docker_proxy }
1318 __apt_proxy__: { get_param: apt_proxy }
1319 __docker_version__: { get_param: docker_version }
1320 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
1321 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
1322 __host_private_ip_addr__: { get_attr: [orch_1_floating_ip, fixed_ip_address] }
1323 template:
1324 get_file: k8s_vm_install.sh
1325 - path: /opt/k8s_vm_init.sh
1326 permissions: '0755'
1327 content:
1328 str_replace:
1329 params:
1330 __host_private_ip_addr__: { get_attr: [orch_1_floating_ip, fixed_ip_address] }
1331 __host_label__: 'orchestration'
1332 template:
1333 get_file: k8s_vm_init.sh
1334 - path: /etc/init.d/k8s_vm_init_serv
1335 permissions: '0755'
1336 content:
1337 get_file: k8s_vm_init_serv.sh
1338
1339 orch_1_vm_config:
1340 type: OS::Heat::MultipartMime
1341 properties:
1342 parts:
1343 - config: { get_resource: orch_1_vm_scripts }
1344
Gary Wu89f67232018-11-01 13:45:31 -07001345 orch_1_vm:
1346 type: OS::Nova::Server
1347 properties:
1348 name:
1349 list_join: ['-', [ { get_param: 'OS::stack_name' }, 'orch', '1' ] ]
1350 image: { get_param: ubuntu_1604_image }
1351 flavor: { get_param: orch_vm_flavor }
1352 key_name: { get_param: key_name }
1353 networks:
1354 - port: { get_resource: orch_1_private_port }
Gary Wub7189982018-11-14 10:01:37 -08001355 user_data_format: SOFTWARE_CONFIG
1356 user_data: { get_resource: orch_1_vm_config }
Gary Wu89f67232018-11-01 13:45:31 -07001357
Gary Wu6e662012018-11-13 18:41:45 -08001358 orch_2_private_port:
1359 type: OS::Neutron::Port
1360 properties:
1361 network: { get_resource: oam_network }
1362 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
1363 security_groups:
1364 - { get_resource: onap_sg }
1365
1366 orch_2_floating_ip:
1367 type: OS::Neutron::FloatingIP
1368 properties:
1369 floating_network_id: { get_param: public_net_id }
1370 port_id: { get_resource: orch_2_private_port }
1371
Gary Wub7189982018-11-14 10:01:37 -08001372 orch_2_vm_scripts:
1373 type: OS::Heat::CloudConfig
1374 properties:
1375 cloud_config:
1376 power_state:
1377 mode: reboot
1378 runcmd:
1379 - [ /opt/k8s_vm_install.sh ]
1380 write_files:
1381 - path: /opt/k8s_vm_install.sh
1382 permissions: '0755'
1383 content:
1384 str_replace:
1385 params:
1386 __docker_proxy__: { get_param: docker_proxy }
1387 __apt_proxy__: { get_param: apt_proxy }
1388 __docker_version__: { get_param: docker_version }
1389 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
1390 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
1391 __host_private_ip_addr__: { get_attr: [orch_2_floating_ip, fixed_ip_address] }
1392 template:
1393 get_file: k8s_vm_install.sh
1394 - path: /opt/k8s_vm_init.sh
1395 permissions: '0755'
1396 content:
1397 str_replace:
1398 params:
1399 __host_private_ip_addr__: { get_attr: [orch_2_floating_ip, fixed_ip_address] }
1400 __host_label__: 'orchestration'
1401 template:
1402 get_file: k8s_vm_init.sh
1403 - path: /etc/init.d/k8s_vm_init_serv
1404 permissions: '0755'
1405 content:
1406 get_file: k8s_vm_init_serv.sh
1407
1408 orch_2_vm_config:
1409 type: OS::Heat::MultipartMime
1410 properties:
1411 parts:
1412 - config: { get_resource: orch_2_vm_scripts }
1413
Gary Wu6e662012018-11-13 18:41:45 -08001414 orch_2_vm:
1415 type: OS::Nova::Server
1416 properties:
1417 name:
1418 list_join: ['-', [ { get_param: 'OS::stack_name' }, 'orch', '2' ] ]
1419 image: { get_param: ubuntu_1604_image }
1420 flavor: { get_param: orch_vm_flavor }
1421 key_name: { get_param: key_name }
1422 networks:
1423 - port: { get_resource: orch_2_private_port }
Gary Wub7189982018-11-14 10:01:37 -08001424 user_data_format: SOFTWARE_CONFIG
1425 user_data: { get_resource: orch_2_vm_config }
Gary Wu6e662012018-11-13 18:41:45 -08001426
Gary Wu14ee41d2018-01-19 15:03:59 -08001427outputs:
Gary Wu61034082018-01-22 12:48:50 -08001428 rancher_vm_ip:
1429 description: The IP address of the rancher instance
Gary Wu5d325d02018-02-06 21:21:31 -08001430 value: { get_attr: [rancher_floating_ip, floating_ip_address] }
Gary Wu61034082018-01-22 12:48:50 -08001431
Gary Wu48a32942018-11-08 07:34:49 -08001432 k8s_01_vm_ip:
1433 description: The IP address of the k8s_01 instance
1434 value: { get_attr: [k8s_01_floating_ip, floating_ip_address] }
Gary Wu36e42dd2018-05-03 07:29:53 -07001435
Gary Wu48a32942018-11-08 07:34:49 -08001436 k8s_02_vm_ip:
1437 description: The IP address of the k8s_02 instance
1438 value: { get_attr: [k8s_02_floating_ip, floating_ip_address] }
Gary Wu36e42dd2018-05-03 07:29:53 -07001439
Gary Wu48a32942018-11-08 07:34:49 -08001440 k8s_03_vm_ip:
1441 description: The IP address of the k8s_03 instance
1442 value: { get_attr: [k8s_03_floating_ip, floating_ip_address] }
Gary Wu36e42dd2018-05-03 07:29:53 -07001443
Gary Wu48a32942018-11-08 07:34:49 -08001444 k8s_04_vm_ip:
1445 description: The IP address of the k8s_04 instance
1446 value: { get_attr: [k8s_04_floating_ip, floating_ip_address] }
Gary Wu36e42dd2018-05-03 07:29:53 -07001447
Gary Wu48a32942018-11-08 07:34:49 -08001448 k8s_05_vm_ip:
1449 description: The IP address of the k8s_05 instance
1450 value: { get_attr: [k8s_05_floating_ip, floating_ip_address] }
Gary Wu4d2cfb62018-09-07 09:05:33 -07001451
Gary Wu48a32942018-11-08 07:34:49 -08001452 k8s_06_vm_ip:
1453 description: The IP address of the k8s_06 instance
1454 value: { get_attr: [k8s_06_floating_ip, floating_ip_address] }
Gary Wu0bf673e2018-09-18 08:24:33 -07001455
Gary Wu48a32942018-11-08 07:34:49 -08001456 k8s_07_vm_ip:
1457 description: The IP address of the k8s_07 instance
1458 value: { get_attr: [k8s_07_floating_ip, floating_ip_address] }
Gary Wudc2351b2018-09-24 13:37:53 -07001459
Gary Wu48a32942018-11-08 07:34:49 -08001460 k8s_08_vm_ip:
1461 description: The IP address of the k8s_08 instance
1462 value: { get_attr: [k8s_08_floating_ip, floating_ip_address] }
Gary Wudc2351b2018-09-24 13:37:53 -07001463
Gary Wu48a32942018-11-08 07:34:49 -08001464 k8s_09_vm_ip:
1465 description: The IP address of the k8s_09 instance
1466 value: { get_attr: [k8s_09_floating_ip, floating_ip_address] }
Gary Wudc2351b2018-09-24 13:37:53 -07001467
1468 k8s_10_vm_ip:
1469 description: The IP address of the k8s_10 instance
1470 value: { get_attr: [k8s_10_floating_ip, floating_ip_address] }
1471
Gary Wu48a32942018-11-08 07:34:49 -08001472 k8s_11_vm_ip:
1473 description: The IP address of the k8s_11 instance
1474 value: { get_attr: [k8s_11_floating_ip, floating_ip_address] }
1475
Gary Wu4b79dbb2018-11-08 20:04:33 -08001476 k8s_12_vm_ip:
1477 description: The IP address of the k8s_12 instance
1478 value: { get_attr: [k8s_12_floating_ip, floating_ip_address] }
1479