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: dpdk_2.2
266 interfaceType: virtio
268 - virtual_binding: VDU_vgmux_0
269 - virtual_link: VL_bng_gmux_private_net
271 Cp_vgmux_mux_gw_private_net:
272 type: tosca.nodes.nfv.VduCp
274 layer_protocol: [ipv4]
277 - asscociated_layer_protocol: ipv4
279 address_type: ip_address
281 ip_address_assignment: false
282 floating_ip_activated: false
284 - { get_input: vgmux_private_ip_2 }
285 virtual_network_interface_requirements:
287 support_mandatory: true
289 network_interface_requirements:
290 #dataProcessingAccelerationLibrary: dpdk_2.2
291 interfaceType: virtio
293 - virtual_binding: VDU_vgmux_0
294 - virtual_link: VL_mux_gw_private_net
296 VirtualStorage_root_all:
297 # this indicate the VDU root storage size
298 type: tosca.nodes.nfv.Vdu.VirtualStorage
300 type_of_storage: root
301 size_of_storage: 40 GB
304 type: tosca.nodes.nfv.Vdu.Compute
306 name: { get_input: vgmux_name_0 }
308 configurable_properties:
309 additional_vnfc_configurable_properties: {}
311 min_number_of_instances: 1
312 max_number_of_instances: 1
314 inject_files: #TODO SDC bug
315 source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
316 dest_path: /home/ubuntu/.ssh/authorized_keys
318 vnf_id: { get_input: vnf_id }
319 vf_module_id: { get_input: vf_module_id }
320 mux_to_bng_net_ipaddr: { get_input: vgmux_private_ip_0 }
321 oam_ipaddr: { get_input: vgmux_private_ip_1 }
322 mux_gw_net_ipaddr: { get_input: vgmux_private_ip_2 }
323 bng_to_mux_net_ipaddr: { get_input: bng_gmux_private_ip }
324 bng_mux_net_cidr: { get_input: bng_gmux_private_net_cidr }
325 oam_cidr: { get_input: oam_private_net_cidr }
326 mux_gw_net_cidr: { get_input: mux_gw_private_net_cidr }
327 brg_bng_net_cidr: { get_input: brgemu_bng_private_net_cidr }
328 install_script_version: { get_input: install_script_version }
329 cloud_env: { get_input: cloud_env }
330 nexus_artifact_repo: { get_input: nexus_artifact_repo }
333 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
334 apt-get -y install jq
337 echo $METADATA | jq -r ".meta.$1"
340 # Create configuration files
342 echo "$(get_metadata mux_to_bng_net_ipaddr)" > /opt/config/mux_to_bng_net_ipaddr.txt
343 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
344 echo "$(get_metadata mux_gw_net_ipaddr)" > /opt/config/mux_gw_net_ipaddr.txt
345 echo "$(get_metadata bng_to_mux_net_ipaddr)" > /opt/config/bng_to_mux_net_ipaddr.txt
346 echo "$(get_metadata bng_mux_net_cidr)" > /opt/config/bng_mux_net_cidr.txt
347 echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
348 echo "$(get_metadata mux_gw_net_cidr)" > /opt/config/mux_gw_net_cidr.txt
349 echo "$(get_metadata brg_bng_net_cidr)" > /opt/config/brg_bng_net_cidr.txt
350 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
351 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
352 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
354 # Download and run install script
355 apt-get -y install unzip
356 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
357 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
358 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
359 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
360 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_gmux_install.sh
362 chmod +x v_gmux_install.sh
368 virtual_mem_size: 4096 MB
370 vdu_memory_requirements:
371 memoryPageSize: '{"schema-version": "0", "schema-location": "", "platform-id": "generic", "mandatory": true, "configuration-value": "2 MB"}'
372 numberOfPages: '{"schema-version": "0","schema-location": "","platform-id": "generic","mandatory": true,"configuration-value": 1024}'
375 cpu_architecture: generic
377 - virtual_storage: VirtualStorage_root_all
379 sw_image: #TODO need to put glance image name here
380 #file: { get_input: vcpe_image_name }
381 file: ../Artifacts/images/ubuntu_16.04
382 type: tosca.artifacts.nfv.SwImage