1 tosca_definitions_version: tosca_simple_yaml_1_0
3 template_name: vCPE_vbng
4 template_version: "1.0"
13 derived_from: tosca.nodes.nfv.VNF
17 constraints: [ valid_values: [ b1bb0ce7-5555-4fa7-95ed-4840d70a1177 ] ]
18 default: b1bb0ce7-5555-4fa7-95ed-4840d70a1177
21 constraints: [ valid_values: [ onap ] ]
25 constraints: [ valid_values: [ vcpe_vbng ] ]
29 constraints: [ valid_values: [ '1.0' ] ]
33 constraints: [ valid_values: [ '1.0' ] ]
37 constraints: [ valid_values: [ simple ] ] #only one and only allowed one DF in this example
49 # substitution_mappings:
50 # node_type: onap.vcpe_vbng
52 # virtual_link: [ Cp_vbng_public, virtual_link ] # expose as external CP
53 # virtual_link: [ Cp_vbng_onap_private, virtual_link ] # expose as external CP
58 description: image name for vcpe in openstack glance
62 description: public network id used during onap installation
66 description: onap OAM network id
68 onap_private_net_cidr:
70 description: oanp OAM network cidr
72 brgemu_bng_private_net_id:
74 description: Private network that connects vBRG to vBNG
75 default: zdfw1bngin01_private
76 brgemu_bng_private_net_cidr:
78 description: The CIDR of the input side of vBNG private network
80 bng_gmux_private_net_id:
82 description: Private network that connects vBNG to vGMUX
83 default: zdfw1bngmux01_private
84 bng_gmux_private_net_cidr:
86 description: The CIDR of the input side of vGMUX private network
90 description: Private network that connects vCPE elements with vCPE infrastructure elements
91 default: zdfw1cpe01_private
92 cpe_signal_private_net_cidr:
94 description: The CIDR of the vAAA private network
98 description: Private IP address that is assigned to the vBNG IN
102 description: Private IP address that is assigned to the vBNG to communicate with ONAP components
106 description: Private IP address that is assigned to the vBNG in the CPE_SIGNAL network
110 description: Private IP address that is assigned to the vBNG to vGMUX port
114 description: Name of the vBNG
115 default: zdcpe1cpe01bng01
118 description: The VNF ID is provided by ONAP
119 default: vCPE_Infrastructure_Metro_vBNG_demo_app
122 description: The vCPE Module ID is provided by ONAP
123 default: vCPE_Intrastructure_Metro_vBNG
126 description: dcae collector ip
130 description: dcae collector port
134 description: ssh public key
135 default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
138 description: Root URL for the Nexus repository for Maven artifacts
139 default: https://nexus.onap.org
140 demo_artifacts_version:
142 description: artifacts version used in demo vnfs
144 install_script_version:
146 description: install script version number
147 default: 1.2.0-SNAPSHOT
150 description: cloud environment(openstack or rackspace)
154 description: IP address of the SDNC
160 # type: tosca.nodes.nfv.VnfVirtualLink
163 # layer_protocol: ipv4
165 # max_bit_rate_requirements:
168 # min_bit_rate_requirements:
171 # networkName: { get_input: public_net_id }
175 # type: tosca.nodes.nfv.VnfVirtualLink
178 # layer_protocol: ipv4
180 # max_bit_rate_requirements:
183 # min_bit_rate_requirements:
186 # networkName: { get_input: onap_private_net_id }
187 # cidr: { get_input: onap_private_net_cidr }
189 #Private network that connects vBRG to vBNG
190 VL_brgemu_bng_private_net:
191 type: tosca.nodes.nfv.VnfVirtualLink
196 max_bit_rate_requirements:
199 min_bit_rate_requirements:
202 networkName: { get_input: brgemu_bng_private_net_id}
203 cidr: { get_input: brgemu_bng_private_net_cidr }
208 type: tosca.nodes.nfv.VnfVirtualLink
213 max_bit_rate_requirements:
216 min_bit_rate_requirements:
219 networkName: { get_input: cpe_signal_net_id}
220 cidr: { get_input: cpe_signal_private_net_cidr }
223 #Private network that connects vBNG to vGMUX
224 VL_bng_gmux_private_net:
225 type: tosca.nodes.nfv.VnfVirtualLink
230 max_bit_rate_requirements:
233 min_bit_rate_requirements:
236 networkName: { get_input: bng_gmux_private_net_id}
237 cidr: { get_input: bng_gmux_private_net_cidr }
242 type: tosca.nodes.nfv.VduCp
244 layer_protocol: [ipv4]
247 - asscociated_layer_protocol: ipv4
249 address_type: ip_address
251 ip_address_assignment: false
252 floating_ip_activated: false
254 - virtual_binding: VDU_vbng_0
255 #- virtual_link: VL_public
257 Cp_vbng_onap_private:
258 type: tosca.nodes.nfv.VduCp
260 layer_protocol: [ipv4]
263 - asscociated_layer_protocol: ipv4
265 address_type: ip_address
267 ip_address_assignment: false
268 floating_ip_activated: false
270 - { get_input: vbng_private_ip_1 }
272 - virtual_binding: VDU_vbng_0
273 #- virtual_link: VL_onap_private
275 Cp_vbng_brgemu_bng_private_net:
276 type: tosca.nodes.nfv.VduCp
278 layer_protocol: [ipv4]
281 - asscociated_layer_protocol: ipv4
283 address_type: ip_address
285 ip_address_assignment: false
286 floating_ip_activated: false
288 - { get_input: vbng_private_ip_0 }
289 virtual_network_interface_requirements:
291 support_mandatory: true
293 network_interface_requirements:
294 dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
296 - virtual_binding: VDU_vbng_0
297 - virtual_link: VL_brgemu_bng_private_net
300 type: tosca.nodes.nfv.VduCp
302 layer_protocol: [ipv4]
305 - asscociated_layer_protocol: ipv4
307 address_type: ip_address
309 ip_address_assignment: false
310 floating_ip_activated: false
312 - { get_input: vbng_private_ip_2 }
314 - virtual_binding: VDU_vbng_0
315 - virtual_link: VL_cpe_signal
317 Cp_vbng_bng_gmux_private_net:
318 type: tosca.nodes.nfv.VduCp
320 layer_protocol: [ipv4]
323 - asscociated_layer_protocol: ipv4
325 address_type: ip_address
327 ip_address_assignment: false
328 floating_ip_activated: false
330 - { get_input: vbng_private_ip_3 }
331 virtual_network_interface_requirements:
333 support_mandatory: true
335 network_interface_requirements:
336 dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
338 - virtual_binding: VDU_vbng_0
339 - virtual_link: VL_bng_gmux_private_net
341 VirtualStorage_root_all:
342 # this indicate the VDU root storage size
343 type: tosca.nodes.nfv.Vdu.VirtualStorage
345 type_of_storage: root
346 size_of_storage: 40 GB
349 type: tosca.nodes.nfv.Vdu.Compute
351 name: { get_input: vbng_name_0 }
353 configurable_properties:
354 additional_vnfc_configurable_properties: {}
356 min_number_of_instances: 1
357 max_number_of_instances: 1
359 inject_files: #TODO SDC bug
360 source_path: ../Artifacts/keys/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
424 vdu_memory_requirements:
425 memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
426 numberOfPages: '{"schemaVersion": "0","schemaSelector": "","hardwarePlatform": "generic","mandatory": "true", "configurationValue": "1024"}'
429 cpu_architecture: generic
431 - virtual_storage: VirtualStorage_root_all
433 sw_image: #TODO need to put glance image name here
434 #file: { get_input: vcpe_image_name }
435 file: ../Artifacts/images/ubuntu_16.04
436 type: tosca.artifacts.nfv.SwImage