1 tosca_definitions_version: tosca_simple_yaml_1_0
3 template_name: vCPE_vbng
4 template_version: "1.0"
12 # substitution_mappings:
13 # node_type: onap.vcpe_vbng
15 # virtual_link: [ Cp_vbng_public, virtual_link ] # expose as external CP
16 # virtual_link: [ Cp_vbng_onap_private, virtual_link ] # expose as external CP
21 description: image name for vcpe in openstack glance
25 description: public network id used during onap installation
29 description: onap OAM network id
31 onap_private_net_cidr:
33 description: oanp OAM network cidr
35 brgemu_bng_private_net_id:
37 description: Private network that connects vBRG to vBNG
38 default: zdfw1bngin01_private
39 brgemu_bng_private_net_cidr:
41 description: The CIDR of the input side of vBNG private network
43 bng_gmux_private_net_id:
45 description: Private network that connects vBNG to vGMUX
46 default: zdfw1bngmux01_private
47 bng_gmux_private_net_cidr:
49 description: The CIDR of the input side of vGMUX private network
53 description: Private network that connects vCPE elements with vCPE infrastructure elements
54 default: zdfw1cpe01_private
55 cpe_signal_private_net_cidr:
57 description: The CIDR of the vAAA private network
61 description: Private IP address that is assigned to the vBNG IN
65 description: Private IP address that is assigned to the vBNG to communicate with ONAP components
69 description: Private IP address that is assigned to the vBNG in the CPE_SIGNAL network
73 description: Private IP address that is assigned to the vBNG to vGMUX port
77 description: Name of the vBNG
78 default: zdcpe1cpe01bng01
81 description: The VNF ID is provided by ONAP
82 default: vCPE_Infrastructure_Metro_vBNG_demo_app
85 description: The vCPE Module ID is provided by ONAP
86 default: vCPE_Intrastructure_Metro_vBNG
89 description: dcae collector ip
93 description: dcae collector port
97 description: ssh public key
98 default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
101 description: Root URL for the Nexus repository for Maven artifacts
102 default: https://nexus.onap.org
103 demo_artifacts_version:
105 description: artifacts version used in demo vnfs
107 install_script_version:
109 description: install script version number
110 default: 1.2.0-SNAPSHOT
113 description: cloud environment(openstack or rackspace)
117 description: IP address of the SDNC
122 type: tosca.nodes.nfv.VNF
124 descriptor_id: b1bb0ce7-2222-4fa7-95ed-4840d70a1177
126 product_name: vcpe_vbng
127 software_version: '1.0'
128 descriptor_version: '1.0'
130 flavour_description: simple
136 # type: tosca.nodes.nfv.VnfVirtualLink
139 # layer_protocol: ipv4
141 # max_bit_rate_requirements:
144 # min_bit_rate_requirements:
147 # networkName: { get_input: public_net_id }
151 # type: tosca.nodes.nfv.VnfVirtualLink
154 # layer_protocol: ipv4
156 # max_bit_rate_requirements:
159 # min_bit_rate_requirements:
162 # networkName: { get_input: onap_private_net_id }
163 # cidr: { get_input: onap_private_net_cidr }
165 #Private network that connects vBRG to vBNG
166 VL_brgemu_bng_private_net:
167 type: tosca.nodes.nfv.VnfVirtualLink
172 max_bit_rate_requirements:
175 min_bit_rate_requirements:
178 networkName: { get_input: brgemu_bng_private_net_id}
179 cidr: { get_input: brgemu_bng_private_net_cidr }
184 type: tosca.nodes.nfv.VnfVirtualLink
189 max_bit_rate_requirements:
192 min_bit_rate_requirements:
195 networkName: { get_input: cpe_signal_net_id}
196 cidr: { get_input: cpe_signal_private_net_cidr }
199 #Private network that connects vBNG to vGMUX
200 VL_bng_gmux_private_net:
201 type: tosca.nodes.nfv.VnfVirtualLink
206 max_bit_rate_requirements:
209 min_bit_rate_requirements:
212 networkName: { get_input: bng_gmux_private_net_id}
213 cidr: { get_input: bng_gmux_private_net_cidr }
218 type: tosca.nodes.nfv.VduCp
220 layer_protocol: [ipv4]
223 - asscociated_layer_protocol: ipv4
225 address_type: ip_address
227 ip_address_assignment: false
228 floating_ip_activated: false
230 - virtual_binding: VDU_vbng_0
231 #- virtual_link: VL_public
233 Cp_vbng_onap_private:
234 type: tosca.nodes.nfv.VduCp
236 layer_protocol: [ipv4]
239 - asscociated_layer_protocol: ipv4
241 address_type: ip_address
243 ip_address_assignment: false
244 floating_ip_activated: false
246 - { get_input: vbng_private_ip_1 }
248 - virtual_binding: VDU_vbng_0
249 #- virtual_link: VL_onap_private
251 Cp_vbng_brgemu_bng_private_net:
252 type: tosca.nodes.nfv.VduCp
254 layer_protocol: [ipv4]
257 - asscociated_layer_protocol: ipv4
259 address_type: ip_address
261 ip_address_assignment: false
262 floating_ip_activated: false
264 - { get_input: vbng_private_ip_0 }
265 virtual_network_interface_requirements:
267 support_mandatory: true
269 network_interface_requirements:
270 dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
272 - virtual_binding: VDU_vbng_0
273 - virtual_link: VL_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_2 }
290 - virtual_binding: VDU_vbng_0
291 - virtual_link: VL_cpe_signal
293 Cp_vbng_bng_gmux_private_net:
294 type: tosca.nodes.nfv.VduCp
296 layer_protocol: [ipv4]
299 - asscociated_layer_protocol: ipv4
301 address_type: ip_address
303 ip_address_assignment: false
304 floating_ip_activated: false
306 - { get_input: vbng_private_ip_3 }
307 virtual_network_interface_requirements:
309 support_mandatory: true
311 network_interface_requirements:
312 dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
314 - virtual_binding: VDU_vbng_0
315 - virtual_link: VL_bng_gmux_private_net
317 VirtualStorage_root_all:
318 # this indicate the VDU root storage size
319 type: tosca.nodes.nfv.Vdu.VirtualStorage
321 type_of_storage: root
322 size_of_storage: 40 GB
325 type: tosca.nodes.nfv.Vdu.Compute
327 name: { get_input: vbng_name_0 }
329 configurable_properties:
330 additional_vnfc_configurable_properties: {}
332 min_number_of_instances: 1
333 max_number_of_instances: 1
335 inject_files: #TODO SDC bug
336 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
337 dest_path: /home/ubuntu/.ssh/authorized_keys
339 vnf_id: { get_input: vnf_id }
340 vf_module_id: { get_input: vf_module_id }
342 brgemu_bng_net_ipaddr: { get_input: vbng_private_ip_0 }
343 cpe_signal_net_ipaddr: { get_input: vbng_private_ip_2 }
344 bng_gmux_net_ipaddr: { get_input: vbng_private_ip_3 }
345 oam_ipaddr: { get_input: vbng_private_ip_1 }
346 oam_cidr: { get_input: onap_private_net_cidr }
347 bng_gmux_cidr: { get_input: bng_gmux_private_net_cidr }
348 cpe_signal_cidr: { get_input: cpe_signal_private_net_cidr }
349 brgemu_bng_cidr: { get_input: brgemu_bng_private_net_cidr }
350 dcae_collector_ip: { get_input: dcae_collector_ip }
351 dcae_collector_port: { get_input: dcae_collector_port }
352 demo_artifacts_version: { get_input: demo_artifacts_version }
353 install_script_version: { get_input: install_script_version }
354 sdnc_ip: { get_input: sdnc_ip_addr }
355 cloud_env: { get_input: cloud_env }
356 nexus_artifact_repo: { get_input: nexus_artifact_repo }
359 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
360 apt-get -y install jq
363 echo $METADATA | jq -r ".meta.$1"
366 # Create configuration files
368 echo "$(get_metadata brgemu_bng_net_ipaddr)" > /opt/config/brgemu_bng_net_ipaddr.txt
369 echo "$(get_metadata cpe_signal_net_ipaddr)" > /opt/config/cpe_signal_net_ipaddr.txt
370 echo "$(get_metadata bng_gmux_net_ipaddr)" > /opt/config/bng_gmux_net_ipaddr.txt
371 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
372 echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
373 echo "$(get_metadata bng_gmux_cidr)" > /opt/config/bng_gmux_net_cidr.txt
374 echo "$(get_metadata cpe_signal_cidr)" > /opt/config/cpe_signal_net_cidr.txt
375 echo "$(get_metadata brgemu_bng_cidr)" > /opt/config/brgemu_bng_net_cidr.txt
376 echo "$(get_metadata dcae_collector_ip)" > /opt/config/dcae_collector_ip.txt
377 echo "$(get_metadata dcae_collector_port)" > /opt/config/dcae_collector_port.txt
378 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
379 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
380 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
381 echo "$(get_metadata sdnc_ip)" > /opt/config/sdnc_ip.txt
382 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
384 # Download and run install script
385 apt-get -y install unzip
386 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
387 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
388 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
389 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
390 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_bng_install.sh
392 chmod +x v_bng_install.sh
398 virtual_mem_size: 4096 MB
400 vdu_memory_requirements:
401 memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
402 numberOfPages: '{"schemaVersion": "0","schemaSelector": "","hardwarePlatform": "generic","mandatory": "true", "configurationValue": "1024"}'
405 cpu_architecture: generic
407 - virtual_storage: VirtualStorage_root_all
409 sw_image: #TODO need to put glance image name here
410 #file: { get_input: vcpe_image_name }
411 file: ../Artifacts/Deployment/OTHER/image
412 type: tosca.artifacts.nfv.SwImage