1 tosca_definitions_version: tosca_simple_yaml_1_0
3 template_name: vCPE_vgmux
4 template_version: "1.0"
6 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_protocol: ipv4
128 # max_bit_rate_requirements:
131 # min_bit_rate_requirements:
134 # networkName: { get_input: public_net_id }
138 # type: tosca.nodes.nfv.VnfVirtualLink
141 # layer_protocol: ipv4
143 # max_bit_rate_requirements:
146 # min_bit_rate_requirements:
149 # networkName: { get_input: onap_private_net_id }
150 # cidr: { get_input: onap_private_net_cidr }
152 #Private network that connects vBNG to vGMUX
153 VL_bng_gmux_private_net:
154 type: tosca.nodes.nfv.VnfVirtualLink
159 max_bit_rate_requirements:
162 min_bit_rate_requirements:
165 networkName: { get_input: bng_gmux_private_net_id}
166 cidr: { get_input: bng_gmux_private_net_cidr }
168 physicalNetwork: "physnet1"
170 #Private network that connects vGMUX to vGWs
171 VL_mux_gw_private_net:
172 type: tosca.nodes.nfv.VnfVirtualLink
177 max_bit_rate_requirements:
180 min_bit_rate_requirements:
183 networkName: { get_input: mux_gw_private_net_id}
184 cidr: { get_input: mux_gw_private_net_cidr }
186 physicalNetwork: "physnet1"
190 type: tosca.nodes.nfv.VduCp
192 layer_protocol: [ipv4]
195 - asscociated_layer_protocol: ipv4
197 address_type: ip_address
199 ip_address_assignment: false
200 floating_ip_activated: false
202 - virtual_binding: VDU_vgmux_0
203 #- virtual_link: VL_public
205 Cp_vgmux_onap_private:
206 type: tosca.nodes.nfv.VduCp
208 layer_protocol: [ipv4]
211 - asscociated_layer_protocol: ipv4
213 address_type: ip_address
215 ip_address_assignment: false
216 floating_ip_activated: false
218 - { get_input: vgmux_private_ip_1 }
220 - virtual_binding: VDU_vgmux_0
221 #- virtual_link: VL_onap_private
223 Cp_vgmux_bng_gmux_private_net:
224 type: tosca.nodes.nfv.VduCp
226 layer_protocol: [ipv4]
229 - asscociated_layer_protocol: ipv4
231 address_type: ip_address
233 ip_address_assignment: false
234 floating_ip_activated: false
236 - { get_input: vgmux_private_ip_0 }
238 virtual_network_interface_requirements:
239 - name: "sriov-support"
240 support_mandatory: true
241 network_interface_requirements:
242 interfaceType: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "SR-IOV"}'
244 logical_node_requirements:
245 pciVendorId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1234"}'
246 pciDeviceId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "5678"}'
247 pciNumDevices: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1"}'
249 - virtual_binding: VDU_vgmux_0
250 - virtual_link: VL_bng_gmux_private_net
252 Cp_vgmux_mux_gw_private_net:
253 type: tosca.nodes.nfv.VduCp
255 layer_protocol: [ipv4]
258 - asscociated_layer_protocol: ipv4
260 address_type: ip_address
262 ip_address_assignment: false
263 floating_ip_activated: false
265 - { get_input: vgmux_private_ip_2 }
267 virtual_network_interface_requirements:
268 - name: "sriov-support"
269 support_mandatory: true
270 network_interface_requirements:
271 interfaceType: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "SR-IOV"}'
273 logical_node_requirements:
274 pciVendorId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1234"}'
275 pciDeviceId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "5678"}'
276 pciNumDevices: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1"}'
278 - virtual_binding: VDU_vgmux_0
279 - virtual_link: VL_mux_gw_private_net
281 VirtualStorage_root_all:
282 # this indicate the VDU root storage size
283 type: tosca.nodes.nfv.Vdu.VirtualStorage
285 type_of_storage: root
286 size_of_storage: 40 GB
289 type: tosca.nodes.nfv.Vdu.Compute
291 name: { get_input: vgmux_name_0 }
293 configurable_properties:
294 additional_vnfc_configurable_properties: {}
296 min_number_of_instances: 1
297 max_number_of_instances: 1
299 inject_files: #TODO SDC bug
300 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
301 dest_path: /home/ubuntu/.ssh/authorized_keys
303 vnf_id: { get_input: vnf_id }
304 vf_module_id: { get_input: vf_module_id }
305 mux_to_bng_net_ipaddr: { get_input: vgmux_private_ip_0 }
306 oam_ipaddr: { get_input: vgmux_private_ip_1 }
307 mux_gw_net_ipaddr: { get_input: vgmux_private_ip_2 }
308 bng_to_mux_net_ipaddr: { get_input: bng_gmux_private_ip }
309 bng_mux_net_cidr: { get_input: bng_gmux_private_net_cidr }
310 oam_cidr: { get_input: onap_private_net_cidr }
311 mux_gw_net_cidr: { get_input: mux_gw_private_net_cidr }
312 brg_bng_net_cidr: { get_input: brgemu_bng_private_net_cidr }
313 install_script_version: { get_input: install_script_version }
314 cloud_env: { get_input: cloud_env }
315 nexus_artifact_repo: { get_input: nexus_artifact_repo }
318 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
319 apt-get -y install jq
322 echo $METADATA | jq -r ".meta.$1"
325 # Create configuration files
327 echo "$(get_metadata mux_to_bng_net_ipaddr)" > /opt/config/mux_to_bng_net_ipaddr.txt
328 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
329 echo "$(get_metadata mux_gw_net_ipaddr)" > /opt/config/mux_gw_net_ipaddr.txt
330 echo "$(get_metadata bng_to_mux_net_ipaddr)" > /opt/config/bng_to_mux_net_ipaddr.txt
331 echo "$(get_metadata bng_mux_net_cidr)" > /opt/config/bng_mux_net_cidr.txt
332 echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
333 echo "$(get_metadata mux_gw_net_cidr)" > /opt/config/mux_gw_net_cidr.txt
334 echo "$(get_metadata brg_bng_net_cidr)" > /opt/config/brg_bng_net_cidr.txt
335 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
336 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
337 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
339 # Download and run install script
340 apt-get -y install unzip
341 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
342 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
343 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
344 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
345 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_gmux_install.sh
347 chmod +x v_gmux_install.sh
353 virtual_mem_size: 4096 MB
355 vdu_memory_requirements:
356 memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
357 numberOfPages: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1024"}'
360 cpu_architecture: generic
362 - virtual_storage: VirtualStorage_root_all
364 sw_image: #TODO need to put glance image name here
365 #file: { get_input: vcpe_image_name }
366 file: ../Artifacts/Deployment/OTHER/image
367 type: tosca.artifacts.nfv.SwImage