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
29 description: onap OAM network id
30 onap_private_net_cidr:
32 description: oanp OAM network cidr
34 brgemu_bng_private_net_id:
36 description: Private network that connects vBRG to vBNG
37 default: zdfw1bngin01_private
38 brgemu_bng_private_net_cidr:
40 description: The CIDR of the input side of vBNG private network
42 bng_gmux_private_net_id:
44 description: Private network that connects vBNG to vGMUX
45 default: zdfw1bngmux01_private
46 bng_gmux_private_net_cidr:
48 description: The CIDR of the input side of vGMUX private network
52 description: Private network that connects vCPE elements with vCPE infrastructure elements
53 default: zdfw1cpe01_private
54 cpe_signal_private_net_cidr:
56 description: The CIDR of the vAAA private network
60 description: Private IP address that is assigned to the vBNG IN
64 description: Private IP address that is assigned to the vBNG to communicate with ONAP components
68 description: Private IP address that is assigned to the vBNG in the CPE_SIGNAL network
72 description: Private IP address that is assigned to the vBNG to vGMUX port
76 description: Name of the vBNG
77 default: zdcpe1cpe01bng01
80 description: The VNF ID is provided by ONAP
81 default: vCPE_Infrastructure_Metro_vBNG_demo_app
84 description: The vCPE Module ID is provided by ONAP
85 default: vCPE_Intrastructure_Metro_vBNG
88 description: dcae collector ip
92 description: dcae collector port
96 description: ssh public key
97 default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
100 description: Root URL for the Nexus repository for Maven artifacts
101 default: https://nexus.onap.org
102 demo_artifacts_version:
104 description: artifacts version used in demo vnfs
106 install_script_version:
108 description: install script version number
109 default: 1.2.0-SNAPSHOT
112 description: cloud environment(openstack or rackspace)
116 description: IP address of the SDNC
121 type: tosca.nodes.nfv.VNF
123 descriptor_id: b1bb0ce7-2222-4fa7-95ed-4840d70a1177
125 product_name: vcpe_vbng
126 software_version: '1.0'
127 descriptor_version: '1.0'
129 flavour_description: simple
135 # type: tosca.nodes.nfv.VnfVirtualLink
138 # layer_protocols: [ipv4]
140 # max_bitrate_requirements:
143 # min_bitrate_requirements:
146 # virtual_link_protocol_data:
147 # - associated_layer_protocol: ipv4
150 # name: { get_input: public_net_id }
154 # type: tosca.nodes.nfv.VnfVirtualLink
157 # layer_protocols: [ipv4]
159 # max_bitrate_requirements:
162 # min_bitrate_requirements:
165 # virtual_link_protocol_data:
166 # - associated_layer_protocol: ipv4
169 # name: { get_input: onap_private_net_id }
170 # cidr: { get_input: onap_private_net_cidr }
172 #Private network that connects vBRG to vBNG
173 VL_brgemu_bng_private_net:
174 type: tosca.nodes.nfv.VnfVirtualLink
177 layer_protocols: [ipv4]
179 max_bitrate_requirements:
182 min_bitrate_requirements:
185 virtual_link_protocol_data:
186 - associated_layer_protocol: ipv4
189 name: { get_input: brgemu_bng_private_net_id}
190 cidr: { get_input: brgemu_bng_private_net_cidr }
193 physical_network: "physnet1"
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 }
237 physical_network: "physnet1"
241 type: tosca.nodes.nfv.VduCp
243 layer_protocols: [ipv4]
246 - associated_layer_protocol: ipv4
248 - address_type: ip_address
250 ip_address_assignment: false
251 floating_ip_activated: false
253 - virtual_binding: VDU_vbng_0
254 #- virtual_link: VL_public
256 Cp_vbng_onap_private:
257 type: tosca.nodes.nfv.VduCp
259 layer_protocols: [ipv4]
262 - associated_layer_protocol: ipv4
264 - address_type: ip_address
266 ip_address_assignment: false
267 floating_ip_activated: false
269 - { get_input: vbng_private_ip_1 }
271 - virtual_binding: VDU_vbng_0
272 #- virtual_link: VL_onap_private
274 Cp_vbng_brgemu_bng_private_net:
275 type: tosca.nodes.nfv.VduCp
277 layer_protocols: [ipv4]
280 - associated_layer_protocol: ipv4
282 - address_type: ip_address
284 ip_address_assignment: false
285 floating_ip_activated: false
287 - { get_input: vbng_private_ip_0 }
288 vnic_type: "direct-physical"
289 virtual_network_interface_requirements:
290 - name: "sriov-support"
291 support_mandatory: true
292 network_interface_requirements:
293 interfaceType: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "SR-IOV"}'
295 logical_node_requirements:
296 pciVendorId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1234"}'
297 pciDeviceId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "5678"}'
298 pciNumDevices: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1"}'
300 - virtual_binding: VDU_vbng_0
301 - virtual_link: VL_brgemu_bng_private_net
304 type: tosca.nodes.nfv.VduCp
306 layer_protocols: [ipv4]
309 - associated_layer_protocol: ipv4
311 - address_type: ip_address
313 ip_address_assignment: false
314 floating_ip_activated: false
316 - { get_input: vbng_private_ip_2 }
318 - virtual_binding: VDU_vbng_0
319 - virtual_link: VL_cpe_signal
321 Cp_vbng_bng_gmux_private_net:
322 type: tosca.nodes.nfv.VduCp
324 layer_protocols: [ipv4]
327 - associated_layer_protocol: ipv4
329 - address_type: ip_address
331 ip_address_assignment: false
332 floating_ip_activated: false
334 - { get_input: vbng_private_ip_3 }
335 vnic_type: "direct-physical"
336 virtual_network_interface_requirements:
337 - name: "sriov-support"
338 support_mandatory: true
339 network_interface_requirements:
340 interfaceType: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "SR-IOV"}'
342 logical_node_requirements:
343 pciVendorId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1234"}'
344 pciDeviceId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "5678"}'
345 pciNumDevices: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1"}'
347 - virtual_binding: VDU_vbng_0
348 - virtual_link: VL_bng_gmux_private_net
351 type: tosca.nodes.nfv.Vdu.Compute
353 name: { get_input: vbng_name_0 }
356 min_number_of_instances: 1
357 max_number_of_instances: 1
359 inject_files: #TODO SDC bug
360 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
361 dest_path: /home/ubuntu/.ssh/authorized_keys
363 vnf_id: { get_input: vnf_id }
364 vf_module_id: { get_input: vf_module_id }
366 brgemu_bng_net_ipaddr: { get_input: vbng_private_ip_0 }
367 cpe_signal_net_ipaddr: { get_input: vbng_private_ip_2 }
368 bng_gmux_net_ipaddr: { get_input: vbng_private_ip_3 }
369 oam_ipaddr: { get_input: vbng_private_ip_1 }
370 oam_cidr: { get_input: onap_private_net_cidr }
371 bng_gmux_cidr: { get_input: bng_gmux_private_net_cidr }
372 cpe_signal_cidr: { get_input: cpe_signal_private_net_cidr }
373 brgemu_bng_cidr: { get_input: brgemu_bng_private_net_cidr }
374 dcae_collector_ip: { get_input: dcae_collector_ip }
375 dcae_collector_port: { get_input: dcae_collector_port }
376 demo_artifacts_version: { get_input: demo_artifacts_version }
377 install_script_version: { get_input: install_script_version }
378 sdnc_ip: { get_input: sdnc_ip_addr }
379 cloud_env: { get_input: cloud_env }
380 nexus_artifact_repo: { get_input: nexus_artifact_repo }
383 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
384 apt-get -y install jq
387 echo $METADATA | jq -r ".meta.$1"
390 # Create configuration files
392 echo "$(get_metadata brgemu_bng_net_ipaddr)" > /opt/config/brgemu_bng_net_ipaddr.txt
393 echo "$(get_metadata cpe_signal_net_ipaddr)" > /opt/config/cpe_signal_net_ipaddr.txt
394 echo "$(get_metadata bng_gmux_net_ipaddr)" > /opt/config/bng_gmux_net_ipaddr.txt
395 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
396 echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
397 echo "$(get_metadata bng_gmux_cidr)" > /opt/config/bng_gmux_net_cidr.txt
398 echo "$(get_metadata cpe_signal_cidr)" > /opt/config/cpe_signal_net_cidr.txt
399 echo "$(get_metadata brgemu_bng_cidr)" > /opt/config/brgemu_bng_net_cidr.txt
400 echo "$(get_metadata dcae_collector_ip)" > /opt/config/dcae_collector_ip.txt
401 echo "$(get_metadata dcae_collector_port)" > /opt/config/dcae_collector_port.txt
402 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
403 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
404 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
405 echo "$(get_metadata sdnc_ip)" > /opt/config/sdnc_ip.txt
406 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
408 # Download and run install script
409 apt-get -y install unzip
410 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
411 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
412 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
413 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
414 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_bng_install.sh
416 chmod +x v_bng_install.sh
422 virtual_mem_size: 4096 MB
423 vdu_mem_requirements:
424 memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
425 numberOfPages: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1024"}'
428 cpu_architecture: generic
429 virtual_local_storage:
430 - size_of_storage: 40 GB
432 sw_image: #TODO need to put glance image name here
433 #file: { get_input: vcpe_image_name }
434 file: ../Artifacts/Deployment/OTHER/image
435 type: tosca.artifacts.nfv.SwImage