1 ##########################################################################
3 #==================LICENSE_START==========================================
6 # Copyright (c) 2019 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 that deploys a vLB 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 int_private_subnet_id:
54 label: vLoadBalancer private subnet name or ID
55 description: Private subnet of the network that connects vLoadBalancer with vDNSs
56 int_pktgen_private_net_id:
58 label: vPacketGen private network name or ID
59 description: Private network that connects vLoadBalancer with vPacketGen
60 int_pktgen_private_subnet_id:
62 label: vPacketGen private subnet name or ID
63 description: Private subnet of the network that connects vLoadBalancer with vPacketGen
66 label: ONAP management network name or ID
67 description: Private network that connects ONAP component and the VNF
68 onap_private_subnet_id:
70 label: ONAP management sub-network name or ID
71 description: Private sub-network that connects ONAP component and the VNF
74 label: vLoadBalancer private network CIDR
75 description: The CIDR of the vLoadBalancer private network
76 pktgen_private_net_cidr:
78 label: vPacketGen private network CIDR
79 description: The CIDR of the vPacketGen private network
80 onap_private_net_cidr:
82 label: ONAP private network CIDR
83 description: The CIDR of the protected private network
86 label: vLoadBalancer private IP address towards the private network
87 description: Private IP address that is assigned to the vLoadBalancer to communicate with the vDNSs
88 vlb_onap_private_ip_0:
90 label: vLoadBalancer private IP address towards the ONAP management network
91 description: Private IP address that is assigned to the vLoadBalancer to communicate with ONAP components
92 vlb_int_pktgen_private_ip_0:
94 label: vLoadBalancer private IP address towards the vPacketGen network
95 description: Private IP address that is assigned to the vLoadBalancer to communicate with vPacketGen
96 vdns_int_private_ip_0:
98 label: vDNS private IP address towards the private network
99 description: Private IP address that is assigned to the vDNS to communicate with the vLoadBalancer
100 vdns_onap_private_ip_0:
102 label: vDNS private IP address towards the ONAP management network
103 description: Private IP address that is assigned to the vDNS to communicate with ONAP components
104 vpg_int_pktgen_private_ip_0:
106 label: vPacketGen private IP address towards the vPacketGen private network
107 description: Private IP address that is assigned to the vPacketGen to communicate with the vLoadBalancer
108 vpg_onap_private_ip_0:
110 label: vPacketGen private IP address towards the ONAP management network
111 description: Private IP address that is assigned to the vPacketGen to communicate with ONAP components
114 label: vLB MAC address
115 description: MAC address of the vLB used by the vPacketGen VM
118 label: vPacketGen MAC address
119 description: MAC address of the vPacketGen used by the vLB VM
122 label: Virtual Private IP of the vLoadBalancer
123 description: Virtual Private IP that is assigned to the vLoadBalancer's VPP layer
126 label: IP Address of the GRE tunnel
127 description: IP address assigned to the GRE tunnel on the vLoadBalancer
130 label: vLoadBalancer name
131 description: Name of the vLoadBalancer
135 description: The VNF ID is provided by ONAP
139 description: The VNF NAME is provided by ONAP
142 label: vFirewall module ID
143 description: The vLoadBalancer Module ID is provided by ONAP
146 label: DCAE collector IP address
147 description: IP address of the DCAE collector
150 label: DCAE collector port
151 description: Port of the DCAE collector
155 description: Public/Private key pair name
156 demo_artifacts_version:
158 label: Artifacts version used in demo vnfs
159 description: Version number for downloading the vPacketGen streams for VPP and VES
162 label: Northbound API version
163 description: Version number of the health check and config APIs
164 install_script_version:
166 label: Installation script version number
167 description: Version number of the scripts that install the vLB demo app
170 label: Cloud environment
171 description: Cloud environment (e.g., openstack, rackspace)
174 description: Root URL for the Nexus repository for Maven artifacts.
177 description: ONAP Security Group
180 description: SDNC Model Name metatada
183 description: SDNC Model Version metatada
186 description: SDNC Artifact Name metatada
196 # NETWORK_ROLE: private
198 vlb_0_int_private_port_0:
199 type: OS::Neutron::Port
201 network: { get_param: int_private_net_id }
202 fixed_ips: [{"subnet": { get_param: int_private_subnet_id }, "ip_address": { get_param: vlb_int_private_ip_0 }}]
204 - { get_param: sec_group }
206 # NETWORK_ROLE: onap_private
208 vlb_0_onap_private_port_0:
209 type: OS::Neutron::Port
211 network: { get_param: onap_private_net_id }
212 fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vlb_onap_private_ip_0 }}]
214 - { get_param: sec_group }
216 # NETWORK_ROLE: pktgen_private
218 vlb_0_int_pktgen_private_port_0:
219 type: OS::Neutron::Port
221 network: { get_param: int_pktgen_private_net_id }
222 fixed_ips: [{"subnet": { get_param: int_pktgen_private_subnet_id }, "ip_address": { get_param: vlb_int_pktgen_private_ip_0 }}]
223 mac_address: { get_param: vlb_0_mac_address }
225 - { get_param: sec_group }
229 type: OS::Nova::Server
231 image: { get_param: vlb_image_name }
232 flavor: { get_param: vlb_flavor_name }
233 name: { get_param: vlb_name_0 }
234 key_name: { get_param: keypair }
236 - network: { get_param: public_net_id }
237 - port: { get_resource: vlb_0_int_private_port_0 }
238 - port: { get_resource: vlb_0_onap_private_port_0 }
239 - port: { get_resource: vlb_0_int_pktgen_private_port_0 }
241 vnf_id: { get_param: vnf_id }
242 vf_module_id: { get_param: vf_module_id }
243 vnf_name: { get_param: vnf_name }
244 sdnc_model_name: { get_param: sdnc_model_name }
245 sdnc_model_version: { get_param: sdnc_model_version }
246 sdnc_artifact_name: { get_param: sdnc_artifact_name }
247 user_data_format: RAW
251 __dcae_collector_ip__: { get_param: dcae_collector_ip }
252 __dcae_collector_port__: { get_param: dcae_collector_port }
253 __ip_to_dns_net__: { get_param: vlb_int_private_ip_0 }
254 __ip_to_pktgen_net__: { get_param: vlb_int_pktgen_private_ip_0 }
255 __oam_vpktgen_ip__: { get_param: vpg_onap_private_ip_0 }
256 __oam_vdns_ip__: { get_param: vdns_onap_private_ip_0 }
257 __vip__: { get_param: vip }
258 __gre_ipaddr__: { get_param: gre_ipaddr }
259 __pktgen_ipaddr__: { get_param: vpg_int_pktgen_private_ip_0 }
260 __vdns_ipaddr__: { get_param: vdns_int_private_ip_0 }
261 __oam_private_ipaddr__: { get_param: vlb_onap_private_ip_0 }
262 __demo_artifacts_version__: { get_param: demo_artifacts_version }
263 __nb_api_version__: { get_param: nb_api_version }
264 __install_script_version__: { get_param: install_script_version }
265 __vlb_private_net_cidr__: { get_param: vlb_private_net_cidr }
266 __onap_private_net_cidr__: { get_param: onap_private_net_cidr }
267 __pktgen_private_net_cidr__: { get_param: pktgen_private_net_cidr }
268 __pktgen_mac__: { get_param: vpg_0_mac_address }
269 __cloud_env__: { get_param: cloud_env }
270 __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
274 # Create configuration files
276 echo "__dcae_collector_ip__" > /opt/config/dcae_collector_ip.txt
277 echo "__dcae_collector_port__" > /opt/config/dcae_collector_port.txt
278 echo "__ip_to_dns_net__" > /opt/config/ip_to_dns_net.txt
279 echo "__ip_to_pktgen_net__" > /opt/config/ip_to_pktgen_net.txt
280 echo "__oam_vpktgen_ip__" > /opt/config/oam_vpktgen_ip.txt
281 echo "__oam_vdns_ip__" > /opt/config/oam_vdns_ip.txt
282 echo "__vip__" > /opt/config/vip.txt
283 echo "__gre_ipaddr__" > /opt/config/gre_ipaddr.txt
284 echo "__pktgen_ipaddr__" > /opt/config/pktgen_ipaddr.txt
285 echo "__vdns_ipaddr__" > /opt/config/vdns_ipaddr.txt
286 echo "__oam_private_ipaddr__" > /opt/config/oam_private_ipaddr.txt
287 echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
288 echo "__nb_api_version__" > /opt/config/nb_api_version.txt
289 echo "__install_script_version__" > /opt/config/install_script_version.txt
290 echo "__vlb_private_net_cidr__" > /opt/config/vlb_private_net_cidr.txt
291 echo "__pktgen_private_net_cidr__" > /opt/config/pktgen_private_net_cidr.txt
292 echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt
293 echo "__pktgen_mac__" > /opt/config/pktgen_mac.txt
294 echo "__cloud_env__" > /opt/config/cloud_env.txt
295 echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_repo.txt
297 # Download and run install script
299 apt-get -y install unzip
300 if [[ "__install_script_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
301 curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vlbms&a=vlbms-scripts&e=zip&v=__install_script_version__" -o /opt/vlbms-scripts-__install_script_version__.zip
302 unzip -j /opt/vlbms-scripts-__install_script_version__.zip -d /opt v_lb_install.sh
304 chmod +x v_lb_install.sh