1 tosca_definitions_version: tosca_simple_yaml_1_0
3 template_name: vCPE_vbrgemu
4 template_version: "1.0"
6 VNFD_SCHEMA_VERSION: "2.5.1+1"
7 description: vCPE_vbrgemu
13 # substitution_mappings:
14 # node_type: onap.vcpe_vbrgemu
16 # virtual_link: [ Cp_vbrgemu_public, 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 vbrgemu_bng_private_net_id:
37 description: Private network that connects vBRGEMU to vBNG
38 default: zdfw1bngin01_private
39 vbrgemu_bng_private_net_cidr:
41 description: The CIDR of the input side of vBNG private network
45 description: Private IP address towards the BRGEMU-BNG network
49 description: Name of the vBRGEMU
50 default: zdcpe1cpe01brgemu01
53 description: The VNF ID is provided by ONAP
54 default: vCPE_Infrastructure_BGREMU_demo_app
57 description: The vCPE Module ID is provided by ONAP
58 default: vCPE_Customer_BRGEMU
61 description: ssh public key
62 default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
63 install_script_version:
65 description: install script version number
66 default: 1.2.0-SNAPSHOT
69 description: Root URL for the Nexus repository for Maven artifacts
70 default: https://nexus.onap.org
71 demo_artifacts_version:
73 description: artifacts version used in demo vnfs
77 description: cloud environment(openstack or rackspace)
81 description: SDNC ip address used to set NAT
85 description: State to compile code or not (done, auto or build)
90 type: tosca.nodes.nfv.VNF
92 descriptor_id: b1bb0ce7-2222-4fa7-95ed-4840d70a1177
94 product_name: vcpe_vbrgemu
95 software_version: '1.0'
96 descriptor_version: '1.0'
98 flavour_description: simple
104 # type: tosca.nodes.nfv.VnfVirtualLink
107 # layer_protocols: [ipv4]
109 # max_bitrate_requirements:
112 # min_bitrate_requirements:
115 # virtual_link_protocol_data:
116 # - associated_layer_protocol: ipv4
119 # name: { get_input: public_net_id }
123 # type: tosca.nodes.nfv.VnfVirtualLink
126 # layer_protocols: [ipv4]
128 # max_bitrate_requirements:
131 # min_bitrate_requirements:
134 # virtual_link_protocol_data:
135 # - associated_layer_protocol: ipv4
138 # name: { get_input: onap_private_net_id }
139 # cidr: { get_input: onap_private_net_cidr }
141 #Private network that connects vBRGEMU to vBNG
142 VL_vbrgemu_bng_private_net:
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: vbrgemu_bng_private_net_id}
159 cidr: { get_input: vbrgemu_bng_private_net_cidr }
164 type: tosca.nodes.nfv.VduCp
166 layer_protocols: [ipv4]
169 - associated_layer_protocol: ipv4
171 - address_type: ip_address
173 ip_address_assignment: false
174 floating_ip_activated: false
176 - virtual_binding: VDU_vbrgemu_0
177 #- virtual_link: VL_public
179 Cp_vbrgemu_vbrgemu_bng_private_net:
180 type: tosca.nodes.nfv.VduCp
182 layer_protocols: [ipv4]
185 - associated_layer_protocol: ipv4
187 - address_type: ip_address
189 ip_address_assignment: false
190 floating_ip_activated: false
192 - { get_input: vbrgemu_private_ip_0 }
193 virtual_network_interface_requirements:
195 support_mandatory: true
196 network_interface_requirements:
197 dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
199 - virtual_binding: VDU_vbrgemu_0
200 - virtual_link: VL_vbrgemu_bng_private_net
203 type: tosca.nodes.nfv.Vdu.Compute
205 name: { get_input: vbrgemu_name_0 }
208 min_number_of_instances: 1
209 max_number_of_instances: 1
211 inject_files: #TODO SDC bug
212 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
213 dest_path: /home/ubuntu/.ssh/authorized_keys
215 vnf_id: { get_input: vnf_id }
216 vf_module_id: { get_input: vf_module_id }
217 vbrgemu_bng_private_net_cidr: { get_input: vbrgemu_bng_private_net_cidr }
218 demo_artifacts_version: { get_input: demo_artifacts_version }
219 install_script_version: { get_input: install_script_version }
220 sdnc_ip: { get_input: sdnc_ip_addr }
221 cloud_env: { get_input: cloud_env }
222 nexus_artifact_repo: { get_input: nexus_artifact_repo }
225 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
226 apt-get -y install jq
229 echo $METADATA | jq -r ".meta.$1"
232 # Create configuration files
234 echo "$(get_metadata vbrgemu_bng_private_net_cidr)" > /opt/config/brgemu_bng_private_net_cidr.txt
235 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
236 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
237 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
238 echo "$(get_metadata sdnc_ip)" > /opt/config/sdnc_ip.txt
239 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
241 # Download and run install script
242 apt-get -y install unzip
243 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
244 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
245 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
246 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
247 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_brgemu_install.sh
249 chmod +x v_brgemu_install.sh
250 ./v_brgemu_install.sh
255 virtual_mem_size: 4096 MB
256 vdu_mem_requirements:
257 memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
258 numberOfPages: '{"schemaVersion": "0","schemaSelector": "","hardwarePlatform": "generic","mandatory": "true", "configurationValue": "1024"}'
261 cpu_architecture: generic
262 virtual_local_storage:
263 - size_of_storage: 40 GB
265 sw_image: #TODO need to put glance image name here
266 #file: { get_input: vcpe_image_name }
267 file: ../Artifacts/Deployment/OTHER/image
268 type: tosca.artifacts.nfv.SwImage