Upgrading Local Edition cluster from 5.4.0 to 5.4.1 for Docker Swarm

The following section provides information on upgrading Local Edition cluster from version 5.4.0 to 5.4.1 for Docker swarm.

The following steps are applicable to swarm environment in untethered mode.

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.
  • For Docker Swarm deployment, if host were pinned in older versions then the deployment scripts must be pinned to the same hosts for version 5.4.1.
  • Carry out the configurations as follows:

    Swarm: Configure the Docker client for communication with the manager node.

Note:
  • When redeploying container in the following procedure, execute the scripts from the 5.4.1 manifest deployment folder.
  • 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.4.0_to_5.4.1.sh file. Contact TIBCO support for this file.
    2. Make the migration script executable as follows:
      chmod +x /root/migrate_nosql_from_5.4.0_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.
      docker cp /root/migrate_nosql_from_5.4.0_to_5.4.1.sh NOSQL_CONTAINER_ID:/usr/local/bin
    4. Run the migration script to update Cassandra configuration.
      docker exec NOSQL_CONTAINER_ID /usr/local/bin/migrate_nosql_from_5.4.0_to_5.4.1.sh
  2. Undeploy and redeploy NoSQL container.
    1. For single zone undeployment:
      • docker stack rm nosqlstack
    2. For more than one NoSQL components, run the following command.
      • docker stack rm nosqlnonseedstack
    3. 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.
    1. Remove running Local Edition 5.4.0 Log container.
      • docker stack rm logstack
    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.
      docker exec LOG_CONTAINER_ID chown -R td-agent:td-agent /mnt/log/td-agent
  4. Undeploy and redeploy CM components.
    1. Remove running Local Edition 5.4.0 CM container.
      • docker stack rm cmstack
    2. To redeploy the container, run the following command.
      ./deploy-cm-pod.sh
  5. Undeploy and redeploy SQL components.
    1. Remove running Local Edition 5.4.0 SQL container.
      • docker stack rm sqlstack
    2. To redeploy the container, run the following command.
      ./deploy-sql-pod.sh
    3. Run the following command after the SQL pods have been successfully deployed.
      docker exec SQL_CONTAINER_ID chown -R mysql:mysql /var/lib/mysql
      docker exec SQL_CONTAINER_ID chmod 0751 /var/lib/mysql
  6. Upgrade SQL. Run the upgrade scripts inside the container.
    1. Upgrade SQL container.
      For single zone deployment:
      • docker exec -it <sql_container_id> bash
    2. Navigate to the scripts folder using cd /opt/mashery/scripts/ and run the following commands as applicable.
      For upgrading from 5.4.0:
      ./sql-upgrade.sh 5.4.0
    The SQL container will be upgraded to 5.4.1.
  7. Undeploy and redeploy Cache components.
    1. Remove running Local Edition 5.4.0 Cache container.
      • docker stack rm cachestack
    2. To redeploy the container, run the following command.
      ./deploy-cache-pod.sh
  8. Undeploy and redeploy TM components.
    1. Remove running Local Edition 5.4.0 TM container.
      • docker stack rm tmstack
    2. To redeploy the container, run the following command.
      ./deploy-tm-pod.sh