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_protocol: ipv4
129 # max_bit_rate_requirements:
132 # min_bit_rate_requirements:
135 # networkName: { get_input: public_net_id }
139 # type: tosca.nodes.nfv.VnfVirtualLink
142 # layer_protocol: ipv4
144 # max_bit_rate_requirements:
147 # min_bit_rate_requirements:
150 # networkName: { get_input: onap_private_net_id }
151 # cidr: { get_input: onap_private_net_cidr }
153 #Private network that connects vBNG to vGMUX
154 VL_bng_gmux_private_net:
155 type: tosca.nodes.nfv.VnfVirtualLink
160 max_bit_rate_requirements:
163 min_bit_rate_requirements:
166 networkName: { get_input: bng_gmux_private_net_id}
167 cidr: { get_input: bng_gmux_private_net_cidr }
170 #Private network that connects vGMUX to vGWs
171 VL_mux_gw_private_net:
172 type: tosca.nodes.nfv.VnfVirtualLink
177 max_bit_rate_requirements:
180 min_bit_rate_requirements:
183 networkName: { get_input: mux_gw_private_net_id}
184 cidr: { get_input: mux_gw_private_net_cidr }
189 type: tosca.nodes.nfv.VduCp
191 layer_protocol: [ipv4]
194 - asscociated_layer_protocol: ipv4
196 address_type: ip_address
198 ip_address_assignment: false
199 floating_ip_activated: false
201 - virtual_binding: VDU_vgmux_0
202 #- virtual_link: VL_public
204 Cp_vgmux_onap_private:
205 type: tosca.nodes.nfv.VduCp
207 layer_protocol: [ipv4]
210 - asscociated_layer_protocol: ipv4
212 address_type: ip_address
214 ip_address_assignment: false
215 floating_ip_activated: false
217 - { get_input: vgmux_private_ip_1 }
219 - virtual_binding: VDU_vgmux_0
220 #- virtual_link: VL_onap_private
222 Cp_vgmux_bng_gmux_private_net:
223 type: tosca.nodes.nfv.VduCp
225 layer_protocol: [ipv4]
228 - asscociated_layer_protocol: ipv4
230 address_type: ip_address
232 ip_address_assignment: false
233 floating_ip_activated: false
235 - { get_input: vgmux_private_ip_0 }
236 virtual_network_interface_requirements:
238 support_mandatory: true
240 network_interface_requirements:
241 dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
243 - virtual_binding: VDU_vgmux_0
244 - virtual_link: VL_bng_gmux_private_net
246 Cp_vgmux_mux_gw_private_net:
247 type: tosca.nodes.nfv.VduCp
249 layer_protocol: [ipv4]
252 - asscociated_layer_protocol: ipv4
254 address_type: ip_address
256 ip_address_assignment: false
257 floating_ip_activated: false
259 - { get_input: vgmux_private_ip_2 }
260 virtual_network_interface_requirements:
262 support_mandatory: true
264 network_interface_requirements:
265 dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
267 - virtual_binding: VDU_vgmux_0
268 - virtual_link: VL_mux_gw_private_net
270 VirtualStorage_root_all:
271 # this indicate the VDU root storage size
272 type: tosca.nodes.nfv.Vdu.VirtualStorage
274 type_of_storage: root
275 size_of_storage: 40 GB
278 type: tosca.nodes.nfv.Vdu.Compute
280 name: { get_input: vgmux_name_0 }
282 configurable_properties:
283 additional_vnfc_configurable_properties: {}
285 min_number_of_instances: 1
286 max_number_of_instances: 1
288 inject_files: #TODO SDC bug
289 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
290 dest_path: /home/ubuntu/.ssh/authorized_keys
292 vnf_id: { get_input: vnf_id }
293 vf_module_id: { get_input: vf_module_id }
294 mux_to_bng_net_ipaddr: { get_input: vgmux_private_ip_0 }
295 oam_ipaddr: { get_input: vgmux_private_ip_1 }
296 mux_gw_net_ipaddr: { get_input: vgmux_private_ip_2 }
297 bng_to_mux_net_ipaddr: { get_input: bng_gmux_private_ip }
298 bng_mux_net_cidr: { get_input: bng_gmux_private_net_cidr }
299 oam_cidr: { get_input: onap_private_net_cidr }
300 mux_gw_net_cidr: { get_input: mux_gw_private_net_cidr }
301 brg_bng_net_cidr: { get_input: brgemu_bng_private_net_cidr }
302 install_script_version: { get_input: install_script_version }
303 cloud_env: { get_input: cloud_env }
304 nexus_artifact_repo: { get_input: nexus_artifact_repo }
307 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
308 apt-get -y install jq
311 echo $METADATA | jq -r ".meta.$1"
314 # Create configuration files
316 echo "$(get_metadata mux_to_bng_net_ipaddr)" > /opt/config/mux_to_bng_net_ipaddr.txt
317 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
318 echo "$(get_metadata mux_gw_net_ipaddr)" > /opt/config/mux_gw_net_ipaddr.txt
319 echo "$(get_metadata bng_to_mux_net_ipaddr)" > /opt/config/bng_to_mux_net_ipaddr.txt
320 echo "$(get_metadata bng_mux_net_cidr)" > /opt/config/bng_mux_net_cidr.txt
321 echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
322 echo "$(get_metadata mux_gw_net_cidr)" > /opt/config/mux_gw_net_cidr.txt
323 echo "$(get_metadata brg_bng_net_cidr)" > /opt/config/brg_bng_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 nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
328 # Download and run install script
329 apt-get -y install unzip
330 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
331 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
332 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
333 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
334 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_gmux_install.sh
336 chmod +x v_gmux_install.sh
342 virtual_mem_size: 4096 MB
344 vdu_memory_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
351 - virtual_storage: VirtualStorage_root_all
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