Upgrading an Existing User Data Repository Deployment

For upgrading the UDR deployment, First DB schema upgrade should be done and then the helm upgrade should be performed.

Provisioning traffic should be stopped while the upgrade procedure is performed.

Upgrading DB Schema

You should install mysql-connector before upgrading the DB schema.

To upgrade DB schema:
  1. wget http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/p/python2-pip-8.1.2-7.el7.noarch.rpm		  
    		
  2. wget dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
  3. rpm -ivh epel-release-6-8.noarch.rpm 
    		
  4. yum install python-setuptools
  5. rpm -ivh python2-pip-8.1.2-7.el7.noarch.rpm
  6. pip install -U setuptools 
    		
  7. pip install -U wheel 
    		
  8. pip install mysql-connector-python-rf 
    		
  9. chmod +x upgrade.py
  10.  python upgrade.py

Use the script upgrade.py to upgrade to 1.3.0 schema using the following command. Modify username, password and db name in the script as per requirement.

Note:

Please view the Oracle Help Center site for the upgrade.py script.

Helm Upgrade

Upgrading an existing deployment replaces the running containers and pods with new ones. If there is no change in the pod configuration, it will not get replaced. Unless there is a change in the service configuration of a micro service, the service endpoints remains unchanged. For example, ClusterIP.
  • Extract the required OCUDR software components and if required, re-tag and push the images to user's repository. For more information, see Deploying Cloud Native User Data Repository.
  • Create a backup of the ocudr-values.yaml file before changing any configuration.
  • Modify the ocudr-custom-values-1.3.0.yaml file as per site requirement. For more information on updating the ocudr-custom-values-1.3.0.yaml file, see Deploying Cloud Native User Data Repository.

Run the following command to upgrade an existing User Data Repository deployment. For the parameters that can be configurable, see Customizing User Data Repository.

$ helm upgrade <release> <helm chart> [--version <OCUDR version>] -f <ocudr-custom-values-1.3.0.yaml>
 
<release> could be found in the output of 'helm list' command
<chart> is the name of the chart in the form of <repository/ocudr> e.g. reg-1/ocudr or cne-repo/ocudr

Rollback Instructions

Use the following command to check if the pods are successfully started.

kubectl get pods -n <namespace_name>

If there are issues that cannot be recovered on checking logs and describe on pods, rollback using these steps below:

Schema Rollback:
  1. Rollback schema to 1.0.0
  2. Downgrade to 1.1.0 schema using the rollback.py script , modify username, password and db name as per requirement.

    python rollback.py

Note:

Please view the Oracle Help Center site for the rollback.py script.
Image Rollback using Helm:
  1. Use the backed up customized 1.0.0 version's ocudr-values.yaml file to rollback to previous version.
  2. Run the helm rollback command.

    helm rollback <helm release name> <revision_no>

    To obtain the revision number, run the following command :

    helm history <helm release name>