Nav

To Migrate Anypoint Platform Private Cloud Edition, Version 1.5.x to 1.6.1

This topic describes how to migrate from Anypoint Platform Private Cloud Edition version 1.5.x to version 1.6.1. These procedures are applicable to 1, 3, and 6 node installation.

During the migration process, there may be some downtime as each node is migrated.

Prerequisites

Before migrating, ensure that you have performed and met the following prerequisites:

  • Perform a backup of your system as described in About Backup and Recovery.

  • Ensure that your environment meets all of the system and network requirements described in About Minimum System Requirements

  • Enable TCP ports 5973, 3022, 7373 intra-node to enable communication with the database cluster.

  • Ensure you have permission to run the sudo command on the node where you launch the migration tool.

  • Ensure the kubectl command is available in the node where you are performing the migration. To verify that kubectl is installed, run the following:

    $ sudo gravity enter
    $ kubectl

Performing the Upgrade

  1. Obtain the anypoint-1.6.1-installer.tar.gz archive from your customer success representative.

  2. Determine the master node of your cluster.

    [ec2-user@ip-172-31-14-206 1.6.1]$ systemctl status | grep gravitational
               │     └─25249 grep --color=auto gravitational
                 ├─gravity__gravitational.io__teleport__1.2.0.service
                 ├─gravity__gravitational.io__planet-master__0.1.39-138.service
  3. Use ssh to login to the master node of your cluster.

  4. Upload the installer to the master node of your cluster.

  5. Uncompress the installer archive.

    mkdir anypoint-1.6.1
    tar -xzf anypoint-1.6.1-installer.tar.gz -C anypoint-1.6.1
  6. Navigate to the anypoint-1.6.1 directory, then run the upload script.

    cd anypoint-1.6.1
    sudo ./upload

    This command uploads data to the master node and performs internal updates.

    sudo ./upload
    /etc/container-environment: line 19: --exec-opt: command not found
    gravitational.io/gravity:3.62.0 imported: gravitational.io/gravity:3.62.0 93MB
    -> update old gravity packages with the new binary
    gravitational.io/gravity:1.25.0 deleted
    gravitational.io/gravity:1.25.0 imported: gravitational.io/gravity:1.25.0 93MB
    gravitational.io/gravity:1.25.0 labels updated
    gravitational.io/gravity:1.27.0 deleted
    gravitational.io/gravity:1.27.0 imported: gravitational.io/gravity:1.27.0 93MB
    gravitational.io/gravity:1.27.0 labels updated
    -> update gravity binary on all nodes
    daemonset "gravity-binary-update" created
    configmap "gravity-binary-update" created
    -> clean up gravity binary update resources
    daemonset "gravity-binary-update" deleted
    configmap "gravity-binary-update" deleted
    -> restart gravity site pods
    pod "gravity-site-0ablz" deleted
    pod "gravity-site-3thio" deleted
    pod "gravity-site-um5ry" deleted
    -> wait until gravity site is running
    -> upload the update
    new application anypoint 1.6.1 has been uploaded

    Depending on your network configuration, this command may take a while to complete. Wait until the command finishes before proceeding to the next step.

  7. Download the installation script and copy it to each node in your cluster.

    1. Download script from the following URL

      https://anypoint-anywhere.s3.amazonaws.com/1.6.1-GA/manual_update_161.sh?Signature=xTkDlF%2F1OKFYtjG2lXPZcuc2itY%3D&Expires=1536705930&AWSAccessKeyId=AKIAITTY5MSTT3INJ7XQ
    2. Copy the script to directory on the master node where you ran the ./upload.

    3. Copy script to the other nodes in your installation.

  8. Export RBAC bootstrap package.

    From the master node, run the following command:

    ./manual_update_161.sh export-rbac
  9. Scale down deployments

    From the master node, run the following command:

    ./manual_update_161.sh scale-down
  10. Initiate the update operation

    From the master node, run the following command:

    ./manual_update_161.sh start-update

    The output of this command should be similar to the following:

    ./manual_update_161.sh start-update
    Initiating the update process, setting it in manual mode
    updating anypoint from 1.5.2 to 1.6.1
    update operation (3f097853-64dd-4201-973f-2bb4a686c9ee) has been started
    
    The update operation has been created in manual mode.
  11. Bootstrap the system update process

    From the master node, run the following command:

    ./manual_update_161.sh bootstrap-system
  12. Peform the system update

    Perform the following command by logging into each node in your cluster. You must run this command sequentially on each node. Wait until this command completes before running it on the next node.

    ./manual_update_161.sh update-system

    The output of this command should be similar to the following:

    Updating the Gravity/Planet system on this node
    applying {gravitational.io/gravity:1.27.0 gravitational.io/gravity:3.62.0 }
    binary package gravitational.io/gravity:3.62.0 installed in /usr/bin/gravity
    applying {anypoint-5.6.2-3nodes-for-update/planet-ip-172-31-14-206.us-east-2.compute.internal-secrets:0.0.1 anypoint-5.6.2-3nodes-for-update/planet-172.31.14.206-secrets:0.0.1504292122 }
    secrets package anypoint-5.6.2-3nodes-for-update/planet-172.31.14.206-secrets:0.0.1504292122 installed in /var/lib/gravity/secrets
    applying {anypoint-5.6.2-3nodes-for-update/planet-config-1723114206anypoint-562-3nodes-for-update:0.0.1 anypoint-5.6.2-3nodes-for-update/planet-config-1723114206anypoint-562-3nodes-for-update:0.1.61-157 }
    applying {gravitational.io/planet-master:0.1.39-138 gravitational.io/planet-master:0.1.61-157 planet-config-1723114206anypoint-562-3nodes-for-update}
    gravitational.io/planet-master:0.1.39-138 is installed as a service, uninstalling
    gravitational.io/planet-master:0.1.61-157 successfully installed
    applying {gravitational.io/teleport:1.2.0 gravitational.io/teleport:2.0.6 }
    gravitational.io/teleport:1.2.0 is installed as a service, uninstalling
    gravitational.io/teleport:2.0.6 successfully installed
    system successfully updated: changeset(id=108cfd7f-997e-4656-b425-21557c261d8a, created=2017-09-01 18:58:33.894121128 +0000 UTC, changes=update(gravitational.io/gravity:1.27.0 -> gravitational.io/gravity:3.62.0), update(anypoint-5.6.2-3nodes-for-update/planet-ip-172-31-14-206.us-east-2.compute.internal-secrets:0.0.1 -> anypoint-5.6.2-3nodes-for-update/planet-172.31.14.206-secrets:0.0.1504292122), update(anypoint-5.6.2-3nodes-for-update/planet-config-1723114206anypoint-562-3nodes-for-update:0.0.1 -> anypoint-5.6.2-3nodes-for-update/planet-config-1723114206anypoint-562-3nodes-for-update:0.1.61-157), update(gravitational.io/planet-master:0.1.39-138 -> gravitational.io/planet-master:0.1.61-157), update(gravitational.io/teleport:1.2.0 -> gravitational.io/teleport:2.0.6))
  13. Bootstrap the RBAC configuration in the cluster

    From the master node, run the following command:

    ./manual_update_161.sh bootstrap-rbac
  14. Determine the name of each of your nodes using the following command:

    sudo gravity enter
    kubectl get nodes
  15. Exit the gravity shell

    exit
  16. Drain each of the nodes in your cluster.

    From the master node, run the following command one each node in your cluster. You must pass the nodename for each node.

    ./manual_update_161.sh drain=<node-name>

    The ouput of this command should be similar to the following:

    ./manual_update_161.sh drain=172.31.11.215
    Draining node 172.31.11.215
    node "172.31.11.215" cordoned
    WARNING: Ignoring DaemonSet-managed pods: cassandra-p4mjy, stolon-keeper-d2get, gravity-site-tgme5, kube-dns-v18-41u28, log-forwarder-ujp6d; Deleting pods not managed by ReplicationController, ReplicaSet, Job, DaemonSet or StatefulSet: bandwagon; Deleting pods with local storage: bandwagon-mulesoft-install-35afd2-ingx2, gravity-site-tgme5, monitoring-app-install-39664d-l7xo4, pithos-app-install-95fa7b-58flh, site-app-post-install-916df9-03pol, stolon-app-install-5480c4-v6n81
    pod "exchange-api-db-migration-q8itn" evicted
    pod "site-app-post-install-916df9-03pol" evicted
    pod "pithos-app-install-95fa7b-58flh" evicted
    ...
    ...
    ...

    Before continuing, ensure that all pods are in running or pending state. No pod should be in crashloopbackoff or terminating state.

  17. Make each of the nodes in your cluster is schedulable.

    From the master node, run the following command for each node in your cluster. You must pass the nodename for each node.

    ./manual_update_161.sh uncordon=<node-name>

    The output of this command should be similar to the following:

    ./manual_update_161.sh uncordon=172.31.11.215
    Uncordoning node 172.31.11.215
    node "172.31.11.215" uncordoned
    Proceed with the next node drain or by updating application resources by running 'manual_update_161.sh update-app'
    WARNING - before proceeding, please verify that the node is fully 'uncordoned', by checking the output
    of 'kubectl get nodes' from inside Gravity and wait the node to be 'Ready' again.
  18. From the master node, initiate the application update

    ./manual_update_161.sh update-app
  19. If you are upgrading a one node installation, fix the LDAP config directory permissions

    ./manual_update_161.sh fix-ldap
  20. Finalize and complete the update operation

    ./manual_update_161.sh finalize-update
  21. Update the health check on the load balancer.

    You must enable port 10248 for the load balancer health check.