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: Version number for downloading the vPacketGen streams for VPP and VES
166 label: Northbound API version
167 description: Version number of the health check and config APIs
168 install_script_version:
170 label: Installation script version number
171 description: Version number of the scripts that install the vLB demo app
174 label: Cloud environment
175 description: Cloud environment (e.g., openstack, rackspace)
186 type: OS::Heat::RandomString
191 type: OS::Nova::KeyPair
197 base: { get_param: key_name }
198 rand: { get_resource: random-str }
199 public_key: { get_param: pub_key }
200 save_private_key: false
203 type: OS::Neutron::Net
205 name: { get_param: vlb_private_net_id }
208 type: OS::Neutron::Subnet
210 name: { get_param: vlb_private_net_id }
211 network_id: { get_resource: vlb_private_network }
212 cidr: { get_param: vlb_private_net_cidr }
214 pktgen_private_network:
215 type: OS::Neutron::Net
217 name: { get_param: pktgen_private_net_id }
219 pktgen_private_subnet:
220 type: OS::Neutron::Subnet
222 name: { get_param: pktgen_private_net_id }
223 network_id: { get_resource: pktgen_private_network }
224 cidr: { get_param: pktgen_private_net_cidr }
227 type: OS::Neutron::Port
229 network: { get_resource: vlb_private_network }
230 fixed_ips: [{"subnet": { get_resource: vlb_private_subnet }, "ip_address": { get_param: vlb_private_ip_0 }}]
233 type: OS::Neutron::Port
235 network: { get_param: onap_private_net_id }
236 fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vlb_private_ip_1 }}]
239 type: OS::Neutron::Port
241 network: { get_resource: pktgen_private_network }
242 fixed_ips: [{"subnet": { get_resource: pktgen_private_subnet }, "ip_address": { get_param: vlb_private_ip_2 }}]
245 type: OS::Nova::Server
247 image: { get_param: vlb_image_name }
248 flavor: { get_param: vlb_flavor_name }
249 name: { get_param: vlb_name_0 }
250 key_name: { get_resource: my_keypair }
252 - network: { get_param: public_net_id }
253 - port: { get_resource: vlb_private_0_port }
254 - port: { get_resource: vlb_private_1_port }
255 - port: { get_resource: vlb_private_2_port }
256 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
257 user_data_format: RAW
261 __dcae_collector_ip__: { get_param: dcae_collector_ip }
262 __dcae_collector_port__: { get_param: dcae_collector_port }
263 __ip_to_dns_net__: { get_param: vlb_private_ip_0 }
264 __ip_to_pktgen_net__: { get_param: vlb_private_ip_2 }
265 __oam_vpktgen_ip__: { get_param: vpg_private_ip_1 }
266 __oam_vdns_ip__: { get_param: vdns_private_ip_1 }
267 __vip__: { get_param: vip }
268 __gre_ipaddr__: { get_param: gre_ipaddr }
269 __pktgen_ipaddr__: { get_param: vpg_private_ip_0 }
270 __vdns_ipaddr__: { get_param: vdns_private_ip_0 }
271 __oam_private_ipaddr__: { get_param: vlb_private_ip_1 }
272 __repo_url_blob__: { get_param: repo_url_blob }
273 __repo_url_artifacts__: { get_param: repo_url_artifacts }
274 __demo_artifacts_version__: { get_param: demo_artifacts_version }
275 __nb_api_version__: { get_param: nb_api_version }
276 __install_script_version__: { get_param: install_script_version }
277 __vlb_private_net_cidr__: { get_param: vlb_private_net_cidr }
278 __onap_private_net_cidr__: { get_param: onap_private_net_cidr }
279 __pktgen_private_net_cidr__: { get_param: pktgen_private_net_cidr }
280 __pktgen_mac__: { get_attr: [vpg_private_0_port, mac_address] }
281 __cloud_env__: { get_param: cloud_env }
285 # Create configuration files
287 echo "__dcae_collector_ip__" > /opt/config/dcae_collector_ip.txt
288 echo "__dcae_collector_port__" > /opt/config/dcae_collector_port.txt
289 echo "__ip_to_dns_net__" > /opt/config/ip_to_dns_net.txt
290 echo "__ip_to_pktgen_net__" > /opt/config/ip_to_pktgen_net.txt
291 echo "__oam_vpktgen_ip__" > /opt/config/oam_vpktgen_ip.txt
292 echo "__oam_vdns_ip__" > /opt/config/oam_vdns_ip.txt
293 echo "__vip__" > /opt/config/vip.txt
294 echo "__gre_ipaddr__" > /opt/config/gre_ipaddr.txt
295 echo "__pktgen_ipaddr__" > /opt/config/pktgen_ipaddr.txt
296 echo "__vdns_ipaddr__" > /opt/config/vdns_ipaddr.txt
297 echo "__oam_private_ipaddr__" > /opt/config/oam_private_ipaddr.txt
298 echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt
299 echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt
300 echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
301 echo "__nb_api_version__" > /opt/config/nb_api_version.txt
302 echo "__install_script_version__" > /opt/config/install_script_version.txt
303 echo "__vlb_private_net_cidr__" > /opt/config/vlb_private_net_cidr.txt
304 echo "__pktgen_private_net_cidr__" > /opt/config/pktgen_private_net_cidr.txt
305 echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt
306 echo "__pktgen_mac__" > /opt/config/pktgen_mac.txt
307 echo "__cloud_env__" > /opt/config/cloud_env.txt
309 # Download and run install script
310 curl -k __repo_url_blob__/org.onap.demo/vnfs/vlbms/__install_script_version__/v_lb_install.sh -o /opt/v_lb_install.sh
312 chmod +x v_lb_install.sh
317 type: OS::Neutron::Port
319 network: { get_resource: vlb_private_network }
320 fixed_ips: [{"subnet": { get_resource: vlb_private_subnet }, "ip_address": { get_param: vdns_private_ip_0 }}]
323 type: OS::Neutron::Port
325 network: { get_param: onap_private_net_id }
326 fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vdns_private_ip_1 }}]
329 type: OS::Nova::Server
331 image: { get_param: vlb_image_name }
332 flavor: { get_param: vlb_flavor_name }
333 name: { get_param: vdns_name_0 }
334 key_name: { get_resource: my_keypair }
336 - network: { get_param: public_net_id }
337 - port: { get_resource: vdns_private_0_port }
338 - port: { get_resource: vdns_private_1_port }
339 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
340 user_data_format: RAW
344 __lb_oam_int__: { get_param: vlb_private_ip_1 }
345 __lb_private_ipaddr__: { get_param: vlb_private_ip_0 }
346 __lb_to_pktgen_if__: { get_param: vlb_private_ip_2}
347 __local_private_ipaddr__: { get_param: vdns_private_ip_0 }
348 __oam_private_ipaddr__: { get_param: vdns_private_ip_1 }
349 __repo_url_blob__: { get_param: repo_url_blob }
350 __repo_url_artifacts__: { get_param: repo_url_artifacts }
351 __nb_api_version__: { get_param: nb_api_version }
352 __install_script_version__: { get_param: install_script_version }
353 __vlb_private_net_cidr__: { get_param: vlb_private_net_cidr }
354 __onap_private_net_cidr__: { get_param: onap_private_net_cidr }
355 __cloud_env__: { get_param: cloud_env }
359 # Create configuration files
361 echo "__lb_oam_int__" > /opt/config/lb_oam_int.txt
362 echo "__lb_private_ipaddr__" > /opt/config/lb_private_ipaddr.txt
363 echo "__lb_to_pktgen_if__" > /opt/config/lb_to_pktgen_if.txt
364 echo "__local_private_ipaddr__" > /opt/config/local_private_ipaddr.txt
365 echo "__oam_private_ipaddr__" > /opt/config/oam_private_ipaddr.txt
366 echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt
367 echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt
368 echo "__nb_api_version__" > /opt/config/nb_api_version.txt
369 echo "__install_script_version__" > /opt/config/install_script_version.txt
370 echo "__vlb_private_net_cidr__" > /opt/config/vlb_private_net_cidr.txt
371 echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt
372 echo "__cloud_env__" > /opt/config/cloud_env.txt
374 # Download and run install script
375 curl -k __repo_url_blob__/org.onap.demo/vnfs/vlbms/__install_script_version__/v_dns_install.sh -o /opt/v_dns_install.sh
377 chmod +x v_dns_install.sh
382 type: OS::Neutron::Port
384 network: { get_resource: pktgen_private_network }
385 fixed_ips: [{"subnet": { get_resource: pktgen_private_subnet }, "ip_address": { get_param: vpg_private_ip_0 }}]
388 type: OS::Neutron::Port
390 network: { get_param: onap_private_net_id }
391 fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vpg_private_ip_1 }}]
394 type: OS::Nova::Server
396 image: { get_param: vlb_image_name }
397 flavor: { get_param: vlb_flavor_name }
398 name: { get_param: vpg_name_0 }
399 key_name: { get_resource: my_keypair }
401 - network: { get_param: public_net_id }
402 - port: { get_resource: vpg_private_0_port }
403 - port: { get_resource: vpg_private_1_port }
404 user_data_format: RAW
408 __repo_url_blob__: { get_param: repo_url_blob }
409 __repo_url_artifacts__: { get_param: repo_url_artifacts }
410 __local_private_ipaddr__: { get_param: vpg_private_ip_0 }
411 __oam_private_ipaddr__: { get_param: vpg_private_ip_1 }
412 __onap_private_net_cidr__: { get_param: onap_private_net_cidr }
413 __pktgen_private_net_cidr__: { get_param: pktgen_private_net_cidr }
414 __vlb_ipaddr__: { get_param: vlb_private_ip_2 }
415 __demo_artifacts_version__: { get_param: demo_artifacts_version }
416 __nb_api_version__: { get_param: nb_api_version }
417 __install_script_version__: { get_param: install_script_version }
418 __pg_int__: { get_param: pg_int }
419 __vlb_mac__: { get_attr: [vlb_private_2_port, mac_address] }
420 __cloud_env__: { get_param: cloud_env }
424 # Create configuration files
426 echo "__oam_private_ipaddr__" > /opt/config/oam_private_ipaddr.txt
427 echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt
428 echo "__local_private_ipaddr__" > /opt/config/local_private_ipaddr.txt
429 echo "__pktgen_private_net_cidr__" > /opt/config/pktgen_private_net_cidr.txt
430 echo "__vlb_ipaddr__" > /opt/config/vlb_ipaddr.txt
431 echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt
432 echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt
433 echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
434 echo "__nb_api_version__" > /opt/config/nb_api_version.txt
435 echo "__install_script_version__" > /opt/config/install_script_version.txt
436 echo "__pg_int__" > /opt/config/pg_int.txt
437 echo "__vlb_mac__" > /opt/config/vlb_mac.txt
438 echo "__cloud_env__" > /opt/config/cloud_env.txt
440 # Download and run install script
441 curl -k __repo_url_blob__/org.onap.demo/vnfs/vlbms/__install_script_version__/v_packetgen_install.sh -o /opt/v_packetgen_install.sh
443 chmod +x v_packetgen_install.sh
444 ./v_packetgen_install.sh