Fix warnings in PF documentation generation
[policy/parent.git] / docs / installation / oom.rst
index 8485bb7..621df5b 100644 (file)
@@ -42,6 +42,8 @@ Accessing the policy docker containers is the same as for any kubernetes contain
 
   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.
@@ -50,6 +52,12 @@ The assumption is you have cloned the charts from the OOM repository into a loca
 
 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
@@ -65,39 +73,45 @@ After undeploying policy, loop on monitoring the policy pods until they go away.
 
 .. 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
 *****************************
@@ -153,7 +167,7 @@ The reader is refered to the AAF documentation when new AAF-compliant keystores
 * `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
@@ -168,7 +182,7 @@ 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
@@ -197,7 +211,7 @@ To *disable AAF*, simply override the "aaf.enabled" value when deploying the hel
 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>`_