summaryrefslogtreecommitdiffstats
path: root/docs/development/devtools/installation/local-installation.rst
blob: 861d4650e2a9ce92ca75f98befc32c3c3903e381 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
.. _local-policy-label:

.. toctree::
   :maxdepth: 2

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
-------

    .. image:: images/policy-api-eclipse.png

IntelliJ
--------

    .. image:: images/policy-api-intellij.png

Command Line
------------

    .. code-block:: bash

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

Eclipse
-------

    .. image:: images/policy-pap-eclipse.png

IntelliJ
--------

    .. image:: images/policy-pap-intellij.png

Command Line
------------

    .. code-block:: bash

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

Eclipse
-------

    .. image:: images/apex-pdp-eclipse.png

IntelliJ
--------

    .. image:: images/apex-pdp-intellij.png

Command Line
------------

    .. code-block:: bash

        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
-------

    .. image:: images/acm-eclipse.png

IntelliJ
--------

    .. image:: images/acm-intellij.png

Command Line
------------

    .. code-block:: bash

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

Command Line
------------

    .. code-block:: bash

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

    .. code-block:: bash

        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
-------

    .. image:: images/xacml-pdp-eclipse.png

IntelliJ
--------

    .. image:: images/xacml-pdp-intellij.png

Command Line
------------

    .. code-block:: bash

        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
-------

    .. image:: images/drools-pdp-eclipse.png

IntelliJ
--------

    .. image:: images/drools-pdp-intellij.png

Command Line
------------

    .. code-block:: bash

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

Policy Participant
******************

Eclipse
-------

    .. image:: images/policy-ppnt-eclipse.png

IntelliJ
--------

    .. image:: images/policy-ppnt-intellij.png

Command Line
------------

    .. code-block:: bash

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

Eclipse
-------

Similar to above eclipse configuration for participant startup.

IntelliJ
--------

    .. image:: images/http-ppnt-intellij.png

Command Line
------------

    .. code-block:: bash

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

Eclipse
-------

Similar to above eclipse configuration for participant startup.

IntelliJ
--------

    .. image:: images/k8s-ppnt-intellij.png

Command Line
------------

    .. code-block:: bash

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

Eclipse
-------

Similar to above eclipse configuration for participant startup.

IntelliJ
--------

    .. image:: images/a1-ppnt-intellij.png

Command Line
------------

    .. code-block:: bash

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

Eclipse
-------

Similar to above eclipse configuration for participant startup.

IntelliJ
--------

    .. image:: images/kserve-ppnt-intellij.png

Command Line
------------

    .. code-block:: bash

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