Add OOM installation notes
[policy/parent.git] / docs / installation / oom.rst
1 .. This work is licensed under a
2 .. Creative Commons Attribution 4.0 International License.
3 .. http://creativecommons.org/licenses/by/4.0
4
5
6 Policy OOM Installation
7 -----------------------
8
9 .. contents::
10     :depth: 2
11
12 Policy OOM Charts
13 *****************
14 The policy K8S charts are located in the `OOM repository <https://gerrit.onap.org/r/gitweb?p=oom.git;a=tree;f=kubernetes/policy;h=78576c7a0d30cb87054e9776326cdde20986e6e3;hb=refs/heads/master>`_.
15
16 Please refer to the OOM documentation on how to install and deploy ONAP.
17
18 Policy Pods
19 ***********
20 To get a listing of the Policy Pods, run the following command:
21
22 .. code-block:: bash
23
24   kubectl get pods | grep policy
25
26   brmsgw                     ClusterIP   10.43.77.177    <none>        9989/TCP                              5d15h   app=brmsgw,release=dev-policy
27   drools                     ClusterIP   10.43.167.154   <none>        6969/TCP,9696/TCP                     5d15h   app=drools,release=dev-policy
28   nexus                      ClusterIP   10.43.239.92    <none>        8081/TCP                              5d15h   app=nexus,release=dev-policy
29   pap                        NodePort    10.43.207.229   <none>        8443:30219/TCP,9091:30218/TCP         5d15h   app=pap,release=dev-policy
30   pdp                        ClusterIP   None            <none>        8081/TCP                              5d15h   app=pdp,release=dev-policy
31   policy-apex-pdp            ClusterIP   10.43.226.0     <none>        6969/TCP                              5d15h   app=policy-apex-pdp,release=dev-policy
32   policy-api                 ClusterIP   10.43.102.56    <none>        6969/TCP                              5d15h   app=policy-api,release=dev-policy
33   policy-distribution        ClusterIP   10.43.4.211     <none>        6969/TCP                              5d15h   app=policy-distribution,release=dev-policy
34   policy-pap                 ClusterIP   10.43.175.164   <none>        6969/TCP                              5d15h   app=policy-pap,release=dev-policy
35   policy-xacml-pdp           ClusterIP   10.43.181.208   <none>        6969/TCP                              5d15h   app=policy-xacml-pdp,release=dev-policy
36   policydb                   ClusterIP   10.43.93.233    <none>        3306/TCP                              5d15h   app=policydb,release=dev-policy
37
38 Some of these pods are shared between the legacy components and the latest framework components, while others are not.
39
40 .. csv-table::
41    :header: "Policy Pod", "Latest Framework", "Legacy"
42    :widths: 15,10,10
43
44    "brmsgw", "", "yes"
45    "drools", "yes", "yes"
46    "nexus", "yes", "yes"
47    "pap", "", "yes"
48    "pdp", "", "yes"
49    "policy-apex-pdp", "yes", ""
50    "policy-api", "yes", ""
51    "policy-distribution", "yes", "yes"
52    "policy-pap", "yes", ""
53    "policy-xacml-pdp", "yes", ""
54    "policydb", "yes", "yes"
55
56 Accessing Policy Containers
57 ***************************
58 Accessing the policy docker containers is the same as for any kubernetes container. Here is an example:
59
60 .. code-block:: bash
61
62   kubectl -n onap exec -it dev-policy-policy-xacml-pdp-584844b8cf-9zptx bash
63
64 Rebuilding and/or modifying the Policy Charts
65 *********************************************
66 The assumption is you have cloned the charts from the OOM repository into a local directory.
67
68 **Step 1** Go into local copy of OOM charts
69
70 From your local copy, edit any of the values.yaml files in the policy tree to make desired changes.
71
72 **Step 2** Build the charts
73
74 .. code-block:: bash
75
76   make policy
77   make onap
78
79 **Step 3** Undeploy Policy
80 After undeploying policy, loop on monitoring the policy pods until they go away.
81
82 .. code-block:: bash
83
84   helm del --purge dev-policy
85   kubectl get pods -n onap
86
87 **Step 4** Delete NFS persisted data for Policy
88 Sudo to root if you logged in using another account such as ubuntu.
89
90 .. code-block:: bash
91
92   rm -fr /dockerdata-nfs/dev-policy
93
94 **Step 5** Re-Deploy Policy pods
95 After deploying policy, loop on monitoring the policy pods until they come up.
96
97 .. code-block:: bash
98
99   helm deploy dev-policy local/onap --namespace onap 
100   kubectl get pods -n onap
101
102 Exposing ports
103 **************
104 For security reasons, the ports for the policy containers are configured as ClusterIP and thus not exposed. If you find you need those ports in a development environment, then the following will expose them.
105
106 .. code-block:: bash
107
108   kubectl -n onap expose service policy-api --port=7171 --target-port=6969 --name=api-public --type=NodePort
109