Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: fixed broken repo links

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. 

Table of Contents
outlinetrue

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..)

...

  1. Go to the OOF VM
  2. 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. 

...

Run 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. 

Table of Contents
outlinetrue

Requirements from the downstream dependencies

AAI

Data needed

  • vGMuxInfra (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

  1. Install Docker CE, an example tutorial can be found here.
  2. Make local copies of the HAS and MUSIC repos

    Code Block
    languagebash
    titleHAS 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
  3. (Optional) Install Insomnia REST API client for handling REST requests. Some prepared requests and variables are available can be imported to Insomnia.
  4. (Optional) For advanced debugging of the inter-component communication use Wireshark

Installation and Configuration

...

Build and start A&AI simulator

Code Block
languagebash
$ cd ~/has/conductor/conductor/tests/functional/simulators
$ ./build_aaisim.sh
$ ./run_aaisim.sh

Note: DNS name resolution issue may arise during building the simulator, because it needs the **web** Python package. TBD: Provide more detailed instructions. How does one there is an issues? what can one do about it?

...

  1. $ docker container ls
  2. expected result: image names should include: aaisim
  3. $ curl http://0.0.0.0:8081/healthcheck
  4. expected result: {"status": "success"}
  5. $ curl http://0.0.0.0:8081/aai/v13/cloud-infrastructure/cloud-regions/
  6. expected result: {"cloud-region": [{"group-assignments": ...much more...

...

  1. Configure access to MUSIC:
  2. Edit music/distribution/dockermusic/music.sh to change user/password:

    Code Block
    languagebash
    ```text
    -CASS_USERNAME=cassandra1
    -CASS_PASSWORD=cassandra1
    +CASS_USERNAME=conductor
    +CASS_PASSWORD=c0nduct0r
    ```
  3. Edit music/distribution/dockermusic/properties/music.properties to change user/password:

    Code Block
    languagebash
    ```text
    -cassandra.user=cassandra1
    -cassandra.password=cassandra1
    +cassandra.user=conductor
    +cassandra.password=c0nduct0r
    ```
  4. Build and start MUSIC containers

    Code Block
    languagebash
    $ cd ~//music/distribution/dockermusic
    $ ./music.sh start
  5. Verify MUSIC components
    1. $ docker container ls
    2. expected result: image names should include: music-tomcat, music-zk, music-war, music-db

...

search for [music_api]

  • )
  • 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: 
      1. Go to the OOF VM
      2. 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


  1. Install Docker CE, an example tutorial can be found here.
  2. Make local copies of the HAS and MUSIC repos

    Code Block
    languagebash
    titleHAS 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
  3. (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: 
    View file
    namevCPE-use-case-2.0.0-ONAP.json
    height250
  4. (Optional) For advanced debugging of the inter-component communication use Wireshark

Installation and Configuration

  1. Build and start A&AI simulator

    Code Block
    languagebash
    $ cd ~/has/conductor/conductor/tests/functional/simulators
    $ ./build_aaisim.sh
    $ ./run_aaisim.sh

    Note: DNS name resolution issue may arise during building the simulator, because it needs the **web** Python package. TBD: Provide more detailed instructions. How does one there is an issues? what can one do about it?

  2. Verify A&AI Simulator (Hint: in examples, 0.0.0.0 is IPAddress of A&AI container as per $ docker container ls)
    1. $ docker container ls
    2. expected result: image names should include: aaisim
    3. $ curl http://0.0.0.0:8081/healthcheck
    4. expected result: {"status": "success"}
    5. $ curl http://0.0.0.0:8081/aai/v13/cloud-infrastructure/cloud-regions/
    6. expected result: {"cloud-region": [{"group-assignments": ...much more...
  3. Build and start MUSIC
    1. Configure access to MUSIC:
    2. Edit music/distribution/dockermusic/music.sh to change user/password:

      Code Block
      languagebash
      ```text
      -
      server
      CASS_
      url = http://localhost:8080/MUSIC/rest/v2 +server_url = http://<<IP address of 'music-tomcat' container>>:8080/MUSIC/rest/v2 ```search for [aai]
      USERNAME=cassandra1
      -CASS_PASSWORD=cassandra1
      +CASS_USERNAME=conductor
      +CASS_PASSWORD=c0nduct0r
      ```
    3. Edit music/distribution/dockermusic/properties/music.properties to change user/password:

      Code Block
      languagebash
      ```text
      -
      server_url = https://aai.api.simpledemo.onap.org:8443/aai +server_url = http://<<IP address of 'aaisim' container>>:8081/aai ```
    4. Hint: find IPAddress of containers via:
      1. $ docker container ls
      2. look at first term in PORTS column
    Onboard the HAS "conductor" application into MUSIC, 
    1. E.g.:
      cassandra.user=cassandra1
      -cassandra.password=cassandra1
      +cassandra.user=conductor
      +cassandra.password=c0nduct0r
      ```
    2. Build and start MUSIC containers

      Code Block
      languagebash
      $ cd ~//music/distribution/dockermusic
      $ ./music.sh start
    3. Verify MUSIC components
      1. $ docker container ls
      2. expected result: image names should include: music-tomcat, music-zk, music-war, music-db
  4. Build and Start HAS
    1. Configure HAS
      1. Edit has/conductor.conf
      2. search for [music_api]


        Code Block
        languagebash
      $ curl
      1. ```text
        -
      X
      1. server_url 
      POST -H 'Content-Type: application/json' \ -d '{"appname" : "conductor","userId": "conductor","password": "c0nduct0r","isAAF": false}' \ 0.0.0.0
      1. = http://localhost:8080/MUSIC/rest/v2
        +server_url = http://<<IP address of 'music-tomcat' container>>:8080/MUSIC/rest/v2
      /admin/onboardAppWithMusic
    2. expected result: {"Generated AID":"2895db7e-2746-426a-822f-80c367161c65","Success":"Your application conductor has been onboarded with MUSIC."}
  5. Start the HAS containers
    1. $ cd ~/has
    2. $ ./run-dockers.sh
  6. Verify HAS components
    1. $ docker container ls
    2. expected result: image names should include: data, reservation, solver, api, controller
  7. At this moment a $ docker ps or $ docker container ls commands should have an output similar to the following
    1. Example output
    2. Code BlockCONTAINER ID
      1. 
        ```
      2. Set the replication_factor to 1. (In the local installation MUSIC runs in a single instance, if this value is higher MUSIC requests with atomic consistency will fail with error message "Exception thrown while doing the critical put, check sanctity of the row/conditions:\nnull")
      3. Search for [aai]


        Code Block
        languagebash
        ```text
        -server_url = https://aai.api.simpledemo.onap.org:8443/aai
        +server_url = http://<<IP address of 'aaisim' container>>:8081/aai
        ```
      4. Hint: find IPAddress of containers via:
        1. $ docker container ls
        2. look at first term in PORTS column
  8. Onboard the HAS "conductor" application into MUSIC, 
    1. E.g.:

      Code Block
      languagebash
      $ curl -X POST -H 'Content-Type: application/json' \
      -d '{"appname" : "conductor","userId": "conductor","password": "c0nduct0r","isAAF": false}' \
      0.0.0.0:8080/MUSIC/rest/v2/admin/onboardAppWithMusic
    2. expected result: {"Generated AID":"2895db7e-2746-426a-822f-80c367161c65","Success":"Your application conductor has been onboarded with MUSIC."}
  9. Start the HAS containers
    1. $ cd ~/has
    2. $ ./run-dockers.sh
  10. Verify HAS components
    1. $ docker container ls
    2. expected result: image names should include: data, reservation, solver, api, controller
  11. At this moment a $ docker ps or $ docker container ls commands should have an output similar to the following
    1. Example output
    2. Code Block
      CONTAINER ID        IMAGE                                                     COMMAND                  CREATED             STATUS              PORTS                                               IMAGE                                                     COMMAND  NAMES
      d140b3aa2590        nexus3.onap.org:10003/onap/optf-has:latest       CREATED         "python /usr/local/b…"   STATUS13 minutes ago      Up 13 minutes    PORTS   8091/tcp                                                                                                   NAMESdata
      d140b3aa2590a64620643678        nexus3.onap.org:10003/onap/optf-has:latest                "python /usr/local/b…"   13 minutes ago      Up 13 minutes       8091/tcp                                                                                                   datareservation
      a64620643678343c987ee6d0        nexus3.onap.org:10003/onap/optf-has:latest                "python /usr/local/b…"   13 minutes ago      Up 13 minutes       8091/tcp                                                                                                   reservationsolver
      343c987ee6d0ee3ebd3ef924        nexus3.onap.org:10003/onap/optf-has:latest                "python /usr/local/b…"/local/b…"   13 minutes ago      Up 13 minutes       0.0.0.0:8091->8091/tcp   13 minutes ago      Up 13 minutes       8091/tcp                                                                 api
      47ed0c49a6ae        nexus3.onap.org:10003/onap/optf-has:latest                "python /usr/local/b…"   13 minutes ago   solver ee3ebd3ef924  Up      nexus3.onap.org:10003/onap/optf-has:latest13 minutes       8091/tcp             "python /usr/local/b…"   13 minutes ago      Up 13 minutes       0.0.0.0:8091->8091/tcp                                                                 controller
      140da6ee2808        tomcat:8.5           api 47ed0c49a6ae        nexus3.onap.org:10003/onap/optf-has:latest                   "python /usr/local/b…"   13 minutes ago   "catalina.sh run"  Up 13 minutes    36 minutes ago 8091/tcp     Up 36 minutes       0.0.0.0:8080->8080/tcp                                                                                     controllermusic-tomcat
      140da6ee280815553a52e3ae        tomcatzookeeper:8.5   3.4                                             "catalina.sh run"    /docker-entrypoint.…"    36 minutes ago      Up 36 minutes       0.0.0.0:80802181->8080>2181/tcp, 0.0.0.0:2888->2888/tcp, 0.0.0.0:3888->3888/tcp                                     music-zk
      08c89e0fff47         nexus3.onap.org:10001/onap/music/music:latest             "tail -f /dev/null"      36 minutes ago      Up       music-tomcat
      15553a52e3ae36 minutes        zookeeper:3.4                                             "/docker-entrypoint.…"   36 minutes ago      Up 36 minutes       0.0.0.0:2181->2181/tcp, 0.0.0.0:2888->2888/tcp, 0.0.0.0:3888->3888/tcp                                         music-zkwar
      08c89e0fff473387e50c4135        nexus3.onap.org:10001/onap/music/cassandra_music:latest             "tail -f /dev/null"   docker-entrypoint.sh"   36 minutes ago      Up 36 minutes       0.0.0.0:7000-7001->7000-7001/tcp, 0.0.0.0:7199->7199/tcp, 0.0.0.0:9042->9042/tcp, 0.0.0.0:9160->9160/tcp   music-db
      9cafc8ddfdd1        aaisim                                                    "/bin/sh -c 'python …"   42 minutes ago      Up 42 minutes       0.0.0.0:8081->8081/tcp                    music-war 3387e50c4135        nexus3.onap.org:10001/onap/music/cassandra_music:latest   "docker-entrypoint.sh"      36 minutes ago      Up 36 minutes       0.0.0.0:7000-7001->7000-7001/tcp, 0.0.0.0:7199->7199/tcp, 0.0.0.0:9042->9042/tcp, 0.0.0.0:9160->9160/tcp         music-db 9cafc8ddfdd1        aaisim             aaisim

Running

  1. Send vCPE homing template to HAS, E.g.

    1. $ curl -X POST --user admin1:plan.15 -H 'Content-Type: application/json' \
      -d @homing.json localhost:8091/v1/plans

    2. Hint: homing.json may be created by conjoining 

      Code Block
      {
      "name": "vCPE homing                                    "/bin/sh -c 'python …"   42 minutes ago      Up 42 minutes       0.0.0.0:8081->8081/tcp                                                                                     aaisim

Running

  1. Send vCPE homing template to HAS, E.g.

    1. $ curl -X POST --user admin1:plan.15 -H 'Content-Type: application/json' \
      -d @homing.json localhost:8091/v1/plans

    2. Hint: homing.json may be created by conjoining 

      Code Block
      {
      "name": "vCPE homing Beijing 2.0.0-ONAP",
      "template": <<HAS Homing Specification (R')>>
      }

      where HAS Homing Specification (R') = https://wiki.onap.org/display/DW/vCPE+Homing+Use+Case

    3. Hint: for username:password (--user above) see ~/conductor.conf, conductor_api section

  2. ISSUE_1: At this point a request sent to the MUSIC fails with the error: 

    1. request to MUSIC sent by the controller: PUT /MUSIC/rest/v2/keyspaces/conductor_rpc/tables/controller/rows?id=<<Some UUID>>

    2. MUSIC's reply: "Exception thrown while doing the critical put, check sanctity of the row/conditions:\nnull"
      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

    3. Hint: for username:password (--user above) see ~/conductor.conf, conductor_api section

  3. RESOLVED: ISSUE_1: At this point a request fails with an error and the following message is returned for the homing request:

    1. After a 5 mins long timeout, the HAS api component replies back with error:

    2. Code Block
      languagejs
      {
      	"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"
      	}
      }
    3. 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:

      1. Request to MUSIC sent by the controller: PUT /MUSIC/rest/v2/keyspaces/conductor_rpc/tables/controller/rows?id=<<Some UUID>>

        1. 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.
      2. MUSIC's reply: "Exception thrown while doing the critical put, check sanctity of the row/conditions:\nnull"

      3. The produced HTTP stream between `controller` and MUSIC captured with Wireshark:
        View file
        nameHAS-MUSIC consitency-atomic.txt
        height250
  4. ISSUE_2Controller - 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