1 tosca_definitions_version: tosca_simple_yaml_1_0
3 template_name: vCPE_vbrgemu
4 template_version: "1.0"
6 description: vCPE_vbrgemu
13 derived_from: tosca.nodes.nfv.VNF
17 constraints: [ valid_values: [ b1bb0ce7-4444-4fa7-95ed-4840d70a1177 ] ]
18 default: b1bb0ce7-4444-4fa7-95ed-4840d70a1177
21 constraints: [ valid_values: [ onap ] ]
25 constraints: [ valid_values: [ vcpe_vbrgemu ] ]
29 constraints: [ valid_values: [ '1.0' ] ]
33 constraints: [ valid_values: [ '1.0' ] ]
37 constraints: [ valid_values: [ simple ] ] #only one and only allowed one DF in this example
49 # substitution_mappings:
50 # node_type: onap.vcpe_vbrgemu
52 # virtual_link: [ Cp_vbrgemu_public, virtual_link ] # expose as external CP
57 description: image name for vcpe in openstack glance
61 description: public network id used during onap installation
65 description: onap OAM network id
67 onap_private_net_cidr:
69 description: oanp OAM network cidr
71 vbrgemu_bng_private_net_id:
73 description: Private network that connects vBRGEMU to vBNG
74 default: zdfw1bngin01_private
75 vbrgemu_bng_private_net_cidr:
77 description: The CIDR of the input side of vBNG private network
81 description: Private IP address towards the BRGEMU-BNG network
85 description: Name of the vBRGEMU
86 default: zdcpe1cpe01brgemu01
89 description: The VNF ID is provided by ONAP
90 default: vCPE_Infrastructure_BGREMU_demo_app
93 description: The vCPE Module ID is provided by ONAP
94 default: vCPE_Customer_BRGEMU
97 description: ssh public key
98 default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
99 install_script_version:
101 description: install script version number
102 default: 1.2.0-SNAPSHOT
105 description: Root URL for the Nexus repository for Maven artifacts
106 default: https://nexus.onap.org
107 demo_artifacts_version:
109 description: artifacts version used in demo vnfs
113 description: cloud environment(openstack or rackspace)
117 description: SDNC ip address used to set NAT
121 description: State to compile code or not (done, auto or build)
127 # type: tosca.nodes.nfv.VnfVirtualLink
130 # layer_protocol: ipv4
132 # max_bit_rate_requirements:
135 # min_bit_rate_requirements:
138 # networkName: { get_input: public_net_id }
142 # type: tosca.nodes.nfv.VnfVirtualLink
145 # layer_protocol: ipv4
147 # max_bit_rate_requirements:
150 # min_bit_rate_requirements:
153 # networkName: { get_input: onap_private_net_id }
154 # cidr: { get_input: onap_private_net_cidr }
156 #Private network that connects vBRGEMU to vBNG
157 VL_vbrgemu_bng_private_net:
158 type: tosca.nodes.nfv.VnfVirtualLink
163 max_bit_rate_requirements:
166 min_bit_rate_requirements:
169 networkName: { get_input: vbrgemu_bng_private_net_id}
170 cidr: { get_input: vbrgemu_bng_private_net_cidr }
175 type: tosca.nodes.nfv.VduCp
177 layer_protocol: [ipv4]
180 - asscociated_layer_protocol: ipv4
182 address_type: ip_address
184 ip_address_assignment: false
185 floating_ip_activated: false
187 - virtual_binding: VDU_vbrgemu_0
188 #- virtual_link: VL_public
190 Cp_vbrgemu_vbrgemu_bng_private_net:
191 type: tosca.nodes.nfv.VduCp
193 layer_protocol: [ipv4]
196 - asscociated_layer_protocol: ipv4
198 address_type: ip_address
200 ip_address_assignment: false
201 floating_ip_activated: false
203 - { get_input: vbrgemu_private_ip_0 }
204 virtual_network_interface_requirements:
206 support_mandatory: true
208 network_interface_requirements:
209 dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
211 - virtual_binding: VDU_vbrgemu_0
212 - virtual_link: VL_vbrgemu_bng_private_net
214 VirtualStorage_root_all:
215 # this indicate the VDU root storage size
216 type: tosca.nodes.nfv.Vdu.VirtualStorage
218 type_of_storage: root
219 size_of_storage: 40 GB
222 type: tosca.nodes.nfv.Vdu.Compute
224 name: { get_input: vbrgemu_name_0 }
226 configurable_properties:
227 additional_vnfc_configurable_properties: {}
229 min_number_of_instances: 1
230 max_number_of_instances: 1
232 inject_files: #TODO SDC bug
233 source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
234 dest_path: /home/ubuntu/.ssh/authorized_keys
236 vnf_id: { get_input: vnf_id }
237 vf_module_id: { get_input: vf_module_id }
238 vbrgemu_bng_private_net_cidr: { get_input: vbrgemu_bng_private_net_cidr }
239 demo_artifacts_version: { get_input: demo_artifacts_version }
240 install_script_version: { get_input: install_script_version }
241 sdnc_ip: { get_input: sdnc_ip }
242 cloud_env: { get_input: cloud_env }
243 nexus_artifact_repo: { get_input: nexus_artifact_repo }
246 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
247 apt-get -y install jq
250 echo $METADATA | jq -r ".meta.$1"
253 # Create configuration files
255 echo "$(get_metadata vbrgemu_bng_private_net_cidr)" > /opt/config/brgemu_bng_private_net_cidr.txt
256 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
257 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
258 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
259 echo "$(get_metadata sdnc_ip)" > /opt/config/sdnc_ip.txt
260 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
262 # Download and run install script
263 apt-get -y install unzip
264 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
265 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
266 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
267 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
268 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_brgemu_install.sh
270 chmod +x v_brgemu_install.sh
271 ./v_brgemu_install.sh
276 virtual_mem_size: 4096 MB
278 vdu_memory_requirements:
279 memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
280 numberOfPages: '{"schemaVersion": "0","schemaSelector": "","hardwarePlatform": "generic","mandatory": "true", "configurationValue": "1024"}'
283 cpu_architecture: generic
285 - virtual_storage: VirtualStorage_root_all
287 sw_image: #TODO need to put glance image name here
288 #file: { get_input: vcpe_image_name }
289 file: ../Artifacts/images/ubuntu_16.04
290 type: tosca.artifacts.nfv.SwImage