blob: c290e17cd6183bda62da70a6d7cf232b13b47a20 [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
34 integration_override_yaml:
35 type: string
36 description: Content for integration_override.yaml
Gary Wu60dd0d82018-01-18 14:54:47 -080037
Gary Wuccd529b2018-01-16 18:31:01 -080038resources:
Gary Wuc98156d2018-01-18 12:03:26 -080039 random-str:
40 type: OS::Heat::RandomString
41 properties:
42 length: 4
43
Gary Wubc11e5d2018-02-07 10:23:27 -080044 # ONAP security group
45 onap_sg:
46 type: OS::Neutron::SecurityGroup
47 properties:
48 name:
49 str_replace:
50 template: base_rand
51 params:
52 base: onap_sg
53 rand: { get_resource: random-str }
54 description: security group used by ONAP
55 rules:
56 # All egress traffic
57 - direction: egress
58 ethertype: IPv4
59 - direction: egress
60 ethertype: IPv6
61 # ingress traffic
62 # ICMP
63 - protocol: icmp
64 - protocol: udp
65 port_range_min: 1
66 port_range_max: 65535
67 - protocol: tcp
68 port_range_min: 1
69 port_range_max: 65535
70
71
Gary Wu52dfdcb2018-01-25 11:02:48 -080072 # ONAP management private network
73 oam_network:
74 type: OS::Neutron::Net
75 properties:
76 name:
77 str_replace:
78 template: oam_network_rand
79 params:
80 rand: { get_resource: random-str }
81
82 oam_subnet:
83 type: OS::Neutron::Subnet
84 properties:
85 name:
86 str_replace:
87 template: oam_network_rand
88 params:
89 rand: { get_resource: random-str }
90 network_id: { get_resource: oam_network }
91 cidr: { get_param: oam_network_cidr }
Gary Wu14a6b302018-05-01 15:59:28 -070092 dns_nameservers: [ "8.8.8.8" ]
Gary Wu52dfdcb2018-01-25 11:02:48 -080093
94 router:
95 type: OS::Neutron::Router
96 properties:
97 external_gateway_info:
98 network: { get_param: public_net_id }
99
100 router_interface:
101 type: OS::Neutron::RouterInterface
102 properties:
103 router_id: { get_resource: router }
104 subnet_id: { get_resource: oam_subnet }
105
Gary Wu374498a2018-02-06 17:31:04 -0800106 rancher_private_port:
107 type: OS::Neutron::Port
108 properties:
109 network: { get_resource: oam_network }
110 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
Gary Wubc11e5d2018-02-07 10:23:27 -0800111 security_groups:
112 - { get_resource: onap_sg }
Gary Wu374498a2018-02-06 17:31:04 -0800113
114 rancher_floating_ip:
115 type: OS::Neutron::FloatingIP
116 properties:
117 floating_network_id: { get_param: public_net_id }
118 port_id: { get_resource: rancher_private_port }
119
Gary Wuccd529b2018-01-16 18:31:01 -0800120 rancher_vm:
121 type: OS::Nova::Server
122 properties:
123 name: rancher
Gary Wu558ac6e2018-01-19 14:53:12 -0800124 image: { get_param: ubuntu_1604_image }
Gary Wu60dd0d82018-01-18 14:54:47 -0800125 flavor: { get_param: rancher_vm_flavor }
Gary Wuccd529b2018-01-16 18:31:01 -0800126 key_name: onap_key
127 networks:
Gary Wu374498a2018-02-06 17:31:04 -0800128 - port: { get_resource: rancher_private_port }
Gary Wuccd529b2018-01-16 18:31:01 -0800129 user_data_format: RAW
130 user_data:
131 str_replace:
Gary Wu1ff56672018-01-17 20:51:45 -0800132 template:
133 get_file: rancher_vm_entrypoint.sh
Gary Wu14a6b302018-05-01 15:59:28 -0700134 params:
Gary Wu14a6b302018-05-01 15:59:28 -0700135 __docker_proxy__: { get_param: docker_proxy }
136 __apt_proxy__: { get_param: apt_proxy }
137 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
Gary Wu11c98742018-05-02 16:19:04 -0700138 __integration_override_yaml__: { get_param: integration_override_yaml }
139 __oam_network_id__: { get_resource: oam_network }
140 __oam_subnet_id__: { get_resource: oam_subnet }
Gary Wu14a6b302018-05-01 15:59:28 -0700141 __k8s_vm_ips__: [
142 get_attr: [k8s_1_floating_ip, floating_ip_address],
143 get_attr: [k8s_2_floating_ip, floating_ip_address],
144 get_attr: [k8s_3_floating_ip, floating_ip_address],
145 get_attr: [k8s_4_floating_ip, floating_ip_address],
146 get_attr: [k8s_5_floating_ip, floating_ip_address],
147 get_attr: [k8s_6_floating_ip, floating_ip_address],
148 get_attr: [k8s_7_floating_ip, floating_ip_address],
149 ]
150 k8s_1_private_port:
Gary Wu52dfdcb2018-01-25 11:02:48 -0800151 type: OS::Neutron::Port
152 properties:
153 network: { get_resource: oam_network }
154 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
Gary Wubc11e5d2018-02-07 10:23:27 -0800155 security_groups:
156 - { get_resource: onap_sg }
Gary Wu52dfdcb2018-01-25 11:02:48 -0800157
Gary Wu14a6b302018-05-01 15:59:28 -0700158 k8s_1_floating_ip:
Gary Wu52dfdcb2018-01-25 11:02:48 -0800159 type: OS::Neutron::FloatingIP
160 properties:
161 floating_network_id: { get_param: public_net_id }
Gary Wu14a6b302018-05-01 15:59:28 -0700162 port_id: { get_resource: k8s_1_private_port }
Gary Wu52dfdcb2018-01-25 11:02:48 -0800163
Gary Wu14a6b302018-05-01 15:59:28 -0700164 k8s_1_vm:
Gary Wuccd529b2018-01-16 18:31:01 -0800165 type: OS::Nova::Server
166 properties:
Gary Wu14a6b302018-05-01 15:59:28 -0700167 name: k8s_1
Gary Wu558ac6e2018-01-19 14:53:12 -0800168 image: { get_param: ubuntu_1604_image }
Gary Wu60dd0d82018-01-18 14:54:47 -0800169 flavor: { get_param: k8s_vm_flavor }
Gary Wuccd529b2018-01-16 18:31:01 -0800170 key_name: onap_key
171 networks:
Gary Wu14a6b302018-05-01 15:59:28 -0700172 - port: { get_resource: k8s_1_private_port }
Gary Wuccd529b2018-01-16 18:31:01 -0800173 user_data_format: RAW
174 user_data:
175 str_replace:
176 params:
177 __docker_proxy__: { get_param: docker_proxy }
178 __apt_proxy__: { get_param: apt_proxy }
Gary Wu5d325d02018-02-06 21:21:31 -0800179 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
Gary Wu14a6b302018-05-01 15:59:28 -0700180 template:
181 get_file: k8s_vm_entrypoint.sh
182
183 k8s_2_private_port:
184 type: OS::Neutron::Port
185 properties:
186 network: { get_resource: oam_network }
187 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
188 security_groups:
189 - { get_resource: onap_sg }
190
191 k8s_2_floating_ip:
192 type: OS::Neutron::FloatingIP
193 properties:
194 floating_network_id: { get_param: public_net_id }
195 port_id: { get_resource: k8s_2_private_port }
196
197 k8s_2_vm:
198 type: OS::Nova::Server
199 properties:
200 name: k8s_2
201 image: { get_param: ubuntu_1604_image }
202 flavor: { get_param: k8s_vm_flavor }
203 key_name: onap_key
204 networks:
205 - port: { get_resource: k8s_2_private_port }
206 user_data_format: RAW
207 user_data:
208 str_replace:
209 params:
Gary Wu14a6b302018-05-01 15:59:28 -0700210 __docker_proxy__: { get_param: docker_proxy }
211 __apt_proxy__: { get_param: apt_proxy }
212 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
213 template:
214 get_file: k8s_vm_entrypoint.sh
215
216 k8s_3_private_port:
217 type: OS::Neutron::Port
218 properties:
219 network: { get_resource: oam_network }
220 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
221 security_groups:
222 - { get_resource: onap_sg }
223
224 k8s_3_floating_ip:
225 type: OS::Neutron::FloatingIP
226 properties:
227 floating_network_id: { get_param: public_net_id }
228 port_id: { get_resource: k8s_3_private_port }
229
230 k8s_3_vm:
231 type: OS::Nova::Server
232 properties:
233 name: k8s_3
234 image: { get_param: ubuntu_1604_image }
235 flavor: { get_param: k8s_vm_flavor }
236 key_name: onap_key
237 networks:
238 - port: { get_resource: k8s_3_private_port }
239 user_data_format: RAW
240 user_data:
241 str_replace:
242 params:
Gary Wu14a6b302018-05-01 15:59:28 -0700243 __docker_proxy__: { get_param: docker_proxy }
244 __apt_proxy__: { get_param: apt_proxy }
245 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
246 template:
247 get_file: k8s_vm_entrypoint.sh
248
249 k8s_4_private_port:
250 type: OS::Neutron::Port
251 properties:
252 network: { get_resource: oam_network }
253 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
254 security_groups:
255 - { get_resource: onap_sg }
256
257 k8s_4_floating_ip:
258 type: OS::Neutron::FloatingIP
259 properties:
260 floating_network_id: { get_param: public_net_id }
261 port_id: { get_resource: k8s_4_private_port }
262
263 k8s_4_vm:
264 type: OS::Nova::Server
265 properties:
266 name: k8s_4
267 image: { get_param: ubuntu_1604_image }
268 flavor: { get_param: k8s_vm_flavor }
269 key_name: onap_key
270 networks:
271 - port: { get_resource: k8s_4_private_port }
272 user_data_format: RAW
273 user_data:
274 str_replace:
275 params:
Gary Wu14a6b302018-05-01 15:59:28 -0700276 __docker_proxy__: { get_param: docker_proxy }
277 __apt_proxy__: { get_param: apt_proxy }
278 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
279 template:
280 get_file: k8s_vm_entrypoint.sh
281
282 k8s_5_private_port:
283 type: OS::Neutron::Port
284 properties:
285 network: { get_resource: oam_network }
286 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
287 security_groups:
288 - { get_resource: onap_sg }
289
290 k8s_5_floating_ip:
291 type: OS::Neutron::FloatingIP
292 properties:
293 floating_network_id: { get_param: public_net_id }
294 port_id: { get_resource: k8s_5_private_port }
295
296 k8s_5_vm:
297 type: OS::Nova::Server
298 properties:
299 name: k8s_5
300 image: { get_param: ubuntu_1604_image }
301 flavor: { get_param: k8s_vm_flavor }
302 key_name: onap_key
303 networks:
304 - port: { get_resource: k8s_5_private_port }
305 user_data_format: RAW
306 user_data:
307 str_replace:
308 params:
Gary Wu14a6b302018-05-01 15:59:28 -0700309 __docker_proxy__: { get_param: docker_proxy }
310 __apt_proxy__: { get_param: apt_proxy }
311 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
312 template:
313 get_file: k8s_vm_entrypoint.sh
314
315 k8s_6_private_port:
316 type: OS::Neutron::Port
317 properties:
318 network: { get_resource: oam_network }
319 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
320 security_groups:
321 - { get_resource: onap_sg }
322
323 k8s_6_floating_ip:
324 type: OS::Neutron::FloatingIP
325 properties:
326 floating_network_id: { get_param: public_net_id }
327 port_id: { get_resource: k8s_6_private_port }
328
329 k8s_6_vm:
330 type: OS::Nova::Server
331 properties:
332 name: k8s_6
333 image: { get_param: ubuntu_1604_image }
334 flavor: { get_param: k8s_vm_flavor }
335 key_name: onap_key
336 networks:
337 - port: { get_resource: k8s_6_private_port }
338 user_data_format: RAW
339 user_data:
340 str_replace:
341 params:
Gary Wu14a6b302018-05-01 15:59:28 -0700342 __docker_proxy__: { get_param: docker_proxy }
343 __apt_proxy__: { get_param: apt_proxy }
344 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
345 template:
346 get_file: k8s_vm_entrypoint.sh
347
348 k8s_7_private_port:
349 type: OS::Neutron::Port
350 properties:
351 network: { get_resource: oam_network }
352 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
353 security_groups:
354 - { get_resource: onap_sg }
355
356 k8s_7_floating_ip:
357 type: OS::Neutron::FloatingIP
358 properties:
359 floating_network_id: { get_param: public_net_id }
360 port_id: { get_resource: k8s_7_private_port }
361
362 k8s_7_vm:
363 type: OS::Nova::Server
364 properties:
365 name: k8s_7
366 image: { get_param: ubuntu_1604_image }
367 flavor: { get_param: k8s_vm_flavor }
368 key_name: onap_key
369 networks:
370 - port: { get_resource: k8s_7_private_port }
371 user_data_format: RAW
372 user_data:
373 str_replace:
374 params:
Gary Wu14a6b302018-05-01 15:59:28 -0700375 __docker_proxy__: { get_param: docker_proxy }
376 __apt_proxy__: { get_param: apt_proxy }
377 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
Gary Wu1ff56672018-01-17 20:51:45 -0800378 template:
379 get_file: k8s_vm_entrypoint.sh
Gary Wu7b416392018-01-19 13:16:49 -0800380
Gary Wu14ee41d2018-01-19 15:03:59 -0800381outputs:
Gary Wu61034082018-01-22 12:48:50 -0800382 rancher_vm_ip:
383 description: The IP address of the rancher instance
Gary Wu5d325d02018-02-06 21:21:31 -0800384 value: { get_attr: [rancher_floating_ip, floating_ip_address] }
Gary Wu61034082018-01-22 12:48:50 -0800385
Gary Wu36e42dd2018-05-03 07:29:53 -0700386 k8s_1_vm_ip:
387 description: The IP address of the k8s_1 instance
388 value: { get_attr: [k8s_1_floating_ip, floating_ip_address] }
389
390 k8s_2_vm_ip:
391 description: The IP address of the k8s_2 instance
392 value: { get_attr: [k8s_2_floating_ip, floating_ip_address] }
393
394 k8s_3_vm_ip:
395 description: The IP address of the k8s_3 instance
396 value: { get_attr: [k8s_3_floating_ip, floating_ip_address] }
397
398 k8s_4_vm_ip:
399 description: The IP address of the k8s_4 instance
400 value: { get_attr: [k8s_4_floating_ip, floating_ip_address] }
401
402 k8s_5_vm_ip:
403 description: The IP address of the k8s_5 instance
404 value: { get_attr: [k8s_5_floating_ip, floating_ip_address] }
405
406 k8s_6_vm_ip:
407 description: The IP address of the k8s_6 instance
408 value: { get_attr: [k8s_6_floating_ip, floating_ip_address] }
409
410 k8s_7_vm_ip:
411 description: The IP address of the k8s_7 instance
412 value: { get_attr: [k8s_7_floating_ip, floating_ip_address] }
413