Policy Framework Component Local Execution

This page will explain how to execute policy components locally using an IDE (IntelliJ/Eclipse) or using the command line. The intention of this page is to outline how a developer can quickly execute a single component for testing purposes, alleviating the need to generate docker images per change to test in Docker/Kubernetes environments.

These instructions are for development purposes only.

Note: Run “mvn clean install” before bringing up the components using the methods outlined below. Note: Running applications in the IDEs will require run configurations if shown below.

Policy API

Eclipse

../../../_images/policy-api-eclipse.png

IntelliJ

../../../_images/policy-api-intellij.png

Command Line

mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082

Policy PAP

Eclipse

../../../_images/policy-pap-eclipse.png

IntelliJ

../../../_images/policy-pap-intellij.png

Command Line

mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082

Apex-PDP

Eclipse

../../../_images/apex-pdp-eclipse.png

IntelliJ

../../../_images/apex-pdp-intellij.png

Command Line

cd services/services-engine
mvn -q -e clean compile exec:java -Dexec.mainClass="org.onap.policy.apex.service.engine.main.ApexMain" -Dexec.args="-p /PATH/TO/POLICY_FILE.json"

ACM-Runtime

Eclipse

../../../_images/acm-eclipse.png

IntelliJ

../../../_images/acm-intellij.png

Command Line

mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082

Models Simulators

Command Line

mvn -q -e clean compile exec:java -Dexec.mainClass="org.onap.policy.models.sim.pdp.PdpSimulatorMain" -Dexec.args="-c /PATH/TO/OnapPfConfig.json"
mvn -q -e clean compile exec:java -Dexec.mainClass="org.onap.policy.models.sim.dmaap.startstop.Main" -Dexec.args="-c /PATH/TO/DefaultConfig.json"

XACML-PDP

Eclipse

../../../_images/xacml-pdp-eclipse.png

IntelliJ

../../../_images/xacml-pdp-intellij.png

Command Line

cd main
mvn -q -e clean compile exec:java -Dexec.mainClass="org.onap.policy.pdpx.main.startstop.Main" -Dexec.args="-c /PATH/TO/XacmlPdpConfigParameters.json"

Drools-PDP

Eclipse

../../../_images/drools-pdp-eclipse.png

IntelliJ

../../../_images/drools-pdp-intellij.png

Command Line

cd policy-management
mvn -q -e clean compile exec:java -Dexec.mainClass="org.onap.policy.drools.system.Main"

Policy Participant

Eclipse

../../../_images/policy-ppnt-eclipse.png

IntelliJ

../../../_images/policy-ppnt-intellij.png

Command Line

mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082

Http Participant

Eclipse

Similar to above eclipse configuration for participant startup.

IntelliJ

../../../_images/http-ppnt-intellij.png

Command Line

mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082

Kubernetes Participant

Eclipse

Similar to above eclipse configuration for participant startup.

IntelliJ

../../../_images/k8s-ppnt-intellij.png

Command Line

mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082

A1 Participant

Eclipse

Similar to above eclipse configuration for participant startup.

IntelliJ

../../../_images/a1-ppnt-intellij.png

Command Line

mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082

Kserve Participant

Eclipse

Similar to above eclipse configuration for participant startup.

IntelliJ

../../../_images/kserve-ppnt-intellij.png

Command Line

mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082