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: dpdk_2.2
210 interfaceType: virtio
212 - virtual_binding: VDU_vbrgemu_0
213 - virtual_link: VL_vbrgemu_bng_private_net
215 VirtualStorage_root_all:
216 # this indicate the VDU root storage size
217 type: tosca.nodes.nfv.Vdu.VirtualStorage
219 type_of_storage: root
220 size_of_storage: 40 GB
223 type: tosca.nodes.nfv.Vdu.Compute
225 name: { get_input: vbrgemu_name_0 }
227 configurable_properties:
228 additional_vnfc_configurable_properties: {}
230 min_number_of_instances: 1
231 max_number_of_instances: 1
233 inject_files: #TODO SDC bug
234 source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
235 dest_path: /home/ubuntu/.ssh/authorized_keys
237 vnf_id: { get_input: vnf_id }
238 vf_module_id: { get_input: vf_module_id }
239 vbrgemu_bng_private_net_cidr: { get_input: vbrgemu_bng_private_net_cidr }
240 demo_artifacts_version: { get_input: demo_artifacts_version }
241 install_script_version: { get_input: install_script_version }
242 sdnc_ip: { get_input: sdnc_ip }
243 cloud_env: { get_input: cloud_env }
244 nexus_artifact_repo: { get_input: nexus_artifact_repo }
247 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
248 apt-get -y install jq
251 echo $METADATA | jq -r ".meta.$1"
254 # Create configuration files
256 echo "$(get_metadata vbrgemu_bng_private_net_cidr)" > /opt/config/brgemu_bng_private_net_cidr.txt
257 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
258 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
259 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
260 echo "$(get_metadata sdnc_ip)" > /opt/config/sdnc_ip.txt
261 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
263 # Download and run install script
264 apt-get -y install unzip
265 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
266 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
267 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
268 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
269 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_brgemu_install.sh
271 chmod +x v_brgemu_install.sh
272 ./v_brgemu_install.sh
277 virtual_mem_size: 4096 MB
279 vdu_memory_requirements:
280 memoryPageSize: '{"schema-version": "0", "schema-location": "", "platform-id": "generic", "mandatory": true, "configuration-value": "2 MB"}'
281 numberOfPages: '{"schema-version": "0","schema-location": "","platform-id": "generic","mandatory": true,"configuration-value": 1024}'
284 cpu_architecture: generic
286 - virtual_storage: VirtualStorage_root_all
288 sw_image: #TODO need to put glance image name here
289 #file: { get_input: vcpe_image_name }
290 file: ../Artifacts/images/ubuntu_16.04
291 type: tosca.artifacts.nfv.SwImage