Upgrading Local Edition cluster from 5.3.1 to 5.4.1 for Kubernetes in Tethered Mode

The following section provides information on upgrading Local Edition cluster from version 5.3.1 to 5.4.1 for Kubernetes.

Note: The following steps are applicable to Kubernetes environment in tethered mode and Local Edition 5.3.1 HF 2.

Prerequisites

  • Local Edition 5.4.1 images must be built and pushed to the desired registry for deployment.
  • For customization done to the JSON properties files in previous versions, the deployment scripts of Local Edition 5.4.1 must include these previously customized values.
  • An admin must generate the manifest deployment folder, namely the manifest-single-zone, as per the deployment topology for version 5.4.1 by running the compose command.
Note: Some traffic disruptions are expected during upgrade. To minimize disruptions, upgrade the Local Edition components sequentially, explained as follows.

Procedure

  1. Upgrade NoSQL container. Run the upgrade scripts inside the container.
    1. Upgrade NoSQL container using the migrate_nosql_from_5.3.1_to_5.4.1.sh file. Contact TIBCO support for this file.
    2. Run the migration script.
      chmod +x /root/migrate_nosql_from_5.3.1_to_5.4.1.sh
      Note: Ensure that the NoSQL container is running.
    3. Navigate to the NoSQL docker container and copy the migration script to the NoSQL container.
      kubectl cp /root/migrate_nosql_from_5.3.1_to_5.4.1.sh NOSQL_CONTAINER_ID:/usr/local/bin/migrate_nosql_from_5.3.1_to_5.4.1.sh
    4. Run the migration script to update Cassandra configuration.
      kubectl exec NOSQL_CONTAINER_ID /usr/local/bin/migrate_nosql_from_5.3.1_to_5.4.1.sh
  2. Undeploy and redeploy NoSQL container.
    1. For single zone undeployment:
      • ./undeploy-nosql-pod.sh
    2. To redeploy the container, run the following command.
      ./deploy-nosql-pod.sh
    The NoSQL container will be upgraded to 5.4.1.
  3. Undeploy and redeploy Log components.
    Remove running Local Edition 5.3.1 Log container.
    1. For single zone undeployment:
      • ./undeploy-log-pod.sh
    2. To redeploy the container, run the following command.
      ./deploy-log-pod.sh
    3. Run the following command after all the log pods have been successfully deployed.
      kubectl exec LOG_CONTAINER_ID chown -R td-agent:td-agent /mnt/log/td-agent
  4. Undeploy and redeploy CM components.
    Remove running Local Edition 5.3.1 CM container.
    1. For single zone undeployment:
      • ./undeploy-cm-pod.sh
    2. To redeploy the container, run the following command.
      ./deploy-cm-pod.sh
  5. Undeploy and redeploy SQL components.
    Remove running Local Edition 5.3.1 SQL container.
    1. For single zone undeployment:
      ./undeploy-sql-pod.sh
    2. Delete SQL persistent volumes, persistent volume claims, and storage classes of 5.3.1 cluster.
      • Get list of SQL persistent volumes and delete them.
        $ kubectl get pv | grep default/sqlvol
        pvc-07612b5f-ba8d-49dd-b87a-45bb66822735   10Gi       RWO            Delete           Bound    default/sqlvol-mysql-set-2-0     sql-storage-2              18h
        pvc-45bd1d23-1cde-4069-acf2-6a84790960e6   10Gi       RWO            Delete           Bound    default/sqlvol-mysql-set-1-0     sql-storage-1              18h
        pvc-a450f23a-e3bc-4618-8a85-ba1c34cf2d54   10Gi       RWO            Delete           Bound    default/sqlvol-mysql-set-0-0     sql-storage-0              18h
         
        Delete these PV 
        $ kubectl delete pv pvc-07612b5f-ba8d-49dd-b87a-45bb66822735 
        $ kubectl delete pv pvc-45bd1d23-1cde-4069-acf2-6a84790960e6 
        $ kubectl delete pv pvc-a450f23a-e3bc-4618-8a85-ba1c34cf2d54
        
      • Delete SQL persistent volume claims.
        $ kubectl get pvc | grep mysql
        sqlvol-mysql-set-0-0     Bound    pvc-4d2003fe-8b11-48f1-aa00-5604266feb02   10Gi       RWO            sql-storage-0     4d2h
        sqlvol-mysql-set-1-0     Bound    pvc-9eef5029-de94-4fd6-9402-b84f56fcaebb   10Gi       RWO            sql-storage-1     4d2h
        sqlvol-mysql-set-2-0     Bound    pvc-b0032295-5326-4b02-99b7-087cbffc63db   10Gi       RWO            sql-storage-2     4d2h
        Delete these PVC
        $ kubectl delete pvc sqlvol-mysql-set-0-0
        $ kubectl delete pvc sqlvol-mysql-set-1-0
        $ kubectl delete pvc sqlvol-mysql-set-2-0
      • Delete storage classes.
        $ kubectl delete sc sql-storage-0
        $ kubectl delete sc sql-storage-1
        $ kubectl delete sc sql-storage-2
    3. Note: This is an optional step. Reporting pod was introduced in 5.4.0 release.
      Create storage-classes-sql-reporting.yaml.

      Refer storage-classes-X.yaml in the 5.4.1 manifest folder, here X is zone number.

      kind: StorageClass
      apiVersion: storage.k8s.io/v1
      metadata:
        name: sql-storage-0
      provisioner: kubernetes.io/aws-ebs
      parameters:
        type: gp2
        zones: us-east-1a
      ---
      kind: StorageClass
      apiVersion: storage.k8s.io/v1
      metadata:
        name: sql-storage-1
      provisioner: kubernetes.io/aws-ebs
      parameters:
        type: gp2
        zones: us-east-1c
      ---
      kind: StorageClass
      apiVersion: storage.k8s.io/v1
      metadata:
        name: sql-storage-2
      provisioner: kubernetes.io/aws-ebs
      parameters:
        type: gp2
        zones: us-east-1d
      ---
      kind: StorageClass
      apiVersion: storage.k8s.io/v1
      metadata:
        name: reporting-storage-0
      provisioner: kubernetes.io/aws-ebs
      parameters:
        type: gp2
        zones: us-east-1a

      Create storage classes using the following command

      kubectl create -f storage-classes-sql-reporting.yaml
    4. To redeploy the container, run the following command.
      ./deploy-sql-pod.sh
  6. Undeploy and redeploy Cache components.
    Remove running Local Edition 5.3.1 Cache container.
    1. For single zone undeployment:
      • ./undeploy-cache-pod.sh
    2. To redeploy the container, run the following command.
      ./deploy-cache-pod.sh
  7. Undeploy and redeploy TM components.
    Remove running Local Edition 5.3.1 TM container.
    1. For single zone undeployment:
      • ./undeploy-tm-pod.sh
    2. Remove tm-svc service from 5.3.1 folder, run the following command.
      ./delete-tm-svs.sh
    3. Create tm-svc service in 5.4.1 folder, run the following command.
      ./set-tm-svs.sh
    4. Deploy 5.4.1 TM container, run the following command.
      ./deploy-tm-pod.sh