vCPE use case testing
Here's the list of requirements that need to be met at each of the components for the homing call from SO to succeed for the vCPE use case.
- 1 Requirements from the downstream dependencies
- 1.1 AAI
- 1.2 MultiCloud
- 1.3 Policy
- 1.4 HAS
- 1.5
- 1.6 OSDF
- 2 Requirements for Functional Features
- 2.1
- 2.2 HPA
- 2.3 Capacity checks
- 3 Sequence of actions (how to..)
- 4 vCPE use case standalone testing on a single machine
- 4.1 Prerequisites
- 4.2 Installation and Configuration
- 4.3 Running
- 4.4 Contact
Requirements from the downstream dependencies
AAI
Data needed
vGMuxInfra (run the vcpe flows that create the vGMuxInfra)
list of Cloud regions, one of which should have the vGMuxInfra
MultiCloud
Data needed
Policy
Policy models to be created:
Policies to be uploaded:
vG demand
vGMuxInfra demand
objective function (distance)
colocation constraint
HAS
OSDF
Requirements for Functional Features
HPA
upload HPA policies into policy framework
Capacity checks
upload Capacity check policy into policy framework
Sequence of actions (how to..)
Deploy OOF
HEAT:
Go to the OOF VM
Run /opt/oof_vm_init.sh - this will pull the docker images and install OSDF + HAS, and perform the required configurations to pass the healthcheck.
OOM:
populate the cloud region data into AAI
upload the policies into policy framework
Run the vcpe flows that create the vGMuxInfra
vCPE use case standalone testing on a single machine
Goal: Running the vCPE use case of the Beijing release of ONAP in a local setup, with minimal hardware and software requirements.
The work should be done in the ONAP MUSIC and ONAP HAS repositories with tag 2.0.0-ONAP.
Prerequisites
Install Docker CE, an example tutorial can be found here.
Make local copies of the HAS and MUSIC repos
HAS and MUSIC install
$ cd "your workspace" $ git clone https://gerrit.onap.org/r/music $ cd music $ git checkout 2.0.0-ONAP $ cd ../ $ git clone https://gerrit.onap.org/r/optf/has $ cd has $ git checkout 2.0.0-ONAP(Optional) Install Insomnia REST API client for handling REST requests. Some prepared requests and variables are available can be imported to Insomnia. Importable to Insomnia:
(Optional) For advanced debugging of the inter-component communication use Wireshark
Installation and Configuration
Running
Send vCPE homing template to HAS, E.g.
$ curl -X POST --user admin1:plan.15 -H 'Content-Type: application/json' \
-d @homing.json localhost:8091/v1/plansHint: homing.json may be created by conjoining
{ "name": "vCPE homing Beijing 2.0.0-ONAP", "template": <<HAS Homing Specification (R')>> }where HAS Homing Specification (R') = https://lf-onap.atlassian.net/wiki/display/DW/vCPE+Homing+Use+Case
Hint: for username:password (--user above) see ~/conductor.conf, conductor_api section
RESOLVED: ISSUE_1: At this point a request fails with an error and the following message is returned for the homing request:
After a 5 mins long timeout, the HAS api component replies back with error:
{ "error_message": { "explanation": "Unable to create Plan.", "code": 500, "error": { "message": "The server has either erred or is incapable of performing the requested operation.", "type": "HTTPInternalServerError" }, "title": "Internal Server Error" } }The underlying communication can be observed by capturing network traffic on the docker bridges by Wireshark. The communication is stuck (which causes the timeout at the api component) after a faulty MUSIC reply:
Request to MUSIC sent by the controller: PUT /MUSIC/rest/v2/keyspaces/conductor_rpc/tables/controller/rows?id=<<Some UUID>>
This request is a database primitive of the MUSIC API which modifies a row identified by <<Some UUID>> in table *controller* of keyspace *conductor_rpc*. The data of the new database entry is delivered in the HTTP request body (not included here), which can be captured by Wireshark observing the communication between the controller HAS component and MUSIC.
MUSIC's reply: "Exception thrown while doing the critical put, check sanctity of the row/conditions:\nnull"
The produced HTTP stream between `controller` and MUSIC captured with Wireshark:
ISSUE_2: Controller - MUSIC interaction fails with "Customer ID not specified for demand vGMuxInfra". This error message can be accessed by capturing HTTP traffic on the docker bridge created for the HAS components. Even though a HTTP 200 OK message is sent back to the homing template vCPE request initiator's side (either the Insomnia REST client or the curl command), the placement does not finish successfully.
Contact
Please if you have anything to add to or ask about this tutorial, contact me: balazs.nemeth__AT__tmit.bme.hu