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
29 description: onap OAM network id
31 onap_private_net_cidr:
33 description: oanp OAM network cidr
35 bng_gmux_private_net_id:
37 description: Private network that connects vBNG to vGMUX
38 default: zdfw1bngmux01_private
39 bng_gmux_private_net_cidr:
41 description: The CIDR of the vBNG-vGMUX private network
43 mux_gw_private_net_id:
45 description: Private network that connects vGMUX to vGWs
46 default: zdfw1muxgw01_private
47 mux_gw_private_net_cidr:
49 description: The CIDR of the vGMUX private network
51 brgemu_bng_private_net_cidr:
53 description: The CIDR of the vBRG-vBNG private network
57 description: Private IP address that is assigned to the vGMUX to communicate with the vBNG
61 description: Private IP address that is assigned to the vGMUX to communicate with ONAP components
65 description: Private IP address that is assigned to the vGMUX to communicate with vGWs
69 description: Name of the vGMUX
70 default: zdcpe1cpe01mux01
73 description: The VNF ID is provided by ONAP
74 default: vCPE_Infrastructure_vGMUX_demo_app
77 description: The vCPE Module ID is provided by ONAP
78 default: vCPE_Intrastructure_Metro_vGMUX
81 description: Private IP address that is assigned to the vBNG to communicate with the vGMUX
85 description: dcae collector ip
89 description: dcae collector port
93 description: ssh public key
94 default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
95 install_script_version:
97 description: install script version number
98 default: 1.2.0-SNAPSHOT
101 description: Root URL for the Nexus repository for Maven artifacts
102 default: https://nexus.onap.org
105 description: cloud environment(openstack or rackspace)
110 type: tosca.nodes.nfv.VNF
112 descriptor_id: b1bb0ce7-2222-4fa7-95ed-4840d70a1177
114 product_name: vcpe_vgmux
115 software_version: '1.0'
116 descriptor_version: '1.0'
118 flavour_description: simple
124 # type: tosca.nodes.nfv.VnfVirtualLink
127 # layer_protocols: [ipv4]
129 # max_bitrate_requirements:
132 # min_bitrate_requirements:
135 # virtual_link_protocol_data:
136 # - associated_layer_protocol: ipv4
139 # name: { get_input: public_net_id }
143 # type: tosca.nodes.nfv.VnfVirtualLink
146 # layer_protocols: [ipv4]
148 # max_bitrate_requirements:
151 # min_bitrate_requirements:
154 # virtual_link_protocol_data:
155 # - associated_layer_protocol: ipv4
158 # name: { get_input: onap_private_net_id }
159 # cidr: { get_input: onap_private_net_cidr }
161 #Private network that connects vBNG to vGMUX
162 VL_bng_gmux_private_net:
163 type: tosca.nodes.nfv.VnfVirtualLink
166 layer_protocols: [ipv4]
168 max_bitrate_requirements:
171 min_bitrate_requirements:
174 virtual_link_protocol_data:
175 - associated_layer_protocol: ipv4
178 name: { get_input: bng_gmux_private_net_id}
179 cidr: { get_input: bng_gmux_private_net_cidr }
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 }
205 type: tosca.nodes.nfv.VduCp
207 layer_protocols: [ipv4]
210 - associated_layer_protocol: ipv4
212 - address_type: ip_address
214 ip_address_assignment: false
215 floating_ip_activated: false
217 - virtual_binding: VDU_vgmux_0
218 #- virtual_link: VL_public
220 Cp_vgmux_onap_private:
221 type: tosca.nodes.nfv.VduCp
223 layer_protocols: [ipv4]
226 - associated_layer_protocol: ipv4
228 - address_type: ip_address
230 ip_address_assignment: false
231 floating_ip_activated: false
233 - { get_input: vgmux_private_ip_1 }
235 - virtual_binding: VDU_vgmux_0
236 #- virtual_link: VL_onap_private
238 Cp_vgmux_bng_gmux_private_net:
239 type: tosca.nodes.nfv.VduCp
241 layer_protocols: [ipv4]
244 - associated_layer_protocol: ipv4
246 - address_type: ip_address
248 ip_address_assignment: false
249 floating_ip_activated: false
251 - { get_input: vgmux_private_ip_0 }
252 virtual_network_interface_requirements:
254 support_mandatory: true
255 network_interface_requirements:
256 dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
258 - virtual_binding: VDU_vgmux_0
259 - virtual_link: VL_bng_gmux_private_net
261 Cp_vgmux_mux_gw_private_net:
262 type: tosca.nodes.nfv.VduCp
264 layer_protocols: [ipv4]
267 - associated_layer_protocol: ipv4
269 - address_type: ip_address
271 ip_address_assignment: false
272 floating_ip_activated: false
274 - { get_input: vgmux_private_ip_2 }
275 virtual_network_interface_requirements:
277 support_mandatory: true
278 network_interface_requirements:
279 dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
281 - virtual_binding: VDU_vgmux_0
282 - virtual_link: VL_mux_gw_private_net
285 type: tosca.nodes.nfv.Vdu.Compute
287 name: { get_input: vgmux_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_to_bng_net_ipaddr: { get_input: vgmux_private_ip_0 }
300 oam_ipaddr: { get_input: vgmux_private_ip_1 }
301 mux_gw_net_ipaddr: { get_input: vgmux_private_ip_2 }
302 bng_to_mux_net_ipaddr: { get_input: bng_gmux_private_ip }
303 bng_mux_net_cidr: { get_input: bng_gmux_private_net_cidr }
304 oam_cidr: { get_input: onap_private_net_cidr }
305 mux_gw_net_cidr: { get_input: mux_gw_private_net_cidr }
306 brg_bng_net_cidr: { get_input: brgemu_bng_private_net_cidr }
307 install_script_version: { get_input: install_script_version }
308 cloud_env: { get_input: cloud_env }
309 nexus_artifact_repo: { get_input: nexus_artifact_repo }
312 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
313 apt-get -y install jq
316 echo $METADATA | jq -r ".meta.$1"
319 # Create configuration files
321 echo "$(get_metadata mux_to_bng_net_ipaddr)" > /opt/config/mux_to_bng_net_ipaddr.txt
322 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
323 echo "$(get_metadata mux_gw_net_ipaddr)" > /opt/config/mux_gw_net_ipaddr.txt
324 echo "$(get_metadata bng_to_mux_net_ipaddr)" > /opt/config/bng_to_mux_net_ipaddr.txt
325 echo "$(get_metadata bng_mux_net_cidr)" > /opt/config/bng_mux_net_cidr.txt
326 echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
327 echo "$(get_metadata mux_gw_net_cidr)" > /opt/config/mux_gw_net_cidr.txt
328 echo "$(get_metadata brg_bng_net_cidr)" > /opt/config/brg_bng_net_cidr.txt
329 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
330 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
331 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
333 # Download and run install script
334 apt-get -y install unzip
335 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
336 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
337 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
338 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
339 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_gmux_install.sh
341 chmod +x v_gmux_install.sh
347 virtual_mem_size: 4096 MB
348 vdu_mem_requirements:
349 memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
350 numberOfPages: '{"schemaVersion": "0","schemaSelector": "","hardwarePlatform": "generic","mandatory": "true", "configurationValue": "1024"}'
353 cpu_architecture: generic
354 virtual_local_storage:
355 - size_of_storage: 40 GB
357 sw_image: #TODO need to put glance image name here
358 #file: { get_input: vcpe_image_name }
359 file: ../Artifacts/Deployment/OTHER/image
360 type: tosca.artifacts.nfv.SwImage