11 software delivery problems solved by intelligence software delivery platform  Download
Select Page

Upgrading to OES 3.7 from 3.6 in 5 Easy Steps

Sudheendra Fadnis June 4, 2021
Share

Not using OES 3.7 features?

Sign up for SaaS Spinnaker free Trial today.

OpsMx Enterprise for Spinnaker (OES) 3.7 release has gained very good momentum with our prospects and customers.  As a part of OES 3.7, we have made OpsMx Intelligent Cloud- a SaaS Spinnaker; generally available.  Some of the salient features of the updated version are its enhanced capacity for traceability and observability, one-click policy enforcement and integration with new data source. Refer to the OES 3.7 release blog.

In this blog, we shall outline how to upgrade from OES 3.6 to OES 3.7 with 5 easy steps. 

Upgrading to OES 3.7 from 3.6 in 5 easy steps in just 20-30 minutes: 

To upgrade OES 3.6 to 3.7, these  five steps are  to be followed

  1. Take Backup of the existing system
  2. Prepare values.yaml for helm install/upgrade
  3. Delete certain elements from the previous installation
  4. Execute helm upgrade
  5. Upgrade DB and restart the application

Step-1: Take Backup

It is highly recommended to take a backup of the current environment before upgrading. Please follow the instructions here for backup.

Step-2: Prepare for helm installation

Download the values.yaml from given below link. 

wget https://github.com/OpsMx/standard-gitops-repo/blob/master/SAMPLES/values.yaml   

Update the values.yaml file by following instructions in gitOps Halyard installation (click here) and follow the guidelines from “Prepare Git Repo” and “Install OES/Prepare values.yaml” sections.

At this point, values.yaml is ready for use in helm based installation.

Step-3: Prepare the deployment environment

Delete k8s components as shown below: 

# kubectl delete sts create-controller-secret -n <NAMESPACE>

# kubectl delete secret git-token -n default

# kubectl delete secret local-spin-cli-config -n default

# kubectl delete configmap pipe-promot-config -n default

# kubectl delete configmap pipe-promot-scripts -n default

Note: If some of the objects are not present, that is ok. The error given by kubectl can be ignored in this case.

Step-4: Install OES 3.7

Execute the below command to access OES helm charts,

Add the repo and install 3.7

# helm repo add opsmx https://helmcharts.opsmx.com/

# helm repo update

# helm list -n oes   # this will print the Release name of previous installation 

Now start the upgradation with below instructions,

# helm upgrade --install <RELEASE NAME> opsmx/oes -f values.yaml -n oes --timeout=30m

Once the command is issued, wait for oes-platform pod to be ready state, as show below:

# kubectl get po | grep platform

oes-platform-7bfc64dbcf-5k85s                   1/1     Running     0          5m49s

Upgrade the DB

Go to the platform pod and execute db migration script as follows:

# kubectl exec -it oes-platform-xxxxxxxxxx-yyyyy -n oes -- bash

# cd datamigration

# ls -l

 -rw-r–r– 1 opsmx root 9510 May 22 07:23  migration_v3.6.x_to_v3.7.py

-rw-r–r– 1 opsmx root  601 May 22 07:23  steps-v3.6.xTO-V3.7-MigrationScript.txt

# cat steps-v3.6.xTO-V3.7-MigrationScript.txt

Ex: python3 migration_v3.6.x_to_v3.7.py admin http://oes-dashboard:8094 http://oes-sapor:8085 oes-db 5432 opsmx platformdb postgres networks123

Copy paste the example command given above:

# python3 migration_v3.6.x_to_v3.7.py admin http://oes-dashboard:8094 http://oes-sapor:8085 oes-db 5432 opsmx platformdb postgres networks123

Note: Change the username(postres) and password(networks123) with the username and password of the postgres database that the OES is configured with. The defaults would work in case these have not been changed.

After migration script run successfully, restart below OES components as follows:

# kubectl scale deploy -l app=oes --replaces=0

[wait for a few seconds]

# kubectl scale deploy -l app=oes --replaces=1

Check the Upgrade

Wait for all the OES pods to come to running state. Once ready, please logout and login to the OES UI and refresh all the pages. Confirm that all the data shows correctly.

Step-5: Roll back Instructions

In the unlikely event that the upgrade has failed and rollback is desired, please follow the instructions below.

Step 1: List the revisions of helm in namespace where OES is installed, default ns is oes

# helm history <release-name> -n <namespace>

It will list out the revisions and choose accordingly

example:

# helm history oes -n oes

REVISION UPDATED                 STATUS    CHART     APP VERSION DESCRIPTION

1       Mon May 24 15:22:57 2021 superseded oes-3.6.10 3.6.2      Install complete

2       Mon May 24 19:23:35 2021 deployed  oes-3.7.02 3.7.01     Upgrade complete

Step 2: Issue helm rollback command

# helm rollback <release-name> -n <namespace> <revision-number>

Example:

# helm rollback oes -n oes 1

Restore Database

Restore OES Postgres db as mentioned here.

By now  your OES 3.7 would be up and running.                                                   

Need Help ?

We provide hassle free , 24/7 support.

Iocn

Sudheendra Fadnis

Sudheendra Fadnis is a Technical Content Writer who delights in simplifying complex technical concepts to facilitate easier understanding for making business decisions. He is a voracious reader of non-fiction books, and also dabbles in poetry at times. He loves Western philosophy. He particularly likes the German philosopher Friedrich Nietzsche's philosophy.He is also a very active member of the literary clubs in the city of Hyderabad.

You May Like