1 tosca_definitions_version: tosca_simple_yaml_1_0
3 template_name: vCPE_vgw
4 template_version: "1.0"
6 VNFD_SCHEMA_VERSION: "2.5.1+1"
7 descriptor_id: b1bb0ce7-2222-4fa7-95ed-4840d70a1177
14 #substitution_mappings:
15 # node_type: onap.vcpe_vgw
17 # virtual_link: [ Cp_vgw_public, virtual_link ] # expose as external CP
18 # virtual_link: [ Cp_vgw_onap_private, virtual_link ] # expose as external CP
23 description: image name for vcpe in openstack glance
27 description: public network id used during onap installation
31 description: onap OAM network id
33 onap_private_net_cidr:
35 description: oanp OAM network cidr
37 mux_gw_private_net_id:
39 description: Private network that connects vGMUX to vGWs
40 default: zdfw1muxgw01_private
41 mux_gw_private_net_cidr:
43 description: he CIDR of the vGMUX private network
47 description: cpe public net name
48 default: zdfw1cpe01_public
51 description: cpe public net cidr
55 description: Private IP address that is assigned to the vGW to communicate with vGMUX
59 description: Private IP address that is assigned to the vGW to communicate with ONAP components
63 description: Private IP address that is assigned to the vGW to communicate with vCPE public network
67 description: Name of the vGW
68 default: zdcpe1cpe01gw01
71 description: dcae collector ip
75 description: dcae collector port
79 description: ssh public key
80 default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
83 description: Root URL for the Nexus repository for Maven artifacts
84 default: https://nexus.onap.org
85 demo_artifacts_version:
87 description: artifacts version used in demo vnfs
89 install_script_version:
91 description: install script version number
92 default: 1.2.0-SNAPSHOT
95 description: cloud environment(openstack or rackspace)
99 description: IP address of vGMUX
103 description: vni value of vG-vGMUX vxlan tunnel
107 description: The VNF ID is provided by ONAP
108 default: vCPE_Infrastructure_GW_demo_app
111 description: The vCPE Module ID is provided by ONAP
112 default: vCPE_Customer_GW
116 type: tosca.nodes.nfv.VNF
118 descriptor_id: b1bb0ce7-2222-4fa7-95ed-4840d70a1177
120 product_name: vcpe_vgw
121 software_version: '1.0'
122 descriptor_version: '1.0'
124 flavour_description: simple
129 # type: tosca.nodes.nfv.VnfVirtualLink
132 # layer_protocols: [ipv4]
134 # max_bitrate_requirements:
137 # min_bitrate_requirements:
140 # virtual_link_protocol_data:
141 # - associated_layer_protocol: ipv4
144 # name: { get_input: public_net_id }
148 # type: tosca.nodes.nfv.VnfVirtualLink
151 # layer_protocols: [ipv4]
153 # max_bitrate_requirements:
156 # min_bitrate_requirements:
159 # virtual_link_protocol_data:
160 # - associated_layer_protocol: ipv4
163 # name: { get_input: onap_private_net_id }
164 # cidr: { get_input: onap_private_net_cidr }
166 #Private network that connects vGMUX to vGWs
167 VL_mux_gw_private_net:
168 type: tosca.nodes.nfv.VnfVirtualLink
171 layer_protocols: [ipv4]
173 max_bitrate_requirements:
176 min_bitrate_requirements:
179 virtual_link_protocol_data:
180 - associated_layer_protocol: ipv4
182 name: { get_input: mux_gw_private_net_id }
184 cidr: { get_input: mux_gw_private_net_cidr }
189 type: tosca.nodes.nfv.VnfVirtualLink
192 layer_protocols: [ipv4]
194 max_bitrate_requirements:
197 min_bitrate_requirements:
200 virtual_link_protocol_data:
201 - associated_layer_protocol: ipv4
203 name: { get_input: cpe_public_net_id }
205 cidr: { get_input: cpe_public_net_cidr }
210 type: tosca.nodes.nfv.VduCp
212 layer_protocols: [ipv4]
215 - associated_layer_protocol: ipv4
217 - address_type: ip_address
219 ip_address_assignment: false
220 floating_ip_activated: false
222 - virtual_binding: VDU_vgw_0
223 #- virtual_link: VL_public
226 type: tosca.nodes.nfv.VduCp
228 layer_protocols: [ipv4]
231 - associated_layer_protocol: ipv4
233 - address_type: ip_address
235 ip_address_assignment: false
236 floating_ip_activated: false
238 - { get_input: vgw_private_ip_1 }
240 - virtual_binding: VDU_vgw_0
241 #- virtual_link: VL_onap_private
243 Cp_vgw_mux_gw_private_net:
244 type: tosca.nodes.nfv.VduCp
246 layer_protocols: [ipv4]
249 - associated_layer_protocol: ipv4
251 - address_type: ip_address
253 ip_address_assignment: false
254 floating_ip_activated: false
256 - { get_input: vgw_private_ip_0 }
257 virtual_network_interface_requirements:
259 support_mandatory: true
260 network_interface_requirements:
261 dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
263 - virtual_binding: VDU_vgw_0
264 - virtual_link: VL_mux_gw_private_net
267 type: tosca.nodes.nfv.VduCp
269 layer_protocols: [ipv4]
272 - associated_layer_protocol: ipv4
274 - address_type: ip_address
276 ip_address_assignment: false
277 floating_ip_activated: false
279 - { get_input: vgw_private_ip_2 }
281 - virtual_binding: VDU_vgw_0
282 - virtual_link: VL_cpe_public
285 type: tosca.nodes.nfv.Vdu.Compute
287 name: { get_input: vgw_name_0 }
290 min_number_of_instances: 1
291 max_number_of_instances: 1
293 inject_files: # TODO SDC BUG
294 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
295 dest_path: /home/ubuntu/.ssh/authorized_keys
297 vnf_id: { get_input: vnf_id }
298 vf_module_id: { get_input: vf_module_id }
299 mux_gw_private_net_ipaddr: { get_input: vgw_private_ip_0 }
300 oam_ipaddr: { get_input: vgw_private_ip_1 }
301 oam_cidr: { get_input: onap_private_net_cidr }
302 cpe_public_net_cidr: { get_input: cpe_public_net_cidr }
303 mux_gw_private_net_cidr: { get_input: mux_gw_private_net_cidr }
304 mux_ip_addr: { get_input: mux_ip_addr }
305 vg_vgmux_tunnel_vni: { get_input: vg_vgmux_tunnel_vni }
306 install_script_version: { get_input: install_script_version }
307 cloud_env: { get_input: cloud_env }
308 nexus_artifact_repo: { get_input: nexus_artifact_repo }
311 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
312 apt-get -y install jq
315 echo $METADATA | jq -r ".meta.$1"
318 # Create configuration files
320 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
321 echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
322 echo "$(get_metadata cpe_public_net_cidr)" > /opt/config/cpe_public_net_cidr.txt
323 echo "$(get_metadata mux_gw_private_net_ipaddr)" > /opt/config/mux_gw_private_net_ipaddr.txt
324 echo "$(get_metadata mux_gw_private_net_cidr)" > /opt/config/mux_gw_private_net_cidr.txt
325 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
326 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
327 echo "$(get_metadata mux_ip_addr)" > /opt/config/mux_ip_addr.txt
328 echo "$(get_metadata vg_vgmux_tunnel_vni)" > /opt/config/vg_vgmux_tunnel_vni.txt
329 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
331 # Download and run install script
332 apt-get -y install unzip
333 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
334 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
335 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
336 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
337 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_gw_install.sh
339 chmod +x v_gw_install.sh
345 virtual_mem_size: 4096 MB
346 vdu_mem_requirements:
347 memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
348 numberOfPages: '{"schemaVersion": "0","schemaSelector": "","hardwarePlatform": "generic","mandatory": "true", "configurationValue": "1024"}'
351 cpu_architecture: generic
352 virtual_local_storage:
353 - size_of_storage: 40 GB
355 sw_image: #TODO need to put glance image name here
356 #file: { get_input: vcpe_image_name }
357 file: ../Artifacts/Deployment/OTHER/image
358 type: tosca.artifacts.nfv.SwImage