Deploying the OAuth Token Migration Utility

Downloading the Utility

The OAuth Token Migration utility is part of the Mashery Local installer.

Create the /opt/mashery/migration/ directory where the migration utility will be deployed, using the following command:
$ mkdir /opt/mashery/migration/
Note: The following steps assume that the Mashery Local 5.x cluster has been created and configured.
Platform Steps
AWS K8 Cluster
  1. Login to the terminal from where you can access the pods.
  2. Once the cluster is up, install the migration utility:
    1. Identify the Cluster Manager container name:

    2. Copy the migration utility tar to Cluster Manager container:
      kubectl cp tml-token-migration-v1.0.0.tar.gz cm-deploy-0-6fcf4c44d-fv8vf:/opt/mashery/migration/
      
    3. Extract the tar and write/modify suitable configuration properties in tml-token-migration-v1.0.0/conf/config.properties:
      $ cd /op/mashery/migration
      $ tar -xvzf tml-token-migration-v1.0.0.tar.gz
    4. Edit config.properties:
      $ cd tml-token-migration-v1.0.0/conf
      $ vi config.properties
      Note: See the section OAuth Token Migration Configuration Properties for details of required configurations.
    5. Copy the exported data.tar archive to Cluster Manager container in order for this to be migrated to the destination (Cassandra):
      $ kubectl cp tokens.tar cm-deploy-0-6fcf4c44d-fv8vf:/opt/mashery/migration/
      $ tar -xvzf tokens.tar
AWS Docker Swarm Cluster Once the cluster is up, install the migration utility:
  1. Identify the Cluster Manager container name:

    Note: If the Cluster Manager container is running on a different node, repeat the previous step for every node (Master, etc.).
  2. Repeat the previous step, with this change in the command (kubectl should be replaced with docker), for example:
    docker cp tml-token-migration-v1.0.0.tar.gz b77fad139de0:/opt/mashery/migration/
    
  3. Create deployment folder and extract application tar.
    $ cd /op/mashery/migration
    $ tar -xvzf tml-token-migration-v1.0.0.tar.gz
  4. Edit config.properties:
    $ cd tml-token-migration-v1.0.0/conf
    $ vi config.properties
    Note: See the section OAuth Token Migration Configuration Properties for details of required configurations.
  5. Copy the exported data.tar archive to Cluster Manager container in order for this to be migrated to destination (Cassandra).
    $ docker cp tokens.tar b77fad139de0:/opt/mashery/migration/
    $ tar -xvzf tokens.tar
GCP K8 Cluster
  1. Login to the terminal from where you can access the pods.
  2. Once the cluster is up, install the migration utility:
    1. Identify the Cluster Manager container name:

    2. Copy the migration utility tar to Cluster Manager container:
      kubectl cp tml-token-migration-v1.0.0.tar.gz cm-deploy-0-6fcf4c44d-fv8vf:/opt/mashery/migration/
      
    3. Extract the tar and write/modify suitable configuration properties in tml-token-migration-v1.0.0/conf/config.properties:
      $ tar -xvzf tml-token-migration-v1.0.0.tar.gz
      $ cd tml-token-migration-v1.0.0/conf
      $ vi config.properties
    4. Edit config.properties:
      $ cd tml-token-migration-v1.0.0/conf
      $ vi config.properties
      Note: See the section OAuth Token Migration Configuration Properties for details of required configurations.
    5. Copy the exported data.tar archive to Cluster Manager container in order for this to be migrated to the destination (Cassandra):
      $ kubectl cp tokens.tar cm-deploy-0-6fcf4c44d-fv8vf:/opt/mashery/migration/
      $ tar -xvzf tokens.tar
GCP Docker Swarm Cluster Once the cluster is up, install the migration utility:
  1. Identify the Cluster Manager container name:

    Note: If the Cluster Manager container is running on a different node, repeat the previous step for every node (Master, etc.).
  2. Repeat the previous step, with this change in the command (kubectl should be replaced with docker), for example:
    docker cp tml-token-migration-v1.0.0.tar.gz b77fad139de0:/opt/mashery/migration/
    
  3. Create deployment folder and extract application tar.
    $ cd /op/mashery/migration
    $ tar -xvzf tml-token-migration-v1.0.0.tar.gz
  4. Edit config.properties:
    $ cd tml-token-migration-v1.0.0/conf
    $ vi config.properties
    Note: See the section OAuth Token Migration Configuration Properties for details of required configurations.
  5. Copy the exported data.tar archive to Cluster Manager container in order for this to be migrated to the destination (Cassandra):
    $ docker cp tokens.tar b77fad139de0:/opt/mashery/migration/
    $ tar -xvzf tokens.tar
