1 tosca_definitions_version: tosca_simple_yaml_1_0
3 template_name: vCPE_vgmux
4 template_version: "1.0"
6 description: vCPE_vgmux
13 derived_from: tosca.nodes.nfv.VNF
17 constraints: [ valid_values: [ b1bb0ce7-3333-4fa7-95ed-4840d70a1177 ] ]
18 default: b1bb0ce7-3333-4fa7-95ed-4840d70a1177
21 constraints: [ valid_values: [ onap ] ]
25 constraints: [ valid_values: [ vcpe_vgmux ] ]
29 constraints: [ valid_values: [ '1.0' ] ]
33 constraints: [ valid_values: [ '1.0' ] ]
37 constraints: [ valid_values: [ simple ] ] #only one and only allowed one DF in this example
49 # substitution_mappings:
50 # node_type: onap.vcpe_vgmux
52 # virtual_link: [ Cp_vgmux_public, virtual_link ] # expose as external CP
53 # virtual_link: [ Cp_vgmux_onap_private, virtual_link ] # expose as external CP
58 description: image name for vcpe in openstack glance
62 description: public network id used during onap installation
66 description: onap OAM network id
68 onap_private_net_cidr:
70 description: oanp OAM network cidr
72 bng_gmux_private_net_id:
74 description: Private network that connects vBNG to vGMUX
75 default: zdfw1bngmux01_private
76 bng_gmux_private_net_cidr:
78 description: The CIDR of the vBNG-vGMUX private network
80 mux_gw_private_net_id:
82 description: Private network that connects vGMUX to vGWs
83 default: zdfw1muxgw01_private
84 mux_gw_private_net_cidr:
86 description: The CIDR of the vGMUX private network
88 brgemu_bng_private_net_cidr:
90 description: The CIDR of the vBRG-vBNG private network
94 description: Private IP address that is assigned to the vGMUX to communicate with the vBNG
98 description: Private IP address that is assigned to the vGMUX to communicate with ONAP components
102 description: Private IP address that is assigned to the vGMUX to communicate with vGWs
106 description: Name of the vGMUX
107 default: zdcpe1cpe01mux01
110 description: The VNF ID is provided by ONAP
111 default: vCPE_Infrastructure_vGMUX_demo_app
114 description: The vCPE Module ID is provided by ONAP
115 default: vCPE_Intrastructure_Metro_vGMUX
118 description: Private IP address that is assigned to the vBNG to communicate with the vGMUX
122 description: dcae collector ip
126 description: dcae collector port
130 description: ssh public key
131 default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
132 install_script_version:
134 description: install script version number
135 default: 1.2.0-SNAPSHOT
138 description: Root URL for the Nexus repository for Maven artifacts
139 default: https://nexus.onap.org
142 description: cloud environment(openstack or rackspace)
148 # type: tosca.nodes.nfv.VnfVirtualLink
151 # layer_protocol: ipv4
153 # max_bit_rate_requirements:
156 # min_bit_rate_requirements:
159 # networkName: { get_input: public_net_id }
163 # type: tosca.nodes.nfv.VnfVirtualLink
166 # layer_protocol: ipv4
168 # max_bit_rate_requirements:
171 # min_bit_rate_requirements:
174 # networkName: { get_input: onap_private_net_id }
175 # cidr: { get_input: onap_private_net_cidr }
177 #Private network that connects vBNG to vGMUX
178 VL_bng_gmux_private_net:
179 type: tosca.nodes.nfv.VnfVirtualLink
184 max_bit_rate_requirements:
187 min_bit_rate_requirements:
190 networkName: { get_input: bng_gmux_private_net_id}
191 cidr: { get_input: bng_gmux_private_net_cidr }
194 #Private network that connects vGMUX to vGWs
195 VL_mux_gw_private_net:
196 type: tosca.nodes.nfv.VnfVirtualLink
201 max_bit_rate_requirements:
204 min_bit_rate_requirements:
207 networkName: { get_input: mux_gw_private_net_id}
208 cidr: { get_input: mux_gw_private_net_cidr }
213 type: tosca.nodes.nfv.VduCp
215 layer_protocol: [ipv4]
218 - asscociated_layer_protocol: ipv4
220 address_type: ip_address
222 ip_address_assignment: false
223 floating_ip_activated: false
225 - virtual_binding: VDU_vgmux_0
226 #- virtual_link: VL_public
228 Cp_vgmux_onap_private:
229 type: tosca.nodes.nfv.VduCp
231 layer_protocol: [ipv4]
234 - asscociated_layer_protocol: ipv4
236 address_type: ip_address
238 ip_address_assignment: false
239 floating_ip_activated: false
241 - { get_input: vgmux_private_ip_1 }
243 - virtual_binding: VDU_vgmux_0
244 #- virtual_link: VL_onap_private
246 Cp_vgmux_bng_gmux_private_net:
247 type: tosca.nodes.nfv.VduCp
249 layer_protocol: [ipv4]
252 - asscociated_layer_protocol: ipv4
254 address_type: ip_address
256 ip_address_assignment: false
257 floating_ip_activated: false
259 - { get_input: vgmux_private_ip_0 }
260 virtual_network_interface_requirements:
262 support_mandatory: true
264 network_interface_requirements:
265 dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
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_protocol: [ipv4]
276 - asscociated_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 }
284 virtual_network_interface_requirements:
286 support_mandatory: true
288 network_interface_requirements:
289 dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
291 - virtual_binding: VDU_vgmux_0
292 - virtual_link: VL_mux_gw_private_net
294 VirtualStorage_root_all:
295 # this indicate the VDU root storage size
296 type: tosca.nodes.nfv.Vdu.VirtualStorage
298 type_of_storage: root
299 size_of_storage: 40 GB
302 type: tosca.nodes.nfv.Vdu.Compute
304 name: { get_input: vgmux_name_0 }
306 configurable_properties:
307 additional_vnfc_configurable_properties: {}
309 min_number_of_instances: 1
310 max_number_of_instances: 1
312 inject_files: #TODO SDC bug
313 source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
314 dest_path: /home/ubuntu/.ssh/authorized_keys
316 vnf_id: { get_input: vnf_id }
317 vf_module_id: { get_input: vf_module_id }
318 mux_to_bng_net_ipaddr: { get_input: vgmux_private_ip_0 }
319 oam_ipaddr: { get_input: vgmux_private_ip_1 }
320 mux_gw_net_ipaddr: { get_input: vgmux_private_ip_2 }
321 bng_to_mux_net_ipaddr: { get_input: bng_gmux_private_ip }
322 bng_mux_net_cidr: { get_input: bng_gmux_private_net_cidr }
323 oam_cidr: { get_input: onap_private_net_cidr }
324 mux_gw_net_cidr: { get_input: mux_gw_private_net_cidr }
325 brg_bng_net_cidr: { get_input: brgemu_bng_private_net_cidr }
326 install_script_version: { get_input: install_script_version }
327 cloud_env: { get_input: cloud_env }
328 nexus_artifact_repo: { get_input: nexus_artifact_repo }
331 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
332 apt-get -y install jq
335 echo $METADATA | jq -r ".meta.$1"
338 # Create configuration files
340 echo "$(get_metadata mux_to_bng_net_ipaddr)" > /opt/config/mux_to_bng_net_ipaddr.txt
341 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
342 echo "$(get_metadata mux_gw_net_ipaddr)" > /opt/config/mux_gw_net_ipaddr.txt
343 echo "$(get_metadata bng_to_mux_net_ipaddr)" > /opt/config/bng_to_mux_net_ipaddr.txt
344 echo "$(get_metadata bng_mux_net_cidr)" > /opt/config/bng_mux_net_cidr.txt
345 echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
346 echo "$(get_metadata mux_gw_net_cidr)" > /opt/config/mux_gw_net_cidr.txt
347 echo "$(get_metadata brg_bng_net_cidr)" > /opt/config/brg_bng_net_cidr.txt
348 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
349 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
350 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
352 # Download and run install script
353 apt-get -y install unzip
354 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
355 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
356 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
357 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
358 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_gmux_install.sh
360 chmod +x v_gmux_install.sh
366 virtual_mem_size: 4096 MB
368 vdu_memory_requirements:
369 memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
370 numberOfPages: '{"schemaVersion": "0","schemaSelector": "","hardwarePlatform": "generic","mandatory": "true", "configurationValue": "1024"}'
373 cpu_architecture: generic
375 - virtual_storage: VirtualStorage_root_all
377 sw_image: #TODO need to put glance image name here
378 #file: { get_input: vcpe_image_name }
379 file: ../Artifacts/images/ubuntu_16.04
380 type: tosca.artifacts.nfv.SwImage