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
29 description: onap OAM network id
30 onap_private_net_cidr:
32 description: oanp OAM network cidr
34 bng_gmux_private_net_id:
36 description: Private network that connects vBNG to vGMUX
37 default: zdfw1bngmux01_private
38 bng_gmux_private_net_cidr:
40 description: The CIDR of the vBNG-vGMUX private network
42 mux_gw_private_net_id:
44 description: Private network that connects vGMUX to vGWs
45 default: zdfw1muxgw01_private
46 mux_gw_private_net_cidr:
48 description: The CIDR of the vGMUX private network
50 brgemu_bng_private_net_cidr:
52 description: The CIDR of the vBRG-vBNG private network
56 description: Private IP address that is assigned to the vGMUX to communicate with the vBNG
60 description: Private IP address that is assigned to the vGMUX to communicate with ONAP components
64 description: Private IP address that is assigned to the vGMUX to communicate with vGWs
68 description: Name of the vGMUX
69 default: zdcpe1cpe01mux01
72 description: The VNF ID is provided by ONAP
73 default: vCPE_Infrastructure_vGMUX_demo_app
76 description: The vCPE Module ID is provided by ONAP
77 default: vCPE_Intrastructure_Metro_vGMUX
80 description: Private IP address that is assigned to the vBNG to communicate with the vGMUX
84 description: dcae collector ip
88 description: dcae collector port
92 description: ssh public key
93 default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
94 install_script_version:
96 description: install script version number
97 default: 1.2.0-SNAPSHOT
100 description: Root URL for the Nexus repository for Maven artifacts
101 default: https://nexus.onap.org
104 description: cloud environment(openstack or rackspace)
109 type: tosca.nodes.nfv.VNF
111 descriptor_id: b1bb0ce7-2222-4fa7-95ed-4840d70a1177
113 product_name: vcpe_vgmux
114 software_version: '1.0'
115 descriptor_version: '1.0'
117 flavour_description: simple
123 # type: tosca.nodes.nfv.VnfVirtualLink
126 # layer_protocols: [ipv4]
128 # max_bitrate_requirements:
131 # min_bitrate_requirements:
134 # virtual_link_protocol_data:
135 # - associated_layer_protocol: ipv4
138 # name: { get_input: public_net_id }
142 # type: tosca.nodes.nfv.VnfVirtualLink
145 # layer_protocols: [ipv4]
147 # max_bitrate_requirements:
150 # min_bitrate_requirements:
153 # virtual_link_protocol_data:
154 # - associated_layer_protocol: ipv4
157 # name: { get_input: onap_private_net_id }
158 # cidr: { get_input: onap_private_net_cidr }
160 #Private network that connects vBNG to vGMUX
161 VL_bng_gmux_private_net:
162 type: tosca.nodes.nfv.VnfVirtualLink
165 layer_protocols: [ipv4]
167 max_bitrate_requirements:
170 min_bitrate_requirements:
173 virtual_link_protocol_data:
174 - associated_layer_protocol: ipv4
177 name: { get_input: bng_gmux_private_net_id}
178 cidr: { get_input: bng_gmux_private_net_cidr }
181 physical_network: "physnet1"
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 }
204 physical_network: "physnet1"
208 type: tosca.nodes.nfv.VduCp
210 layer_protocols: [ipv4]
213 - associated_layer_protocol: ipv4
215 - address_type: ip_address
217 ip_address_assignment: false
218 floating_ip_activated: false
220 - virtual_binding: VDU_vgmux_0
221 #- virtual_link: VL_public
223 Cp_vgmux_onap_private:
224 type: tosca.nodes.nfv.VduCp
226 layer_protocols: [ipv4]
229 - associated_layer_protocol: ipv4
231 - address_type: ip_address
233 ip_address_assignment: false
234 floating_ip_activated: false
236 - { get_input: vgmux_private_ip_1 }
238 - virtual_binding: VDU_vgmux_0
239 #- virtual_link: VL_onap_private
241 Cp_vgmux_bng_gmux_private_net:
242 type: tosca.nodes.nfv.VduCp
244 layer_protocols: [ipv4]
247 - associated_layer_protocol: ipv4
249 - address_type: ip_address
251 ip_address_assignment: false
252 floating_ip_activated: false
254 - { get_input: vgmux_private_ip_0 }
256 virtual_network_interface_requirements:
257 - name: "sriov-support"
258 support_mandatory: true
259 network_interface_requirements:
260 interfaceType: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "SR-IOV"}'
262 logical_node_requirements:
263 pciVendorId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1234"}'
264 pciDeviceId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "5678"}'
265 pciNumDevices: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1"}'
267 - virtual_binding: VDU_vgmux_0
268 - virtual_link: VL_bng_gmux_private_net
270 Cp_vgmux_mux_gw_private_net:
271 type: tosca.nodes.nfv.VduCp
273 layer_protocols: [ipv4]
276 - associated_layer_protocol: ipv4
278 - address_type: ip_address
280 ip_address_assignment: false
281 floating_ip_activated: false
283 - { get_input: vgmux_private_ip_2 }
285 virtual_network_interface_requirements:
286 - name: "sriov-support"
287 support_mandatory: true
288 network_interface_requirements:
289 interfaceType: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "SR-IOV"}'
291 logical_node_requirements:
292 pciVendorId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1234"}'
293 pciDeviceId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "5678"}'
294 pciNumDevices: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1"}'
296 - virtual_binding: VDU_vgmux_0
297 - virtual_link: VL_mux_gw_private_net
300 type: tosca.nodes.nfv.Vdu.Compute
302 name: { get_input: vgmux_name_0 }
305 min_number_of_instances: 1
306 max_number_of_instances: 1
308 inject_files: #TODO SDC bug
309 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
310 dest_path: /home/ubuntu/.ssh/authorized_keys
312 vnf_id: { get_input: vnf_id }
313 vf_module_id: { get_input: vf_module_id }
314 mux_to_bng_net_ipaddr: { get_input: vgmux_private_ip_0 }
315 oam_ipaddr: { get_input: vgmux_private_ip_1 }
316 mux_gw_net_ipaddr: { get_input: vgmux_private_ip_2 }
317 bng_to_mux_net_ipaddr: { get_input: bng_gmux_private_ip }
318 bng_mux_net_cidr: { get_input: bng_gmux_private_net_cidr }
319 oam_cidr: { get_input: onap_private_net_cidr }
320 mux_gw_net_cidr: { get_input: mux_gw_private_net_cidr }
321 brg_bng_net_cidr: { get_input: brgemu_bng_private_net_cidr }
322 install_script_version: { get_input: install_script_version }
323 cloud_env: { get_input: cloud_env }
324 nexus_artifact_repo: { get_input: nexus_artifact_repo }
327 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
328 apt-get -y install jq
331 echo $METADATA | jq -r ".meta.$1"
334 # Create configuration files
336 echo "$(get_metadata mux_to_bng_net_ipaddr)" > /opt/config/mux_to_bng_net_ipaddr.txt
337 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
338 echo "$(get_metadata mux_gw_net_ipaddr)" > /opt/config/mux_gw_net_ipaddr.txt
339 echo "$(get_metadata bng_to_mux_net_ipaddr)" > /opt/config/bng_to_mux_net_ipaddr.txt
340 echo "$(get_metadata bng_mux_net_cidr)" > /opt/config/bng_mux_net_cidr.txt
341 echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
342 echo "$(get_metadata mux_gw_net_cidr)" > /opt/config/mux_gw_net_cidr.txt
343 echo "$(get_metadata brg_bng_net_cidr)" > /opt/config/brg_bng_net_cidr.txt
344 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
345 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
346 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
348 # Download and run install script
349 apt-get -y install unzip
350 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
351 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
352 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
353 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
354 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_gmux_install.sh
356 chmod +x v_gmux_install.sh
362 virtual_mem_size: 4096 MB
363 vdu_mem_requirements:
364 memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
365 numberOfPages: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1024"}'
368 cpu_architecture: generic
369 virtual_local_storage:
370 - size_of_storage: 40 GB
372 sw_image: #TODO need to put glance image name here
373 #file: { get_input: vcpe_image_name }
374 file: ../Artifacts/Deployment/OTHER/image
375 type: tosca.artifacts.nfv.SwImage