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
28 description: onap OAM network id
29 onap_private_net_cidr:
31 description: oanp OAM network cidr
33 brgemu_bng_private_net_id:
35 description: Private network that connects vBRG to vBNG
36 default: zdfw1bngin01_private
37 brgemu_bng_private_net_cidr:
39 description: The CIDR of the input side of vBNG private network
41 bng_gmux_private_net_id:
43 description: Private network that connects vBNG to vGMUX
44 default: zdfw1bngmux01_private
45 bng_gmux_private_net_cidr:
47 description: The CIDR of the input side of vGMUX private network
51 description: Private network that connects vCPE elements with vCPE infrastructure elements
52 default: zdfw1cpe01_private
53 cpe_signal_private_net_cidr:
55 description: The CIDR of the vAAA private network
59 description: Private IP address that is assigned to the vBNG IN
63 description: Private IP address that is assigned to the vBNG to communicate with ONAP components
67 description: Private IP address that is assigned to the vBNG in the CPE_SIGNAL network
71 description: Private IP address that is assigned to the vBNG to vGMUX port
75 description: Name of the vBNG
76 default: zdcpe1cpe01bng01
79 description: The VNF ID is provided by ONAP
80 default: vCPE_Infrastructure_Metro_vBNG_demo_app
83 description: The vCPE Module ID is provided by ONAP
84 default: vCPE_Intrastructure_Metro_vBNG
87 description: dcae collector ip
91 description: dcae collector port
95 description: ssh public key
96 default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
99 description: Root URL for the Nexus repository for Maven artifacts
100 default: https://nexus.onap.org
101 demo_artifacts_version:
103 description: artifacts version used in demo vnfs
105 install_script_version:
107 description: install script version number
108 default: 1.2.0-SNAPSHOT
111 description: cloud environment(openstack or rackspace)
115 description: IP address of the SDNC
120 type: tosca.nodes.nfv.VNF
122 descriptor_id: b1bb0ce7-2222-4fa7-95ed-4840d70a1177
124 product_name: vcpe_vbng
125 software_version: '1.0'
126 descriptor_version: '1.0'
128 flavour_description: simple
134 # type: tosca.nodes.nfv.VnfVirtualLink
137 # layer_protocols: [ipv4]
139 # max_bitrate_requirements:
142 # min_bitrate_requirements:
145 # virtual_link_protocol_data:
146 # - associated_layer_protocol: ipv4
149 # name: { get_input: public_net_id }
153 # type: tosca.nodes.nfv.VnfVirtualLink
156 # layer_protocols: [ipv4]
158 # max_bitrate_requirements:
161 # min_bitrate_requirements:
164 # virtual_link_protocol_data:
165 # - associated_layer_protocol: ipv4
168 # name: { get_input: onap_private_net_id }
169 # cidr: { get_input: onap_private_net_cidr }
171 #Private network that connects vBRG to vBNG
172 VL_brgemu_bng_private_net:
173 type: tosca.nodes.nfv.VnfVirtualLink
176 layer_protocols: [ipv4]
178 max_bitrate_requirements:
181 min_bitrate_requirements:
184 virtual_link_protocol_data:
185 - associated_layer_protocol: ipv4
188 name: { get_input: brgemu_bng_private_net_id}
189 cidr: { get_input: brgemu_bng_private_net_cidr }
192 physical_network: "physnet1"
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 }
236 physical_network: "physnet1"
240 type: tosca.nodes.nfv.VduCp
242 layer_protocols: [ipv4]
245 - associated_layer_protocol: ipv4
247 - address_type: ip_address
249 ip_address_assignment: false
250 floating_ip_activated: false
252 - virtual_binding: VDU_vbng_0
253 #- virtual_link: VL_public
255 Cp_vbng_onap_private:
256 type: tosca.nodes.nfv.VduCp
258 layer_protocols: [ipv4]
261 - associated_layer_protocol: ipv4
263 - address_type: ip_address
265 ip_address_assignment: false
266 floating_ip_activated: false
268 - { get_input: vbng_private_ip_1 }
270 - virtual_binding: VDU_vbng_0
271 #- virtual_link: VL_onap_private
273 Cp_vbng_brgemu_bng_private_net:
274 type: tosca.nodes.nfv.VduCp
276 layer_protocols: [ipv4]
279 - associated_layer_protocol: ipv4
281 - address_type: ip_address
283 ip_address_assignment: false
284 floating_ip_activated: false
286 - { get_input: vbng_private_ip_0 }
287 vnic_type: "direct-physical"
288 virtual_network_interface_requirements:
289 - name: "sriov-support"
290 support_mandatory: true
291 network_interface_requirements:
292 interfaceType: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "SR-IOV"}'
294 logical_node_requirements:
295 pciVendorId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1234"}'
296 pciDeviceId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "5678"}'
297 pciNumDevices: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1"}'
299 - virtual_binding: VDU_vbng_0
300 - virtual_link: VL_brgemu_bng_private_net
303 type: tosca.nodes.nfv.VduCp
305 layer_protocols: [ipv4]
308 - associated_layer_protocol: ipv4
310 - address_type: ip_address
312 ip_address_assignment: false
313 floating_ip_activated: false
315 - { get_input: vbng_private_ip_2 }
317 - virtual_binding: VDU_vbng_0
318 - virtual_link: VL_cpe_signal
320 Cp_vbng_bng_gmux_private_net:
321 type: tosca.nodes.nfv.VduCp
323 layer_protocols: [ipv4]
326 - associated_layer_protocol: ipv4
328 - address_type: ip_address
330 ip_address_assignment: false
331 floating_ip_activated: false
333 - { get_input: vbng_private_ip_3 }
334 vnic_type: "direct-physical"
335 virtual_network_interface_requirements:
336 - name: "sriov-support"
337 support_mandatory: true
338 network_interface_requirements:
339 interfaceType: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "SR-IOV"}'
341 logical_node_requirements:
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
350 type: tosca.nodes.nfv.Vdu.Compute
352 name: { get_input: vbng_name_0 }
355 min_number_of_instances: 1
356 max_number_of_instances: 1
358 inject_files: #TODO SDC bug
359 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
360 dest_path: /home/ubuntu/.ssh/authorized_keys
362 vnf_id: { get_input: vnf_id }
363 vf_module_id: { get_input: vf_module_id }
365 brgemu_bng_net_ipaddr: { get_input: vbng_private_ip_0 }
366 cpe_signal_net_ipaddr: { get_input: vbng_private_ip_2 }
367 bng_gmux_net_ipaddr: { get_input: vbng_private_ip_3 }
368 oam_ipaddr: { get_input: vbng_private_ip_1 }
369 oam_cidr: { get_input: onap_private_net_cidr }
370 bng_gmux_cidr: { get_input: bng_gmux_private_net_cidr }
371 cpe_signal_cidr: { get_input: cpe_signal_private_net_cidr }
372 brgemu_bng_cidr: { get_input: brgemu_bng_private_net_cidr }
373 dcae_collector_ip: { get_input: dcae_collector_ip }
374 dcae_collector_port: { get_input: dcae_collector_port }
375 demo_artifacts_version: { get_input: demo_artifacts_version }
376 install_script_version: { get_input: install_script_version }
377 sdnc_ip: { get_input: sdnc_ip_addr }
378 cloud_env: { get_input: cloud_env }
379 nexus_artifact_repo: { get_input: nexus_artifact_repo }
382 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
383 apt-get -y install jq
386 echo $METADATA | jq -r ".meta.$1"
389 # Create configuration files
391 echo "$(get_metadata brgemu_bng_net_ipaddr)" > /opt/config/brgemu_bng_net_ipaddr.txt
392 echo "$(get_metadata cpe_signal_net_ipaddr)" > /opt/config/cpe_signal_net_ipaddr.txt
393 echo "$(get_metadata bng_gmux_net_ipaddr)" > /opt/config/bng_gmux_net_ipaddr.txt
394 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
395 echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
396 echo "$(get_metadata bng_gmux_cidr)" > /opt/config/bng_gmux_net_cidr.txt
397 echo "$(get_metadata cpe_signal_cidr)" > /opt/config/cpe_signal_net_cidr.txt
398 echo "$(get_metadata brgemu_bng_cidr)" > /opt/config/brgemu_bng_net_cidr.txt
399 echo "$(get_metadata dcae_collector_ip)" > /opt/config/dcae_collector_ip.txt
400 echo "$(get_metadata dcae_collector_port)" > /opt/config/dcae_collector_port.txt
401 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
402 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
403 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
404 echo "$(get_metadata sdnc_ip)" > /opt/config/sdnc_ip.txt
405 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
407 # Download and run install script
408 apt-get -y install unzip
409 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
410 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
411 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
412 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
413 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_bng_install.sh
415 chmod +x v_bng_install.sh
421 virtual_mem_size: 4096 MB
422 vdu_mem_requirements:
423 memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
424 numberOfPages: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1024"}'
427 cpu_architecture: generic
428 virtual_local_storage:
429 - size_of_storage: 40 GB
431 sw_image: #TODO need to put glance image name here
432 #file: { get_input: vcpe_image_name }
433 file: ../Artifacts/Deployment/OTHER/image
434 type: tosca.artifacts.nfv.SwImage