blob: 867f242d9f86b683ad83018eec178e4dce5b18c7 [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 Wu81836d22018-06-22 13:48:50 -070038 gerrit_branch:
39 type: string
40 default: "master"
41
42 gerrit_refspec:
43 type: string
44 default: "refs/heads/master"
45
46 docker_manifest:
47 type: string
48 default: "docker-manifest.csv"
49
gwu10db4622018-07-17 22:11:39 -070050 key_name:
51 type: string
52 default: "onap_key"
53
Gary Wuccd529b2018-01-16 18:31:01 -080054resources:
Gary Wuc98156d2018-01-18 12:03:26 -080055 random-str:
56 type: OS::Heat::RandomString
57 properties:
58 length: 4
59
Gary Wubc11e5d2018-02-07 10:23:27 -080060 # ONAP security group
61 onap_sg:
62 type: OS::Neutron::SecurityGroup
63 properties:
64 name:
65 str_replace:
66 template: base_rand
67 params:
68 base: onap_sg
69 rand: { get_resource: random-str }
70 description: security group used by ONAP
71 rules:
72 # All egress traffic
73 - direction: egress
74 ethertype: IPv4
75 - direction: egress
76 ethertype: IPv6
77 # ingress traffic
78 # ICMP
79 - protocol: icmp
80 - protocol: udp
81 port_range_min: 1
82 port_range_max: 65535
83 - protocol: tcp
84 port_range_min: 1
85 port_range_max: 65535
86
87
Gary Wu52dfdcb2018-01-25 11:02:48 -080088 # ONAP management private network
89 oam_network:
90 type: OS::Neutron::Net
91 properties:
92 name:
93 str_replace:
94 template: oam_network_rand
95 params:
96 rand: { get_resource: random-str }
97
98 oam_subnet:
99 type: OS::Neutron::Subnet
100 properties:
101 name:
102 str_replace:
103 template: oam_network_rand
104 params:
105 rand: { get_resource: random-str }
106 network_id: { get_resource: oam_network }
107 cidr: { get_param: oam_network_cidr }
Gary Wu14a6b302018-05-01 15:59:28 -0700108 dns_nameservers: [ "8.8.8.8" ]
Gary Wu52dfdcb2018-01-25 11:02:48 -0800109
110 router:
111 type: OS::Neutron::Router
112 properties:
113 external_gateway_info:
114 network: { get_param: public_net_id }
115
116 router_interface:
117 type: OS::Neutron::RouterInterface
118 properties:
119 router_id: { get_resource: router }
120 subnet_id: { get_resource: oam_subnet }
121
Gary Wu374498a2018-02-06 17:31:04 -0800122 rancher_private_port:
123 type: OS::Neutron::Port
124 properties:
125 network: { get_resource: oam_network }
126 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
Gary Wubc11e5d2018-02-07 10:23:27 -0800127 security_groups:
128 - { get_resource: onap_sg }
Gary Wu374498a2018-02-06 17:31:04 -0800129
130 rancher_floating_ip:
131 type: OS::Neutron::FloatingIP
132 properties:
133 floating_network_id: { get_param: public_net_id }
134 port_id: { get_resource: rancher_private_port }
135
Gary Wuccd529b2018-01-16 18:31:01 -0800136 rancher_vm:
137 type: OS::Nova::Server
138 properties:
139 name: rancher
Gary Wu558ac6e2018-01-19 14:53:12 -0800140 image: { get_param: ubuntu_1604_image }
Gary Wu60dd0d82018-01-18 14:54:47 -0800141 flavor: { get_param: rancher_vm_flavor }
gwu10db4622018-07-17 22:11:39 -0700142 key_name: { get_param: key_name }
Gary Wuccd529b2018-01-16 18:31:01 -0800143 networks:
Gary Wu374498a2018-02-06 17:31:04 -0800144 - port: { get_resource: rancher_private_port }
Gary Wuccd529b2018-01-16 18:31:01 -0800145 user_data_format: RAW
146 user_data:
147 str_replace:
Gary Wu1ff56672018-01-17 20:51:45 -0800148 template:
149 get_file: rancher_vm_entrypoint.sh
Gary Wu14a6b302018-05-01 15:59:28 -0700150 params:
Gary Wu14a6b302018-05-01 15:59:28 -0700151 __docker_proxy__: { get_param: docker_proxy }
152 __apt_proxy__: { get_param: apt_proxy }
153 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
Gary Wuad513722018-07-26 13:08:47 -0700154 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
Gary Wu11c98742018-05-02 16:19:04 -0700155 __integration_override_yaml__: { get_param: integration_override_yaml }
Gary Wu81836d22018-06-22 13:48:50 -0700156 __gerrit_branch__: { get_param: gerrit_branch }
157 __gerrit_refspec__: { get_param: gerrit_refspec }
158 __docker_manifest__: { get_param: docker_manifest }
Gary Wu978171e2018-07-24 11:56:01 -0700159 __public_net_id__: { get_param: public_net_id }
160 __oam_network_cidr__: { get_param: oam_network_cidr }
Gary Wu11c98742018-05-02 16:19:04 -0700161 __oam_network_id__: { get_resource: oam_network }
162 __oam_subnet_id__: { get_resource: oam_subnet }
Gary Wu0a671622018-05-14 12:59:03 -0700163 __k8s_1_vm_ip__: { get_attr: [k8s_1_floating_ip, floating_ip_address] }
Gary Wu14a6b302018-05-01 15:59:28 -0700164 __k8s_vm_ips__: [
165 get_attr: [k8s_1_floating_ip, floating_ip_address],
166 get_attr: [k8s_2_floating_ip, floating_ip_address],
167 get_attr: [k8s_3_floating_ip, floating_ip_address],
168 get_attr: [k8s_4_floating_ip, floating_ip_address],
169 get_attr: [k8s_5_floating_ip, floating_ip_address],
Gary Wu14a6b302018-05-01 15:59:28 -0700170 ]
Gary Wuad513722018-07-26 13:08:47 -0700171 __k8s_private_ips__: [
172 get_attr: [k8s_1_floating_ip, fixed_ip_address],
173 get_attr: [k8s_2_floating_ip, fixed_ip_address],
174 get_attr: [k8s_3_floating_ip, fixed_ip_address],
175 get_attr: [k8s_4_floating_ip, fixed_ip_address],
176 get_attr: [k8s_5_floating_ip, fixed_ip_address],
Gary Wuad513722018-07-26 13:08:47 -0700177 ]
Gary Wu14a6b302018-05-01 15:59:28 -0700178 k8s_1_private_port:
Gary Wu52dfdcb2018-01-25 11:02:48 -0800179 type: OS::Neutron::Port
180 properties:
181 network: { get_resource: oam_network }
182 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
Gary Wubc11e5d2018-02-07 10:23:27 -0800183 security_groups:
184 - { get_resource: onap_sg }
Gary Wu52dfdcb2018-01-25 11:02:48 -0800185
Gary Wu14a6b302018-05-01 15:59:28 -0700186 k8s_1_floating_ip:
Gary Wu52dfdcb2018-01-25 11:02:48 -0800187 type: OS::Neutron::FloatingIP
188 properties:
189 floating_network_id: { get_param: public_net_id }
Gary Wu14a6b302018-05-01 15:59:28 -0700190 port_id: { get_resource: k8s_1_private_port }
Gary Wu52dfdcb2018-01-25 11:02:48 -0800191
Gary Wu14a6b302018-05-01 15:59:28 -0700192 k8s_1_vm:
Gary Wuccd529b2018-01-16 18:31:01 -0800193 type: OS::Nova::Server
194 properties:
Gary Wu14a6b302018-05-01 15:59:28 -0700195 name: k8s_1
Gary Wu558ac6e2018-01-19 14:53:12 -0800196 image: { get_param: ubuntu_1604_image }
Gary Wu60dd0d82018-01-18 14:54:47 -0800197 flavor: { get_param: k8s_vm_flavor }
gwu10db4622018-07-17 22:11:39 -0700198 key_name: { get_param: key_name }
Gary Wuccd529b2018-01-16 18:31:01 -0800199 networks:
Gary Wu14a6b302018-05-01 15:59:28 -0700200 - port: { get_resource: k8s_1_private_port }
Gary Wuccd529b2018-01-16 18:31:01 -0800201 user_data_format: RAW
202 user_data:
203 str_replace:
204 params:
205 __docker_proxy__: { get_param: docker_proxy }
206 __apt_proxy__: { get_param: apt_proxy }
Gary Wu5d325d02018-02-06 21:21:31 -0800207 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
Gary Wuad513722018-07-26 13:08:47 -0700208 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
Gary Wu14a6b302018-05-01 15:59:28 -0700209 template:
210 get_file: k8s_vm_entrypoint.sh
211
212 k8s_2_private_port:
213 type: OS::Neutron::Port
214 properties:
215 network: { get_resource: oam_network }
216 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
217 security_groups:
218 - { get_resource: onap_sg }
219
220 k8s_2_floating_ip:
221 type: OS::Neutron::FloatingIP
222 properties:
223 floating_network_id: { get_param: public_net_id }
224 port_id: { get_resource: k8s_2_private_port }
225
226 k8s_2_vm:
227 type: OS::Nova::Server
228 properties:
229 name: k8s_2
230 image: { get_param: ubuntu_1604_image }
231 flavor: { get_param: k8s_vm_flavor }
gwu10db4622018-07-17 22:11:39 -0700232 key_name: { get_param: key_name }
Gary Wu14a6b302018-05-01 15:59:28 -0700233 networks:
234 - port: { get_resource: k8s_2_private_port }
235 user_data_format: RAW
236 user_data:
237 str_replace:
238 params:
Gary Wu14a6b302018-05-01 15:59:28 -0700239 __docker_proxy__: { get_param: docker_proxy }
240 __apt_proxy__: { get_param: apt_proxy }
241 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
Gary Wuad513722018-07-26 13:08:47 -0700242 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
Gary Wu14a6b302018-05-01 15:59:28 -0700243 template:
244 get_file: k8s_vm_entrypoint.sh
245
246 k8s_3_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_3_floating_ip:
255 type: OS::Neutron::FloatingIP
256 properties:
257 floating_network_id: { get_param: public_net_id }
258 port_id: { get_resource: k8s_3_private_port }
259
260 k8s_3_vm:
261 type: OS::Nova::Server
262 properties:
263 name: k8s_3
264 image: { get_param: ubuntu_1604_image }
265 flavor: { get_param: k8s_vm_flavor }
gwu10db4622018-07-17 22:11:39 -0700266 key_name: { get_param: key_name }
Gary Wu14a6b302018-05-01 15:59:28 -0700267 networks:
268 - port: { get_resource: k8s_3_private_port }
269 user_data_format: RAW
270 user_data:
271 str_replace:
272 params:
Gary Wu14a6b302018-05-01 15:59:28 -0700273 __docker_proxy__: { get_param: docker_proxy }
274 __apt_proxy__: { get_param: apt_proxy }
275 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
Gary Wuad513722018-07-26 13:08:47 -0700276 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
Gary Wu14a6b302018-05-01 15:59:28 -0700277 template:
278 get_file: k8s_vm_entrypoint.sh
279
280 k8s_4_private_port:
281 type: OS::Neutron::Port
282 properties:
283 network: { get_resource: oam_network }
284 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
285 security_groups:
286 - { get_resource: onap_sg }
287
288 k8s_4_floating_ip:
289 type: OS::Neutron::FloatingIP
290 properties:
291 floating_network_id: { get_param: public_net_id }
292 port_id: { get_resource: k8s_4_private_port }
293
294 k8s_4_vm:
295 type: OS::Nova::Server
296 properties:
297 name: k8s_4
298 image: { get_param: ubuntu_1604_image }
299 flavor: { get_param: k8s_vm_flavor }
gwu10db4622018-07-17 22:11:39 -0700300 key_name: { get_param: key_name }
Gary Wu14a6b302018-05-01 15:59:28 -0700301 networks:
302 - port: { get_resource: k8s_4_private_port }
303 user_data_format: RAW
304 user_data:
305 str_replace:
306 params:
Gary Wu14a6b302018-05-01 15:59:28 -0700307 __docker_proxy__: { get_param: docker_proxy }
308 __apt_proxy__: { get_param: apt_proxy }
309 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
Gary Wuad513722018-07-26 13:08:47 -0700310 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
Gary Wu14a6b302018-05-01 15:59:28 -0700311 template:
312 get_file: k8s_vm_entrypoint.sh
313
314 k8s_5_private_port:
315 type: OS::Neutron::Port
316 properties:
317 network: { get_resource: oam_network }
318 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
319 security_groups:
320 - { get_resource: onap_sg }
321
322 k8s_5_floating_ip:
323 type: OS::Neutron::FloatingIP
324 properties:
325 floating_network_id: { get_param: public_net_id }
326 port_id: { get_resource: k8s_5_private_port }
327
328 k8s_5_vm:
329 type: OS::Nova::Server
330 properties:
331 name: k8s_5
332 image: { get_param: ubuntu_1604_image }
333 flavor: { get_param: k8s_vm_flavor }
gwu10db4622018-07-17 22:11:39 -0700334 key_name: { get_param: key_name }
Gary Wu14a6b302018-05-01 15:59:28 -0700335 networks:
336 - port: { get_resource: k8s_5_private_port }
337 user_data_format: RAW
338 user_data:
339 str_replace:
340 params:
Gary Wu14a6b302018-05-01 15:59:28 -0700341 __docker_proxy__: { get_param: docker_proxy }
342 __apt_proxy__: { get_param: apt_proxy }
343 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
Gary Wuad513722018-07-26 13:08:47 -0700344 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
Gary Wu14a6b302018-05-01 15:59:28 -0700345 template:
346 get_file: k8s_vm_entrypoint.sh
347
Gary Wu14ee41d2018-01-19 15:03:59 -0800348outputs:
Gary Wu61034082018-01-22 12:48:50 -0800349 rancher_vm_ip:
350 description: The IP address of the rancher instance
Gary Wu5d325d02018-02-06 21:21:31 -0800351 value: { get_attr: [rancher_floating_ip, floating_ip_address] }
Gary Wu61034082018-01-22 12:48:50 -0800352
Gary Wu36e42dd2018-05-03 07:29:53 -0700353 k8s_1_vm_ip:
354 description: The IP address of the k8s_1 instance
355 value: { get_attr: [k8s_1_floating_ip, floating_ip_address] }
356
357 k8s_2_vm_ip:
358 description: The IP address of the k8s_2 instance
359 value: { get_attr: [k8s_2_floating_ip, floating_ip_address] }
360
361 k8s_3_vm_ip:
362 description: The IP address of the k8s_3 instance
363 value: { get_attr: [k8s_3_floating_ip, floating_ip_address] }
364
365 k8s_4_vm_ip:
366 description: The IP address of the k8s_4 instance
367 value: { get_attr: [k8s_4_floating_ip, floating_ip_address] }
368
369 k8s_5_vm_ip:
370 description: The IP address of the k8s_5 instance
371 value: { get_attr: [k8s_5_floating_ip, floating_ip_address] }
372