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
65 description: onap OAM network id
66 onap_private_net_cidr:
68 description: oanp OAM network cidr
70 bng_gmux_private_net_id:
72 description: Private network that connects vBNG to vGMUX
73 default: zdfw1bngmux01_private
74 bng_gmux_private_net_cidr:
76 description: The CIDR of the vBNG-vGMUX private network
78 mux_gw_private_net_id:
80 description: Private network that connects vGMUX to vGWs
81 default: zdfw1muxgw01_private
82 mux_gw_private_net_cidr:
84 description: The CIDR of the vGMUX private network
86 brgemu_bng_private_net_cidr:
88 description: The CIDR of the vBRG-vBNG private network
92 description: Private IP address that is assigned to the vGMUX to communicate with the vBNG
96 description: Private IP address that is assigned to the vGMUX to communicate with ONAP components
100 description: Private IP address that is assigned to the vGMUX to communicate with vGWs
104 description: Name of the vGMUX
105 default: zdcpe1cpe01mux01
108 description: The VNF ID is provided by ONAP
109 default: vCPE_Infrastructure_vGMUX_demo_app
112 description: The vCPE Module ID is provided by ONAP
113 default: vCPE_Intrastructure_Metro_vGMUX
116 description: Private IP address that is assigned to the vBNG to communicate with the vGMUX
120 description: dcae collector ip
124 description: dcae collector port
128 description: ssh public key
129 default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
130 install_script_version:
132 description: install script version number
133 default: 1.2.0-SNAPSHOT
136 description: Root URL for the Nexus repository for Maven artifacts
137 default: https://nexus.onap.org
140 description: cloud environment(openstack or rackspace)
146 # type: tosca.nodes.nfv.VnfVirtualLink
149 # layer_protocol: ipv4
151 # max_bit_rate_requirements:
154 # min_bit_rate_requirements:
157 # networkName: { get_input: public_net_id }
161 # type: tosca.nodes.nfv.VnfVirtualLink
164 # layer_protocol: ipv4
166 # max_bit_rate_requirements:
169 # min_bit_rate_requirements:
172 # networkName: { get_input: onap_private_net_id }
173 # cidr: { get_input: onap_private_net_cidr }
175 #Private network that connects vBNG to vGMUX
176 VL_bng_gmux_private_net:
177 type: tosca.nodes.nfv.VnfVirtualLink
182 max_bit_rate_requirements:
185 min_bit_rate_requirements:
188 networkName: { get_input: bng_gmux_private_net_id}
189 cidr: { get_input: bng_gmux_private_net_cidr }
191 physicalNetwork: "physnet1"
193 #Private network that connects vGMUX to vGWs
194 VL_mux_gw_private_net:
195 type: tosca.nodes.nfv.VnfVirtualLink
200 max_bit_rate_requirements:
203 min_bit_rate_requirements:
206 networkName: { get_input: mux_gw_private_net_id}
207 cidr: { get_input: mux_gw_private_net_cidr }
209 physicalNetwork: "physnet1"
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 }
261 virtual_network_interface_requirements:
262 - name: "sriov-support"
263 support_mandatory: true
264 network_interface_requirements:
265 interfaceType: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "SR-IOV"}'
267 pciVendorId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1234"}'
268 pciDeviceId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "5678"}'
269 pciNumDevices: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1"}'
271 - virtual_binding: VDU_vgmux_0
272 - virtual_link: VL_bng_gmux_private_net
274 Cp_vgmux_mux_gw_private_net:
275 type: tosca.nodes.nfv.VduCp
277 layer_protocol: [ipv4]
280 - asscociated_layer_protocol: ipv4
282 address_type: ip_address
284 ip_address_assignment: false
285 floating_ip_activated: false
287 - { get_input: vgmux_private_ip_2 }
289 virtual_network_interface_requirements:
290 - name: "sriov-support"
291 support_mandatory: true
292 network_interface_requirements:
293 interfaceType: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "SR-IOV"}'
295 pciVendorId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1234"}'
296 pciDeviceId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "5678"}'
297 pciNumDevices: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1"}'
299 - virtual_binding: VDU_vgmux_0
300 - virtual_link: VL_mux_gw_private_net
302 VirtualStorage_root_all:
303 # this indicate the VDU root storage size
304 type: tosca.nodes.nfv.Vdu.VirtualStorage
306 type_of_storage: root
307 size_of_storage: 40 GB
310 type: tosca.nodes.nfv.Vdu.Compute
312 name: { get_input: vgmux_name_0 }
314 configurable_properties:
315 additional_vnfc_configurable_properties: {}
317 min_number_of_instances: 1
318 max_number_of_instances: 1
320 inject_files: #TODO SDC bug
321 source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
322 dest_path: /home/ubuntu/.ssh/authorized_keys
324 vnf_id: { get_input: vnf_id }
325 vf_module_id: { get_input: vf_module_id }
326 mux_to_bng_net_ipaddr: { get_input: vgmux_private_ip_0 }
327 oam_ipaddr: { get_input: vgmux_private_ip_1 }
328 mux_gw_net_ipaddr: { get_input: vgmux_private_ip_2 }
329 bng_to_mux_net_ipaddr: { get_input: bng_gmux_private_ip }
330 bng_mux_net_cidr: { get_input: bng_gmux_private_net_cidr }
331 oam_cidr: { get_input: oam_private_net_cidr }
332 mux_gw_net_cidr: { get_input: mux_gw_private_net_cidr }
333 brg_bng_net_cidr: { get_input: brgemu_bng_private_net_cidr }
334 install_script_version: { get_input: install_script_version }
335 cloud_env: { get_input: cloud_env }
336 nexus_artifact_repo: { get_input: nexus_artifact_repo }
339 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
340 apt-get -y install jq
343 echo $METADATA | jq -r ".meta.$1"
346 # Create configuration files
348 echo "$(get_metadata mux_to_bng_net_ipaddr)" > /opt/config/mux_to_bng_net_ipaddr.txt
349 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
350 echo "$(get_metadata mux_gw_net_ipaddr)" > /opt/config/mux_gw_net_ipaddr.txt
351 echo "$(get_metadata bng_to_mux_net_ipaddr)" > /opt/config/bng_to_mux_net_ipaddr.txt
352 echo "$(get_metadata bng_mux_net_cidr)" > /opt/config/bng_mux_net_cidr.txt
353 echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
354 echo "$(get_metadata mux_gw_net_cidr)" > /opt/config/mux_gw_net_cidr.txt
355 echo "$(get_metadata brg_bng_net_cidr)" > /opt/config/brg_bng_net_cidr.txt
356 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
357 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
358 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
360 # Download and run install script
361 apt-get -y install unzip
362 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
363 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
364 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
365 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
366 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_gmux_install.sh
368 chmod +x v_gmux_install.sh
374 virtual_mem_size: 4096 MB
376 vdu_memory_requirements:
377 memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
378 numberOfPages: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1024"}'
381 cpu_architecture: generic
383 - virtual_storage: VirtualStorage_root_all
385 sw_image: #TODO need to put glance image name here
386 #file: { get_input: vcpe_image_name }
387 file: ../Artifacts/images/ubuntu_16.04
388 type: tosca.artifacts.nfv.SwImage