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
+:ref:`Using Policy DB Migrator <policy-db-migrator-label>`.
+
**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
-**Step 5** Make sure there is no orphan policy database persistent volume or claim.
+.. note::
+ If you want to purge the existing data and start with a clean install,
+ please follow these steps after undeploying:
-First, find if there is an orphan database PV or PVC with the following commands:
+ **Step 1** Delete NFS persisted data for Policy
-.. code-block:: bash
+ .. code-block:: bash
- kubectl get pvc -n onap | grep policy
- kubectl get pv -n onap | grep policy
+ rm -fr /dockerdata-nfs/dev/policy
-If there are any orphan resources, delete them with
+ **Step 2** Make sure there is no orphan policy database persistent volume or claim.
-.. code-block:: bash
+ First, find if there is an orphan database PV or PVC with the following commands:
- kubectl delete pvc <orphan-policy-mariadb-resource>
- kubectl delete pv <orphan-policy-mariadb-resource>
+ .. code-block:: bash
-**Step 6** Re-Deploy Policy pods
+ kubectl get pvc -n onap | grep policy
+ kubectl get pv -n onap | grep policy
-After deploying policy, loop on monitoring the policy pods until they come up.
+ If there are any orphan resources, delete them with
-.. 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
*****************************
kubectl -n onap expose service policy-api --port=7171 --target-port=6969 --name=api-public --type=NodePort
Overriding certificate stores
-*******************************
+*****************************
Policy components package default key and trust stores that support https based communication with other
AAF-enabled ONAP components. Each store can be overridden at installation.
This procedure is applicable to an installation that requires either AAF or non-AAF derived certificates.
The reader is refered to the AAF documentation when new AAF-compliant keystores are desired:
-* `AAF automated configuration and Certificates <https://docs.onap.org/projects/onap-aaf-authz/en/latest/sections/configuration/AAF_4.1_config.html#typical-onap-entity-info-in-aaf>`_.
+* `AAF automated configuration and Certificates <https://wiki.onap.org/display/DW/Application+Authorization+Framework+%28AAF%29+Documentation>`_.
* `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
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>`_