vCPE Use Case + OOF + HPA Tutorial: Design and Deploy based on ONAP
Difference between running vCPE and vCPE + OOF - Beijing
The following steps are in addition the standard vCPE use case setup steps.
1. We need to create an updated vCPE service CSAR as follows:
# When we add nfType and nfRole during vCPE service creation in SDC, we also add an nfFunction to subcomponents in vCPE CSAR.
For vG put nf_function of 'vGW'
For vgMuxAR put nf_function of 'vgMuxAR'
For vBRG put nf_function of 'vBRG'
2. We need to configure OOF and OOF used Policy
How to configure OOF is TBD based on OOF Team
Uploading the policy models is TBD based on OOF Team
3. When we create the service instance we need to add the following to the request for userParams
"userParams": [
{
"name": "BRG_WAN_MAC_Address",
"value": "fa:16:3e:be:9a:b0"
},
{
"name": "Customer_Location",
"value": {
"customerLatitude": "32.897480",
"customerLongitude": "97.040443",
"customerName": "some_company"
}
},
{
"name": "Homing_Model_Ids",
"value": [
{
"resourceModuleName": "vgMuxAR",
"resourceModelInvariantId": "565d5b75-11b8-41be-9991-ee03a0049159",
"resourceModelVersionId": "61414c6c-6082-4e03-9824-bf53c3582b78"
}
]
}
]
}
Limitation of vCPE + OOF in Beijing
vCPE service instance name should match policy setup in OOF
Difference between running vCPE and vCPE + OOF + HPA - Beijing
1. We need to create an updated vCPE service CSAR that has flavor_label for vGW set to vcpe.vgw
We can use the following zip when creating the vgw CSAR: vgw-sb01-hpa1.zip
2. We need to create OOF used HPA Policy
This is a basic HPA policy. What we found during testing is that formatting can cause OOF not to work, so caution is in order.
{ "configBody":"{\"service\":\"hpaPolicy\",\"policyName\":\"OSDF_R2.hpa_policy_vGW_1\",\"description\":\"HPA policy for vGW\",\"templateVersion\":\"OpenSource.version.1\",\"version\":\"test1\",\"priority\":\"3\",\"riskType\":\"test\",\"riskLevel\":\"2\",\"guard\":\"False\",\"content\":{\"resources\":[\"vGW\"],\"identity\":\"hpaPolicy_vGW\",\"policyScope\":[\"vcpe\",\"us\",\"international\",\"ip\",\"vgw\"],\"policyType\":\"hpaPolicy\",\"flavorFeatures\":[{\"flavorLabel\":\"vcpe.vgw\",\"flavorProperties\":[{\"hpa-feature\":\"basicCapabilities\",\"mandatory\":\"True\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"numVirtualCpu\",\"hpa-attribute-value\":\"2\",\"operator\":\">=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"virtualMemSize\",\"hpa-attribute-value\":\"8\",\"operator\":\"=\",\"unit\":\"MB\"}]}]},{\"flavorLabel\":\"vcpe.vgw.02\",\"flavorProperties\":[{\"hpa-feature\":\"basicCapabilities\",\"mandatory\":\"True\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"numVirtualCpu\",\"hpa-attribute-value\":\"4\",\"operator\":\">=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"virtualMemSize\",\"hpa-attribute-value\":\"8\",\"operator\":\"=\",\"unit\":\"MB\"}]}]},{\"flavorLabel\":\"vcpe.vgw.03\",\"flavorProperties\":[{\"hpa-feature\":\"basicCapabilities\",\"mandatory\":\"True\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"numVirtualCpu\",\"hpa-attribute-value\":\"4\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"virtualMemSize\",\"hpa-attribute-value\":\"8\",\"operator\":\"=\",\"unit\":\"MB\"}]}]}]}}", "policyName": "OSDF_R2.hpa_policy_vGW_1", "policyConfigType":"Optimization", "ecompName":"DCAE", "policyScope":"OSDF_R2" }
Limitation of vCPE + OOF + HPA in Beijing
HPA will not work with multiple clouds due to a bug: https://jira.onap.org/browse/SO-671
This bug also requires the the cloud region to be RegionOne.
Preparation
Install ONAP
Make sure that you've installed ONAP R2 release. For installation instructions, please refer ONAP Installation in Vanilla OpenStack.
Make sure that all components pass health check when you do the following:
ssh to the robot vm, run '/opt/ete.sh health'
You will need to update your /etc/hosts so that you can access the ONAP Portal in your browser. You may also want to add IP addresses of so, sdnc, aai, etc so that you can easily ssh to those VMs. Below is a sample just for your reference:
10.12.5.159 aai-inst2
10.12.5.162 portal
10.12.5.162 portal.api.simpledemo.onap.org
10.12.5.173 dns-server
10.12.5.178 aai
10.12.5.178 aai.api.simpledemo.onap.org
10.12.5.178 aai1
10.12.5.183 dcaecdap00
10.12.5.184 multi-service
10.12.5.189 sdc
10.12.5.189 sdc.api.simpledemo.onap.org
10.12.5.194 robot
10.12.5.2 so
10.12.5.204 dmaap
10.12.5.207 appc
10.12.5.208 dcae-bootstrap
10.12.5.211 dcaeorcl00
10.12.5.214 sdnc
10.12.5.219 dcaecdap02
10.12.5.224 dcaecnsl02
10.12.5.225 dcaecnsl00
10.12.5.227 dcaedokp00
10.12.5.229 dcaecnsl01
10.12.5.238 dcaepgvm00
10.12.5.239 dcaedoks00
10.12.5.241 dcaecdap03
10.12.5.247 dcaecdap04
10.12.5.248 dcaecdap05
10.12.5.249 dcaecdap06
10.12.5.38 policy
10.12.5.38 policy.api.simpledemo.onap.org
10.12.5.48 vid
10.12.5.48 vid.api.simpledemo.onap.org
10.12.5.51 clamp
10.12.5.62 dcaecdap01
You can try to login to the portal at http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/login.htm using as one of the following roles. The password is demo123456 for all the users.