Merge "log RI kubernetes and docker devops"
[logging-analytics.git] / onap / policy / README.md
1 ##############################################################################################################################################
2 ## Policy Logging Configuration
3 =================================================================================================
4 Policy has 7 docker containers - pap,pdp,pypdp,drools,mariadb,nexus,brmsGateway.
5 Each one has its own separate logback.xml file.
6 The canonical logging implementation is done for the containers- pap,pdp,pypdp,drools.
7 Canonical logs will be generated at /var/log/onap/policy/
8 =================================================================================================
9 ## Instructions for deployment
10 =================================================================================================
11 ### Policy logging deployment for PDP
12 -------------------------------------------------------------------------------------------------
13     1. Log provider file is available at the path, /opt/app/policy/servers/pdp/webapps/pdp/WEB-INF/classes, in the container PDP.
14   2. Copy the canonical logback.xml from 'xacml-pdp-rest' directory (of gerrit) into the path mentioned in step 1.
15   3. Create the canonical path for logs, /var/log/onap/policy/xacml-pdp-rest, on the host VM.
16   4. Provide write permissions for "others" users for directory created in step 3.
17   5. Volume-Mount:The pdp container requires one host path mapped as volume in the container
18         
19           5.1. Log file path:
20              Host path -      /var/log/onap/policy/xacml-pdp-rest/ mapped to 
21         Container path - /var/log/onap/policy/xacml-pdp-rest/      
22       5.2. Log provider file path:              
23         Note: Log provider path cannot be configured externally as it is bundled inside a WAR.  
24 ------------------------------------------------------------------------------------------------------------------------------------------
25 ### Policy logging deployment for PAP sub-module ep_sdk_app
26 ------------------------------------------------------------------------------------------------------------------------------------------
27     1. Log provider file is available at the path, /opt/app/policy/servers/console/webapps/ecomp/WEB-INF/classes/, is in the container PAP.
28   2. Copy the canonical logback.xml from 'ep_sdk_app' directory (of gerrit) into the path mentioned in step 1.
29   3. Create the canonical path for logs, /var/log/onap/policy/ep_sdk_app, on the host VM.
30   4. Provide write permissions for "others" users for directory created in step 3.
31   5. Volume-Mount: The pap container requires one host path mapped as volume in the container
32         
33           5.1. Log file path:
34              Host path -      /var/log/onap/policy/ep_sdk_app/ mapped to 
35         Container path - /var/log/onap/policy/ep_sdk_app/      
36       5.2. Log provider file path:              
37         Note: Log provider path cannot be configured externally as it is bundled inside a WAR. 
38 ------------------------------------------------------------------------------------------------------------------------------------------
39 ### Policy logging deployment for PAP sub-module xacml-pap-rest
40 ------------------------------------------------------------------------------------------------------------------------------------------
41     1. Log provider file is available at the path, /opt/app/policy/servers/pap/webapps/pap/WEB-INF/classes/, is in the container PAP.
42   2. Copy the canonical logback.xml from 'xacml-pap-rest' directory (of gerrit) into the path mentioned in step 1.
43   3. Create the canonical path for logs, /var/log/onap/policy/xacml-pap-rest, on the host VM.
44   4. Provide write permissions for "others" users for directory created in step 3.
45   5. Volume-Mount: The pap container requires one host path mapped as volume in the container
46         
47           5.1. Log file path:
48              Host path -      /var/log/onap/policy/xacml-pap-rest/ mapped to 
49         Container path - /var/log/onap/policy/xacml-pap-rest/      
50       5.2. Log provider file path:              
51         Note: Log provider path cannot be configured externally as it is bundled inside a WAR. 
52 ------------------------------------------------------------------------------------------------------------------------------------------
53 ### Policy logging deployment for drools
54 ------------------------------------------------------------------------------------------------------------------------------------------
55     1. Create the canonical path for log provider, /etc/onap/policy/conf.d/drools/, on the host VM.
56     2. Copy the canonical logback.xml from 'drools' directory (of gerrit) into the path created in step 1.
57     3. Give the read access to 'others' for the file, /etc/onap/policy/conf.d/drools/logback.xml. This will give access to the 'policy' user used by the policy container to read this file.
58   4. Create the canonical path for logs, /var/log/onap/policy/drools, on the host VM.
59   5. Provide write permissions for "others" users for directory created in step 4.
60   6. Volume-Mount:The drools container requires two host paths mapped as volume in the container
61         
62           6.1. Log file path:
63              Host path -      /var/log/onap/policy/drools/ mapped to 
64         Container path - /var/log/onap/policy/drools/      
65       6.2. Log provider file path:    
66           Host path -      /etc/onap/policy/conf.d/drools/logback.xml mapped to 
67         Container path - /opt/app/policy/config/logback.xml
68 ------------------------------------------------------------------------------------------------------------------------------------------
69 ### Policy logging deployment for pypdpserver
70 ------------------------------------------------------------------------------------------------------------------------------------------
71     1. Log provider file is available at the path, /opt/app/policy/servers/pypdp/webapps/PyPDPServer/WEB-INF/classes/, is in the container pypdpserver on the host VM.
72   2. Copy the canonical logback.xml from 'pypdpserver' directory (of gerrit) into the path mentioned in step 1.
73   3. Create the canonical path for logs, /var/log/onap/policy/pypdpserver, on the host VM.
74   4. Provide write permissions for "others" users for directory created in step 3.
75   5. Volume-Mount:The pypdpserver container requires one host path mapped as volume in the container
76         
77           5.1. Log file path:
78              Host path -      /var/log/onap/policy/pypdpserver/ mapped to 
79         Container path - /var/log/onap/policy/pypdpserver/
80       5.2. Log provider file path:    
81            Note: Log provider path cannot be configured externally as it is bundled inside a WAR.
82 ##############################################################################################################################################