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_protocol: ipv4
139 # max_bit_rate_requirements:
142 # min_bit_rate_requirements:
145 # networkName: { get_input: public_net_id }
149 # type: tosca.nodes.nfv.VnfVirtualLink
152 # layer_protocol: ipv4
154 # max_bit_rate_requirements:
157 # min_bit_rate_requirements:
160 # networkName: { get_input: onap_private_net_id }
161 # cidr: { get_input: onap_private_net_cidr }
163 #Private network that connects vBRG to vBNG
164 VL_brgemu_bng_private_net:
165 type: tosca.nodes.nfv.VnfVirtualLink
170 max_bit_rate_requirements:
173 min_bit_rate_requirements:
176 networkName: { get_input: brgemu_bng_private_net_id}
177 cidr: { get_input: brgemu_bng_private_net_cidr }
179 physicalNetwork: "physnet1"
183 type: tosca.nodes.nfv.VnfVirtualLink
188 max_bit_rate_requirements:
191 min_bit_rate_requirements:
194 networkName: { get_input: cpe_signal_net_id}
195 cidr: { get_input: cpe_signal_private_net_cidr }
198 #Private network that connects vBNG to vGMUX
199 VL_bng_gmux_private_net:
200 type: tosca.nodes.nfv.VnfVirtualLink
205 max_bit_rate_requirements:
208 min_bit_rate_requirements:
211 networkName: { get_input: bng_gmux_private_net_id}
212 cidr: { get_input: bng_gmux_private_net_cidr }
214 physicalNetwork: "physnet1"
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 }
266 virtual_network_interface_requirements:
267 - name: "sriov-support"
268 support_mandatory: true
269 network_interface_requirements:
270 interfaceType: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "SR-IOV"}'
272 logical_node_requirements:
273 pciVendorId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1234"}'
274 pciDeviceId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "5678"}'
275 pciNumDevices: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1"}'
277 - virtual_binding: VDU_vbng_0
278 - virtual_link: VL_brgemu_bng_private_net
281 type: tosca.nodes.nfv.VduCp
283 layer_protocol: [ipv4]
286 - asscociated_layer_protocol: ipv4
288 address_type: ip_address
290 ip_address_assignment: false
291 floating_ip_activated: false
293 - { get_input: vbng_private_ip_2 }
295 - virtual_binding: VDU_vbng_0
296 - virtual_link: VL_cpe_signal
298 Cp_vbng_bng_gmux_private_net:
299 type: tosca.nodes.nfv.VduCp
301 layer_protocol: [ipv4]
304 - asscociated_layer_protocol: ipv4
306 address_type: ip_address
308 ip_address_assignment: false
309 floating_ip_activated: false
311 - { get_input: vbng_private_ip_3 }
313 virtual_network_interface_requirements:
314 - name: "sriov-support"
315 support_mandatory: true
316 network_interface_requirements:
317 interfaceType: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "SR-IOV"}'
319 logical_node_requirements:
320 pciVendorId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1234"}'
321 pciDeviceId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "5678"}'
322 pciNumDevices: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1"}'
324 - virtual_binding: VDU_vbng_0
325 - virtual_link: VL_bng_gmux_private_net
327 VirtualStorage_root_all:
328 # this indicate the VDU root storage size
329 type: tosca.nodes.nfv.Vdu.VirtualStorage
331 type_of_storage: root
332 size_of_storage: 40 GB
335 type: tosca.nodes.nfv.Vdu.Compute
337 name: { get_input: vbng_name_0 }
339 configurable_properties:
340 additional_vnfc_configurable_properties: {}
342 min_number_of_instances: 1
343 max_number_of_instances: 1
345 inject_files: #TODO SDC bug
346 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
347 dest_path: /home/ubuntu/.ssh/authorized_keys
349 vnf_id: { get_input: vnf_id }
350 vf_module_id: { get_input: vf_module_id }
352 brgemu_bng_net_ipaddr: { get_input: vbng_private_ip_0 }
353 cpe_signal_net_ipaddr: { get_input: vbng_private_ip_2 }
354 bng_gmux_net_ipaddr: { get_input: vbng_private_ip_3 }
355 oam_ipaddr: { get_input: vbng_private_ip_1 }
356 oam_cidr: { get_input: onap_private_net_cidr }
357 bng_gmux_cidr: { get_input: bng_gmux_private_net_cidr }
358 cpe_signal_cidr: { get_input: cpe_signal_private_net_cidr }
359 brgemu_bng_cidr: { get_input: brgemu_bng_private_net_cidr }
360 dcae_collector_ip: { get_input: dcae_collector_ip }
361 dcae_collector_port: { get_input: dcae_collector_port }
362 demo_artifacts_version: { get_input: demo_artifacts_version }
363 install_script_version: { get_input: install_script_version }
364 sdnc_ip: { get_input: sdnc_ip_addr }
365 cloud_env: { get_input: cloud_env }
366 nexus_artifact_repo: { get_input: nexus_artifact_repo }
369 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
370 apt-get -y install jq
373 echo $METADATA | jq -r ".meta.$1"
376 # Create configuration files
378 echo "$(get_metadata brgemu_bng_net_ipaddr)" > /opt/config/brgemu_bng_net_ipaddr.txt
379 echo "$(get_metadata cpe_signal_net_ipaddr)" > /opt/config/cpe_signal_net_ipaddr.txt
380 echo "$(get_metadata bng_gmux_net_ipaddr)" > /opt/config/bng_gmux_net_ipaddr.txt
381 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
382 echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
383 echo "$(get_metadata bng_gmux_cidr)" > /opt/config/bng_gmux_net_cidr.txt
384 echo "$(get_metadata cpe_signal_cidr)" > /opt/config/cpe_signal_net_cidr.txt
385 echo "$(get_metadata brgemu_bng_cidr)" > /opt/config/brgemu_bng_net_cidr.txt
386 echo "$(get_metadata dcae_collector_ip)" > /opt/config/dcae_collector_ip.txt
387 echo "$(get_metadata dcae_collector_port)" > /opt/config/dcae_collector_port.txt
388 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
389 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
390 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
391 echo "$(get_metadata sdnc_ip)" > /opt/config/sdnc_ip.txt
392 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
394 # Download and run install script
395 apt-get -y install unzip
396 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
397 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
398 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
399 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
400 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_bng_install.sh
402 chmod +x v_bng_install.sh
408 virtual_mem_size: 4096 MB
410 vdu_memory_requirements:
411 memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
412 numberOfPages: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1024"}'
415 cpu_architecture: generic
417 - virtual_storage: VirtualStorage_root_all
419 sw_image: #TODO need to put glance image name here
420 #file: { get_input: vcpe_image_name }
421 file: ../Artifacts/Deployment/OTHER/image
422 type: tosca.artifacts.nfv.SwImage