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
65 description: onap OAM network id
66 onap_private_net_cidr:
68 description: oanp OAM network cidr
70 brgemu_bng_private_net_id:
72 description: Private network that connects vBRG to vBNG
73 default: zdfw1bngin01_private
74 brgemu_bng_private_net_cidr:
76 description: The CIDR of the input side of vBNG private network
78 bng_gmux_private_net_id:
80 description: Private network that connects vBNG to vGMUX
81 default: zdfw1bngmux01_private
82 bng_gmux_private_net_cidr:
84 description: The CIDR of the input side of vGMUX private network
88 description: Private network that connects vCPE elements with vCPE infrastructure elements
89 default: zdfw1cpe01_private
90 cpe_signal_private_net_cidr:
92 description: The CIDR of the vAAA private network
96 description: Private IP address that is assigned to the vBNG IN
100 description: Private IP address that is assigned to the vBNG to communicate with ONAP components
104 description: Private IP address that is assigned to the vBNG in the CPE_SIGNAL network
108 description: Private IP address that is assigned to the vBNG to vGMUX port
112 description: Name of the vBNG
113 default: zdcpe1cpe01bng01
116 description: The VNF ID is provided by ONAP
117 default: vCPE_Infrastructure_Metro_vBNG_demo_app
120 description: The vCPE Module ID is provided by ONAP
121 default: vCPE_Intrastructure_Metro_vBNG
124 description: dcae collector ip
128 description: dcae collector port
132 description: ssh public key
133 default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
136 description: Root URL for the Nexus repository for Maven artifacts
137 default: https://nexus.onap.org
138 demo_artifacts_version:
140 description: artifacts version used in demo vnfs
142 install_script_version:
144 description: install script version number
145 default: 1.2.0-SNAPSHOT
148 description: cloud environment(openstack or rackspace)
152 description: IP address of the SDNC
158 # type: tosca.nodes.nfv.VnfVirtualLink
161 # layer_protocol: ipv4
163 # max_bit_rate_requirements:
166 # min_bit_rate_requirements:
169 # networkName: { get_input: public_net_id }
173 # type: tosca.nodes.nfv.VnfVirtualLink
176 # layer_protocol: ipv4
178 # max_bit_rate_requirements:
181 # min_bit_rate_requirements:
184 # networkName: { get_input: onap_private_net_id }
185 # cidr: { get_input: onap_private_net_cidr }
187 #Private network that connects vBRG to vBNG
188 VL_brgemu_bng_private_net:
189 type: tosca.nodes.nfv.VnfVirtualLink
194 max_bit_rate_requirements:
197 min_bit_rate_requirements:
200 networkName: { get_input: brgemu_bng_private_net_id}
201 cidr: { get_input: brgemu_bng_private_net_cidr }
203 physicalNetwork: "physnet1"
207 type: tosca.nodes.nfv.VnfVirtualLink
212 max_bit_rate_requirements:
215 min_bit_rate_requirements:
218 networkName: { get_input: cpe_signal_net_id}
219 cidr: { get_input: cpe_signal_private_net_cidr }
222 #Private network that connects vBNG to vGMUX
223 VL_bng_gmux_private_net:
224 type: tosca.nodes.nfv.VnfVirtualLink
229 max_bit_rate_requirements:
232 min_bit_rate_requirements:
235 networkName: { get_input: bng_gmux_private_net_id}
236 cidr: { get_input: bng_gmux_private_net_cidr }
238 physicalNetwork: "physnet1"
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 }
290 virtual_network_interface_requirements:
291 - name: "sriov-support"
292 support_mandatory: true
293 network_interface_requirements:
294 interfaceType: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "SR-IOV"}'
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_protocol: [ipv4]
309 - asscociated_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_protocol: [ipv4]
327 - asscociated_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 }
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 pciVendorId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1234"}'
343 pciDeviceId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "5678"}'
344 pciNumDevices: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1"}'
346 - virtual_binding: VDU_vbng_0
347 - virtual_link: VL_bng_gmux_private_net
349 VirtualStorage_root_all:
350 # this indicate the VDU root storage size
351 type: tosca.nodes.nfv.Vdu.VirtualStorage
353 type_of_storage: root
354 size_of_storage: 40 GB
357 type: tosca.nodes.nfv.Vdu.Compute
359 name: { get_input: vbng_name_0 }
361 configurable_properties:
362 additional_vnfc_configurable_properties: {}
364 min_number_of_instances: 1
365 max_number_of_instances: 1
367 inject_files: #TODO SDC bug
368 source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
369 dest_path: /home/ubuntu/.ssh/authorized_keys
371 vnf_id: { get_input: vnf_id }
372 vf_module_id: { get_input: vf_module_id }
374 brgemu_bng_net_ipaddr: { get_input: vbng_private_ip_0 }
375 cpe_signal_net_ipaddr: { get_input: vbng_private_ip_2 }
376 bng_gmux_net_ipaddr: { get_input: vbng_private_ip_3 }
377 oam_ipaddr: { get_input: vbng_private_ip_1 }
378 oam_cidr: { get_input: onap_private_net_cidr }
379 bng_gmux_cidr: { get_input: bng_gmux_private_net_cidr }
380 cpe_signal_cidr: { get_input: cpe_signal_private_net_cidr }
381 brgemu_bng_cidr: { get_input: brgemu_bng_private_net_cidr }
382 dcae_collector_ip: { get_input: dcae_collector_ip }
383 dcae_collector_port: { get_input: dcae_collector_port }
384 demo_artifacts_version: { get_input: demo_artifacts_version }
385 install_script_version: { get_input: install_script_version }
386 sdnc_ip: { get_input: sdnc_ip_addr }
387 cloud_env: { get_input: cloud_env }
388 nexus_artifact_repo: { get_input: nexus_artifact_repo }
391 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
392 apt-get -y install jq
395 echo $METADATA | jq -r ".meta.$1"
398 # Create configuration files
400 echo "$(get_metadata brgemu_bng_net_ipaddr)" > /opt/config/brgemu_bng_net_ipaddr.txt
401 echo "$(get_metadata cpe_signal_net_ipaddr)" > /opt/config/cpe_signal_net_ipaddr.txt
402 echo "$(get_metadata bng_gmux_net_ipaddr)" > /opt/config/bng_gmux_net_ipaddr.txt
403 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
404 echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
405 echo "$(get_metadata bng_gmux_cidr)" > /opt/config/bng_gmux_net_cidr.txt
406 echo "$(get_metadata cpe_signal_cidr)" > /opt/config/cpe_signal_net_cidr.txt
407 echo "$(get_metadata brgemu_bng_cidr)" > /opt/config/brgemu_bng_net_cidr.txt
408 echo "$(get_metadata dcae_collector_ip)" > /opt/config/dcae_collector_ip.txt
409 echo "$(get_metadata dcae_collector_port)" > /opt/config/dcae_collector_port.txt
410 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
411 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
412 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
413 echo "$(get_metadata sdnc_ip)" > /opt/config/sdnc_ip.txt
414 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
416 # Download and run install script
417 apt-get -y install unzip
418 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
419 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
420 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
421 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
422 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_bng_install.sh
424 chmod +x v_bng_install.sh
430 virtual_mem_size: 4096 MB
432 vdu_memory_requirements:
433 memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
434 numberOfPages: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1024"}'
437 cpu_architecture: generic
439 - virtual_storage: VirtualStorage_root_all
441 sw_image: #TODO need to put glance image name here
442 #file: { get_input: vcpe_image_name }
443 file: ../Artifacts/images/ubuntu_16.04
444 type: tosca.artifacts.nfv.SwImage