kubectl -n onap exec -it dev-policy-policy-xacml-pdp-584844b8cf-9zptx bash
+.. _install-upgrade-policy-label:
+
Installing or Upgrading Policy
******************************
The assumption is you have cloned the charts from the OOM repository into a local directory.
From your local copy, edit any of the values.yaml files in the policy tree to make desired changes.
+The policy schema will be installed automatically as part of the database configuration using ``db-migrator``.
+By default the policy schema is upgraded to the latest version.
+For more information on how to change the ``db-migrator`` setup please see: `Using Policy DB Migrator`_.
+
+.. _Using Policy DB Migrator: ../db-migrator/policy-db-migrator.html
+
**Step 2** Build the charts
.. code-block:: bash
.. code-block:: bash
- helm del --purge dev-policy
+ helm undeploy dev-policy
kubectl get pods -n onap | grep dev-policy
-**Step 4** Delete NFS persisted data for Policy
+
+**Step 4** Re-Deploy Policy pods
+
+After deploying policy, loop on monitoring the policy pods until they come up.
.. code-block:: bash
- rm -fr /dockerdata-nfs/dev/policy
+ helm deploy dev-policy local/onap --namespace onap
+ kubectl get pods -n onap | grep dev-policy
+
+.. note::
+ If you want to purge the existing data and start with a clean install,
+ please follow these steps after undeploying:
-**Step 5** Make sure there is no orphan policy database persistent volume or claim.
+ **Step 1** Delete NFS persisted data for Policy
-First, find if there is an orphan database PV or PVC with the following commands:
+ .. code-block:: bash
-.. code-block:: bash
+ rm -fr /dockerdata-nfs/dev/policy
- kubectl get pvc -n onap | grep policy
- kubectl get pv -n onap | grep policy
+ **Step 2** Make sure there is no orphan policy database persistent volume or claim.
-If there are any orphan resources, delete them with
+ First, find if there is an orphan database PV or PVC with the following commands:
-.. code-block:: bash
+ .. code-block:: bash
- kubectl delete pvc <orphan-policy-mariadb-resource>
- kubectl delete pv <orphan-policy-mariadb-resource>
+ kubectl get pvc -n onap | grep policy
+ kubectl get pv -n onap | grep policy
-**Step 6** Re-Deploy Policy pods
+ If there are any orphan resources, delete them with
-After deploying policy, loop on monitoring the policy pods until they come up.
+ .. code-block:: bash
-.. code-block:: bash
+ kubectl delete pvc <orphan-policy-mariadb-resource>
+ kubectl delete pv <orphan-policy-mariadb-resource>
- helm deploy dev-policy local/onap --namespace onap
- kubectl get pods -n onap | grep dev-policy
Restarting a faulty component
*****************************
* `AAF Certificate Management for Dummies <https://wiki.onap.org/display/DW/AAF+Certificate+Management+for+Dummies>`_.
* `Instructional Videos <https://wiki.onap.org/display/DW/Instructional+Videos>`_.
-After these changes, follow the procedures in the :ref:`Installing or Upgrading Policy` section to make usage of
+After these changes, follow the procedures in the :ref:`install-upgrade-policy-label` section to make usage of
the new stores effective.
Additional PDP-D Customizations
Credentials and other configuration parameters can be set as values
when deploying the policy (drools) subchart. Please refer to
-`PDP-D Default Values <https://git.onap.org/oom/tree/kubernetes/policy/charts/drools/values.yaml>`_
+`PDP-D Default Values <https://git.onap.org/oom/tree/kubernetes/policy/components/policy-drools-pdp/values.yaml>`_
for the current default values. It is strongly recommended that sensitive
information is secured appropriately before using in production.
Additional customization can be applied to the PDP-D. Custom configuration goes under the
"resources" directory of the drools subchart (oom/kubernetes/policy/charts/drools/resources).
This requires rebuilding the policy subchart
-(see section :ref:`Installing or Upgrading Policy`).
+(see section :ref:`install-upgrade-policy-label`).
Configuration is done by adding or modifying configmaps and/or secrets.
Configmaps are placed under "drools/resources/configmaps", and
To *override the PDP-D keystore or trustore*, add a suitable replacement(s) under
"drools/resources/secrets". Modify the drools chart values.yaml with
new credentials, and follow the procedures described at
-:ref:`Installing or Upgrading Policy` to redeploy the chart.
+:ref:`install-upgrade-policy-label` to redeploy the chart.
To *disable https* for the DMaaP configuration topic, add a copy of
`engine.properties <https://git.onap.org/policy/drools-pdp/tree/policy-management/src/main/server/config/engine.properties>`_