Upgrading
Local Edition Cluster from 5.5.0 to 5.5.1 for Kubernetes in Untethered mode
The following section provides information on upgrading
Local Edition cluster from version 5.5.0 to 5.5.1 for Kubernetes in untethered mode.
Prerequisites
Local Edition 5.5.1 images must be built and pushed to the desired registry for deployment.
The volumes for
tml-nosql,
tml-logtml-cacheare reused, so while doing upgrade the number of these pods must be consistent with the earlier version.
The customization done to the JSON properties files at
docker-deploy/properties/*.json in earlier version must be ported to 5.5.1.
Admin must generate the manifest deployment folder, namely the
manifest-single-zone, as per the deployment topology for version 5.5.1 by running the
compose command.
Note:
The following procedure is applicable for single and multi zone clusters.
Some traffic disruptions are expected during upgrade. To minimize disruptions, upgrade theLocal Edition components sequentially, explained as follows.
Procedure
Undeploy and redeploy
NoSQL components.
Remove running
Local Edition 5.5.0 NoSQL container. Run the following command.
For single-zone deployment:
./undeploy-nosql-pod.sh
Deploy
Local Edition 5.5.1 NoSQL containers. Run the following command.
For single-zone deployment:
./deploy-nosql-pod.sh
Undeploy and redeploy
Log components.
To remove running
Local Edition 5.5.0 Log container, run the following command.
For single-zone deployment:
./undeploy-log-pod.sh
To deploy
Local Edition 5.5.1 Log containers for single-zone deployment, run the following command.
./deploy-log-pod.sh
Undeploy and redeploy
CM components.
To remove running
Local Edition 5.5.0 CM container, run the following command.
./undeploy-cm-pod.sh
To deploy
Local Edition 5.5.1 CM containers, run the following command.
./deploy-cm-pod.sh
Undeploy and redeploy
SQL components.
Dump MySQL Data from the cluster created in the earlier version. Login to any
tml-sql pod running in the earlier cluster.
kubectl exec -it mysql-set-0-0 -- /bin/bash
To dump MySQL data, run the following command. Update the MySQL password for the cluster.
Note: In case duplication of data occurs then redo the MySQL data dump by ignoring the duplicate entries. The following are few cases where duplication of entries is observed.
kubectl delete pvc $(kubectl get pvc -o=jsonpath='{.items[?(@.metadata.labels.app=="mysql-svc")].metadata.name}')l
Deploy
Local Edition 5.5.1 SQL containers. Run the following command.
For single zone deployment:
./deploy-sql-pod.sh
Copy the MySQL data from 5.5.0 cluster in the 5.5.1 cluster.
Run the following command to copy MySQL data file to any tml-sql pod in TML 5.5.0 cluster
kubectl cp mash_data.sql mysql-set-0-0:/tmp
Clear the MySQL data in the 5.5.0 cluster.
In the 5.5.0 cluster, login to thetml-sql pod where the MySQL data file was copied.
kubectl exec -it mysql-set-0-0 -- /bin/bash
To clear data in MySQL:
mysql -u root -p'changeme' -Nse 'show tables' masherysolar | sed -r 's/\b(area_config|areas|package_key_audit_log)\b//g' | sed '/^$/d' | while read table; do mysql -u root -p'changeme' -e "truncate table $table" masherysolar; done
Import MySQL data dumped from the 5.5.0 cluster to the 5.5.1 cluster.
Run the following command in each
tml-sql pod in the new cluster.
mysql -u root -p'changeme' masherysolar < /tmp/mash_data.sql
Undeploy and redeploy
Cache components.
Remove running
Local Edition 5.5.0 Cache container.
For single zone undeployment:
./undeploy-cache-pod.sh
To deploy the
Local Edition 5.5.1 Cache container, run the following command.
./deploy-cache-pod.sh
Undeploy and redeploy
TM components.
Remove running
Local Edition 5.5.0 TM container.
For single zone undeployment:
./undeploy-tm-pod.sh
To deploy
Local Edition 5.5.1 TM container, run the following command.
./deploy-tm-pod.sh
Optional. This step is applicable if reporting pod is deployed. Undeploy and redeploy
Reporting components.
Remove running
Local Edition 5.5.0 TM container.
For single zone undeployment:
./undeploy-reporting-pod.sh
To deploy 5.5.1 TM container, run the following command.