1 .. _local-policy-label:
6 Policy Framework Component Local Execution
7 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9 This page will explain how to execute policy components locally using an IDE (IntelliJ/Eclipse) or using the command line.
10 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.
12 These instructions are for development purposes only.
14 Note: Run "mvn clean install" before bringing up the components using the methods outlined below.
15 Note: Running applications in the IDEs will require run configurations if shown below.
23 .. image:: images/policy-api-eclipse.png
28 .. image:: images/policy-api-intellij.png
35 mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”
43 .. image:: images/policy-pap-eclipse.png
48 .. image:: images/policy-pap-intellij.png
55 mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”
63 .. image:: images/apex-pdp-eclipse.png
68 .. image:: images/apex-pdp-intellij.png
75 cd services/services-engine
76 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"
84 .. image:: images/acm-eclipse.png
89 .. image:: images/acm-intellij.png
96 mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”
106 mvn -q -e clean compile exec:java -Dexec.mainClass="org.onap.policy.models.sim.pdp.PdpSimulatorMain" -Dexec.args="-c /PATH/TO/OnapPfConfig.json"
110 mvn -q -e clean compile exec:java -Dexec.mainClass="org.onap.policy.models.sim.dmaap.startstop.Main" -Dexec.args="-c /PATH/TO/DefaultConfig.json"
118 .. image:: images/xacml-pdp-eclipse.png
123 .. image:: images/xacml-pdp-intellij.png
131 mvn -q -e clean compile exec:java -Dexec.mainClass="org.onap.policy.pdpx.main.startstop.Main" -Dexec.args="-c /PATH/TO/XacmlPdpConfigParameters.json"
139 .. image:: images/drools-pdp-eclipse.png
144 .. image:: images/drools-pdp-intellij.png
152 mvn -q -e clean compile exec:java -Dexec.mainClass="org.onap.policy.drools.system.Main"
160 .. image:: images/policy-ppnt-eclipse.png
165 .. image:: images/policy-ppnt-intellij.png
172 mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”
180 Similar to above eclipse configuration for participant startup.
185 .. image:: images/http-ppnt-intellij.png
192 mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”
194 Kubernetes Participant
195 **********************
200 Similar to above eclipse configuration for participant startup.
205 .. image:: images/k8s-ppnt-intellij.png
212 mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”
220 Similar to above eclipse configuration for participant startup.
225 .. image:: images/a1-ppnt-intellij.png
232 mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”
240 Similar to above eclipse configuration for participant startup.
245 .. image:: images/kserve-ppnt-intellij.png
252 mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”