Merge "user guide demo for monitoring gui"
[policy/parent.git] / docs / drools / runningEclipse.rst
1
2 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
3 .. http://creativecommons.org/licenses/by/4.0
4
5 ************************
6 Running PDP-D in Eclipse
7 ************************
8
9 .. contents::
10     :depth: 3
11
12 This 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
14 Starting the PDP-D
15 ^^^^^^^^^^^^^^^^^^
16
17 For the Frankfurt release, the project directory will look as follows assuming all drools-pdp projects were selected when importing.
18
19     .. image:: img/frankfurt_project_explorer2.png
20
21 Right click on policy-management hover over "Run As" and select "Java Application"
22
23     .. image:: RunEcl_run_as.png
24
25 Search for "Main" in the pop up and select the Main with the package "org.onap.policy.drools.system" and click "OK".
26
27     .. image:: RunEcl_main.png
28
29 The PDP-D will start running; the console will display output.
30
31     .. image:: RunEcl_console_output.png
32
33 Interacting with the PDP-D
34 ^^^^^^^^^^^^^^^^^^^^^^^^^^
35
36 To 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. Ensure you are using the correct username and password specified for your setup.
37
38     .. code-block:: bash
39
40         curl -k --silent --user <username>:<password> -X GET https://localhost:9696/policy/pdp/engine/ | python -m json.tool
41
42     .. image:: RunEcl_telemetry.png
43
44 An HTTP 200 message for the GET request will also appear in the console in Eclipse.
45
46     .. image:: RunEcl_pdpd_200.png
47
48
49 .. seealso:: To create a controller and run a control loop, refer to `Modifying the Release Template  <modAmsterTemplate.html>`_.
50
51 .. seealso:: To use other telemetry commands to interact with the PDP-D, refer to `Getting Information  <clsimulation.html#getting-information>`_.
52
53
54 End of Document
55
56
57 .. SSNote: Wiki page ref. https://wiki.onap.org/display/DW/Running+PDP-D+in+Eclipse
58
59