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_protocols: [ipv4]
108 # max_bitrate_requirements:
111 # min_bitrate_requirements:
114 # virtual_link_protocol_data:
115 # - associated_layer_protocol: ipv4
118 # name: { get_input: public_net_id }
122 # type: tosca.nodes.nfv.VnfVirtualLink
125 # layer_protocols: [ipv4]
127 # max_bitrate_requirements:
130 # min_bitrate_requirements:
133 # virtual_link_protocol_data:
134 # - associated_layer_protocol: ipv4
137 # name: { get_input: onap_private_net_id }
138 # cidr: { get_input: onap_private_net_cidr }
140 #Private network that connects vBRGEMU to vBNG
141 VL_vbrgemu_bng_private_net:
142 type: tosca.nodes.nfv.VnfVirtualLink
145 layer_protocols: [ipv4]
147 max_bitrate_requirements:
150 min_bitrate_requirements:
153 virtual_link_protocol_data:
154 - associated_layer_protocol: ipv4
157 name: { get_input: vbrgemu_bng_private_net_id}
158 cidr: { get_input: vbrgemu_bng_private_net_cidr }
163 type: tosca.nodes.nfv.VduCp
165 layer_protocols: [ipv4]
168 - associated_layer_protocol: ipv4
170 - address_type: ip_address
172 ip_address_assignment: false
173 floating_ip_activated: false
175 - virtual_binding: VDU_vbrgemu_0
176 #- virtual_link: VL_public
178 Cp_vbrgemu_vbrgemu_bng_private_net:
179 type: tosca.nodes.nfv.VduCp
181 layer_protocols: [ipv4]
184 - associated_layer_protocol: ipv4
186 - address_type: ip_address
188 ip_address_assignment: false
189 floating_ip_activated: false
191 - { get_input: vbrgemu_private_ip_0 }
192 virtual_network_interface_requirements:
194 support_mandatory: true
195 network_interface_requirements:
196 dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
198 - virtual_binding: VDU_vbrgemu_0
199 - virtual_link: VL_vbrgemu_bng_private_net
202 type: tosca.nodes.nfv.Vdu.Compute
204 name: { get_input: vbrgemu_name_0 }
207 min_number_of_instances: 1
208 max_number_of_instances: 1
210 inject_files: #TODO SDC bug
211 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
212 dest_path: /home/ubuntu/.ssh/authorized_keys
214 vnf_id: { get_input: vnf_id }
215 vf_module_id: { get_input: vf_module_id }
216 vbrgemu_bng_private_net_cidr: { get_input: vbrgemu_bng_private_net_cidr }
217 demo_artifacts_version: { get_input: demo_artifacts_version }
218 install_script_version: { get_input: install_script_version }
219 sdnc_ip: { get_input: sdnc_ip_addr }
220 cloud_env: { get_input: cloud_env }
221 nexus_artifact_repo: { get_input: nexus_artifact_repo }
224 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
225 apt-get -y install jq
228 echo $METADATA | jq -r ".meta.$1"
231 # Create configuration files
233 echo "$(get_metadata vbrgemu_bng_private_net_cidr)" > /opt/config/brgemu_bng_private_net_cidr.txt
234 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
235 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
236 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
237 echo "$(get_metadata sdnc_ip)" > /opt/config/sdnc_ip.txt
238 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
240 # Download and run install script
241 apt-get -y install unzip
242 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
243 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
244 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
245 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
246 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_brgemu_install.sh
248 chmod +x v_brgemu_install.sh
249 ./v_brgemu_install.sh
254 virtual_mem_size: 4096 MB
255 vdu_mem_requirements:
256 memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
257 numberOfPages: '{"schemaVersion": "0","schemaSelector": "","hardwarePlatform": "generic","mandatory": "true", "configurationValue": "1024"}'
260 cpu_architecture: generic
261 virtual_local_storage:
262 - size_of_storage: 40 GB
264 sw_image: #TODO need to put glance image name here
265 #file: { get_input: vcpe_image_name }
266 file: ../Artifacts/Deployment/OTHER/image
267 type: tosca.artifacts.nfv.SwImage