blob: 136efe736c0951455cea12e8487850265602d90c [file] [log] [blame]
Saryu Shahef28b6d2017-11-14 03:00:56 +00001
2.. This work is licensed under a Creative Commons Attribution 4.0 International License.
3.. http://creativecommons.org/licenses/by/4.0
4
5************************
6Running PDP-D in Eclipse
7************************
8
9.. contents::
10 :depth: 3
11
12This tutorial is intended for developers who would like to run the PDP-D in an Eclipse environment. It is assumed that the drools-pdp git project has been imported in an Eclipse workspace.
13
14Starting the PDP-D
15^^^^^^^^^^^^^^^^^^
16For the Amsterdam release, the project directory will look as follows assuming all drools-pdp projects were selected when importing.
17
18 .. image:: RunEcl_drools_pdp_project.png
19
20Right click on policy-management hover over "Run As" and select "Java Application"
21
22 .. image:: RunEcl_run_as.png
23
24Search for "Main" in the pop up and select the Main with the package "org.onap.policy.drools.system" and click "OK".
25
26 .. image:: RunEcl_main.png
27
28The PDP-D will start running; the console will display output.
29
30 .. image:: RunEcl_console_output.png
31
32Interacting with the PDP-D
33^^^^^^^^^^^^^^^^^^^^^^^^^^
34
35To interact with the PDP-D, the Telemetry API can be used. A simple GET on the engine will show that the PDP-D is running in Eclipse.
36
37 .. code-block:: bash
38
Saryu Shah65640a22018-10-18 01:19:03 +000039 curl -k --silent --user @1b3rt:31nst31n -X GET https://localhost:9696/policy/pdp/engine/ | python -m json.tool
Saryu Shahef28b6d2017-11-14 03:00:56 +000040
41 .. image:: RunEcl_telemetry.png
42
43An HTTP 200 message for the GET request will also appear in the console in Eclipse.
44
45 .. image:: RunEcl_pdpd_200.png
46
Saryu Shah60942782018-03-23 21:11:08 +000047
48.. seealso:: To create a controller and run a control loop, refer to `Modifying the Release Template <modAmsterTemplate.html>`_.
Saryu Shahef28b6d2017-11-14 03:00:56 +000049
50
51End of Document
52
53
54.. SSNote: Wiki page ref. https://wiki.onap.org/display/DW/Running+PDP-D+in+Eclipse
55
56