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"
13 #substitution_mappings:
14 # node_type: onap.vcpe_vgw
16 # virtual_link: [ Cp_vgw_public, virtual_link ] # expose as external CP
17 # virtual_link: [ Cp_vgw_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
30 description: onap OAM network id
32 onap_private_net_cidr:
34 description: oanp OAM network cidr
36 mux_gw_private_net_id:
38 description: Private network that connects vGMUX to vGWs
39 default: zdfw1muxgw01_private
40 mux_gw_private_net_cidr:
42 description: he CIDR of the vGMUX private network
46 description: cpe public net name
47 default: zdfw1cpe01_public
50 description: cpe public net cidr
54 description: Private IP address that is assigned to the vGW to communicate with vGMUX
58 description: Private IP address that is assigned to the vGW to communicate with ONAP components
62 description: Private IP address that is assigned to the vGW to communicate with vCPE public network
66 description: Name of the vGW
67 default: zdcpe1cpe01gw01
70 description: dcae collector ip
74 description: dcae collector port
78 description: ssh public key
79 default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
82 description: Root URL for the Nexus repository for Maven artifacts
83 default: https://nexus.onap.org
84 demo_artifacts_version:
86 description: artifacts version used in demo vnfs
88 install_script_version:
90 description: install script version number
91 default: 1.2.0-SNAPSHOT
94 description: cloud environment(openstack or rackspace)
98 description: IP address of vGMUX
102 description: vni value of vG-vGMUX vxlan tunnel
106 description: The VNF ID is provided by ONAP
107 default: vCPE_Infrastructure_GW_demo_app
110 description: The vCPE Module ID is provided by ONAP
111 default: vCPE_Customer_GW
115 type: tosca.nodes.nfv.VNF
117 descriptor_id: b1bb0ce7-2222-4fa7-95ed-4840d70a1177
119 product_name: vcpe_vgw
120 software_version: '1.0'
121 descriptor_version: '1.0'
123 flavour_description: simple
128 # type: tosca.nodes.nfv.VnfVirtualLink
131 # layer_protocols: [ipv4]
133 # max_bitrate_requirements:
136 # min_bitrate_requirements:
139 # virtual_link_protocol_data:
140 # - associated_layer_protocol: ipv4
143 # name: { get_input: public_net_id }
147 # type: tosca.nodes.nfv.VnfVirtualLink
150 # layer_protocols: [ipv4]
152 # max_bitrate_requirements:
155 # min_bitrate_requirements:
158 # virtual_link_protocol_data:
159 # - associated_layer_protocol: ipv4
162 # name: { get_input: onap_private_net_id }
163 # cidr: { get_input: onap_private_net_cidr }
165 #Private network that connects vGMUX to vGWs
166 VL_mux_gw_private_net:
167 type: tosca.nodes.nfv.VnfVirtualLink
170 layer_protocols: [ipv4]
172 max_bitrate_requirements:
175 min_bitrate_requirements:
178 virtual_link_protocol_data:
179 - associated_layer_protocol: ipv4
181 name: { get_input: mux_gw_private_net_id }
183 cidr: { get_input: mux_gw_private_net_cidr }
188 type: tosca.nodes.nfv.VnfVirtualLink
191 layer_protocols: [ipv4]
193 max_bitrate_requirements:
196 min_bitrate_requirements:
199 virtual_link_protocol_data:
200 - associated_layer_protocol: ipv4
202 name: { get_input: cpe_public_net_id }
204 cidr: { get_input: cpe_public_net_cidr }
209 type: tosca.nodes.nfv.VduCp
211 layer_protocols: [ipv4]
214 - associated_layer_protocol: ipv4
216 - address_type: ip_address
218 ip_address_assignment: false
219 floating_ip_activated: false
221 - virtual_binding: VDU_vgw_0
222 #- virtual_link: VL_public
225 type: tosca.nodes.nfv.VduCp
227 layer_protocols: [ipv4]
230 - associated_layer_protocol: ipv4
232 - address_type: ip_address
234 ip_address_assignment: false
235 floating_ip_activated: false
237 - { get_input: vgw_private_ip_1 }
239 - virtual_binding: VDU_vgw_0
240 #- virtual_link: VL_onap_private
242 Cp_vgw_mux_gw_private_net:
243 type: tosca.nodes.nfv.VduCp
245 layer_protocols: [ipv4]
248 - associated_layer_protocol: ipv4
250 - address_type: ip_address
252 ip_address_assignment: false
253 floating_ip_activated: false
255 - { get_input: vgw_private_ip_0 }
256 virtual_network_interface_requirements:
258 support_mandatory: true
259 network_interface_requirements:
260 dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
262 - virtual_binding: VDU_vgw_0
263 - virtual_link: VL_mux_gw_private_net
266 type: tosca.nodes.nfv.VduCp
268 layer_protocols: [ipv4]
271 - associated_layer_protocol: ipv4
273 - address_type: ip_address
275 ip_address_assignment: false
276 floating_ip_activated: false
278 - { get_input: vgw_private_ip_2 }
280 - virtual_binding: VDU_vgw_0
281 - virtual_link: VL_cpe_public
284 type: tosca.nodes.nfv.Vdu.Compute
286 name: { get_input: vgw_name_0 }
289 min_number_of_instances: 1
290 max_number_of_instances: 1
292 inject_files: # TODO SDC BUG
293 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
294 dest_path: /home/ubuntu/.ssh/authorized_keys
296 vnf_id: { get_input: vnf_id }
297 vf_module_id: { get_input: vf_module_id }
298 mux_gw_private_net_ipaddr: { get_input: vgw_private_ip_0 }
299 oam_ipaddr: { get_input: vgw_private_ip_1 }
300 oam_cidr: { get_input: onap_private_net_cidr }
301 cpe_public_net_cidr: { get_input: cpe_public_net_cidr }
302 mux_gw_private_net_cidr: { get_input: mux_gw_private_net_cidr }
303 mux_ip_addr: { get_input: mux_ip_addr }
304 vg_vgmux_tunnel_vni: { get_input: vg_vgmux_tunnel_vni }
305 install_script_version: { get_input: install_script_version }
306 cloud_env: { get_input: cloud_env }
307 nexus_artifact_repo: { get_input: nexus_artifact_repo }
310 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
311 apt-get -y install jq
314 echo $METADATA | jq -r ".meta.$1"
317 # Create configuration files
319 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
320 echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
321 echo "$(get_metadata cpe_public_net_cidr)" > /opt/config/cpe_public_net_cidr.txt
322 echo "$(get_metadata mux_gw_private_net_ipaddr)" > /opt/config/mux_gw_private_net_ipaddr.txt
323 echo "$(get_metadata mux_gw_private_net_cidr)" > /opt/config/mux_gw_private_net_cidr.txt
324 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
325 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
326 echo "$(get_metadata mux_ip_addr)" > /opt/config/mux_ip_addr.txt
327 echo "$(get_metadata vg_vgmux_tunnel_vni)" > /opt/config/vg_vgmux_tunnel_vni.txt
328 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
330 # Download and run install script
331 apt-get -y install unzip
332 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
333 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
334 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
335 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
336 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_gw_install.sh
338 chmod +x v_gw_install.sh
344 virtual_mem_size: 4096 MB
345 vdu_mem_requirements:
346 memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
347 numberOfPages: '{"schemaVersion": "0","schemaSelector": "","hardwarePlatform": "generic","mandatory": "true", "configurationValue": "1024"}'
350 cpu_architecture: generic
351 virtual_local_storage:
352 - size_of_storage: 40 GB
354 sw_image: #TODO need to put glance image name here
355 #file: { get_input: vcpe_image_name }
356 file: ../Artifacts/Deployment/OTHER/image
357 type: tosca.artifacts.nfv.SwImage