...
Installation and Configuration
Build and start A&AI simulator
Code Block language bash $ 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?
- Verify A&AI Simulator (Hint: in examples, 0.0.0.0 is IPAddress of A&AI container as per $ docker container ls)
- $ docker container ls
- expected result: image names should include: aaisim
- $ curl http://0.0.0.0:8081/healthcheck
- expected result: {"status": "success"}
- $ curl http://0.0.0.0:8081/aai/v13/cloud-infrastructure/cloud-regions/
- expected result: {"cloud-region": [{"group-assignments": ...much more...
- Build and start MUSIC
- Configure access to MUSIC:
Edit music/distribution/dockermusic/music.sh to change user/password:
Code Block language bash ```text -CASS_USERNAME=cassandra1 -CASS_PASSWORD=cassandra1 +CASS_USERNAME=conductor +CASS_PASSWORD=c0nduct0r ```
Edit music/distribution/dockermusic/properties/music.properties to change user/password:
Code Block language bash ```text -cassandra.user=cassandra1 -cassandra.password=cassandra1 +cassandra.user=conductor +cassandra.password=c0nduct0r ```
Build and start MUSIC containers
Code Block language bash $ cd ~//music/distribution/dockermusic $ ./music.sh start
- Verify MUSIC components
- $ docker container ls
- expected result: image names should include: music-tomcat, music-zk, music-war, music-db
- Build and Start HAS
- Configure HAS
- Edit has/conductor.conf
search for [music_api]
Code Block language bash ```text -server_url = http://localhost:8080/MUSIC/rest/v2 +server_url = http://<<IP address of 'music-tomcat' container>>:8080/MUSIC/rest/v2 ```
- search for [aai]
Code Block language bash ```text -server_url = https://aai.api.simpledemo.onap.org:8443/aai +server_url = http://<<IP address of 'aaisim' container>>:8081/aai ```
- Hint: find IPAddress of containers via:
- $ docker container ls
- look at first term in PORTS column
- Configure HAS
- Onboard the HAS "conductor" application into MUSIC,
E.g.:
Code Block language bash $ 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
- expected result: {"Generated AID":"2895db7e-2746-426a-822f-80c367161c65","Success":"Your application conductor has been onboarded with MUSIC."}
- Start the HAS containers
- $ cd ~/has
- $ ./run-dockers.sh
- Verify HAS components
- $ docker container ls
- expected result: image names should include: data, reservation, solver, api, controller
- At this moment a $ docker ps or $ docker container ls commands should have an output similar to the following
- Example output
Code Block CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES d140b3aa2590 nexus3.onap.org:10003/onap/optf-has:latest "python /usr/local/b…" 13 minutes ago Up 13 minutes 8091/tcp data a64620643678 nexus3.onap.org:10003/onap/optf-has:latest "python /usr/local/b…" 13 minutes ago Up 13 minutes 8091/tcp reservation 343c987ee6d0 nexus3.onap.org:10003/onap/optf-has:latest "python /usr/local/b…" 13 minutes ago Up 13 minutes 8091/tcp solver ee3ebd3ef924 nexus3.onap.org:10003/onap/optf-has:latest "python /usr/local/b…" 13 minutes ago Up 13 minutes 0.0.0.0:8091->8091/tcp api 47ed0c49a6ae nexus3.onap.org:10003/onap/optf-has:latest "python /usr/local/b…" 13 minutes ago Up 13 minutes 8091/tcp controller 140da6ee2808 tomcat:8.5 "catalina.sh run" 36 minutes ago Up 36 minutes 0.0.0.0:8080->8080/tcp music-tomcat 15553a52e3ae 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-zk 08c89e0fff47 nexus3.onap.org:10001/onap/music/music:latest "tail -f /dev/null" 36 minutes ago Up 36 minutes 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 "/bin/sh -c 'python …" 42 minutes ago Up 42 minutes 0.0.0.0:8081->8081/tcp aaisim
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
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
Hint: for username:password (--user above) see ~/conductor.conf, conductor_api section
ISSUE_1: At this point a request sent to the MUSIC fails with the error:
request to MUSIC sent by the controller: PUT /MUSIC/rest/v2/keyspaces/conductor_rpc/tables/controller/rows?id=<<Some UUID>>
MUSIC's reply: "Exception thrown while doing the critical put, check sanctity of the row/conditions:\nnull"