...
See also TOSCA Control Loop Test Picture
Running CLAMP ControlLoop CSIT
- Docker images can be build and pushed to nexus using steps in Building and running CLAMP
Once the docker images are built and available in nexus or localhost (for local verification), following are the steps and results of CLAMP CSITClone policy docker repo where CSITs reside
Code Block language bash $git clone "https://gerrit.onap.org/r/policy/docker"
Open a console and go into the directory docker/csit/
Code Block language bash $cd docker/csit/ $./run-project-csit.sh clamp
Above script will perform following operations :
- Pull the clamp docker images from nexus docker registry
- Bring up all the docker images
- Assign IP address and bring up the exposed ports
- Run integration tests, return the test results
- Teardown entire setup by stopping and removing the docker images
- Save the logs and reports (log.html, output.xml, report.html) in docker/csit
Developer details on the CLAMP CSIT procedure
setup.sh script in $/docker/csit/clamp/plans is responsible for sourcing all required configuration such as versions, IP-Addresses, Port info etc
It internally calls following docker-compose command to bring up docker instances. It also sets Robot variables needed for running Robot tests.
Code Block language bash $docker-compose -f ${SCRIPTS}/docker-compose-all.yml up -d policy-controlloop-runtime
For establishing a basic ControlLoop, a controlloop runtime component (policy-clamp-cl-runtime), different participants (policy-clamp-cl-pf-ppnt, policy-clamp-cl-k8s-ppnt), Dmaap simulator for communication between components (simulator), mariadb for storage of controlloop data are needed (mariadb) are needed. policy-api docker image is needed for interaction of policy-participant with policy-framework.
Code Block language bash $docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES b2266ab66cbc onap/policy-clamp-cl-runtime:latest "/opt/app/policy/bin…" 28 seconds ago Up 27 seconds 6970/tcp policy-controlloop-runtime c6475277e750 policy-clamp-cl-pf-ppnt:latest "/opt/app/policy/bin…" 29 seconds ago Up 28 seconds 6972/tcp policy-participant 5a83596fd963 nexus3.onap.org:10001/onap/policy-api:2.5-SNAPSHOT-latest "./wait_for_port.sh …" 30 seconds ago Up 29 seconds 6969/tcp policy-api 77746467d139 onap/policy-clamp-cl-k8s-ppnt:latest "/opt/app/policy/bin…" 30 seconds ago Up 29 seconds 6971/tcp kubernetes-participant 6053cdad35fd nexus3.onap.org:10001/onap/policy-models-simulator:2.5-SNAPSHOT-latest "bash simulators.sh" 31 seconds ago Up 30 seconds 3905/tcp, 6666/tcp, 6668-6670/tcp simulator 17cf42071531 nexus3.onap.org:10001/mariadb:10.5.8 "docker-entrypoint.s…" 32 seconds ago Up 30 seconds 3306/tcp mariadb
CLAMP CSIT testcases for ControlLoop are present in policy-clamp-test.robot under $docker/csit/clamp/tests
There is a testplan.txt under docker/csit/clamp/plans/ which is read for identifying the testcases.
Robot testcases establish a basic controlloop by communicating between different components (or docker images) with REST APIs and Dmaapteardown.sh script in $/docker/csit/clamp/plans is responsible for stopping and removing docker images
Code Block language bash $docker-compose -f ${SCRIPTS}/docker-compose-all.yml down -v
Report and log after CSIT execution are stored in $docker/csit
Code Block language bash log.html output.xml report.html