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_protocols: [ipv4]
105 # max_bitrate_requirements:
108 # min_bitrate_requirements:
111 # virtual_link_protocol_data:
112 # - associated_layer_protocol: ipv4
115 # name: { get_input: public_net_id }
119 # type: tosca.nodes.nfv.VnfVirtualLink
122 # layer_protocols: [ipv4]
124 # max_bitrate_requirements:
127 # min_bitrate_requirements:
130 # virtual_link_protocol_data:
131 # - associated_layer_protocol: ipv4
134 # name: { get_input: onap_private_net_id }
135 # cidr: { get_input: onap_private_net_cidr }
137 #Private network that connects vBRGEMU to vBNG
138 VL_vbrgemu_bng_private_net:
139 type: tosca.nodes.nfv.VnfVirtualLink
142 layer_protocols: [ipv4]
144 max_bitrate_requirements:
147 min_bitrate_requirements:
150 virtual_link_protocol_data:
151 - associated_layer_protocol: ipv4
154 name: { get_input: vbrgemu_bng_private_net_id}
155 cidr: { get_input: vbrgemu_bng_private_net_cidr }
158 physical_network: "physnet1"
162 type: tosca.nodes.nfv.VduCp
164 layer_protocols: [ipv4]
167 - associated_layer_protocol: ipv4
169 - address_type: ip_address
171 ip_address_assignment: false
172 floating_ip_activated: false
174 - virtual_binding: VDU_vbrgemu_0
175 #- virtual_link: VL_public
177 Cp_vbrgemu_vbrgemu_bng_private_net:
178 type: tosca.nodes.nfv.VduCp
180 layer_protocols: [ipv4]
183 - associated_layer_protocol: ipv4
185 - address_type: ip_address
187 ip_address_assignment: false
188 floating_ip_activated: false
190 - { get_input: vbrgemu_private_ip_0 }
191 vnic_type: "direct-physical"
192 virtual_network_interface_requirements:
193 - name: "sriov-support"
194 support_mandatory: true
195 network_interface_requirements:
196 interfaceType: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "SR-IOV"}'
198 logical_node_requirements:
199 pciVendorId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1234"}'
200 pciDeviceId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "5678"}'
201 pciNumDevices: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1"}'
203 - virtual_binding: VDU_vbrgemu_0
204 - virtual_link: VL_vbrgemu_bng_private_net
207 type: tosca.nodes.nfv.Vdu.Compute
209 name: { get_input: vbrgemu_name_0 }
212 min_number_of_instances: 1
213 max_number_of_instances: 1
215 inject_files: #TODO SDC bug
216 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
217 dest_path: /home/ubuntu/.ssh/authorized_keys
219 vnf_id: { get_input: vnf_id }
220 vf_module_id: { get_input: vf_module_id }
221 vbrgemu_bng_private_net_cidr: { get_input: vbrgemu_bng_private_net_cidr }
222 demo_artifacts_version: { get_input: demo_artifacts_version }
223 install_script_version: { get_input: install_script_version }
224 sdnc_ip: { get_input: sdnc_ip_addr }
225 cloud_env: { get_input: cloud_env }
226 nexus_artifact_repo: { get_input: nexus_artifact_repo }
229 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
230 apt-get -y install jq
233 echo $METADATA | jq -r ".meta.$1"
236 # Create configuration files
238 echo "$(get_metadata vbrgemu_bng_private_net_cidr)" > /opt/config/brgemu_bng_private_net_cidr.txt
239 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
240 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
241 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
242 echo "$(get_metadata sdnc_ip)" > /opt/config/sdnc_ip.txt
243 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
245 # Download and run install script
246 apt-get -y install unzip
247 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
248 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
249 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
250 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
251 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_brgemu_install.sh
253 chmod +x v_brgemu_install.sh
254 ./v_brgemu_install.sh
259 virtual_mem_size: 4096 MB
260 vdu_mem_requirements:
261 memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
262 numberOfPages: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1024"}'
265 cpu_architecture: generic
266 virtual_local_storage:
267 - size_of_storage: 40 GB
269 sw_image: #TODO need to put glance image name here
270 #file: { get_input: vcpe_image_name }
271 file: ../Artifacts/Deployment/OTHER/image
272 type: tosca.artifacts.nfv.SwImage