Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Follow the steps below Depending on you requirements there are several ways to setup the CPS environment. 

Checkout the project

Checkout https://gerrit.onap.org/r/admin/repos/cps

From docker-compose folder run the following after building the images locally :

Code Block
languagebash
VERSION=x.y.z-SNAPSHOT DB_HOST=dbpostgresql DB_USERNAME=cps DB_PASSWORD=cps docker-compose up -d

This starts both cps and postgres containers.

Note: Checkout the README.md in docker-compose folder for detailed steps.

Setup schema in DB

Liquibase auto creates the schema on startup.

Set environment variables with relevant connection details which can be found in application.yml in docker-compose folder.

Building the project

When building the project run from the root cps folder :

Code Block
mvn clean install

Running the project

This option is if you have  a local postgres running.

From the cps folder run the following command :

Code Block
java -DDB_HOST=localhost -DDB_USERNAME=cps -DDB_PASSWORD=cps -jar cps-application/target/cps-application-x.y.z-SNAPSHOT.jar

...

and Its dependencies:

  1. Local Setup Using Docker
  2. Local Setup Using CSIT
  3. CPS Setup Using Minikube
  4. SDNC, RAN-sim controller and Honeycomb Simulator Setup Locally
  5. CPS-OOM Deployment for Kubernetes VM

Optional supporting setup guides:

Code Block
mvn spring-boot:run

Running CPS via Helm charts on Minikube :

Start Minikube.

To setup ONAP locally using Helm follow steps as outlined in the deploy section on - https://docs.onap.org/projects/onap-oom/en/latest/oom_user_guide.html

To just install CPS use :

Code Block
helm upgrade dev1 local/cps -i -f values.yaml --set global.masterPassword=mysecr

This was tested on windows using WSL2 with Ubuntu 20.04 but any similar environment should suffice.

FAQ

How to fix "Error: could not open `{argLine}'when running unit tests from Intellij IDE ?

If not able to run unit tests from Intellj unit tests tool because of this error

Code Block
languagetext
Error: could not open `{argLine}'

Process finished with exit code 1

Then review maven-surefire-plugin integration with Intellij:

  • Go to Settings-> Build,Execution,Deployment -> Build Tools -> Maven -> Running Tests
  • Uncheck argLine