blob: 476d6860b37218aabf37b61d819f6daf3f038f01 [file] [log] [blame]
Saryu Shah83f3ae32017-11-06 23:18:08 +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********************************************
6Testing, Deploying and Debugging the PDP/PAP
7********************************************
8
9.. contents::
10 :depth: 3
11
12PAP (Policy Administration Point)
13^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14
15Accessing and Starting PAP
16--------------------------
17
18- To access the PAP docker use
19
Saryu Shah3198d6d2017-11-07 21:40:27 +000020 .. code-block:: bash
Saryu Shah83f3ae32017-11-06 23:18:08 +000021
Saryu Shah3198d6d2017-11-07 21:40:27 +000022 docker exec -it -u 0 pap su - policy
Saryu Shah83f3ae32017-11-06 23:18:08 +000023
24- All Policy related software are installed under the policy account, the policy root directory is under *${POLICY_HOME}* environment variable and it may be changed on a per installation basis. It is typically set up under the */opt/app/policy* directory but can be changed during installation. All Policy software runs with non-root privileges as *policy* is a regular user account.
25
26- Once within the PAP Container the running status can be checked using the following policy status command.
27
Saryu Shah3198d6d2017-11-07 21:40:27 +000028 .. code-block:: bash
Saryu Shah83f3ae32017-11-06 23:18:08 +000029
Saryu Shah3198d6d2017-11-07 21:40:27 +000030 policy [--debug] status|start|stop
Saryu Shah83f3ae32017-11-06 23:18:08 +000031
32- To get the current status of Policy use *policy.sh status*
33
Saryu Shah3198d6d2017-11-07 21:40:27 +000034 .. code-block:: bash
Saryu Shah83f3ae32017-11-06 23:18:08 +000035
Saryu Shah3198d6d2017-11-07 21:40:27 +000036 policy@pap:~$ policy.sh status
37 pap: UP: running with pid 2114
38 console: UP: running with pid 2135
39 paplp: UP: running with pid 2155
40 3 cron jobs installed.
Saryu Shah83f3ae32017-11-06 23:18:08 +000041
42- To Stop the components use *policy.sh stop*
43
Saryu Shah3198d6d2017-11-07 21:40:27 +000044 .. code-block:: bash
45
46 policy@pap:~$ policy.sh stop
47 paplp: STOPPING ..
48 console: STOPPING ..
49 pap: STOPPING ..
Saryu Shah83f3ae32017-11-06 23:18:08 +000050
51- To Start use *policy.sh start*
52
Saryu Shah3198d6d2017-11-07 21:40:27 +000053 .. code-block:: bash
54
55 policy@pap:~$ policy.sh start
56 pap: STARTING ..
57 console: STARTING ..
58 paplp: STARTING ..
Saryu Shah83f3ae32017-11-06 23:18:08 +000059
60Healthcheck
61-----------
62
63- To perform Health check on policy components you can follow the generic procedure documented as below.
64
Saryu Shah3198d6d2017-11-07 21:40:27 +000065 .. code-block:: bash
66
67 # Assuming the healthcheck service credentials have not been changed
68 # post-installation within the drools container
69
70 source /opt/policy/config/drools/feature-healthcheck.conf
71
72 curl --silent --user "${HEALTHCHECK_USER}:${HEALTHCHECK_PASSWORD}"
73 -X GET http://localhost:6969/healthcheck | python -m json.tool
Saryu Shah83f3ae32017-11-06 23:18:08 +000074
75- Additional information can be found in the documentation for Testing, Deploying, and debugging on a PDP-D Healthcheck.
76
77Logs
78----
79
Saryu Shah3198d6d2017-11-07 21:40:27 +000080- Logs for PAP are located at *$POLICY_HOME/servers/pap/logs/* location. The main application logs can be found at *$POLICY_HOME/servers/pap/logs/Policy/ONAP-PAP-REST* location.
81
82* Policy PAP uses EELF logging framework for logging and if needed to be modified can be modified at *$POLICY_HOME/servers/pap/webapps/pap/WEB-INF/classes/logback.xml*. This change needs a restart of the PAP component in order to be in effect.
83
84- The Logs are divided into separate files and debug logs can be found in *debug.log* and error logs in *error.log* file which are two different files under application logs directory.
Saryu Shah83f3ae32017-11-06 23:18:08 +000085
86PDP (Policy Decision Point)
87^^^^^^^^^^^^^^^^^^^^^^^^^^^
88
89Accessing and Starting PDP
90--------------------------
91
92- To access the PDP docker :
93
Saryu Shah3198d6d2017-11-07 21:40:27 +000094 .. code-block:: bash
Saryu Shah83f3ae32017-11-06 23:18:08 +000095
Saryu Shah3198d6d2017-11-07 21:40:27 +000096 docker exec -it -u 0 pdp su - policy
Saryu Shah83f3ae32017-11-06 23:18:08 +000097
98- To start and stop the PDP components the same procedure can be followed as documented for PAP.
99
Saryu Shah3198d6d2017-11-07 21:40:27 +0000100 .. code-block:: bash
Saryu Shah83f3ae32017-11-06 23:18:08 +0000101
Saryu Shah3198d6d2017-11-07 21:40:27 +0000102 policy [--debug] status|start|stop
Saryu Shah83f3ae32017-11-06 23:18:08 +0000103
104Healthcheck / Testing
105---------------------
106
107- The Policy PDP health check can be checked using the generic procedure documented above for PAP which applies to all policy components.
Saryu Shah3198d6d2017-11-07 21:40:27 +0000108
109* Apart from the above check PDP also provides the swagger UI from which PDP REST APIs which can be tested and used, this also lets us know the PDP Status. In order to access PDP's swagger UI visit http://{PDP_URL}:8081/pdp/swagger-ui.html
110
Saryu Shah83f3ae32017-11-06 23:18:08 +0000111- In order to test the Policy components, the swagger UI provided by PDP can be used to test PDP and PAP.
112
113
114End of Document
115
116.. SSNote: Wiki page ref. https://wiki.onap.org/pages/viewpage.action?pageId=16003633
117