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"
14 derived_from: tosca.nodes.nfv.VNF
18 constraints: [ valid_values: [ b1bb0ce7-2222-4fa7-95ed-4840d70a1177 ] ]
19 default: b1bb0ce7-2222-4fa7-95ed-4840d70a1177
22 constraints: [ valid_values: [ onap ] ]
26 constraints: [ valid_values: [ vcpe_vgw ] ]
30 constraints: [ valid_values: [ '1.0' ] ]
34 constraints: [ valid_values: [ '1.0' ] ]
38 constraints: [ valid_values: [ simple ] ] #only one and only allowed one DF in this example
49 - virtual_link_public:
50 capability: tosca.capabilities.nfv.VirtualLinkable
51 relationship: tosca.relationships.nfv.VirtualLinksTo
53 - virtual_link_private:
54 capability: tosca.capabilities.nfv.VirtualLinkable
55 relationship: tosca.relationships.nfv.VirtualLinksTo
59 substitution_mappings:
60 node_type: onap.vcpe_vgw
62 virtual_link_public: [ Cp_vgw_public, virtual_link ] # expose as external CP
67 description: image name for vcpe in openstack glance
71 description: public network id used during onap installation
75 description: onap OAM network id
77 onap_private_net_cidr:
79 description: oanp OAM network cidr
81 mux_gw_private_net_id:
83 description: Private network that connects vGMUX to vGWs
84 default: zdfw1muxgw01_private
85 mux_gw_private_net_cidr:
87 description: he CIDR of the vGMUX private network
91 description: cpe public net name
92 default: zdfw1cpe01_public
95 description: cpe public net cidr
99 description: Private IP address that is assigned to the vGW to communicate with vGMUX
103 description: Private IP address that is assigned to the vGW to communicate with ONAP components
107 description: Private IP address that is assigned to the vGW to communicate with vCPE public network
111 description: Name of the vGW
112 default: zdcpe1cpe01gw01
115 description: dcae collector ip
119 description: dcae collector port
123 description: ssh public key
124 default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
127 description: Root URL for the Nexus repository for Maven artifacts
128 default: https://nexus.onap.org
129 demo_artifacts_version:
131 description: artifacts version used in demo vnfs
133 install_script_version:
135 description: install script version number
136 default: 1.2.0-SNAPSHOT
139 description: cloud environment(openstack or rackspace)
143 description: IP address of vGMUX
147 description: vni value of vG-vGMUX vxlan tunnel
151 description: The VNF ID is provided by ONAP
152 default: vCPE_Infrastructure_GW_demo_app
155 description: The vCPE Module ID is provided by ONAP
156 default: vCPE_Customer_GW
162 descriptor_id: b1bb0ce7-2222-4fa7-95ed-4840d70a1177
164 product_name: vcpe_vgw
165 software_version: '1.0'
166 descriptor_version: '1.0'
168 flavour_description: simple
171 #Private network that connects vGMUX to vGWs
172 VL_mux_gw_private_net:
173 type: tosca.nodes.nfv.VnfVirtualLink
176 layer_protocols: [ipv4]
178 max_bitrate_requirements:
181 min_bitrate_requirements:
184 virtual_link_protocol_data:
185 - associated_layer_protocol: ipv4
187 name: { get_input: mux_gw_private_net_id }
189 cidr: { get_input: mux_gw_private_net_cidr }
194 type: tosca.nodes.nfv.VnfVirtualLink
197 layer_protocols: [ipv4]
199 max_bitrate_requirements:
202 min_bitrate_requirements:
205 virtual_link_protocol_data:
206 - associated_layer_protocol: ipv4
208 name: { get_input: cpe_public_net_id }
210 cidr: { get_input: cpe_public_net_cidr }
215 type: tosca.nodes.nfv.VduCp
217 layer_protocols: [ipv4]
220 - associated_layer_protocol: ipv4
222 - address_type: ip_address
224 ip_address_assignment: false
225 floating_ip_activated: false
227 - virtual_binding: VDU_vgw_0
228 #- virtual_link: VL_public
230 Cp_vgw_mux_gw_private_net:
231 type: tosca.nodes.nfv.VduCp
233 layer_protocols: [ipv4]
236 - associated_layer_protocol: ipv4
238 - address_type: ip_address
240 ip_address_assignment: false
241 floating_ip_activated: false
243 - { get_input: vgw_private_ip_0 }
244 virtual_network_interface_requirements:
246 support_mandatory: true
247 network_interface_requirements:
248 dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
250 - virtual_binding: VDU_vgw_0
251 - virtual_link: VL_mux_gw_private_net
254 type: tosca.nodes.nfv.VduCp
256 layer_protocols: [ipv4]
259 - associated_layer_protocol: ipv4
261 - address_type: ip_address
263 ip_address_assignment: false
264 floating_ip_activated: false
266 - { get_input: vgw_private_ip_2 }
268 - virtual_binding: VDU_vgw_0
269 - virtual_link: VL_cpe_public
272 type: tosca.nodes.nfv.Vdu.Compute
274 name: { get_input: vgw_name_0 }
277 min_number_of_instances: 1
278 max_number_of_instances: 1
280 inject_files: # TODO SDC BUG
281 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
282 dest_path: /home/ubuntu/.ssh/authorized_keys
284 vnf_id: { get_input: vnf_id }
285 vf_module_id: { get_input: vf_module_id }
286 mux_gw_private_net_ipaddr: { get_input: vgw_private_ip_0 }
287 oam_ipaddr: { get_input: vgw_private_ip_1 }
288 oam_cidr: { get_input: onap_private_net_cidr }
289 cpe_public_net_cidr: { get_input: cpe_public_net_cidr }
290 mux_gw_private_net_cidr: { get_input: mux_gw_private_net_cidr }
291 mux_ip_addr: { get_input: mux_ip_addr }
292 vg_vgmux_tunnel_vni: { get_input: vg_vgmux_tunnel_vni }
293 install_script_version: { get_input: install_script_version }
294 cloud_env: { get_input: cloud_env }
295 nexus_artifact_repo: { get_input: nexus_artifact_repo }
298 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
299 apt-get -y install jq
302 echo $METADATA | jq -r ".meta.$1"
305 # Create configuration files
307 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
308 echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
309 echo "$(get_metadata cpe_public_net_cidr)" > /opt/config/cpe_public_net_cidr.txt
310 echo "$(get_metadata mux_gw_private_net_ipaddr)" > /opt/config/mux_gw_private_net_ipaddr.txt
311 echo "$(get_metadata mux_gw_private_net_cidr)" > /opt/config/mux_gw_private_net_cidr.txt
312 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
313 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
314 echo "$(get_metadata mux_ip_addr)" > /opt/config/mux_ip_addr.txt
315 echo "$(get_metadata vg_vgmux_tunnel_vni)" > /opt/config/vg_vgmux_tunnel_vni.txt
316 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
318 # Download and run install script
319 apt-get -y install unzip
320 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
321 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
322 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
323 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
324 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_gw_install.sh
326 chmod +x v_gw_install.sh
332 virtual_mem_size: 4096 MB
333 vdu_mem_requirements:
334 memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
335 numberOfPages: '{"schemaVersion": "0","schemaSelector": "","hardwarePlatform": "generic","mandatory": "true", "configurationValue": "1024"}'
338 cpu_architecture: generic
339 virtual_local_storage:
340 - size_of_storage: 40 GB
342 sw_image: #TODO need to put glance image name here
343 #file: { get_input: vcpe_image_name }
344 file: ../Artifacts/Deployment/OTHER/image
345 type: tosca.artifacts.nfv.SwImage