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: dpdk_2.2
295 interfaceType: virtio
297 - virtual_binding: VDU_vbng_0
298 - virtual_link: VL_brgemu_bng_private_net
301 type: tosca.nodes.nfv.VduCp
303 layer_protocol: [ipv4]
306 - asscociated_layer_protocol: ipv4
308 address_type: ip_address
310 ip_address_assignment: false
311 floating_ip_activated: false
313 - { get_input: vbng_private_ip_2 }
315 - virtual_binding: VDU_vbng_0
316 - virtual_link: VL_cpe_signal
318 Cp_vbng_bng_gmux_private_net:
319 type: tosca.nodes.nfv.VduCp
321 layer_protocol: [ipv4]
324 - asscociated_layer_protocol: ipv4
326 address_type: ip_address
328 ip_address_assignment: false
329 floating_ip_activated: false
331 - { get_input: vbng_private_ip_3 }
332 virtual_network_interface_requirements:
334 support_mandatory: true
336 network_interface_requirements:
337 #dataProcessingAccelerationLibrary: dpdk_2.2
338 interfaceType: virtio
340 - virtual_binding: VDU_vbng_0
341 - virtual_link: VL_bng_gmux_private_net
343 VirtualStorage_root_all:
344 # this indicate the VDU root storage size
345 type: tosca.nodes.nfv.Vdu.VirtualStorage
347 type_of_storage: root
348 size_of_storage: 40 GB
351 type: tosca.nodes.nfv.Vdu.Compute
353 name: { get_input: vbng_name_0 }
355 configurable_properties:
356 additional_vnfc_configurable_properties: {}
358 min_number_of_instances: 1
359 max_number_of_instances: 1
361 inject_files: #TODO SDC bug
362 source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
363 dest_path: /home/ubuntu/.ssh/authorized_keys
365 vnf_id: { get_input: vnf_id }
366 vf_module_id: { get_input: vf_module_id }
368 brgemu_bng_net_ipaddr: { get_input: vbng_private_ip_0 }
369 cpe_signal_net_ipaddr: { get_input: vbng_private_ip_2 }
370 bng_gmux_net_ipaddr: { get_input: vbng_private_ip_3 }
371 oam_ipaddr: { get_input: vbng_private_ip_1 }
372 oam_cidr: { get_input: oam_private_net_cidr }
373 bng_gmux_cidr: { get_input: bng_gmux_private_net_cidr }
374 cpe_signal_cidr: { get_input: cpe_signal_private_net_cidr }
375 brgemu_bng_cidr: { get_input: brgemu_bng_private_net_cidr }
376 dcae_collector_ip: { get_input: dcae_collector_ip }
377 dcae_collector_port: { get_input: dcae_collector_port }
378 demo_artifacts_version: { get_input: demo_artifacts_version }
379 install_script_version: { get_input: install_script_version }
380 sdnc_ip: { get_input: sdnc_ip }
381 cloud_env: { get_input: cloud_env }
382 nexus_artifact_repo: { get_input: nexus_artifact_repo }
385 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
386 apt-get -y install jq
389 echo $METADATA | jq -r ".meta.$1"
392 # Create configuration files
394 echo "$(get_metadata brgemu_bng_net_ipaddr)" > /opt/config/brgemu_bng_net_ipaddr.txt
395 echo "$(get_metadata cpe_signal_net_ipaddr)" > /opt/config/cpe_signal_net_ipaddr.txt
396 echo "$(get_metadata bng_gmux_net_ipaddr)" > /opt/config/bng_gmux_net_ipaddr.txt
397 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
398 echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
399 echo "$(get_metadata bng_gmux_cidr)" > /opt/config/bng_gmux_net_cidr.txt
400 echo "$(get_metadata cpe_signal_cidr)" > /opt/config/cpe_signal_net_cidr.txt
401 echo "$(get_metadata brgemu_bng_cidr)" > /opt/config/brgemu_bng_net_cidr.txt
402 echo "$(get_metadata dcae_collector_ip)" > /opt/config/dcae_collector_ip.txt
403 echo "$(get_metadata dcae_collector_port)" > /opt/config/dcae_collector_port.txt
404 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
405 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
406 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
407 echo "$(get_metadata sdnc_ip)" > /opt/config/sdnc_ip.txt
408 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
410 # Download and run install script
411 apt-get -y install unzip
412 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
413 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
414 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
415 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
416 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_bng_install.sh
418 chmod +x v_bng_install.sh
424 virtual_mem_size: 4096 MB
426 vdu_memory_requirements:
427 memoryPageSize: '{"schema-version": "0", "schema-location": "", "platform-id": "generic", "mandatory": true, "configuration-value": "2 MB"}'
428 numberOfPages: '{"schema-version": "0","schema-location": "","platform-id": "generic","mandatory": true,"configuration-value": 1024}'
431 cpu_architecture: generic
433 - virtual_storage: VirtualStorage_root_all
435 sw_image: #TODO need to put glance image name here
436 #file: { get_input: vcpe_image_name }
437 file: ../Artifacts/images/ubuntu_16.04
438 type: tosca.artifacts.nfv.SwImage