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
27 description: onap OAM network id
28 onap_private_net_cidr:
30 description: oanp OAM network cidr
32 vbrgemu_bng_private_net_id:
34 description: Private network that connects vBRGEMU to vBNG
35 default: zdfw1bngin01_private
36 vbrgemu_bng_private_net_cidr:
38 description: The CIDR of the input side of vBNG private network
42 description: Private IP address towards the BRGEMU-BNG network
46 description: Name of the vBRGEMU
47 default: zdcpe1cpe01brgemu01
50 description: The VNF ID is provided by ONAP
51 default: vCPE_Infrastructure_BGREMU_demo_app
54 description: The vCPE Module ID is provided by ONAP
55 default: vCPE_Customer_BRGEMU
58 description: ssh public key
59 default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
60 install_script_version:
62 description: install script version number
63 default: 1.2.0-SNAPSHOT
66 description: Root URL for the Nexus repository for Maven artifacts
67 default: https://nexus.onap.org
68 demo_artifacts_version:
70 description: artifacts version used in demo vnfs
74 description: cloud environment(openstack or rackspace)
78 description: SDNC ip address used to set NAT
82 description: State to compile code or not (done, auto or build)
87 type: tosca.nodes.nfv.VNF
89 descriptor_id: b1bb0ce7-2222-4fa7-95ed-4840d70a1177
91 product_name: vcpe_vbrgemu
92 software_version: '1.0'
93 descriptor_version: '1.0'
95 flavour_description: simple
100 # type: tosca.nodes.nfv.VnfVirtualLink
103 # layer_protocol: ipv4
105 # max_bit_rate_requirements:
108 # min_bit_rate_requirements:
111 # networkName: { get_input: public_net_id }
115 # type: tosca.nodes.nfv.VnfVirtualLink
118 # layer_protocol: ipv4
120 # max_bit_rate_requirements:
123 # min_bit_rate_requirements:
126 # networkName: { get_input: onap_private_net_id }
127 # cidr: { get_input: onap_private_net_cidr }
129 #Private network that connects vBRGEMU to vBNG
130 VL_vbrgemu_bng_private_net:
131 type: tosca.nodes.nfv.VnfVirtualLink
136 max_bit_rate_requirements:
139 min_bit_rate_requirements:
142 networkName: { get_input: vbrgemu_bng_private_net_id}
143 cidr: { get_input: vbrgemu_bng_private_net_cidr }
145 physicalNetwork: "physnet1"
149 type: tosca.nodes.nfv.VduCp
151 layer_protocol: [ipv4]
154 - asscociated_layer_protocol: ipv4
156 address_type: ip_address
158 ip_address_assignment: false
159 floating_ip_activated: false
161 - virtual_binding: VDU_vbrgemu_0
162 #- virtual_link: VL_public
164 Cp_vbrgemu_vbrgemu_bng_private_net:
165 type: tosca.nodes.nfv.VduCp
167 layer_protocol: [ipv4]
170 - asscociated_layer_protocol: ipv4
172 address_type: ip_address
174 ip_address_assignment: false
175 floating_ip_activated: false
177 - { get_input: vbrgemu_private_ip_0 }
179 virtual_network_interface_requirements:
180 - name: "sriov-support"
181 support_mandatory: true
182 network_interface_requirements:
183 interfaceType: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "SR-IOV"}'
185 logical_node_requirements:
186 pciVendorId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1234"}'
187 pciDeviceId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "5678"}'
188 pciNumDevices: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1"}'
190 - virtual_binding: VDU_vbrgemu_0
191 - virtual_link: VL_vbrgemu_bng_private_net
193 VirtualStorage_root_all:
194 # this indicate the VDU root storage size
195 type: tosca.nodes.nfv.Vdu.VirtualStorage
197 type_of_storage: root
198 size_of_storage: 40 GB
201 type: tosca.nodes.nfv.Vdu.Compute
203 name: { get_input: vbrgemu_name_0 }
205 configurable_properties:
206 additional_vnfc_configurable_properties: {}
208 min_number_of_instances: 1
209 max_number_of_instances: 1
211 inject_files: #TODO SDC bug
212 source_path: ../Artifcats/keys/authorized_keys #SSH authorized_keys
213 dest_path: /home/ubuntu/.ssh/authorized_keys
215 vnf_id: { get_input: vnf_id }
216 vf_module_id: { get_input: vf_module_id }
217 vbrgemu_bng_private_net_cidr: { get_input: vbrgemu_bng_private_net_cidr }
218 demo_artifacts_version: { get_input: demo_artifacts_version }
219 install_script_version: { get_input: install_script_version }
220 sdnc_ip: { get_input: sdnc_ip_addr }
221 cloud_env: { get_input: cloud_env }
222 nexus_artifact_repo: { get_input: nexus_artifact_repo }
225 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
226 apt-get -y install jq
229 echo $METADATA | jq -r ".meta.$1"
232 # Create configuration files
234 echo "$(get_metadata vbrgemu_bng_private_net_cidr)" > /opt/config/brgemu_bng_private_net_cidr.txt
235 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
236 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
237 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
238 echo "$(get_metadata sdnc_ip)" > /opt/config/sdnc_ip.txt
239 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
241 # Download and run install script
242 apt-get -y install unzip
243 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
244 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
245 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
246 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
247 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_brgemu_install.sh
249 chmod +x v_brgemu_install.sh
250 ./v_brgemu_install.sh
255 virtual_mem_size: 4096 MB
257 vdu_memory_requirements:
258 memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
259 numberOfPages: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1024"}'
262 cpu_architecture: generic
264 - virtual_storage: VirtualStorage_root_all
266 sw_image: #TODO need to put glance image name here
267 #file: { get_input: vcpe_image_name }
268 file: ../Artifacts/Deployment/OTHER/image
269 type: tosca.artifacts.nfv.SwImage