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
64 description: onap OAM network id
65 onap_private_net_cidr:
67 description: oanp OAM network cidr
69 vbrgemu_bng_private_net_id:
71 description: Private network that connects vBRGEMU to vBNG
72 default: zdfw1bngin01_private
73 vbrgemu_bng_private_net_cidr:
75 description: The CIDR of the input side of vBNG private network
79 description: Private IP address towards the BRGEMU-BNG network
83 description: Name of the vBRGEMU
84 default: zdcpe1cpe01brgemu01
87 description: The VNF ID is provided by ONAP
88 default: vCPE_Infrastructure_BGREMU_demo_app
91 description: The vCPE Module ID is provided by ONAP
92 default: vCPE_Customer_BRGEMU
95 description: ssh public key
96 default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
97 install_script_version:
99 description: install script version number
100 default: 1.2.0-SNAPSHOT
103 description: Root URL for the Nexus repository for Maven artifacts
104 default: https://nexus.onap.org
105 demo_artifacts_version:
107 description: artifacts version used in demo vnfs
111 description: cloud environment(openstack or rackspace)
115 description: SDNC ip address used to set NAT
119 description: State to compile code or not (done, auto or build)
125 # type: tosca.nodes.nfv.VnfVirtualLink
128 # layer_protocol: ipv4
130 # max_bit_rate_requirements:
133 # min_bit_rate_requirements:
136 # networkName: { get_input: public_net_id }
140 # type: tosca.nodes.nfv.VnfVirtualLink
143 # layer_protocol: ipv4
145 # max_bit_rate_requirements:
148 # min_bit_rate_requirements:
151 # networkName: { get_input: onap_private_net_id }
152 # cidr: { get_input: onap_private_net_cidr }
154 #Private network that connects vBRGEMU to vBNG
155 VL_vbrgemu_bng_private_net:
156 type: tosca.nodes.nfv.VnfVirtualLink
161 max_bit_rate_requirements:
164 min_bit_rate_requirements:
167 networkName: { get_input: vbrgemu_bng_private_net_id}
168 cidr: { get_input: vbrgemu_bng_private_net_cidr }
170 physicalNetwork: "physnet1"
174 type: tosca.nodes.nfv.VduCp
176 layer_protocol: [ipv4]
179 - asscociated_layer_protocol: ipv4
181 address_type: ip_address
183 ip_address_assignment: false
184 floating_ip_activated: false
186 - virtual_binding: VDU_vbrgemu_0
187 #- virtual_link: VL_public
189 Cp_vbrgemu_vbrgemu_bng_private_net:
190 type: tosca.nodes.nfv.VduCp
192 layer_protocol: [ipv4]
195 - asscociated_layer_protocol: ipv4
197 address_type: ip_address
199 ip_address_assignment: false
200 floating_ip_activated: false
202 - { get_input: vbrgemu_private_ip_0 }
204 virtual_network_interface_requirements:
205 - name: "sriov-support"
206 support_mandatory: true
207 network_interface_requirements:
208 interfaceType: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "SR-IOV"}'
210 pciVendorId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1234"}'
211 pciDeviceId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "5678"}'
212 pciNumDevices: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1"}'
214 - virtual_binding: VDU_vbrgemu_0
215 - virtual_link: VL_vbrgemu_bng_private_net
217 VirtualStorage_root_all:
218 # this indicate the VDU root storage size
219 type: tosca.nodes.nfv.Vdu.VirtualStorage
221 type_of_storage: root
222 size_of_storage: 40 GB
225 type: tosca.nodes.nfv.Vdu.Compute
227 name: { get_input: vbrgemu_name_0 }
229 configurable_properties:
230 additional_vnfc_configurable_properties: {}
232 min_number_of_instances: 1
233 max_number_of_instances: 1
235 inject_files: #TODO SDC bug
236 source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
237 dest_path: /home/ubuntu/.ssh/authorized_keys
239 vnf_id: { get_input: vnf_id }
240 vf_module_id: { get_input: vf_module_id }
241 vbrgemu_bng_private_net_cidr: { get_input: vbrgemu_bng_private_net_cidr }
242 demo_artifacts_version: { get_input: demo_artifacts_version }
243 install_script_version: { get_input: install_script_version }
244 sdnc_ip: { get_input: sdnc_ip }
245 cloud_env: { get_input: cloud_env }
246 nexus_artifact_repo: { get_input: nexus_artifact_repo }
249 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
250 apt-get -y install jq
253 echo $METADATA | jq -r ".meta.$1"
256 # Create configuration files
258 echo "$(get_metadata vbrgemu_bng_private_net_cidr)" > /opt/config/brgemu_bng_private_net_cidr.txt
259 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
260 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
261 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
262 echo "$(get_metadata sdnc_ip)" > /opt/config/sdnc_ip.txt
263 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
265 # Download and run install script
266 apt-get -y install unzip
267 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
268 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
269 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
270 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
271 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_brgemu_install.sh
273 chmod +x v_brgemu_install.sh
274 ./v_brgemu_install.sh
279 virtual_mem_size: 4096 MB
281 vdu_memory_requirements:
282 memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
283 numberOfPages: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1024"}'
286 cpu_architecture: generic
288 - virtual_storage: VirtualStorage_root_all
290 sw_image: #TODO need to put glance image name here
291 #file: { get_input: vcpe_image_name }
292 file: ../Artifacats/images/ubuntu_16.04
293 type: tosca.artifacts.nfv.SwImage