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
187 # NETWORK_ROLE: private
189 vlb_0_int_private_port_0:
190 type: OS::Neutron::Port
192 network: { get_param: int_private_net_id }
193 fixed_ips: [{"subnet": { get_param: int_private_subnet_id }, "ip_address": { get_param: vlb_int_private_ip_0 }}]
195 - { get_param: sec_group }
197 # NETWORK_ROLE: onap_private
199 vlb_0_onap_private_port_0:
200 type: OS::Neutron::Port
202 network: { get_param: onap_private_net_id }
203 fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vlb_onap_private_ip_0 }}]
205 - { get_param: sec_group }
207 # NETWORK_ROLE: pktgen_private
209 vlb_0_int_pktgen_private_port_0:
210 type: OS::Neutron::Port
212 network: { get_param: int_pktgen_private_net_id }
213 fixed_ips: [{"subnet": { get_param: int_pktgen_private_subnet_id }, "ip_address": { get_param: vlb_int_pktgen_private_ip_0 }}]
214 mac_address: { get_param: vlb_0_mac_address }
216 - { get_param: sec_group }
220 type: OS::Nova::Server
222 image: { get_param: vlb_image_name }
223 flavor: { get_param: vlb_flavor_name }
224 name: { get_param: vlb_name_0 }
225 key_name: { get_param: keypair }
227 - network: { get_param: public_net_id }
228 - port: { get_resource: vlb_0_int_private_port_0 }
229 - port: { get_resource: vlb_0_onap_private_port_0 }
230 - port: { get_resource: vlb_0_int_pktgen_private_port_0 }
232 vnf_id: { get_param: vnf_id }
233 vf_module_id: { get_param: vf_module_id }
234 vnf_name: { get_param: vnf_name }
235 user_data_format: RAW
239 __dcae_collector_ip__: { get_param: dcae_collector_ip }
240 __dcae_collector_port__: { get_param: dcae_collector_port }
241 __ip_to_dns_net__: { get_param: vlb_int_private_ip_0 }
242 __ip_to_pktgen_net__: { get_param: vlb_int_pktgen_private_ip_0 }
243 __oam_vpktgen_ip__: { get_param: vpg_onap_private_ip_0 }
244 __oam_vdns_ip__: { get_param: vdns_onap_private_ip_0 }
245 __vip__: { get_param: vip }
246 __gre_ipaddr__: { get_param: gre_ipaddr }
247 __pktgen_ipaddr__: { get_param: vpg_int_pktgen_private_ip_0 }
248 __vdns_ipaddr__: { get_param: vdns_int_private_ip_0 }
249 __oam_private_ipaddr__: { get_param: vlb_onap_private_ip_0 }
250 __demo_artifacts_version__: { get_param: demo_artifacts_version }
251 __nb_api_version__: { get_param: nb_api_version }
252 __install_script_version__: { get_param: install_script_version }
253 __vlb_private_net_cidr__: { get_param: vlb_private_net_cidr }
254 __onap_private_net_cidr__: { get_param: onap_private_net_cidr }
255 __pktgen_private_net_cidr__: { get_param: pktgen_private_net_cidr }
256 __pktgen_mac__: { get_param: vpg_0_mac_address }
257 __cloud_env__: { get_param: cloud_env }
258 __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
262 # Create configuration files
264 echo "__dcae_collector_ip__" > /opt/config/dcae_collector_ip.txt
265 echo "__dcae_collector_port__" > /opt/config/dcae_collector_port.txt
266 echo "__ip_to_dns_net__" > /opt/config/ip_to_dns_net.txt
267 echo "__ip_to_pktgen_net__" > /opt/config/ip_to_pktgen_net.txt
268 echo "__oam_vpktgen_ip__" > /opt/config/oam_vpktgen_ip.txt
269 echo "__oam_vdns_ip__" > /opt/config/oam_vdns_ip.txt
270 echo "__vip__" > /opt/config/vip.txt
271 echo "__gre_ipaddr__" > /opt/config/gre_ipaddr.txt
272 echo "__pktgen_ipaddr__" > /opt/config/pktgen_ipaddr.txt
273 echo "__vdns_ipaddr__" > /opt/config/vdns_ipaddr.txt
274 echo "__oam_private_ipaddr__" > /opt/config/oam_private_ipaddr.txt
275 echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
276 echo "__nb_api_version__" > /opt/config/nb_api_version.txt
277 echo "__install_script_version__" > /opt/config/install_script_version.txt
278 echo "__vlb_private_net_cidr__" > /opt/config/vlb_private_net_cidr.txt
279 echo "__pktgen_private_net_cidr__" > /opt/config/pktgen_private_net_cidr.txt
280 echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt
281 echo "__pktgen_mac__" > /opt/config/pktgen_mac.txt
282 echo "__cloud_env__" > /opt/config/cloud_env.txt
283 echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_repo.txt
285 # Download and run install script
287 apt-get -y install unzip
288 if [[ "__install_script_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
289 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
290 unzip -j /opt/vlbms-scripts-__install_script_version__.zip -d /opt v_lb_install.sh
292 chmod +x v_lb_install.sh