1 tosca_definitions_version: tosca_simple_yaml_1_0
3 template_name: vCPE_vgmux
4 template_version: "1.0"
6 description: vCPE_vgmux
12 # substitution_mappings:
13 # node_type: onap.vcpe_vgmux
15 # virtual_link: [ Cp_vgmux_public, virtual_link ] # expose as external CP
16 # virtual_link: [ Cp_vgmux_onap_private, virtual_link ] # expose as external CP
21 description: image name for vcpe in openstack glance
25 description: public network id used during onap installation
28 description: onap OAM network id
29 onap_private_net_cidr:
31 description: oanp OAM network cidr
33 bng_gmux_private_net_id:
35 description: Private network that connects vBNG to vGMUX
36 default: zdfw1bngmux01_private
37 bng_gmux_private_net_cidr:
39 description: The CIDR of the vBNG-vGMUX private network
41 mux_gw_private_net_id:
43 description: Private network that connects vGMUX to vGWs
44 default: zdfw1muxgw01_private
45 mux_gw_private_net_cidr:
47 description: The CIDR of the vGMUX private network
49 brgemu_bng_private_net_cidr:
51 description: The CIDR of the vBRG-vBNG private network
55 description: Private IP address that is assigned to the vGMUX to communicate with the vBNG
59 description: Private IP address that is assigned to the vGMUX to communicate with ONAP components
63 description: Private IP address that is assigned to the vGMUX to communicate with vGWs
67 description: Name of the vGMUX
68 default: zdcpe1cpe01mux01
71 description: The VNF ID is provided by ONAP
72 default: vCPE_Infrastructure_vGMUX_demo_app
75 description: The vCPE Module ID is provided by ONAP
76 default: vCPE_Intrastructure_Metro_vGMUX
79 description: Private IP address that is assigned to the vBNG to communicate with the vGMUX
83 description: dcae collector ip
87 description: dcae collector port
91 description: ssh public key
92 default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
93 install_script_version:
95 description: install script version number
96 default: 1.2.0-SNAPSHOT
99 description: Root URL for the Nexus repository for Maven artifacts
100 default: https://nexus.onap.org
103 description: cloud environment(openstack or rackspace)
108 type: tosca.nodes.nfv.VNF
110 descriptor_id: b1bb0ce7-2222-4fa7-95ed-4840d70a1177
112 product_name: vcpe_vgmux
113 software_version: '1.0'
114 descriptor_version: '1.0'
116 flavour_description: simple
122 # type: tosca.nodes.nfv.VnfVirtualLink
125 # layer_protocols: [ipv4]
127 # max_bitrate_requirements:
130 # min_bitrate_requirements:
133 # virtual_link_protocol_data:
134 # - associated_layer_protocol: ipv4
137 # name: { get_input: public_net_id }
141 # type: tosca.nodes.nfv.VnfVirtualLink
144 # layer_protocols: [ipv4]
146 # max_bitrate_requirements:
149 # min_bitrate_requirements:
152 # virtual_link_protocol_data:
153 # - associated_layer_protocol: ipv4
156 # name: { get_input: onap_private_net_id }
157 # cidr: { get_input: onap_private_net_cidr }
159 #Private network that connects vBNG to vGMUX
160 VL_bng_gmux_private_net:
161 type: tosca.nodes.nfv.VnfVirtualLink
164 layer_protocols: [ipv4]
166 max_bitrate_requirements:
169 min_bitrate_requirements:
172 virtual_link_protocol_data:
173 - associated_layer_protocol: ipv4
176 name: { get_input: bng_gmux_private_net_id}
177 cidr: { get_input: bng_gmux_private_net_cidr }
180 physical_network: "physnet1"
182 #Private network that connects vGMUX to vGWs
183 VL_mux_gw_private_net:
184 type: tosca.nodes.nfv.VnfVirtualLink
187 layer_protocols: [ipv4]
189 max_bitrate_requirements:
192 min_bitrate_requirements:
195 virtual_link_protocol_data:
196 - associated_layer_protocol: ipv4
199 name: { get_input: mux_gw_private_net_id}
200 cidr: { get_input: mux_gw_private_net_cidr }
203 physical_network: "physnet1"
207 type: tosca.nodes.nfv.VduCp
209 layer_protocols: [ipv4]
212 - associated_layer_protocol: ipv4
214 - address_type: ip_address
216 ip_address_assignment: false
217 floating_ip_activated: false
219 - virtual_binding: VDU_vgmux_0
220 #- virtual_link: VL_public
222 Cp_vgmux_onap_private:
223 type: tosca.nodes.nfv.VduCp
225 layer_protocols: [ipv4]
228 - associated_layer_protocol: ipv4
230 - address_type: ip_address
232 ip_address_assignment: false
233 floating_ip_activated: false
235 - { get_input: vgmux_private_ip_1 }
237 - virtual_binding: VDU_vgmux_0
238 #- virtual_link: VL_onap_private
240 Cp_vgmux_bng_gmux_private_net:
241 type: tosca.nodes.nfv.VduCp
243 layer_protocols: [ipv4]
246 - associated_layer_protocol: ipv4
248 - address_type: ip_address
250 ip_address_assignment: false
251 floating_ip_activated: false
253 - { get_input: vgmux_private_ip_0 }
254 vnic_type: "direct-physical"
255 virtual_network_interface_requirements:
256 - name: "sriov-support"
257 support_mandatory: true
258 network_interface_requirements:
259 interfaceType: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "SR-IOV"}'
261 logical_node_requirements:
262 pciVendorId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1234"}'
263 pciDeviceId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "5678"}'
264 pciNumDevices: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1"}'
266 - virtual_binding: VDU_vgmux_0
267 - virtual_link: VL_bng_gmux_private_net
269 Cp_vgmux_mux_gw_private_net:
270 type: tosca.nodes.nfv.VduCp
272 layer_protocols: [ipv4]
275 - associated_layer_protocol: ipv4
277 - address_type: ip_address
279 ip_address_assignment: false
280 floating_ip_activated: false
282 - { get_input: vgmux_private_ip_2 }
283 vnic_type: "direct-physical"
284 virtual_network_interface_requirements:
285 - name: "sriov-support"
286 support_mandatory: true
287 network_interface_requirements:
288 interfaceType: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "SR-IOV"}'
290 logical_node_requirements:
291 pciVendorId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1234"}'
292 pciDeviceId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "5678"}'
293 pciNumDevices: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1"}'
295 - virtual_binding: VDU_vgmux_0
296 - virtual_link: VL_mux_gw_private_net
299 type: tosca.nodes.nfv.Vdu.Compute
301 name: { get_input: vgmux_name_0 }
304 min_number_of_instances: 1
305 max_number_of_instances: 1
307 inject_files: #TODO SDC bug
308 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
309 dest_path: /home/ubuntu/.ssh/authorized_keys
311 vnf_id: { get_input: vnf_id }
312 vf_module_id: { get_input: vf_module_id }
313 mux_to_bng_net_ipaddr: { get_input: vgmux_private_ip_0 }
314 oam_ipaddr: { get_input: vgmux_private_ip_1 }
315 mux_gw_net_ipaddr: { get_input: vgmux_private_ip_2 }
316 bng_to_mux_net_ipaddr: { get_input: bng_gmux_private_ip }
317 bng_mux_net_cidr: { get_input: bng_gmux_private_net_cidr }
318 oam_cidr: { get_input: onap_private_net_cidr }
319 mux_gw_net_cidr: { get_input: mux_gw_private_net_cidr }
320 brg_bng_net_cidr: { get_input: brgemu_bng_private_net_cidr }
321 install_script_version: { get_input: install_script_version }
322 cloud_env: { get_input: cloud_env }
323 nexus_artifact_repo: { get_input: nexus_artifact_repo }
326 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
327 apt-get -y install jq
330 echo $METADATA | jq -r ".meta.$1"
333 # Create configuration files
335 echo "$(get_metadata mux_to_bng_net_ipaddr)" > /opt/config/mux_to_bng_net_ipaddr.txt
336 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
337 echo "$(get_metadata mux_gw_net_ipaddr)" > /opt/config/mux_gw_net_ipaddr.txt
338 echo "$(get_metadata bng_to_mux_net_ipaddr)" > /opt/config/bng_to_mux_net_ipaddr.txt
339 echo "$(get_metadata bng_mux_net_cidr)" > /opt/config/bng_mux_net_cidr.txt
340 echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
341 echo "$(get_metadata mux_gw_net_cidr)" > /opt/config/mux_gw_net_cidr.txt
342 echo "$(get_metadata brg_bng_net_cidr)" > /opt/config/brg_bng_net_cidr.txt
343 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
344 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
345 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
347 # Download and run install script
348 apt-get -y install unzip
349 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
350 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
351 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
352 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
353 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_gmux_install.sh
355 chmod +x v_gmux_install.sh
361 virtual_mem_size: 4096 MB
362 vdu_mem_requirements:
363 memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
364 numberOfPages: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1024"}'
367 cpu_architecture: generic
368 virtual_local_storage:
369 - size_of_storage: 40 GB
371 sw_image: #TODO need to put glance image name here
372 #file: { get_input: vcpe_image_name }
373 file: ../Artifacts/Deployment/OTHER/image
374 type: tosca.artifacts.nfv.SwImage