1 tosca_definitions_version: tosca_simple_yaml_1_0
3 template_name: vCPE_vbng
4 template_version: "1.0"
6 VNFD_SCHEMA_VERSION: "2.5.1+1"
13 # substitution_mappings:
14 # node_type: onap.vcpe_vbng
16 # virtual_link: [ Cp_vbng_public, virtual_link ] # expose as external CP
17 # virtual_link: [ Cp_vbng_onap_private, virtual_link ] # expose as external CP
22 description: image name for vcpe in openstack glance
26 description: public network id used during onap installation
30 description: onap OAM network id
32 onap_private_net_cidr:
34 description: oanp OAM network cidr
36 brgemu_bng_private_net_id:
38 description: Private network that connects vBRG to vBNG
39 default: zdfw1bngin01_private
40 brgemu_bng_private_net_cidr:
42 description: The CIDR of the input side of vBNG private network
44 bng_gmux_private_net_id:
46 description: Private network that connects vBNG to vGMUX
47 default: zdfw1bngmux01_private
48 bng_gmux_private_net_cidr:
50 description: The CIDR of the input side of vGMUX private network
54 description: Private network that connects vCPE elements with vCPE infrastructure elements
55 default: zdfw1cpe01_private
56 cpe_signal_private_net_cidr:
58 description: The CIDR of the vAAA private network
62 description: Private IP address that is assigned to the vBNG IN
66 description: Private IP address that is assigned to the vBNG to communicate with ONAP components
70 description: Private IP address that is assigned to the vBNG in the CPE_SIGNAL network
74 description: Private IP address that is assigned to the vBNG to vGMUX port
78 description: Name of the vBNG
79 default: zdcpe1cpe01bng01
82 description: The VNF ID is provided by ONAP
83 default: vCPE_Infrastructure_Metro_vBNG_demo_app
86 description: The vCPE Module ID is provided by ONAP
87 default: vCPE_Intrastructure_Metro_vBNG
90 description: dcae collector ip
94 description: dcae collector port
98 description: ssh public key
99 default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
102 description: Root URL for the Nexus repository for Maven artifacts
103 default: https://nexus.onap.org
104 demo_artifacts_version:
106 description: artifacts version used in demo vnfs
108 install_script_version:
110 description: install script version number
111 default: 1.2.0-SNAPSHOT
114 description: cloud environment(openstack or rackspace)
118 description: IP address of the SDNC
123 type: tosca.nodes.nfv.VNF
125 descriptor_id: b1bb0ce7-2222-4fa7-95ed-4840d70a1177
127 product_name: vcpe_vbng
128 software_version: '1.0'
129 descriptor_version: '1.0'
131 flavour_description: simple
137 # type: tosca.nodes.nfv.VnfVirtualLink
140 # layer_protocols: [ipv4]
142 # max_bitrate_requirements:
145 # min_bitrate_requirements:
148 # virtual_link_protocol_data:
149 # - associated_layer_protocol: ipv4
152 # name: { get_input: public_net_id }
156 # type: tosca.nodes.nfv.VnfVirtualLink
159 # layer_protocols: [ipv4]
161 # max_bitrate_requirements:
164 # min_bitrate_requirements:
167 # virtual_link_protocol_data:
168 # - associated_layer_protocol: ipv4
171 # name: { get_input: onap_private_net_id }
172 # cidr: { get_input: onap_private_net_cidr }
174 #Private network that connects vBRG to vBNG
175 VL_brgemu_bng_private_net:
176 type: tosca.nodes.nfv.VnfVirtualLink
179 layer_protocols: [ipv4]
181 max_bitrate_requirements:
184 min_bitrate_requirements:
187 virtual_link_protocol_data:
188 - associated_layer_protocol: ipv4
191 name: { get_input: brgemu_bng_private_net_id}
192 cidr: { get_input: brgemu_bng_private_net_cidr }
197 type: tosca.nodes.nfv.VnfVirtualLink
200 layer_protocols: [ipv4]
202 max_bitrate_requirements:
205 min_bitrate_requirements:
208 virtual_link_protocol_data:
209 - associated_layer_protocol: ipv4
212 name: { get_input: cpe_signal_net_id}
213 cidr: { get_input: cpe_signal_private_net_cidr }
216 #Private network that connects vBNG to vGMUX
217 VL_bng_gmux_private_net:
218 type: tosca.nodes.nfv.VnfVirtualLink
221 layer_protocols: [ipv4]
223 max_bitrate_requirements:
226 min_bitrate_requirements:
229 virtual_link_protocol_data:
230 - associated_layer_protocol: ipv4
233 name: { get_input: bng_gmux_private_net_id}
234 cidr: { get_input: bng_gmux_private_net_cidr }
239 type: tosca.nodes.nfv.VduCp
241 layer_protocols: [ipv4]
244 - associated_layer_protocol: ipv4
246 - address_type: ip_address
248 ip_address_assignment: false
249 floating_ip_activated: false
251 - virtual_binding: VDU_vbng_0
252 #- virtual_link: VL_public
254 Cp_vbng_onap_private:
255 type: tosca.nodes.nfv.VduCp
257 layer_protocols: [ipv4]
260 - associated_layer_protocol: ipv4
262 - address_type: ip_address
264 ip_address_assignment: false
265 floating_ip_activated: false
267 - { get_input: vbng_private_ip_1 }
269 - virtual_binding: VDU_vbng_0
270 #- virtual_link: VL_onap_private
272 Cp_vbng_brgemu_bng_private_net:
273 type: tosca.nodes.nfv.VduCp
275 layer_protocols: [ipv4]
278 - associated_layer_protocol: ipv4
280 - address_type: ip_address
282 ip_address_assignment: false
283 floating_ip_activated: false
285 - { get_input: vbng_private_ip_0 }
286 virtual_network_interface_requirements:
288 support_mandatory: true
289 network_interface_requirements:
290 dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
292 - virtual_binding: VDU_vbng_0
293 - virtual_link: VL_brgemu_bng_private_net
296 type: tosca.nodes.nfv.VduCp
298 layer_protocols: [ipv4]
301 - associated_layer_protocol: ipv4
303 - address_type: ip_address
305 ip_address_assignment: false
306 floating_ip_activated: false
308 - { get_input: vbng_private_ip_2 }
310 - virtual_binding: VDU_vbng_0
311 - virtual_link: VL_cpe_signal
313 Cp_vbng_bng_gmux_private_net:
314 type: tosca.nodes.nfv.VduCp
316 layer_protocols: [ipv4]
319 - associated_layer_protocol: ipv4
321 - address_type: ip_address
323 ip_address_assignment: false
324 floating_ip_activated: false
326 - { get_input: vbng_private_ip_3 }
327 virtual_network_interface_requirements:
329 support_mandatory: true
330 network_interface_requirements:
331 dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
333 - virtual_binding: VDU_vbng_0
334 - virtual_link: VL_bng_gmux_private_net
337 type: tosca.nodes.nfv.Vdu.Compute
339 name: { get_input: vbng_name_0 }
342 min_number_of_instances: 1
343 max_number_of_instances: 1
345 inject_files: #TODO SDC bug
346 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
347 dest_path: /home/ubuntu/.ssh/authorized_keys
349 vnf_id: { get_input: vnf_id }
350 vf_module_id: { get_input: vf_module_id }
352 brgemu_bng_net_ipaddr: { get_input: vbng_private_ip_0 }
353 cpe_signal_net_ipaddr: { get_input: vbng_private_ip_2 }
354 bng_gmux_net_ipaddr: { get_input: vbng_private_ip_3 }
355 oam_ipaddr: { get_input: vbng_private_ip_1 }
356 oam_cidr: { get_input: onap_private_net_cidr }
357 bng_gmux_cidr: { get_input: bng_gmux_private_net_cidr }
358 cpe_signal_cidr: { get_input: cpe_signal_private_net_cidr }
359 brgemu_bng_cidr: { get_input: brgemu_bng_private_net_cidr }
360 dcae_collector_ip: { get_input: dcae_collector_ip }
361 dcae_collector_port: { get_input: dcae_collector_port }
362 demo_artifacts_version: { get_input: demo_artifacts_version }
363 install_script_version: { get_input: install_script_version }
364 sdnc_ip: { get_input: sdnc_ip_addr }
365 cloud_env: { get_input: cloud_env }
366 nexus_artifact_repo: { get_input: nexus_artifact_repo }
369 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
370 apt-get -y install jq
373 echo $METADATA | jq -r ".meta.$1"
376 # Create configuration files
378 echo "$(get_metadata brgemu_bng_net_ipaddr)" > /opt/config/brgemu_bng_net_ipaddr.txt
379 echo "$(get_metadata cpe_signal_net_ipaddr)" > /opt/config/cpe_signal_net_ipaddr.txt
380 echo "$(get_metadata bng_gmux_net_ipaddr)" > /opt/config/bng_gmux_net_ipaddr.txt
381 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
382 echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
383 echo "$(get_metadata bng_gmux_cidr)" > /opt/config/bng_gmux_net_cidr.txt
384 echo "$(get_metadata cpe_signal_cidr)" > /opt/config/cpe_signal_net_cidr.txt
385 echo "$(get_metadata brgemu_bng_cidr)" > /opt/config/brgemu_bng_net_cidr.txt
386 echo "$(get_metadata dcae_collector_ip)" > /opt/config/dcae_collector_ip.txt
387 echo "$(get_metadata dcae_collector_port)" > /opt/config/dcae_collector_port.txt
388 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
389 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
390 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
391 echo "$(get_metadata sdnc_ip)" > /opt/config/sdnc_ip.txt
392 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
394 # Download and run install script
395 apt-get -y install unzip
396 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
397 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
398 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
399 curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
400 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_bng_install.sh
402 chmod +x v_bng_install.sh
408 virtual_mem_size: 4096 MB
409 vdu_mem_requirements:
410 memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
411 numberOfPages: '{"schemaVersion": "0","schemaSelector": "","hardwarePlatform": "generic","mandatory": "true", "configurationValue": "1024"}'
414 cpu_architecture: generic
415 virtual_local_storage:
416 - size_of_storage: 40 GB
418 sw_image: #TODO need to put glance image name here
419 #file: { get_input: vcpe_image_name }
420 file: ../Artifacts/Deployment/OTHER/image
421 type: tosca.artifacts.nfv.SwImage