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_protocols: [ipv4]
141 # max_bitrate_requirements:
144 # min_bitrate_requirements:
147 # virtual_link_protocol_data:
148 # - associated_layer_protocol: ipv4
151 # name: { get_input: public_net_id }
155 # type: tosca.nodes.nfv.VnfVirtualLink
158 # layer_protocols: [ipv4]
160 # max_bitrate_requirements:
163 # min_bitrate_requirements:
166 # virtual_link_protocol_data:
167 # - associated_layer_protocol: ipv4
170 # name: { get_input: onap_private_net_id }
171 # cidr: { get_input: onap_private_net_cidr }
173 #Private network that connects vBRG to vBNG
174 VL_brgemu_bng_private_net:
175 type: tosca.nodes.nfv.VnfVirtualLink
178 layer_protocols: [ipv4]
180 max_bitrate_requirements:
183 min_bitrate_requirements:
186 virtual_link_protocol_data:
187 - associated_layer_protocol: ipv4
190 name: { get_input: brgemu_bng_private_net_id}
191 cidr: { get_input: brgemu_bng_private_net_cidr }
196 type: tosca.nodes.nfv.VnfVirtualLink
199 layer_protocols: [ipv4]
201 max_bitrate_requirements:
204 min_bitrate_requirements:
207 virtual_link_protocol_data:
208 - associated_layer_protocol: ipv4
211 name: { get_input: cpe_signal_net_id}
212 cidr: { get_input: cpe_signal_private_net_cidr }
215 #Private network that connects vBNG to vGMUX
216 VL_bng_gmux_private_net:
217 type: tosca.nodes.nfv.VnfVirtualLink
220 layer_protocols: [ipv4]
222 max_bitrate_requirements:
225 min_bitrate_requirements:
228 virtual_link_protocol_data:
229 - associated_layer_protocol: ipv4
232 name: { get_input: bng_gmux_private_net_id}
233 cidr: { get_input: bng_gmux_private_net_cidr }
238 type: tosca.nodes.nfv.VduCp
240 layer_protocols: [ipv4]
243 - associated_layer_protocol: ipv4
245 - address_type: ip_address
247 ip_address_assignment: false
248 floating_ip_activated: false
250 - virtual_binding: VDU_vbng_0
251 #- virtual_link: VL_public
253 Cp_vbng_onap_private:
254 type: tosca.nodes.nfv.VduCp
256 layer_protocols: [ipv4]
259 - associated_layer_protocol: ipv4
261 - address_type: ip_address
263 ip_address_assignment: false
264 floating_ip_activated: false
266 - { get_input: vbng_private_ip_1 }
268 - virtual_binding: VDU_vbng_0
269 #- virtual_link: VL_onap_private
271 Cp_vbng_brgemu_bng_private_net:
272 type: tosca.nodes.nfv.VduCp
274 layer_protocols: [ipv4]
277 - associated_layer_protocol: ipv4
279 - address_type: ip_address
281 ip_address_assignment: false
282 floating_ip_activated: false
284 - { get_input: vbng_private_ip_0 }
285 virtual_network_interface_requirements:
287 support_mandatory: true
288 network_interface_requirements:
289 dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
291 - virtual_binding: VDU_vbng_0
292 - virtual_link: VL_brgemu_bng_private_net
295 type: tosca.nodes.nfv.VduCp
297 layer_protocols: [ipv4]
300 - associated_layer_protocol: ipv4
302 - address_type: ip_address
304 ip_address_assignment: false
305 floating_ip_activated: false
307 - { get_input: vbng_private_ip_2 }
309 - virtual_binding: VDU_vbng_0
310 - virtual_link: VL_cpe_signal
312 Cp_vbng_bng_gmux_private_net:
313 type: tosca.nodes.nfv.VduCp
315 layer_protocols: [ipv4]
318 - associated_layer_protocol: ipv4
320 - address_type: ip_address
322 ip_address_assignment: false
323 floating_ip_activated: false
325 - { get_input: vbng_private_ip_3 }
326 virtual_network_interface_requirements:
328 support_mandatory: true
329 network_interface_requirements:
330 dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
332 - virtual_binding: VDU_vbng_0
333 - virtual_link: VL_bng_gmux_private_net
336 type: tosca.nodes.nfv.Vdu.Compute
338 name: { get_input: vbng_name_0 }
341 min_number_of_instances: 1
342 max_number_of_instances: 1
344 inject_files: #TODO SDC bug
345 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
346 dest_path: /home/ubuntu/.ssh/authorized_keys
348 vnf_id: { get_input: vnf_id }
349 vf_module_id: { get_input: vf_module_id }
351 brgemu_bng_net_ipaddr: { get_input: vbng_private_ip_0 }
352 cpe_signal_net_ipaddr: { get_input: vbng_private_ip_2 }
353 bng_gmux_net_ipaddr: { get_input: vbng_private_ip_3 }
354 oam_ipaddr: { get_input: vbng_private_ip_1 }
355 oam_cidr: { get_input: onap_private_net_cidr }
356 bng_gmux_cidr: { get_input: bng_gmux_private_net_cidr }
357 cpe_signal_cidr: { get_input: cpe_signal_private_net_cidr }
358 brgemu_bng_cidr: { get_input: brgemu_bng_private_net_cidr }
359 dcae_collector_ip: { get_input: dcae_collector_ip }
360 dcae_collector_port: { get_input: dcae_collector_port }
361 demo_artifacts_version: { get_input: demo_artifacts_version }
362 install_script_version: { get_input: install_script_version }
363 sdnc_ip: { get_input: sdnc_ip_addr }
364 cloud_env: { get_input: cloud_env }
365 nexus_artifact_repo: { get_input: nexus_artifact_repo }
368 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
369 apt-get -y install jq
372 echo $METADATA | jq -r ".meta.$1"
375 # Create configuration files
377 echo "$(get_metadata brgemu_bng_net_ipaddr)" > /opt/config/brgemu_bng_net_ipaddr.txt
378 echo "$(get_metadata cpe_signal_net_ipaddr)" > /opt/config/cpe_signal_net_ipaddr.txt
379 echo "$(get_metadata bng_gmux_net_ipaddr)" > /opt/config/bng_gmux_net_ipaddr.txt
380 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
381 echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
382 echo "$(get_metadata bng_gmux_cidr)" > /opt/config/bng_gmux_net_cidr.txt
383 echo "$(get_metadata cpe_signal_cidr)" > /opt/config/cpe_signal_net_cidr.txt
384 echo "$(get_metadata brgemu_bng_cidr)" > /opt/config/brgemu_bng_net_cidr.txt
385 echo "$(get_metadata dcae_collector_ip)" > /opt/config/dcae_collector_ip.txt
386 echo "$(get_metadata dcae_collector_port)" > /opt/config/dcae_collector_port.txt
387 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
388 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
389 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
390 echo "$(get_metadata sdnc_ip)" > /opt/config/sdnc_ip.txt
391 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
393 # Download and run install script
394 apt-get -y install unzip
395 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
396 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
397 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
398 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
399 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_bng_install.sh
401 chmod +x v_bng_install.sh
407 virtual_mem_size: 4096 MB
408 vdu_mem_requirements:
409 memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
410 numberOfPages: '{"schemaVersion": "0","schemaSelector": "","hardwarePlatform": "generic","mandatory": "true", "configurationValue": "1024"}'
413 cpu_architecture: generic
414 virtual_local_storage:
415 - size_of_storage: 40 GB
417 sw_image: #TODO need to put glance image name here
418 #file: { get_input: vcpe_image_name }
419 file: ../Artifacts/Deployment/OTHER/image
420 type: tosca.artifacts.nfv.SwImage