Merge "Add support for ODL credentials that have changed"
[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   integration_override_yaml:
35     type: string
36     description: Content for integration_override.yaml
37
38   integration_gerrit_branch:
39     type: string
40     default: "master"
41
42   integration_gerrit_refspec:
43     type: string
44     default: "refs/heads/master"
45
46   oom_gerrit_branch:
47     type: string
48     default: "master"
49
50   oom_gerrit_refspec:
51     type: string
52     default: "refs/heads/master"
53
54   docker_manifest:
55     type: string
56     default: ""
57
58   key_name:
59     type: string
60     default: "onap_key"
61
62   docker_version:
63     type: string
64     default: "17.03"
65
66   rancher_version:
67     type: string
68     default: "1.6.18"
69
70   rancher_agent_version:
71     type: string
72     default: "1.2.10"
73
74   kubectl_version:
75     type: string
76     default: "1.8.10"
77
78   helm_version:
79     type: string
80     default: "2.9.1"
81
82 resources:
83   random-str:
84     type: OS::Heat::RandomString
85     properties:
86       length: 4
87
88   # ONAP security group
89   onap_sg:
90     type: OS::Neutron::SecurityGroup
91     properties:
92       name:
93         str_replace:
94           template: base_rand
95           params:
96             base: onap_sg
97             rand: { get_resource: random-str }
98       description: security group used by ONAP
99       rules:
100         # All egress traffic
101         - direction: egress
102           ethertype: IPv4
103         - direction: egress
104           ethertype: IPv6
105         # ingress traffic
106         # ICMP
107         - protocol: icmp
108         - protocol: udp
109           port_range_min: 1
110           port_range_max: 65535
111         - protocol: tcp
112           port_range_min: 1
113           port_range_max: 65535
114
115
116   # ONAP management private network
117   oam_network:
118     type: OS::Neutron::Net
119     properties:
120       name:
121         str_replace:
122           template: oam_network_rand
123           params:
124             rand: { get_resource: random-str }
125
126   oam_subnet:
127     type: OS::Neutron::Subnet
128     properties:
129       name:
130         str_replace:
131           template: oam_network_rand
132           params:
133             rand: { get_resource: random-str }
134       network_id: { get_resource: oam_network }
135       cidr: { get_param: oam_network_cidr }
136       dns_nameservers: [ "8.8.8.8" ]
137
138   router:
139     type: OS::Neutron::Router
140     properties:
141       name:
142         list_join: ['-', [{ get_param: 'OS::stack_name' }, 'router']]
143       external_gateway_info:
144         network: { get_param: public_net_id }
145
146   router_interface:
147     type: OS::Neutron::RouterInterface
148     properties:
149       router_id: { get_resource: router }
150       subnet_id: { get_resource: oam_subnet }
151
152   rancher_private_port:
153     type: OS::Neutron::Port
154     properties:
155       network: { get_resource: oam_network }
156       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
157       security_groups:
158       - { get_resource: onap_sg }
159
160   rancher_floating_ip:
161     type: OS::Neutron::FloatingIP
162     properties:
163       floating_network_id: { get_param: public_net_id }
164       port_id: { get_resource: rancher_private_port }
165
166   rancher_vm:
167     type: OS::Nova::Server
168     properties:
169       name:
170         list_join: ['-', [{ get_param: 'OS::stack_name' }, 'rancher']]
171       image: { get_param: ubuntu_1604_image }
172       flavor: { get_param: rancher_vm_flavor }
173       key_name: { get_param: key_name }
174       networks:
175       - port: { get_resource: rancher_private_port }
176       user_data_format: RAW
177       user_data:
178         str_replace:
179           template:
180             get_file: rancher_vm_entrypoint.sh
181           params:
182             __docker_proxy__: { get_param: docker_proxy }
183             __apt_proxy__: { get_param: apt_proxy }
184             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
185             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
186             __integration_override_yaml__: { get_param: integration_override_yaml }
187             __integration_gerrit_branch__: { get_param: integration_gerrit_branch }
188             __integration_gerrit_refspec__: { get_param: integration_gerrit_refspec }
189             __oom_gerrit_branch__: { get_param: oom_gerrit_branch }
190             __oom_gerrit_refspec__: { get_param: oom_gerrit_refspec }
191             __docker_manifest__: { get_param: docker_manifest }
192             __docker_version__: { get_param: docker_version }
193             __rancher_version__: { get_param: rancher_version }
194             __rancher_agent_version__: { get_param: rancher_agent_version }
195             __kubectl_version__: { get_param: kubectl_version }
196             __helm_version__: { get_param: helm_version }
197             __public_net_id__: { get_param: public_net_id }
198             __oam_network_cidr__: { get_param: oam_network_cidr }
199             __oam_network_id__: { get_resource: oam_network }
200             __oam_subnet_id__: { get_resource: oam_subnet }
201             __k8s_1_vm_ip__: { get_attr: [k8s_1_floating_ip, floating_ip_address] }
202             __k8s_vm_ips__: [
203               get_attr: [k8s_1_floating_ip, floating_ip_address],
204               get_attr: [k8s_2_floating_ip, floating_ip_address],
205               get_attr: [k8s_3_floating_ip, floating_ip_address],
206               get_attr: [k8s_4_floating_ip, floating_ip_address],
207               get_attr: [k8s_5_floating_ip, floating_ip_address],
208             ]
209             __k8s_private_ips__: [
210               get_attr: [k8s_1_floating_ip, fixed_ip_address],
211               get_attr: [k8s_2_floating_ip, fixed_ip_address],
212               get_attr: [k8s_3_floating_ip, fixed_ip_address],
213               get_attr: [k8s_4_floating_ip, fixed_ip_address],
214               get_attr: [k8s_5_floating_ip, fixed_ip_address],
215             ]
216   k8s_1_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_1_floating_ip:
225     type: OS::Neutron::FloatingIP
226     properties:
227       floating_network_id: { get_param: public_net_id }
228       port_id: { get_resource: k8s_1_private_port }
229
230   k8s_1_vm:
231     type: OS::Nova::Server
232     properties:
233       name:
234         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s_1']]
235       image: { get_param: ubuntu_1604_image }
236       flavor: { get_param: k8s_vm_flavor }
237       key_name: { get_param: key_name }
238       networks:
239       - port: { get_resource: k8s_1_private_port }
240       user_data_format: RAW
241       user_data:
242         str_replace:
243           params:
244             __docker_proxy__: { get_param: docker_proxy }
245             __apt_proxy__: { get_param: apt_proxy }
246             __docker_version__: { get_param: docker_version }
247             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
248             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
249           template:
250             get_file: k8s_vm_entrypoint.sh
251
252   k8s_2_private_port:
253     type: OS::Neutron::Port
254     properties:
255       network: { get_resource: oam_network }
256       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
257       security_groups:
258       - { get_resource: onap_sg }
259
260   k8s_2_floating_ip:
261     type: OS::Neutron::FloatingIP
262     properties:
263       floating_network_id: { get_param: public_net_id }
264       port_id: { get_resource: k8s_2_private_port }
265
266   k8s_2_vm:
267     type: OS::Nova::Server
268     properties:
269       name:
270         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s_2']]
271       image: { get_param: ubuntu_1604_image }
272       flavor: { get_param: k8s_vm_flavor }
273       key_name: { get_param: key_name }
274       networks:
275       - port: { get_resource: k8s_2_private_port }
276       user_data_format: RAW
277       user_data:
278         str_replace:
279           params:
280             __docker_proxy__: { get_param: docker_proxy }
281             __apt_proxy__: { get_param: apt_proxy }
282             __docker_version__: { get_param: docker_version }
283             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
284             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
285           template:
286             get_file: k8s_vm_entrypoint.sh
287
288   k8s_3_private_port:
289     type: OS::Neutron::Port
290     properties:
291       network: { get_resource: oam_network }
292       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
293       security_groups:
294       - { get_resource: onap_sg }
295
296   k8s_3_floating_ip:
297     type: OS::Neutron::FloatingIP
298     properties:
299       floating_network_id: { get_param: public_net_id }
300       port_id: { get_resource: k8s_3_private_port }
301
302   k8s_3_vm:
303     type: OS::Nova::Server
304     properties:
305       name:
306         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s_3']]
307       image: { get_param: ubuntu_1604_image }
308       flavor: { get_param: k8s_vm_flavor }
309       key_name: { get_param: key_name }
310       networks:
311       - port: { get_resource: k8s_3_private_port }
312       user_data_format: RAW
313       user_data:
314         str_replace:
315           params:
316             __docker_proxy__: { get_param: docker_proxy }
317             __apt_proxy__: { get_param: apt_proxy }
318             __docker_version__: { get_param: docker_version }
319             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
320             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
321           template:
322             get_file: k8s_vm_entrypoint.sh
323
324   k8s_4_private_port:
325     type: OS::Neutron::Port
326     properties:
327       network: { get_resource: oam_network }
328       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
329       security_groups:
330       - { get_resource: onap_sg }
331
332   k8s_4_floating_ip:
333     type: OS::Neutron::FloatingIP
334     properties:
335       floating_network_id: { get_param: public_net_id }
336       port_id: { get_resource: k8s_4_private_port }
337
338   k8s_4_vm:
339     type: OS::Nova::Server
340     properties:
341       name:
342         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s_4']]
343       image: { get_param: ubuntu_1604_image }
344       flavor: { get_param: k8s_vm_flavor }
345       key_name: { get_param: key_name }
346       networks:
347       - port: { get_resource: k8s_4_private_port }
348       user_data_format: RAW
349       user_data:
350         str_replace:
351           params:
352             __docker_proxy__: { get_param: docker_proxy }
353             __apt_proxy__: { get_param: apt_proxy }
354             __docker_version__: { get_param: docker_version }
355             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
356             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
357           template:
358             get_file: k8s_vm_entrypoint.sh
359
360   k8s_5_private_port:
361     type: OS::Neutron::Port
362     properties:
363       network: { get_resource: oam_network }
364       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
365       security_groups:
366       - { get_resource: onap_sg }
367
368   k8s_5_floating_ip:
369     type: OS::Neutron::FloatingIP
370     properties:
371       floating_network_id: { get_param: public_net_id }
372       port_id: { get_resource: k8s_5_private_port }
373
374   k8s_5_vm:
375     type: OS::Nova::Server
376     properties:
377       name:
378         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s_5']]
379       image: { get_param: ubuntu_1604_image }
380       flavor: { get_param: k8s_vm_flavor }
381       key_name: { get_param: key_name }
382       networks:
383       - port: { get_resource: k8s_5_private_port }
384       user_data_format: RAW
385       user_data:
386         str_replace:
387           params:
388             __docker_proxy__: { get_param: docker_proxy }
389             __apt_proxy__: { get_param: apt_proxy }
390             __docker_version__: { get_param: docker_version }
391             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
392             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
393           template:
394             get_file: k8s_vm_entrypoint.sh
395
396 outputs:
397   rancher_vm_ip:
398     description: The IP address of the rancher instance
399     value: { get_attr: [rancher_floating_ip, floating_ip_address] }
400
401   k8s_1_vm_ip:
402     description: The IP address of the k8s_1 instance
403     value: { get_attr: [k8s_1_floating_ip, floating_ip_address] }
404
405   k8s_2_vm_ip:
406     description: The IP address of the k8s_2 instance
407     value: { get_attr: [k8s_2_floating_ip, floating_ip_address] }
408
409   k8s_3_vm_ip:
410     description: The IP address of the k8s_3 instance
411     value: { get_attr: [k8s_3_floating_ip, floating_ip_address] }
412
413   k8s_4_vm_ip:
414     description: The IP address of the k8s_4 instance
415     value: { get_attr: [k8s_4_floating_ip, floating_ip_address] }
416
417   k8s_5_vm_ip:
418     description: The IP address of the k8s_5 instance
419     value: { get_attr: [k8s_5_floating_ip, floating_ip_address] }
420