Add documentation for local installation of PF components
[policy/parent.git] / docs / development / devtools / local-installation.rst
1 .. _local-policy-label:
2
3 .. toctree::
4    :maxdepth: 2
5
6 Policy Framework Component Local Execution
7 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8
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.
11
12 These instructions are for development purposes only.
13
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.
16
17 Policy API
18 **********
19
20 Eclipse
21 -------
22
23     .. image:: images/policy-api-eclipse.png
24
25 IntelliJ
26 --------
27
28     .. image:: images/policy-api-intellij.png
29
30 Command Line
31 ------------
32
33     .. code-block:: bash
34
35     mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”
36
37 Policy PAP
38 **********
39
40 Eclipse
41 -------
42
43     .. image:: images/policy-pap-eclipse.png
44
45 IntelliJ
46 --------
47
48     .. image:: images/policy-pap-intellij.png
49
50 Command Line
51 ------------
52
53     .. code-block:: bash
54
55     mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”
56
57 Apex-PDP
58 ********
59
60 Eclipse
61 -------
62
63     .. image:: images/apex-pdp-eclipse.png
64
65 IntelliJ
66 --------
67
68     .. image:: images/apex-pdp-intellij.png
69
70 Command Line
71 ------------
72
73     .. code-block:: bash
74
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"
77
78 ACM-Runtime
79 ***********
80
81 Eclipse
82 -------
83
84     .. image:: images/acm-eclipse.png
85
86 IntelliJ
87 --------
88
89     .. image:: images/acm-intellij.png
90
91 Command Line
92 ------------
93
94     .. code-block:: bash
95
96     mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”
97
98 Models Simulators
99 *****************
100
101 Command Line
102 ------------
103
104     .. code-block:: bash
105
106     mvn -q -e clean compile exec:java -Dexec.mainClass="org.onap.policy.models.sim.pdp.PdpSimulatorMain" -Dexec.args="-c /PATH/TO/OnapPfConfig.json"
107
108     .. code-block:: bash
109
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"
111
112 XACML-PDP
113 *********
114
115 Eclipse
116 -------
117
118     .. image:: images/xacml-pdp-eclipse.png
119
120 IntelliJ
121 --------
122
123     .. image:: images/xacml-pdp-intellij.png
124
125 Command Line
126 ------------
127
128     .. code-block:: bash
129
130     cd main
131     mvn -q -e clean compile exec:java -Dexec.mainClass="org.onap.policy.pdpx.main.startstop.Main" -Dexec.args="-c /PATH/TO/XacmlPdpConfigParameters.json"
132
133 Drools-PDP
134 **********
135
136 Eclipse
137 -------
138
139     .. image:: images/drools-pdp-eclipse.png
140
141 IntelliJ
142 --------
143
144     .. image:: images/drools-pdp-intellij.png
145
146 Command Line
147 ------------
148
149     .. code-block:: bash
150
151     cd policy-management
152     mvn -q -e clean compile exec:java -Dexec.mainClass="org.onap.policy.drools.system.Main"
153
154 Policy Participant
155 ******************
156
157 Eclipse
158 -------
159
160     .. image:: images/policy-ppnt-eclipse.png
161
162 IntelliJ
163 --------
164
165     .. image:: images/policy-ppnt-intellij.png
166
167 Command Line
168 ------------
169
170     .. code-block:: bash
171
172     mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”
173
174 Http Participant
175 ****************
176
177 Eclipse
178 -------
179
180 Similar to above eclipse configuration for participant startup.
181
182 IntelliJ
183 --------
184
185     .. image:: images/http-ppnt-intellij.png
186
187 Command Line
188 ------------
189
190     .. code-block:: bash
191
192     mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”
193
194 Kubernetes Participant
195 **********************
196
197 Eclipse
198 -------
199
200 Similar to above eclipse configuration for participant startup.
201
202 IntelliJ
203 --------
204
205     .. image:: images/k8s-ppnt-intellij.png
206
207 Command Line
208 ------------
209
210     .. code-block:: bash
211
212     mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”
213
214 A1 Participant
215 **************
216
217 Eclipse
218 -------
219
220 Similar to above eclipse configuration for participant startup.
221
222 IntelliJ
223 --------
224
225     .. image:: images/a1-ppnt-intellij.png
226
227 Command Line
228 ------------
229
230     .. code-block:: bash
231
232     mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”
233
234 Kserve Participant
235 ******************
236
237 Eclipse
238 -------
239
240 Similar to above eclipse configuration for participant startup.
241
242 IntelliJ
243 --------
244
245     .. image:: images/kserve-ppnt-intellij.png
246
247 Command Line
248 ------------
249
250     .. code-block:: bash
251
252     mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”