Azure K8 Cluster
  1. Login to the terminal from where you can access the pods.
  2. Once the cluster is up, install the migration utility:
    1. Identify the Cluster Manager container name:

    2. Copy the migration utility tar to Cluster Manager container:
      kubectl cp tml-token-migration-v1.0.0.tar.gz cm-deploy-0-6fcf4c44d-fv8vf:/opt/mashery/migration/
      
    3. Extract the tar and write/modify suitable configuration properties in tml-token-migration-v1.0.0/conf/config.properties:
      $ tar -xvzf tml-token-migration-v1.0.0.tar.gz
      $ cd tml-token-migration-v1.0.0/conf
      $ vi config.properties
    4. Edit config.properties:
      $ cd tml-token-migration-v1.0.0/conf
      $ vi config.properties
      Note: See the section OAuth Token Migration Configuration Properties for details of required configurations.
    5. Copy the exported data.tar archive to Cluster Manager container in order for this to be migrated to the destination (Cassandra):
      $ kubectl cp tokens.tar cm-deploy-0-6fcf4c44d-fv8vf:/opt/mashery/migration/
      $ tar -xvzf tokens.tar
Azure Docker Swarm Cluster Once the cluster is up, install the migration utility:
  1. Identify the Cluster Manager container name:

    Note: If the Cluster Manager container is running on a different node, repeat the previous step for every node (Master, etc.).
  2. Repeat the previous step, with this change in the command (kubectl should be replaced with docker), for example:
    docker cp tml-token-migration-v1.0.0.tar.gz b77fad139de0:/opt/mashery/migration/
    
  3. Create deployment folder and extract application tar.
    $ cd /op/mashery/migration
    $ tar -xvzf tml-token-migration-v1.0.0.tar.gz
  4. Edit config.properties:
    $ cd tml-token-migration-v1.0.0/conf
    $ vi config.properties
    Note: See the section OAuth Token Migration Configuration Properties for details of required configurations.
  5. Copy the exported data.tar archive to Cluster Manager container in order for this to be migrated to the destination (Cassandra):
    $ docker cp tokens.tar b77fad139de0:/opt/mashery/migration/
    $ tar -xvzf tokens.tar
On-premises K8 Cluster
  1. Login to the terminal from where you can access the pods.
  2. Once the cluster is up, install the migration utility:
    1. Identify the Cluster Manager container name:

    2. Copy the migration utility tar to Cluster Manager container:
      kubectl cp tml-token-migration-v1.0.0.tar.gz cm-deploy-0-6fcf4c44d-fv8vf:/opt/mashery/migration/
      
    3. Extract the tar and write/modify suitable configuration properties in tml-token-migration-v1.0.0/conf/config.properties:
      $ tar -xvzf tml-token-migration-v1.0.0.tar.gz
      $ cd tml-token-migration-v1.0.0/conf
      $ vi config.properties
    4. Edit config.properties:
      $ cd tml-token-migration-v1.0.0/conf
      $ vi config.properties
      Note: See the section OAuth Token Migration Configuration Properties for details of required configurations.
    5. Copy the exported data.tar archive to Cluster Manager container in order for this to be migrated to the destination (Cassandra):
      $ kubectl cp tokens.tar cm-deploy-0-6fcf4c44d-fv8vf:/opt/mashery/migration/
      $ tar -xvzf tokens.tar
On-premises Docker Swarm Cluster Once the cluster is up, install the migration utility:
  1. Identify the Cluster Manager container name:

    Note: If the Cluster Manager container is running on a different node, repeat the previous step for every node (Master, etc.).
  2. Repeat the previous step, with this change in the command (kubectl should be replaced with docker), for example:
    docker cp tml-token-migration-v1.0.0.tar.gz b77fad139de0:/opt/mashery/migration/
    
  3. Create deployment folder and extract application tar.
    $ cd /op/mashery/migration
    $ tar -xvzf tml-token-migration-v1.0.0.tar.gz
  4. Edit config.properties:
    $ cd tml-token-migration-v1.0.0/conf
    $ vi config.properties
    Note: See the section OAuth Token Migration Configuration Properties for details of required configurations.
  5. Copy the exported data.tar archive to Cluster Manager container in order for this to be migrated to the destination (Cassandra):
    $ docker cp tokens.tar b77fad139de0:/opt/mashery/migration/
    $ tar -xvzf tokens.tar