Jump to content
  • Upgrading to TIBCO API Management - Local Edition 5.6.0 Kubernetes from 5.5.0 K8S cluster (Untethered)


    Mrunal Rajendra Sul

    https://confluence.tibco.com/pages/viewpage.action?pageId=280003969

    Prerequisites:

    •  Mashery Local 5.6.0 images must be built and pushed to the desired registry for deployment.
    • The volumes for tml-nosql, tml-sql, tml-log, tml-cache are reused, so while doing upgrade customer should maintain same number of tml-nosql, tml-sql, tml-log, tml-cache pods configured as the previous release (so all previous volumes will be reused accordingly)
    •  The customizations done to the properties files (docker-deploy/properties/*.json) in previous versions must be ported to Mashery Local 5.6.0. For example, tml_papi_properties.json in 5.5.0 has the same structure as 5.6.0, the customized tml_papi_properties.json in 5.5.0 can be copied to 5.6.0.

    •  An admin must generate the manifest deployment folder, namely the manifest, as per the deployment topology for version 5.6.0 by running the compose command.

    Note:

    • Steps applicable for both Single and Multi zone clusters. Some traffic disruptions are expected during upgrade. To minimize disruptions, upgrade the Mashery Local components sequentially, explained as follows.

    1) Undeploy and redeploy NoSQL components:

    a) Remove running Mashery Local 5.5.0 NoSQL container. Run the following command: 

    For single-zone deployment:

    ./undeploy-nosql-pod.sh

     

    b) Deploy Mashery Local 5.6.0 NoSQL containers. Run the following command:

    ./deploy-nosql-pod.sh

     

    2) Undeploy and redeploy Log components:

    a) Remove running Mashery Local 5.5.0 Log container. Run the following command.

    For single-zone deployment:

    ./undeploy-log-pod.sh

     

    b) Deploy Mashery Local 5.6.0 Log containers. Run the following command.

    For single-zone deployment:

    ./deploy-log-pod.sh

     

    3) Undeploy and redeploy CM components:

    a) Remove running Mashery Local 5.5.0 CM container. Run the following command.

    For single-zone deployment:

    ./undeploy-cm-pod.sh

     

    b) Deploy Mashery Local 5.6.0 CM containers. Run the following command.

    For single-zone deployment:

    ./deploy-cm-pod.sh

     

    4) Undeploy and redeploy SQL components:

     

    Please use steps mentioned in below page to migrate SQL data from TML 5.5.0 cluster to TML 5.6.0 Cluster.

     

    Dump MySQL Data from TML 5.5.0 Cluster

     

    Login to any tml-sql pod running in TML 5.5.0 cluster, i.e.

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

    Run the following command to dump MySQL data (update MySQL password for your cluster):

    mysqldump --no-create-info --complete-insert --single-transaction -u root -p'changeme' --ignore-table=masherysolar.areas --ignore-table=masherysolar.package_key_audit_log --ignore-table=masherysolar.application_audit_log --set-gtid-purged=OFF masherysolar > /tmp/mash_data.sql

    Note:

    • If "Duplicate entry" error occurs when importing data to the new cluster, find the table where "Duplicate entry" occurs, prepare MySQL dump data again by ignoring that table.
    • Here is list of tables which could cause "Duplicate entry" error

    masherysolar.member_activity_log
    masherysolar.member_audit_log

    masherysolar.member_role_audit_log
    masherysolar.method_override_audit_log
    masherysolar.migration_log

    • Copy MySQL data file to your host, i.e.

    kubectl cp mysql-set-0-0:/tmp/mash_data.sql mash_data.sql

    a) Remove running Mashery Local 5.5.0 SQL container. Run the following command.

    For single-zone deployment:

    ./undeploy-sql-pod.sh

     

    Note: Please delete SQL pvc after undeploying the SQL pod.

    kubectl delete pvc $(kubectl get pvc -o=jsonpath='{.items[?(@.metadata.labels.app=="mysql-svc")].metadata.name}')

     

    b) Deploy Mashery Local 5.6.0 SQL containers. Run the following command.

    For single-zone deployment:

    ./deploy-sql-pod.sh

     

    Copy MySQL Data  dumped from TML 5.5.0 Cluster to TML 5.6.0 Cluster

     

    Run the following command to copy MySQL data file to any tml-sql pod in TML 5.6.0 cluster:

    kubectl cp mash_data.sql mysql-set-0-0:/tmp

    Clear MySQL Data in TML 5.6.0 Cluster

    In TML 5.6.0 cluster, login to the tml-sql pod  where the MySQL data file is copied to, i.e.

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

    Run the following command to clear data in MySQL:

    mysql -u root -p'changeme' -Nse 'show tables' masherysolar | sed -r 's/\b(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 TML 5.5.0 Cluster to TML 5.6.0 Cluster

     

    In the tml-sql pod where the MySQL data file is copied to, run the following command to import MySQL data dumped from TML 5.5.0 cluster to TML 5.6.0 cluster:

    mysql -u root -p'changeme' masherysolar < /tmp/mash_data.sql

    5) Undeploy and redeploy Cache components:

     

    a) Remove running Mashery Local 5.5.0 Cache container. Run the following command.

    For single-zone deployment:

    ./undeploy-cache-pod.sh

     

    b) Deploy Mashery Local 5.6.0 Cache containers. Run the following command.

    For single-zone deployment:

    ./deploy-cache-pod.sh

    6) Undeploy and redeploy TM components:

     

    a) Remove running Mashery Local 5.5.0 TM container. Run the following command.

    For single-zone deployment:

    ./undeploy-tm-pod.sh

     

    b) Deploy Mashery Local 5.6.0 TM containers. Run the following command.

    For single-zone deployment:

    ./deploy-tm-pod.sh

    7) Undeploy and redeploy Reporting components (Optional: If reporting pod is deployed):

     

    a) Remove running Mashery Local 5.5.0 TM container. Run the following command.

    For single-zone deployment:

    ./undeploy-reporting-pod.sh

     

    b) Deploy Mashery Local 5.6.0 TM containers. Run the following command.

    For single-zone deployment:

    source deploy-reporting-pod.sh "<zone-name>"


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...