1 tosca_definitions_version: tosca_simple_yaml_1_0
3 template_name: vCPE_vgw
4 template_version: "1.0"
12 #substitution_mappings:
13 # node_type: onap.vcpe_vgw
15 # virtual_link: [ Cp_vgw_public, virtual_link ] # expose as external CP
16 # virtual_link: [ Cp_vgw_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
29 description: onap OAM network id
31 onap_private_net_cidr:
33 description: oanp OAM network cidr
35 mux_gw_private_net_id:
37 description: Private network that connects vGMUX to vGWs
38 default: zdfw1muxgw01_private
39 mux_gw_private_net_cidr:
41 description: he CIDR of the vGMUX private network
45 description: cpe public net name
46 default: zdfw1cpe01_public
49 description: cpe public net cidr
53 description: Private IP address that is assigned to the vGW to communicate with vGMUX
57 description: Private IP address that is assigned to the vGW to communicate with ONAP components
61 description: Private IP address that is assigned to the vGW to communicate with vCPE public network
65 description: Name of the vGW
66 default: zdcpe1cpe01gw01
69 description: dcae collector ip
73 description: dcae collector port
77 description: ssh public key
78 default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
81 description: Root URL for the Nexus repository for Maven artifacts
82 default: https://nexus.onap.org
83 demo_artifacts_version:
85 description: artifacts version used in demo vnfs
87 install_script_version:
89 description: install script version number
90 default: 1.2.0-SNAPSHOT
93 description: cloud environment(openstack or rackspace)
97 description: IP address of vGMUX
101 description: vni value of vG-vGMUX vxlan tunnel
105 description: The VNF ID is provided by ONAP
106 default: vCPE_Infrastructure_GW_demo_app
109 description: The vCPE Module ID is provided by ONAP
110 default: vCPE_Customer_GW
114 type: tosca.nodes.nfv.VNF
116 descriptor_id: b1bb0ce7-2222-4fa7-95ed-4840d70a1177
118 product_name: vcpe_vgw
119 software_version: '1.0'
120 descriptor_version: '1.0'
122 flavour_description: simple
127 # type: tosca.nodes.nfv.VnfVirtualLink
130 # layer_protocols: [ipv4]
132 # max_bitrate_requirements:
135 # min_bitrate_requirements:
138 # virtual_link_protocol_data:
139 # - associated_layer_protocol: ipv4
142 # name: { get_input: public_net_id }
146 # type: tosca.nodes.nfv.VnfVirtualLink
149 # layer_protocols: [ipv4]
151 # max_bitrate_requirements:
154 # min_bitrate_requirements:
157 # virtual_link_protocol_data:
158 # - associated_layer_protocol: ipv4
161 # name: { get_input: onap_private_net_id }
162 # cidr: { get_input: onap_private_net_cidr }
164 #Private network that connects vGMUX to vGWs
165 VL_mux_gw_private_net:
166 type: tosca.nodes.nfv.VnfVirtualLink
169 layer_protocols: [ipv4]
171 max_bitrate_requirements:
174 min_bitrate_requirements:
177 virtual_link_protocol_data:
178 - associated_layer_protocol: ipv4
180 name: { get_input: mux_gw_private_net_id }
182 cidr: { get_input: mux_gw_private_net_cidr }
187 type: tosca.nodes.nfv.VnfVirtualLink
190 layer_protocols: [ipv4]
192 max_bitrate_requirements:
195 min_bitrate_requirements:
198 virtual_link_protocol_data:
199 - associated_layer_protocol: ipv4
201 name: { get_input: cpe_public_net_id }
203 cidr: { get_input: cpe_public_net_cidr }
208 type: tosca.nodes.nfv.VduCp
210 layer_protocols: [ipv4]
213 - associated_layer_protocol: ipv4
215 - address_type: ip_address
217 ip_address_assignment: false
218 floating_ip_activated: false
220 - virtual_binding: VDU_vgw_0
221 #- virtual_link: VL_public
224 type: tosca.nodes.nfv.VduCp
226 layer_protocols: [ipv4]
229 - associated_layer_protocol: ipv4
231 - address_type: ip_address
233 ip_address_assignment: false
234 floating_ip_activated: false
236 - { get_input: vgw_private_ip_1 }
238 - virtual_binding: VDU_vgw_0
239 #- virtual_link: VL_onap_private
241 Cp_vgw_mux_gw_private_net:
242 type: tosca.nodes.nfv.VduCp
244 layer_protocols: [ipv4]
247 - associated_layer_protocol: ipv4
249 - address_type: ip_address
251 ip_address_assignment: false
252 floating_ip_activated: false
254 - { get_input: vgw_private_ip_0 }
255 virtual_network_interface_requirements:
257 support_mandatory: true
258 network_interface_requirements:
259 dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
261 - virtual_binding: VDU_vgw_0
262 - virtual_link: VL_mux_gw_private_net
265 type: tosca.nodes.nfv.VduCp
267 layer_protocols: [ipv4]
270 - associated_layer_protocol: ipv4
272 - address_type: ip_address
274 ip_address_assignment: false
275 floating_ip_activated: false
277 - { get_input: vgw_private_ip_2 }
279 - virtual_binding: VDU_vgw_0
280 - virtual_link: VL_cpe_public
283 type: tosca.nodes.nfv.Vdu.Compute
285 name: { get_input: vgw_name_0 }
288 min_number_of_instances: 1
289 max_number_of_instances: 1
291 inject_files: # TODO SDC BUG
292 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
293 dest_path: /home/ubuntu/.ssh/authorized_keys
295 vnf_id: { get_input: vnf_id }
296 vf_module_id: { get_input: vf_module_id }
297 mux_gw_private_net_ipaddr: { get_input: vgw_private_ip_0 }
298 oam_ipaddr: { get_input: vgw_private_ip_1 }
299 oam_cidr: { get_input: onap_private_net_cidr }
300 cpe_public_net_cidr: { get_input: cpe_public_net_cidr }
301 mux_gw_private_net_cidr: { get_input: mux_gw_private_net_cidr }
302 mux_ip_addr: { get_input: mux_ip_addr }
303 vg_vgmux_tunnel_vni: { get_input: vg_vgmux_tunnel_vni }
304 install_script_version: { get_input: install_script_version }
305 cloud_env: { get_input: cloud_env }
306 nexus_artifact_repo: { get_input: nexus_artifact_repo }
309 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
310 apt-get -y install jq
313 echo $METADATA | jq -r ".meta.$1"
316 # Create configuration files
318 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
319 echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
320 echo "$(get_metadata cpe_public_net_cidr)" > /opt/config/cpe_public_net_cidr.txt
321 echo "$(get_metadata mux_gw_private_net_ipaddr)" > /opt/config/mux_gw_private_net_ipaddr.txt
322 echo "$(get_metadata mux_gw_private_net_cidr)" > /opt/config/mux_gw_private_net_cidr.txt
323 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
324 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
325 echo "$(get_metadata mux_ip_addr)" > /opt/config/mux_ip_addr.txt
326 echo "$(get_metadata vg_vgmux_tunnel_vni)" > /opt/config/vg_vgmux_tunnel_vni.txt
327 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
329 # Download and run install script
330 apt-get -y install unzip
331 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
332 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
333 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
334 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
335 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_gw_install.sh
337 chmod +x v_gw_install.sh
343 virtual_mem_size: 4096 MB
344 vdu_mem_requirements:
345 memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
346 numberOfPages: '{"schemaVersion": "0","schemaSelector": "","hardwarePlatform": "generic","mandatory": "true", "configurationValue": "1024"}'
349 cpu_architecture: generic
350 virtual_local_storage:
351 - size_of_storage: 40 GB
353 sw_image: #TODO need to put glance image name here
354 #file: { get_input: vcpe_image_name }
355 file: ../Artifacts/Deployment/OTHER/image
356 type: tosca.artifacts.nfv.SwImage