From docker-compose folder run the following after building the images locally
VERSION=latest 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 (when CPS-NCMP runs).
Set environment variables with relevant connection details which can be found in application.yml in cps-application/resources folder:
export CPS_USERNAME=cpsuser export CPS_PASSWORD=cpsr0cks! export DMI_USERNAME=cpsuser export DMI_PASSWORD=cpsr0cks!
Running the project
From the cps folder run the following command :
java -DDB_HOST=localhost -DDB_USERNAME=cps -DDB_PASSWORD=cps -jar cps-application/target/cps-application-x.y.z-SNAPSHOT.jar
NB. On Linux use IP address of a container instead of localhost
OR
From the cps\cps-application folder run the following command:
mvn spring-boot:run -DDB_HOST=localhost -DDB_USERNAME=cps -DDB_PASSWORD=cps
Setting up SDNC, CPS & NCMP, DMI-Plugin and netconf-pnp-simulator locally:
Download the following zip file and extract it.
- File to be downloaded : docker.zip
Navigate to the folder where the files were extracted and run the below command from '<sim/>' directory
docker-compose up -d
Then navigate to the folder where the files were extracted and run the below command.
Then run the following command.
docker-compose up -d
Check using 'docker container ls' that SDNC, CPS&NCMP, DMI-Plugin and netconf-pnp-simulator are up and running.