Following command builds all Java components to cps-application/target/cps-application-x.y.z-SNAPSHOT.jar JAR file
without generating any docker images:
mvn clean install -Pcps-docker -Pncmp-docker -Pcps-ncmp-docker -Djib.skip- Following command builds the JAR file and also generates the Docker image for all CPS components:
mvn clean install -Pcps-docker -Pncmp-docker -Pcps-ncmp-docker- Following command builds the JAR file and generates the Docker image for specified CPS component:
(with
<docker-profile>being one ofcps-docker,ncmp-dockerorcps-ncmp-docker):
mvn clean install -P<docker-profile>docker-compose/docker-compose.yml contains the base services required to run CPS and NCMP.
This deployment can also be used for KPI test. Please run the following command from docker-compose folder:
docker-compose up -d
or
docker-compose --profile tracing up -ddocker-compose/dmi-services.yml contains the DMI services including SDNC and PNF Simulator.
This deployment is required for the CSIT test.
docker-compose -f docker-compose.yml -f dmi-services.yml up -dTo deploy services that are required for Endurance test, please use the following command:
docker-compose --project-name endurance --env-file env/endurance.env up -dTo stop any deployment, please replace up -d flag with down in the above commands.
Following command starts the application using JAR file:
DB_HOST=localhost DB_USERNAME=cps DB_PASSWORD=cps \
DMI_USERNAME=cpsuser DMI_PASSWORD=cpsr0cks! \
java -jar cps-application/target/cps-application-x.y.z-SNAPSHOT.jarHere are the steps to run or debug the application from Intellij:
- Enable the desired maven profile form Maven Tool Window
- Run a configuration from
Run -> Edit configurationswith following settings:Environment variables:DB_HOST=localhost;DB_USERNAME=cps;DB_PASSWORD=cps DMI_USERNAME=cpsuser DMI_PASSWORD=cpsr0cks!
Swagger UI and Open API specifications are available to discover service endpoints and send requests.
http://localhost:<port-number>/swagger-ui.htmlhttp://localhost:<port-number>/api-docs/cps-core/openapi.yamlhttp://localhost:<port-number>/api-docs/cps-ncmp/openapi.yamlhttp://localhost:<port-number>/api-docs/cps-ncmp/openapi-inventory.yaml
with is being either 8080 if running the plain Java build or retrieved using following command
if running from docker-compose:
docker inspect \
--format='{{range $p, $conf := .NetworkSettings.Ports}} {{$p}} -> {{(index $conf 0).HostPort}} {{end}}' \
<cps-docker-container>Enjoy CPS!