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
28 description: onap OAM network id
29 onap_private_net_cidr:
31 description: oanp OAM network cidr
33 vbrgemu_bng_private_net_id:
35 description: Private network that connects vBRGEMU to vBNG
36 default: zdfw1bngin01_private
37 vbrgemu_bng_private_net_cidr:
39 description: The CIDR of the input side of vBNG private network
43 description: Private IP address towards the BRGEMU-BNG network
47 description: Name of the vBRGEMU
48 default: zdcpe1cpe01brgemu01
51 description: The VNF ID is provided by ONAP
52 default: vCPE_Infrastructure_BGREMU_demo_app
55 description: The vCPE Module ID is provided by ONAP
56 default: vCPE_Customer_BRGEMU
59 description: ssh public key
60 default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
61 install_script_version:
63 description: install script version number
64 default: 1.2.0-SNAPSHOT
67 description: Root URL for the Nexus repository for Maven artifacts
68 default: https://nexus.onap.org
69 demo_artifacts_version:
71 description: artifacts version used in demo vnfs
75 description: cloud environment(openstack or rackspace)
79 description: SDNC ip address used to set NAT
83 description: State to compile code or not (done, auto or build)
88 type: tosca.nodes.nfv.VNF
90 descriptor_id: b1bb0ce7-2222-4fa7-95ed-4840d70a1177
92 product_name: vcpe_vbrgemu
93 software_version: '1.0'
94 descriptor_version: '1.0'
96 flavour_description: simple
101 # type: tosca.nodes.nfv.VnfVirtualLink
104 # layer_protocols: [ipv4]
106 # max_bitrate_requirements:
109 # min_bitrate_requirements:
112 # virtual_link_protocol_data:
113 # - associated_layer_protocol: ipv4
116 # name: { get_input: public_net_id }
120 # type: tosca.nodes.nfv.VnfVirtualLink
123 # layer_protocols: [ipv4]
125 # max_bitrate_requirements:
128 # min_bitrate_requirements:
131 # virtual_link_protocol_data:
132 # - associated_layer_protocol: ipv4
135 # name: { get_input: onap_private_net_id }
136 # cidr: { get_input: onap_private_net_cidr }
138 #Private network that connects vBRGEMU to vBNG
139 VL_vbrgemu_bng_private_net:
140 type: tosca.nodes.nfv.VnfVirtualLink
143 layer_protocols: [ipv4]
145 max_bitrate_requirements:
148 min_bitrate_requirements:
151 virtual_link_protocol_data:
152 - associated_layer_protocol: ipv4
155 name: { get_input: vbrgemu_bng_private_net_id}
156 cidr: { get_input: vbrgemu_bng_private_net_cidr }
159 physical_network: "physnet1"
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 }
193 virtual_network_interface_requirements:
194 - name: "sriov-support"
195 support_mandatory: true
196 network_interface_requirements:
197 interfaceType: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "SR-IOV"}'
199 logical_node_requirements:
200 pciVendorId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1234"}'
201 pciDeviceId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "5678"}'
202 pciNumDevices: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1"}'
204 - virtual_binding: VDU_vbrgemu_0
205 - virtual_link: VL_vbrgemu_bng_private_net
208 type: tosca.nodes.nfv.Vdu.Compute
210 name: { get_input: vbrgemu_name_0 }
213 min_number_of_instances: 1
214 max_number_of_instances: 1
216 inject_files: #TODO SDC bug
217 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
218 dest_path: /home/ubuntu/.ssh/authorized_keys
220 vnf_id: { get_input: vnf_id }
221 vf_module_id: { get_input: vf_module_id }
222 vbrgemu_bng_private_net_cidr: { get_input: vbrgemu_bng_private_net_cidr }
223 demo_artifacts_version: { get_input: demo_artifacts_version }
224 install_script_version: { get_input: install_script_version }
225 sdnc_ip: { get_input: sdnc_ip_addr }
226 cloud_env: { get_input: cloud_env }
227 nexus_artifact_repo: { get_input: nexus_artifact_repo }
230 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
231 apt-get -y install jq
234 echo $METADATA | jq -r ".meta.$1"
237 # Create configuration files
239 echo "$(get_metadata vbrgemu_bng_private_net_cidr)" > /opt/config/brgemu_bng_private_net_cidr.txt
240 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
241 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
242 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
243 echo "$(get_metadata sdnc_ip)" > /opt/config/sdnc_ip.txt
244 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
246 # Download and run install script
247 apt-get -y install unzip
248 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
249 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
250 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
251 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
252 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_brgemu_install.sh
254 chmod +x v_brgemu_install.sh
255 ./v_brgemu_install.sh
260 virtual_mem_size: 4096 MB
261 vdu_mem_requirements:
262 memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
263 numberOfPages: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1024"}'
266 cpu_architecture: generic
267 virtual_local_storage:
268 - size_of_storage: 40 GB
270 sw_image: #TODO need to put glance image name here
271 #file: { get_input: vcpe_image_name }
272 file: ../Artifacts/Deployment/OTHER/image
273 type: tosca.artifacts.nfv.SwImage