1 tosca_definitions_version: tosca_simple_yaml_1_0
3 template_name: vCPE_vbrgemu
4 template_version: "1.0"
6 description: vCPE_vbrgemu
12 # substitution_mappings:
13 # node_type: onap.vcpe_vbrgemu
15 # virtual_link: [ Cp_vbrgemu_public, virtual_link ] # expose as external CP
20 description: image name for vcpe in openstack glance
24 description: public network id used during onap installation
28 description: onap OAM network id
30 onap_private_net_cidr:
32 description: oanp OAM network cidr
34 vbrgemu_bng_private_net_id:
36 description: Private network that connects vBRGEMU to vBNG
37 default: zdfw1bngin01_private
38 vbrgemu_bng_private_net_cidr:
40 description: The CIDR of the input side of vBNG private network
44 description: Private IP address towards the BRGEMU-BNG network
48 description: Name of the vBRGEMU
49 default: zdcpe1cpe01brgemu01
52 description: The VNF ID is provided by ONAP
53 default: vCPE_Infrastructure_BGREMU_demo_app
56 description: The vCPE Module ID is provided by ONAP
57 default: vCPE_Customer_BRGEMU
60 description: ssh public key
61 default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
62 install_script_version:
64 description: install script version number
65 default: 1.2.0-SNAPSHOT
68 description: Root URL for the Nexus repository for Maven artifacts
69 default: https://nexus.onap.org
70 demo_artifacts_version:
72 description: artifacts version used in demo vnfs
76 description: cloud environment(openstack or rackspace)
80 description: SDNC ip address used to set NAT
84 description: State to compile code or not (done, auto or build)
89 type: tosca.nodes.nfv.VNF
91 descriptor_id: b1bb0ce7-2222-4fa7-95ed-4840d70a1177
93 product_name: vcpe_vbrgemu
94 software_version: '1.0'
95 descriptor_version: '1.0'
97 flavour_description: simple
103 # type: tosca.nodes.nfv.VnfVirtualLink
106 # layer_protocol: ipv4
108 # max_bit_rate_requirements:
111 # min_bit_rate_requirements:
114 # networkName: { get_input: public_net_id }
118 # type: tosca.nodes.nfv.VnfVirtualLink
121 # layer_protocol: ipv4
123 # max_bit_rate_requirements:
126 # min_bit_rate_requirements:
129 # networkName: { get_input: onap_private_net_id }
130 # cidr: { get_input: onap_private_net_cidr }
132 #Private network that connects vBRGEMU to vBNG
133 VL_vbrgemu_bng_private_net:
134 type: tosca.nodes.nfv.VnfVirtualLink
139 max_bit_rate_requirements:
142 min_bit_rate_requirements:
145 networkName: { get_input: vbrgemu_bng_private_net_id}
146 cidr: { get_input: vbrgemu_bng_private_net_cidr }
151 type: tosca.nodes.nfv.VduCp
153 layer_protocol: [ipv4]
156 - asscociated_layer_protocol: ipv4
158 address_type: ip_address
160 ip_address_assignment: false
161 floating_ip_activated: false
163 - virtual_binding: VDU_vbrgemu_0
164 #- virtual_link: VL_public
166 Cp_vbrgemu_vbrgemu_bng_private_net:
167 type: tosca.nodes.nfv.VduCp
169 layer_protocol: [ipv4]
172 - asscociated_layer_protocol: ipv4
174 address_type: ip_address
176 ip_address_assignment: false
177 floating_ip_activated: false
179 - { get_input: vbrgemu_private_ip_0 }
180 virtual_network_interface_requirements:
182 support_mandatory: true
184 network_interface_requirements:
185 dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
187 - virtual_binding: VDU_vbrgemu_0
188 - virtual_link: VL_vbrgemu_bng_private_net
190 VirtualStorage_root_all:
191 # this indicate the VDU root storage size
192 type: tosca.nodes.nfv.Vdu.VirtualStorage
194 type_of_storage: root
195 size_of_storage: 40 GB
198 type: tosca.nodes.nfv.Vdu.Compute
200 name: { get_input: vbrgemu_name_0 }
202 configurable_properties:
203 additional_vnfc_configurable_properties: {}
205 min_number_of_instances: 1
206 max_number_of_instances: 1
208 inject_files: #TODO SDC bug
209 source_path: ../Artifacts/Deployment/Other/authorized_keys #SSH authorized_keys
210 dest_path: /home/ubuntu/.ssh/authorized_keys
212 vnf_id: { get_input: vnf_id }
213 vf_module_id: { get_input: vf_module_id }
214 vbrgemu_bng_private_net_cidr: { get_input: vbrgemu_bng_private_net_cidr }
215 demo_artifacts_version: { get_input: demo_artifacts_version }
216 install_script_version: { get_input: install_script_version }
217 sdnc_ip: { get_input: sdnc_ip_addr }
218 cloud_env: { get_input: cloud_env }
219 nexus_artifact_repo: { get_input: nexus_artifact_repo }
222 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
223 apt-get -y install jq
226 echo $METADATA | jq -r ".meta.$1"
229 # Create configuration files
231 echo "$(get_metadata vbrgemu_bng_private_net_cidr)" > /opt/config/brgemu_bng_private_net_cidr.txt
232 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
233 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
234 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
235 echo "$(get_metadata sdnc_ip)" > /opt/config/sdnc_ip.txt
236 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
238 # Download and run install script
239 apt-get -y install unzip
240 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
241 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
242 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
243 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
244 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_brgemu_install.sh
246 chmod +x v_brgemu_install.sh
247 ./v_brgemu_install.sh
252 virtual_mem_size: 4096 MB
254 vdu_memory_requirements:
255 memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
256 numberOfPages: '{"schemaVersion": "0","schemaSelector": "","hardwarePlatform": "generic","mandatory": "true", "configurationValue": "1024"}'
259 cpu_architecture: generic
261 - virtual_storage: VirtualStorage_root_all
263 sw_image: #TODO need to put glance image name here
264 #file: { get_input: vcpe_image_name }
265 file: ../Artifacts/Deployment/Other/image
266 type: tosca.artifacts.nfv.SwImage