Skip to content

1.5.x to 1.6.x

Here are the detailed instructions to upgradee the self costed controller from v1.5.x to v1.6.x.

Prerequisites

Make sure all the pods are up and running in the existing controller. Check if all the clusters are healthy.


Existing Controller Backup

We need to take the backup of the existing controller to avoid losing the old data.

DB backup

From postgres pods

kubectl exec -it -n rafay-core postgres-admin-0 bash
su - postgres
pg_dumpall -U postgres > /home/postgres/preupgrade_allDB.sql

From the controller copy it into the backup location

mkdir ~/backups
kubectl cp -n rafay-core     postgres-admin-0:/home/postgres/preupgrade_allDB.sql ~/backups/preupgrade_allDB.sql

Secrets and Certificates backup

kubectl get secrets -A -o yaml > ~/backups/all_secrets.yaml
kubectl get certificates -A -o yaml > ~/backups/all_certificates.yaml

Take salt backup

Exec into the salt-master pod and backup the directories under it.

kubectl exec -it -n rafay-core <salt-master-pod> bash
kubectl cp -n rafay-core <salt-master-pod>:/etc/salt/pki ~/backups/salt-master

Upgrading the Controller

Once all the required files backup is complete, start upgrading the controller.

  • Click here to download the latest package for the upgrade

  • Untar the above tar package into the controller node and untar it

tar -xf rafay-controller-v1.6-1.22.tar.gz

  • Once untarring the package into the controller node, backup the old config file into a new one
  • Change the new config file with all the required changes as in the backed up config file
sudo mv ./radm /usr/bin/
$  mv config.yaml config.yaml-1-4-back
$  cp -rp config.yaml-tmpl config.yaml
$  vi config.yaml
$  diff -y config.yaml-1-4-back config.yaml
  • Upgrade the rafay dependencies

sudo radm dependency --config config.yaml

  • Wait until all pods are up and then upgrade the rafay application. This will take approximately 10 mins

kubectl get po -A

  • Upgrade the rafay Applications

sudo radm application --config config.yaml

  • Now delete the salt-master pod

kubectl delete pods -n rafay-core <salt-master>

  • Upgrade the cluster config

sudo radm cluster --config config.yaml

Post Upgrade Migrations

  • Clear all the browser cache, cookies
  • Login to the URL https://ops-console.<controller-FQDN> using the credentials passed in config.yaml under super-user section

  • After login, hit the below API which triggers the DB migrations

https://ops-console.<controller-FQDN>/edge/v1/migrations/

  • A plain screen without any error represents the migration is complete

Cluster Upgrade

  • Once the controller is upgraded, all existing clusters can be upgraded via using blueprint sync

  • Edit the blueprint which is used for the existing clusters

Upgrade

  • Create a new version of blueprint with the existing addons

Upgrade

  • Name the blueprint with a new version number

Upgrade

  • Trigger the blueprint sync from the cluster settings

Upgrade

  • Select the new version of the blueprint created above and publish

Upgrade

  • Once the Blueprint sync is complete, the cluster should be completely upgraded to v1.6