1 tosca_definitions_version: tosca_simple_yaml_1_0
3 template_name: vCPE_vgmux
4 template_version: "1.0"
6 VNFD_SCHEMA_VERSION: "2.5.1+1"
7 description: vCPE_vgmux
13 # substitution_mappings:
14 # node_type: onap.vcpe_vgmux
16 # virtual_link: [ Cp_vgmux_public, virtual_link ] # expose as external CP
17 # virtual_link: [ Cp_vgmux_onap_private, virtual_link ] # expose as external CP
22 description: image name for vcpe in openstack glance
26 description: public network id used during onap installation
30 description: onap OAM network id
32 onap_private_net_cidr:
34 description: oanp OAM network cidr
36 bng_gmux_private_net_id:
38 description: Private network that connects vBNG to vGMUX
39 default: zdfw1bngmux01_private
40 bng_gmux_private_net_cidr:
42 description: The CIDR of the vBNG-vGMUX private network
44 mux_gw_private_net_id:
46 description: Private network that connects vGMUX to vGWs
47 default: zdfw1muxgw01_private
48 mux_gw_private_net_cidr:
50 description: The CIDR of the vGMUX private network
52 brgemu_bng_private_net_cidr:
54 description: The CIDR of the vBRG-vBNG private network
58 description: Private IP address that is assigned to the vGMUX to communicate with the vBNG
62 description: Private IP address that is assigned to the vGMUX to communicate with ONAP components
66 description: Private IP address that is assigned to the vGMUX to communicate with vGWs
70 description: Name of the vGMUX
71 default: zdcpe1cpe01mux01
74 description: The VNF ID is provided by ONAP
75 default: vCPE_Infrastructure_vGMUX_demo_app
78 description: The vCPE Module ID is provided by ONAP
79 default: vCPE_Intrastructure_Metro_vGMUX
82 description: Private IP address that is assigned to the vBNG to communicate with the vGMUX
86 description: dcae collector ip
90 description: dcae collector port
94 description: ssh public key
95 default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
96 install_script_version:
98 description: install script version number
99 default: 1.2.0-SNAPSHOT
102 description: Root URL for the Nexus repository for Maven artifacts
103 default: https://nexus.onap.org
106 description: cloud environment(openstack or rackspace)
111 type: tosca.nodes.nfv.VNF
113 descriptor_id: b1bb0ce7-2222-4fa7-95ed-4840d70a1177
115 product_name: vcpe_vgmux
116 software_version: '1.0'
117 descriptor_version: '1.0'
119 flavour_description: simple
125 # type: tosca.nodes.nfv.VnfVirtualLink
128 # layer_protocols: [ipv4]
130 # max_bitrate_requirements:
133 # min_bitrate_requirements:
136 # virtual_link_protocol_data:
137 # - associated_layer_protocol: ipv4
140 # name: { get_input: public_net_id }
144 # type: tosca.nodes.nfv.VnfVirtualLink
147 # layer_protocols: [ipv4]
149 # max_bitrate_requirements:
152 # min_bitrate_requirements:
155 # virtual_link_protocol_data:
156 # - associated_layer_protocol: ipv4
159 # name: { get_input: onap_private_net_id }
160 # cidr: { get_input: onap_private_net_cidr }
162 #Private network that connects vBNG to vGMUX
163 VL_bng_gmux_private_net:
164 type: tosca.nodes.nfv.VnfVirtualLink
167 layer_protocols: [ipv4]
169 max_bitrate_requirements:
172 min_bitrate_requirements:
175 virtual_link_protocol_data:
176 - associated_layer_protocol: ipv4
179 name: { get_input: bng_gmux_private_net_id}
180 cidr: { get_input: bng_gmux_private_net_cidr }
183 #Private network that connects vGMUX to vGWs
184 VL_mux_gw_private_net:
185 type: tosca.nodes.nfv.VnfVirtualLink
188 layer_protocols: [ipv4]
190 max_bitrate_requirements:
193 min_bitrate_requirements:
196 virtual_link_protocol_data:
197 - associated_layer_protocol: ipv4
200 name: { get_input: mux_gw_private_net_id}
201 cidr: { get_input: mux_gw_private_net_cidr }
206 type: tosca.nodes.nfv.VduCp
208 layer_protocols: [ipv4]
211 - associated_layer_protocol: ipv4
213 - address_type: ip_address
215 ip_address_assignment: false
216 floating_ip_activated: false
218 - virtual_binding: VDU_vgmux_0
219 #- virtual_link: VL_public
221 Cp_vgmux_onap_private:
222 type: tosca.nodes.nfv.VduCp
224 layer_protocols: [ipv4]
227 - associated_layer_protocol: ipv4
229 - address_type: ip_address
231 ip_address_assignment: false
232 floating_ip_activated: false
234 - { get_input: vgmux_private_ip_1 }
236 - virtual_binding: VDU_vgmux_0
237 #- virtual_link: VL_onap_private
239 Cp_vgmux_bng_gmux_private_net:
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 - { get_input: vgmux_private_ip_0 }
253 virtual_network_interface_requirements:
255 support_mandatory: true
256 network_interface_requirements:
257 dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
259 - virtual_binding: VDU_vgmux_0
260 - virtual_link: VL_bng_gmux_private_net
262 Cp_vgmux_mux_gw_private_net:
263 type: tosca.nodes.nfv.VduCp
265 layer_protocols: [ipv4]
268 - associated_layer_protocol: ipv4
270 - address_type: ip_address
272 ip_address_assignment: false
273 floating_ip_activated: false
275 - { get_input: vgmux_private_ip_2 }
276 virtual_network_interface_requirements:
278 support_mandatory: true
279 network_interface_requirements:
280 dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
282 - virtual_binding: VDU_vgmux_0
283 - virtual_link: VL_mux_gw_private_net
286 type: tosca.nodes.nfv.Vdu.Compute
288 name: { get_input: vgmux_name_0 }
291 min_number_of_instances: 1
292 max_number_of_instances: 1
294 inject_files: #TODO SDC bug
295 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
296 dest_path: /home/ubuntu/.ssh/authorized_keys
298 vnf_id: { get_input: vnf_id }
299 vf_module_id: { get_input: vf_module_id }
300 mux_to_bng_net_ipaddr: { get_input: vgmux_private_ip_0 }
301 oam_ipaddr: { get_input: vgmux_private_ip_1 }
302 mux_gw_net_ipaddr: { get_input: vgmux_private_ip_2 }
303 bng_to_mux_net_ipaddr: { get_input: bng_gmux_private_ip }
304 bng_mux_net_cidr: { get_input: bng_gmux_private_net_cidr }
305 oam_cidr: { get_input: onap_private_net_cidr }
306 mux_gw_net_cidr: { get_input: mux_gw_private_net_cidr }
307 brg_bng_net_cidr: { get_input: brgemu_bng_private_net_cidr }
308 install_script_version: { get_input: install_script_version }
309 cloud_env: { get_input: cloud_env }
310 nexus_artifact_repo: { get_input: nexus_artifact_repo }
313 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
314 apt-get -y install jq
317 echo $METADATA | jq -r ".meta.$1"
320 # Create configuration files
322 echo "$(get_metadata mux_to_bng_net_ipaddr)" > /opt/config/mux_to_bng_net_ipaddr.txt
323 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
324 echo "$(get_metadata mux_gw_net_ipaddr)" > /opt/config/mux_gw_net_ipaddr.txt
325 echo "$(get_metadata bng_to_mux_net_ipaddr)" > /opt/config/bng_to_mux_net_ipaddr.txt
326 echo "$(get_metadata bng_mux_net_cidr)" > /opt/config/bng_mux_net_cidr.txt
327 echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
328 echo "$(get_metadata mux_gw_net_cidr)" > /opt/config/mux_gw_net_cidr.txt
329 echo "$(get_metadata brg_bng_net_cidr)" > /opt/config/brg_bng_net_cidr.txt
330 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
331 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
332 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
334 # Download and run install script
335 apt-get -y install unzip
336 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
337 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
338 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
339 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
340 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_gmux_install.sh
342 chmod +x v_gmux_install.sh
348 virtual_mem_size: 4096 MB
349 vdu_mem_requirements:
350 memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
351 numberOfPages: '{"schemaVersion": "0","schemaSelector": "","hardwarePlatform": "generic","mandatory": "true", "configurationValue": "1024"}'
354 cpu_architecture: generic
355 virtual_local_storage:
356 - size_of_storage: 40 GB
358 sw_image: #TODO need to put glance image name here
359 #file: { get_input: vcpe_image_name }
360 file: ../Artifacts/Deployment/OTHER/image
361 type: tosca.artifacts.nfv.SwImage