1 ##########################################################################
3 #==================LICENSE_START==========================================
6 # Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
8 # Licensed under the Apache License, Version 2.0 (the "License");
9 # you may not use this file except in compliance with the License.
10 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
19 #==================LICENSE_END============================================
21 # ECOMP is a trademark and service mark of AT&T Intellectual Property.
23 ##########################################################################
25 heat_template_version: 2013-05-23
27 description: Heat template to deploy vLoadBalancer/vDNS demo app for ONAP
38 label: Image name or ID
39 description: Image to be used for compute instance
43 description: Type of instance (flavor) to be used
46 label: Public network name or ID
47 description: Public network that enables remote connection to VNF
50 label: vLoadBalancer private network name or ID
51 description: Private network that connects vLoadBalancer with vDNSs
52 pktgen_private_net_id:
54 label: vPacketGen private network name or ID
55 description: Private network that connects vLoadBalancer with vPacketGen
58 label: ECOMP management network name or ID
59 description: Private network that connects ONAP component and the VNF
60 onap_private_subnet_id:
62 label: ECOMP management sub-network name or ID
63 description: Private sub-network that connects ONAP component and the VNF
66 label: vLoadBalancer private network CIDR
67 description: The CIDR of the vLoadBalancer private network
68 pktgen_private_net_cidr:
70 label: vPacketGen private network CIDR
71 description: The CIDR of the vPacketGen private network
72 onap_private_net_cidr:
74 label: ONAP private network CIDR
75 description: The CIDR of the protected private network
78 label: vLoadBalancer private IP address towards the private network
79 description: Private IP address that is assigned to the vLoadBalancer to communicate with the vDNSs
82 label: vLoadBalancer private IP address towards the ONAP management network
83 description: Private IP address that is assigned to the vLoadBalancer to communicate with ONAP components
86 label: vLoadBalancer private IP address towards the vPacketGen network
87 description: Private IP address that is assigned to the vLoadBalancer to communicate with vPacketGen
90 label: vDNS private IP address towards the private network
91 description: Private IP address that is assigned to the vDNS to communicate with the vLoadBalancer
94 label: vDNS private IP address towards the ONAP management network
95 description: Private IP address that is assigned to the vDNS to communicate with ONAP components
98 label: vPacketGen private IP address towards the vPacketGen private network
99 description: Private IP address that is assigned to the vPacketGen to communicate with the vLoadBalancer
102 label: vPacketGen private IP address towards the ONAP management network
103 description: Private IP address that is assigned to the vPacketGen to communicate with ONAP components
106 label: Virtual Private IP of the vLoadBalancer
107 description: Virtual Private IP that is assigned to the vLoadBalancer's VPP layer
110 label: IP Address of the GRE tunnel
111 description: IP address assigned to the GRE tunnel on the vLoadBalancer
114 label: IP Address of the output vPacketGen interface
115 description: IP address assigned to the output interface of the vPacketGen's VPP layer
118 label: vLoadBalancer name
119 description: Name of the vLoadBalancer
123 description: Name of the vDNS
127 description: Name of the vPKTGEN
131 description: The VNF ID is provided by ONAP
134 label: vFirewall module ID
135 description: The vLoadBalancer Module ID is provided by ONAP
138 label: DCAE collector IP address
139 description: IP address of the DCAE collector
142 label: DCAE collector port
143 description: Port of the DCAE collector
147 description: Public/Private key pair name
151 description: Public key to be installed on the compute instance
154 label: Repository URL
155 description: URL of the repository that hosts the demo packages
158 label: Repository URL
159 description: URL of the repository that hosts the demo packages
160 demo_artifacts_version:
162 label: Artifacts version used in demo vnfs
163 description: Artifacts (jar, tar.gz) version used in demo vnfs
164 install_script_version:
166 label: Installation script version number
167 description: Version number of the scripts that install the vFW demo app
170 label: Cloud environment
171 description: Cloud environment (e.g., openstack, rackspace)
182 type: OS::Heat::RandomString
187 type: OS::Nova::KeyPair
193 base: { get_param: key_name }
194 rand: { get_resource: random-str }
195 public_key: { get_param: pub_key }
196 save_private_key: false
199 type: OS::Neutron::Net
201 name: { get_param: vlb_private_net_id }
204 type: OS::Neutron::Subnet
206 name: { get_param: vlb_private_net_id }
207 network_id: { get_resource: vlb_private_network }
208 cidr: { get_param: vlb_private_net_cidr }
210 pktgen_private_network:
211 type: OS::Neutron::Net
213 name: { get_param: pktgen_private_net_id }
215 pktgen_private_subnet:
216 type: OS::Neutron::Subnet
218 name: { get_param: pktgen_private_net_id }
219 network_id: { get_resource: pktgen_private_network }
220 cidr: { get_param: pktgen_private_net_cidr }
223 type: OS::Neutron::Port
225 network: { get_resource: vlb_private_network }
226 fixed_ips: [{"subnet": { get_resource: vlb_private_subnet }, "ip_address": { get_param: vlb_private_ip_0 }}]
229 type: OS::Neutron::Port
231 network: { get_param: onap_private_net_id }
232 fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vlb_private_ip_1 }}]
235 type: OS::Neutron::Port
237 network: { get_resource: pktgen_private_network }
238 fixed_ips: [{"subnet": { get_resource: pktgen_private_subnet }, "ip_address": { get_param: vlb_private_ip_2 }}]
241 type: OS::Nova::Server
243 image: { get_param: vlb_image_name }
244 flavor: { get_param: vlb_flavor_name }
245 name: { get_param: vlb_name_0 }
246 key_name: { get_resource: my_keypair }
248 - network: { get_param: public_net_id }
249 - port: { get_resource: vlb_private_0_port }
250 - port: { get_resource: vlb_private_1_port }
251 - port: { get_resource: vlb_private_2_port }
252 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
253 user_data_format: RAW
257 __dcae_collector_ip__: { get_param: dcae_collector_ip }
258 __dcae_collector_port__: { get_param: dcae_collector_port }
259 __ip_to_dns_net__: { get_param: vlb_private_ip_0 }
260 __ip_to_pktgen_net__: { get_param: vlb_private_ip_2 }
261 __oam_vpktgen_ip__: { get_param: vpg_private_ip_1 }
262 __vip__: { get_param: vip }
263 __gre_ipaddr__: { get_param: gre_ipaddr }
264 __pktgen_ipaddr__: { get_param: vpg_private_ip_0 }
265 __oam_private_ipaddr__: { get_param: vlb_private_ip_1 }
266 __repo_url_blob__: { get_param: repo_url_blob }
267 __repo_url_artifacts__: { get_param: repo_url_artifacts }
268 __demo_artifacts_version__: { get_param: demo_artifacts_version }
269 __install_script_version__: { get_param: install_script_version }
270 __vlb_private_net_cidr__: { get_param: vlb_private_net_cidr }
271 __onap_private_net_cidr__: { get_param: onap_private_net_cidr }
272 __pktgen_private_net_cidr__: { get_param: pktgen_private_net_cidr }
273 __pktgen_mac__: { get_attr: [vpg_private_0_port, mac_address] }
274 __cloud_env__: { get_param: cloud_env }
278 # Create configuration files
280 echo "__dcae_collector_ip__" > /opt/config/dcae_collector_ip.txt
281 echo "__dcae_collector_port__" > /opt/config/dcae_collector_port.txt
282 echo "__ip_to_dns_net__" > /opt/config/ip_to_dns_net.txt
283 echo "__ip_to_pktgen_net__" > /opt/config/ip_to_pktgen_net.txt
284 echo "__oam_vpktgen_ip__" > /opt/config/oam_vpktgen_ip.txt
285 echo "__vip__" > /opt/config/vip.txt
286 echo "__gre_ipaddr__" > /opt/config/gre_ipaddr.txt
287 echo "__pktgen_ipaddr__" > /opt/config/pktgen_ipaddr.txt
288 echo "__oam_private_ipaddr__" > /opt/config/oam_private_ipaddr.txt
289 echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt
290 echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt
291 echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
292 echo "__install_script_version__" > /opt/config/install_script_version.txt
293 echo "__vlb_private_net_cidr__" > /opt/config/vlb_private_net_cidr.txt
294 echo "__pktgen_private_net_cidr__" > /opt/config/pktgen_private_net_cidr.txt
295 echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt
296 echo "__pktgen_mac__" > /opt/config/pktgen_mac.txt
297 echo "__cloud_env__" > /opt/config/cloud_env.txt
299 # Download and run install script
300 curl -k __repo_url_blob__/org.onap.demo/vnfs/vlbms/__install_script_version__/v_lb_install.sh -o /opt/v_lb_install.sh
302 chmod +x v_lb_install.sh
307 type: OS::Neutron::Port
309 network: { get_resource: vlb_private_network }
310 fixed_ips: [{"subnet": { get_resource: vlb_private_subnet }, "ip_address": { get_param: vdns_private_ip_0 }}]
313 type: OS::Neutron::Port
315 network: { get_param: onap_private_net_id }
316 fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vdns_private_ip_1 }}]
319 type: OS::Nova::Server
321 image: { get_param: vlb_image_name }
322 flavor: { get_param: vlb_flavor_name }
323 name: { get_param: vdns_name_0 }
324 key_name: { get_resource: my_keypair }
326 - network: { get_param: public_net_id }
327 - port: { get_resource: vdns_private_0_port }
328 - port: { get_resource: vdns_private_1_port }
329 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
330 user_data_format: RAW
334 __lb_oam_int__: { get_param: vlb_private_ip_1 }
335 __lb_private_ipaddr__: { get_param: vlb_private_ip_0 }
336 __lb_public_ipaddr__: { get_attr: [vlb_0, networks, { get_param: public_net_id }, 0]}
337 __local_private_ipaddr__: { get_param: vdns_private_ip_0 }
338 __oam_private_ipaddr__: { get_param: vdns_private_ip_1 }
339 __repo_url_blob__: { get_param: repo_url_blob }
340 __repo_url_artifacts__: { get_param: repo_url_artifacts }
341 __demo_artifacts_version__: { get_param: demo_artifacts_version }
342 __install_script_version__: { get_param: install_script_version }
343 __vlb_private_net_cidr__: { get_param: vlb_private_net_cidr }
344 __onap_private_net_cidr__: { get_param: onap_private_net_cidr }
345 __cloud_env__: { get_param: cloud_env }
349 # Create configuration files
351 echo "__lb_oam_int__" > /opt/config/lb_oam_int.txt
352 echo "__lb_private_ipaddr__" > /opt/config/lb_private_ipaddr.txt
353 echo "__lb_public_ipaddr__" > /opt/config/lb_public_ipaddr.txt
354 echo "__local_private_ipaddr__" > /opt/config/local_private_ipaddr.txt
355 echo "__oam_private_ipaddr__" > /opt/config/oam_private_ipaddr.txt
356 echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt
357 echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt
358 echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
359 echo "__install_script_version__" > /opt/config/install_script_version.txt
360 echo "__vlb_private_net_cidr__" > /opt/config/vlb_private_net_cidr.txt
361 echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt
362 echo "__cloud_env__" > /opt/config/cloud_env.txt
364 # Download and run install script
365 curl -k __repo_url_blob__/org.onap.demo/vnfs/vlbms/__install_script_version__/v_dns_install.sh -o /opt/v_dns_install.sh
367 chmod +x v_dns_install.sh
372 type: OS::Neutron::Port
374 network: { get_resource: pktgen_private_network }
375 fixed_ips: [{"subnet": { get_resource: pktgen_private_subnet }, "ip_address": { get_param: vpg_private_ip_0 }}]
378 type: OS::Neutron::Port
380 network: { get_param: onap_private_net_id }
381 fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vpg_private_ip_1 }}]
384 type: OS::Nova::Server
386 image: { get_param: vlb_image_name }
387 flavor: { get_param: vlb_flavor_name }
388 name: { get_param: vpg_name_0 }
389 key_name: { get_resource: my_keypair }
391 - network: { get_param: public_net_id }
392 - port: { get_resource: vpg_private_0_port }
393 - port: { get_resource: vpg_private_1_port }
394 user_data_format: RAW
398 __repo_url_blob__: { get_param: repo_url_blob }
399 __repo_url_artifacts__: { get_param: repo_url_artifacts }
400 __local_private_ipaddr__: { get_param: vpg_private_ip_0 }
401 __oam_private_ipaddr__: { get_param: vpg_private_ip_1 }
402 __onap_private_net_cidr__: { get_param: onap_private_net_cidr }
403 __pktgen_private_net_cidr__: { get_param: pktgen_private_net_cidr }
404 __vlb_ipaddr__: { get_param: vlb_private_ip_2 }
405 __demo_artifacts_version__: { get_param: demo_artifacts_version }
406 __install_script_version__: { get_param: install_script_version }
407 __pg_int__: { get_param: pg_int }
408 __vlb_mac__: { get_attr: [vlb_private_2_port, mac_address] }
409 __cloud_env__: { get_param: cloud_env }
413 # Create configuration files
415 echo "__oam_private_ipaddr__" > /opt/config/oam_private_ipaddr.txt
416 echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt
417 echo "__local_private_ipaddr__" > /opt/config/local_private_ipaddr.txt
418 echo "__pktgen_private_net_cidr__" > /opt/config/pktgen_private_net_cidr.txt
419 echo "__vlb_ipaddr__" > /opt/config/vlb_ipaddr.txt
420 echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt
421 echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt
422 echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
423 echo "__install_script_version__" > /opt/config/install_script_version.txt
424 echo "__pg_int__" > /opt/config/pg_int.txt
425 echo "__vlb_mac__" > /opt/config/vlb_mac.txt
426 echo "__cloud_env__" > /opt/config/cloud_env.txt
428 # Download and run install script
429 curl -k __repo_url_blob__/org.onap.demo/vnfs/vlbms/__install_script_version__/v_packetgen_install.sh -o /opt/v_packetgen_install.sh
431 chmod +x v_packetgen_install.sh
432 ./v_packetgen_install.sh