Merge "Remove the dependency on the MSB"
[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       external_gateway_info:
142         network: { get_param: public_net_id }
143
144   router_interface:
145     type: OS::Neutron::RouterInterface
146     properties:
147       router_id: { get_resource: router }
148       subnet_id: { get_resource: oam_subnet }
149
150   rancher_private_port:
151     type: OS::Neutron::Port
152     properties:
153       network: { get_resource: oam_network }
154       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
155       security_groups:
156       - { get_resource: onap_sg }
157
158   rancher_floating_ip:
159     type: OS::Neutron::FloatingIP
160     properties:
161       floating_network_id: { get_param: public_net_id }
162       port_id: { get_resource: rancher_private_port }
163
164   rancher_vm:
165     type: OS::Nova::Server
166     properties:
167       name: rancher
168       image: { get_param: ubuntu_1604_image }
169       flavor: { get_param: rancher_vm_flavor }
170       key_name: { get_param: key_name }
171       networks:
172       - port: { get_resource: rancher_private_port }
173       user_data_format: RAW
174       user_data:
175         str_replace:
176           template:
177             get_file: rancher_vm_entrypoint.sh
178           params:
179             __docker_proxy__: { get_param: docker_proxy }
180             __apt_proxy__: { get_param: apt_proxy }
181             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
182             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
183             __integration_override_yaml__: { get_param: integration_override_yaml }
184             __integration_gerrit_branch__: { get_param: integration_gerrit_branch }
185             __integration_gerrit_refspec__: { get_param: integration_gerrit_refspec }
186             __oom_gerrit_branch__: { get_param: oom_gerrit_branch }
187             __oom_gerrit_refspec__: { get_param: oom_gerrit_refspec }
188             __docker_manifest__: { get_param: docker_manifest }
189             __docker_version__: { get_param: docker_version }
190             __rancher_version__: { get_param: rancher_version }
191             __rancher_agent_version__: { get_param: rancher_agent_version }
192             __kubectl_version__: { get_param: kubectl_version }
193             __helm_version__: { get_param: helm_version }
194             __public_net_id__: { get_param: public_net_id }
195             __oam_network_cidr__: { get_param: oam_network_cidr }
196             __oam_network_id__: { get_resource: oam_network }
197             __oam_subnet_id__: { get_resource: oam_subnet }
198             __k8s_1_vm_ip__: { get_attr: [k8s_1_floating_ip, floating_ip_address] }
199             __k8s_vm_ips__: [
200               get_attr: [k8s_1_floating_ip, floating_ip_address],
201               get_attr: [k8s_2_floating_ip, floating_ip_address],
202               get_attr: [k8s_3_floating_ip, floating_ip_address],
203               get_attr: [k8s_4_floating_ip, floating_ip_address],
204             ]
205             __k8s_private_ips__: [
206               get_attr: [k8s_1_floating_ip, fixed_ip_address],
207               get_attr: [k8s_2_floating_ip, fixed_ip_address],
208               get_attr: [k8s_3_floating_ip, fixed_ip_address],
209               get_attr: [k8s_4_floating_ip, fixed_ip_address],
210             ]
211   k8s_1_private_port:
212     type: OS::Neutron::Port
213     properties:
214       network: { get_resource: oam_network }
215       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
216       security_groups:
217       - { get_resource: onap_sg }
218
219   k8s_1_floating_ip:
220     type: OS::Neutron::FloatingIP
221     properties:
222       floating_network_id: { get_param: public_net_id }
223       port_id: { get_resource: k8s_1_private_port }
224
225   k8s_1_vm:
226     type: OS::Nova::Server
227     properties:
228       name: k8s_1
229       image: { get_param: ubuntu_1604_image }
230       flavor: { get_param: k8s_vm_flavor }
231       key_name: { get_param: key_name }
232       networks:
233       - port: { get_resource: k8s_1_private_port }
234       user_data_format: RAW
235       user_data:
236         str_replace:
237           params:
238             __docker_proxy__: { get_param: docker_proxy }
239             __apt_proxy__: { get_param: apt_proxy }
240             __docker_version__: { get_param: docker_version }
241             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
242             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
243           template:
244             get_file: k8s_vm_entrypoint.sh
245
246   k8s_2_private_port:
247     type: OS::Neutron::Port
248     properties:
249       network: { get_resource: oam_network }
250       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
251       security_groups:
252       - { get_resource: onap_sg }
253
254   k8s_2_floating_ip:
255     type: OS::Neutron::FloatingIP
256     properties:
257       floating_network_id: { get_param: public_net_id }
258       port_id: { get_resource: k8s_2_private_port }
259
260   k8s_2_vm:
261     type: OS::Nova::Server
262     properties:
263       name: k8s_2
264       image: { get_param: ubuntu_1604_image }
265       flavor: { get_param: k8s_vm_flavor }
266       key_name: { get_param: key_name }
267       networks:
268       - port: { get_resource: k8s_2_private_port }
269       user_data_format: RAW
270       user_data:
271         str_replace:
272           params:
273             __docker_proxy__: { get_param: docker_proxy }
274             __apt_proxy__: { get_param: apt_proxy }
275             __docker_version__: { get_param: docker_version }
276             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
277             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
278           template:
279             get_file: k8s_vm_entrypoint.sh
280
281   k8s_3_private_port:
282     type: OS::Neutron::Port
283     properties:
284       network: { get_resource: oam_network }
285       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
286       security_groups:
287       - { get_resource: onap_sg }
288
289   k8s_3_floating_ip:
290     type: OS::Neutron::FloatingIP
291     properties:
292       floating_network_id: { get_param: public_net_id }
293       port_id: { get_resource: k8s_3_private_port }
294
295   k8s_3_vm:
296     type: OS::Nova::Server
297     properties:
298       name: k8s_3
299       image: { get_param: ubuntu_1604_image }
300       flavor: { get_param: k8s_vm_flavor }
301       key_name: { get_param: key_name }
302       networks:
303       - port: { get_resource: k8s_3_private_port }
304       user_data_format: RAW
305       user_data:
306         str_replace:
307           params:
308             __docker_proxy__: { get_param: docker_proxy }
309             __apt_proxy__: { get_param: apt_proxy }
310             __docker_version__: { get_param: docker_version }
311             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
312             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
313           template:
314             get_file: k8s_vm_entrypoint.sh
315
316   k8s_4_private_port:
317     type: OS::Neutron::Port
318     properties:
319       network: { get_resource: oam_network }
320       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
321       security_groups:
322       - { get_resource: onap_sg }
323
324   k8s_4_floating_ip:
325     type: OS::Neutron::FloatingIP
326     properties:
327       floating_network_id: { get_param: public_net_id }
328       port_id: { get_resource: k8s_4_private_port }
329
330   k8s_4_vm:
331     type: OS::Nova::Server
332     properties:
333       name: k8s_4
334       image: { get_param: ubuntu_1604_image }
335       flavor: { get_param: k8s_vm_flavor }
336       key_name: { get_param: key_name }
337       networks:
338       - port: { get_resource: k8s_4_private_port }
339       user_data_format: RAW
340       user_data:
341         str_replace:
342           params:
343             __docker_proxy__: { get_param: docker_proxy }
344             __apt_proxy__: { get_param: apt_proxy }
345             __docker_version__: { get_param: docker_version }
346             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
347             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
348           template:
349             get_file: k8s_vm_entrypoint.sh
350
351 outputs:
352   rancher_vm_ip:
353     description: The IP address of the rancher instance
354     value: { get_attr: [rancher_floating_ip, floating_ip_address] }
355
356   k8s_1_vm_ip:
357     description: The IP address of the k8s_1 instance
358     value: { get_attr: [k8s_1_floating_ip, floating_ip_address] }
359
360   k8s_2_vm_ip:
361     description: The IP address of the k8s_2 instance
362     value: { get_attr: [k8s_2_floating_ip, floating_ip_address] }
363
364   k8s_3_vm_ip:
365     description: The IP address of the k8s_3 instance
366     value: { get_attr: [k8s_3_floating_ip, floating_ip_address] }
367
368   k8s_4_vm_ip:
369     description: The IP address of the k8s_4 instance
370     value: { get_attr: [k8s_4_floating_ip, floating_ip_address] }
371