From c90b1ed0de40349ff116437fe2d16e67a0c4d5a4 Mon Sep 17 00:00:00 2001 From: ktimoney Date: Thu, 30 Sep 2021 10:26:55 +0100 Subject: Added documentation for policy db-migrator Issue-ID: POLICY-3690 Change-Id: Icb1d0b931043f67a357fc8e5fc6c24a440c08f19 Signed-off-by: ktimoney --- docs/installation/oom.rst | 46 +++++++++++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 17 deletions(-) (limited to 'docs/installation') diff --git a/docs/installation/oom.rst b/docs/installation/oom.rst index 8485bb74..8e7c585d 100644 --- a/docs/installation/oom.rst +++ b/docs/installation/oom.rst @@ -50,6 +50,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 +71,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 -**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 - kubectl delete pv + .. 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 + kubectl delete pv - helm deploy dev-policy local/onap --namespace onap - kubectl get pods -n onap | grep dev-policy Restarting a faulty component ***************************** -- cgit 1.2.3-korg