Upgrading Local Edition cluster from 5.0 to 5.4.1

The Local Edition cluster can be upgraded from a version 5.0 to version 5.4.1. The upgrade is not an in place upgrade.

A new cluster for version 5.4.1 must be created and then the existing configuration data namely services, packages, plans and other such data can be migrated from version 5.0 cluster to a 5.4.1 cluster using the Configuration Migration Tool.

Prerequisites

  • TheLocal Edition 5.4.1 cluster must be created.
  • Keep the cluster of version 5.0 running until migration of version 5.4.1 is complete.
The TIBCO Cloud™ API Management - Local Edition Configuration Migration Tool is bundled as tml-config-migration.tar.gz, which can be located inside the tml-upgrade folder after extracting theLocal Edition installer distribution. Extracting tml-config-migration.tar.gz results in the following files:
  • export.sh
  • import.sh
  • config-migration-jar-with-dependencies.jar

Running the Migration

  1. Copy the export.sh file from your machine into the MySQL pod of the running Local Edition 5.0 cluster.

    If the Local Edition 5.0 cluster is in Kubernetes:

    1. Use the following command to copy the file to the MySQL pod:
      kubectl cp export.sh mysql-set-0-0:/home/builder/
    2. Use the Kubectlx Exec command to access the MySQL pod using the following command:
      kubectl exec -it mysql-set-0-0 /bin/bash
    3. Locate the export.sh file at the default location (home/builder/), then run the following command:
      ./export.sh

      This produces the export.tar.gz file, which contains all of the exported .csv files and a manifest file.

    If Local Edition 5.0 is in Docker Swarm:

    1. Get the container ID of the tmgc-sql container and copy export.sh to it at the default location:
      docker cp export.sh <sql-container-id>:/home/builder
    2. Use the Docker Exec command to access the tml-sql container:
      docker exec -it <sql-container-id> /bin/bash
    3. Locate the export.sh file at the default location (home/builder/), then run the following command:
      ./export.sh

    This produces the export.tar.gz file, which contains all of the exported .csv files and a manifest file.

  2. Download the export.tar.gz file from the Kubernetes/Swarm pod to your machine.
    1. If in a Kubernetes environment, use the following command to copy the file on your machine's current working directory:
      kubectl cp mysql-set-0-0:/home/builder/export.tar.gz .
    2. If in a Docker Swarm environment, use the following command to copy the file on your machine's current working directory:
      docker cp <sql-container-id>:/home/builder/export.tar.gz .
  3. Copy the export.tar.gz, import.sh, and config-migration-jar-with-dependencies.jar files from your machine to the new 5.4.1 MySQL pod.
    Note: The MySQL pod must be ACTIVE.

    For more information, see the Validating the Local Edition Cluster topic in the TIBCO Cloud™ API Management -Local Edition Installation and Configuration Guide.

    Installation and Configuration Guide

    If in a Kubernetes environment, use the following commands:

    kubectl cp export.tar.gz mysql-set-0-0:/home/builder/
    kubectl cp import.sh mysql-set-0-0:/home/builder/
    kubectl cp config-migration-jar-with-dependencies.jar mysql-set-0-0:/home/builder/

    If in a Docker Swarm environment, use the following commands:

    docker cp export.tar.gz <sql-container-id>:/home/builder
    docker cp import.sh <sql-container-id>:/home/builder
    docker cp config-migration-jar-with-dependencies.jar <sql-container-id>:/home/builder
    
  4. Copy your latest and updated data.zip file, which is also in the MySQL container, to the same location as the other files.

    If in a Kubernetes environment, use the following command:

    kubectl cp data.zip mysql-set-0-0:/home/builder/

    If in a Docker Swarm environment, use the following command:

    docker cp data.zip <sql-container-id>:/home/builder
    Note: If both your source and destination environments are Kubernetes, ensure that you configure kubectl per both environments.
  5. Import into Local Edition 5.4.1.
    1. Log into the MySQL pod. All of the copied files in this step should be present at the default login location (/home/builder/ in this case).

      If in a Kubernetes environment, use the following command:

      kubectl exec -it mysql-set-0-0 /bin/bash

      If in a Docker Swarm environment, use the following command:

      docker exec -it <sql-container-id> /bin/bash
    2. Run the following command:
      ./import.sh
  6. When the import has successfully completed, verify that all the data has been migrated successfully using the 5.4.1 Local Edition Configuration Manager. All of the services, packages, plans, applications, and so on should appear in their appropriate sections.
  7. Use the docker exec/kubectl exec command to access the cache pod and run the following command to load configuration data into cache so that traffic calls can be made without delay.
    /opt/javaproxy/proxy/cacheloader --service --mapi --devclass --packager --httpsclientsecurity --env production --verbose