Nav

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

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

To Perform the Upgrade

  1. Use ssh to login to one of the nodes of your cluster.

    Performing these procedures from a single node updates the entire platform.

  2. Obtain the anypoint-1.6.0-installer.tar.gz archive from your customer support representative.

  3. Uncompress the application archive.

    tar -xvf anypoint-1.6.0-installer.tar.gz
  4. Navigate to the anypoint-1.6.0 directory, then run the upload script.

    sudo ./upload

    This command updates the platform to the current version and restarts each pod in the cluster.

    $ sudo ./upload
    /etc/container-environment: line 19: --exec-opt: command not found
    new app package gravitational.io/anypoint:1.6.0 has been uploaded to the local site
    -> 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
    -> migrate db and restart gravity site pods
    pod "gravity-site-ks4tm" deleted
    pod "gravity-site-oemta" deleted
    pod "gravity-site-ss6nx" deleted
    -> wait until gravity site is running
    time="2017-04-04T22:05:21Z" level=info msg="setting state dir as /var/lib/gravity/local" file="gravity/main.go:1209" func=main.newLocalEnvironment
    time="2017-04-04T22:05:21Z" level=debug msg="got search paths: [/var/lib/gravity assets/local]" file="process/cfg.go:25" func=process.ReadConfig
    time="2017-04-04T22:05:21Z" level=debug msg="look up configs in /var/lib/gravity" file="process/cfg.go:35" func=process.ReadConfig
    time="2017-04-04T22:05:21Z" level=debug msg="/var/lib/gravity/gravity.yaml not found in search path" file="process/cfg.go:32" func=process.ReadConfig
    time="2017-04-04T22:05:21Z" level=debug msg="look up configs in assets/local" file="process/cfg.go:35" func=process.ReadConfig
    time="2017-04-04T22:05:21Z" level=debug msg="assets/local/gravity.yaml not found in search path" file="process/cfg.go:32" func=process.ReadConfig
    time="2017-04-04T22:05:21Z" level=info msg="BOLT: readonly /var/lib/gravity/local/gravity.db" file="keyval/bolt.go:122" func=keyval.newBolt
    time="2017-04-04T22:05:21Z" level=debug msg="\nERROR REPORT:\nOriginal Error: *trace.AlreadyExistsError database is already using new system account\nStack Trace:\n\t/gopath/src/github.com/gravitational/gravity/tool/gravity/migratetools.go:62 main.newMigrator\n\t/gopath/src/github.com/gravitational/gravity/tool/gravity/migratetools.go:17 main.migrate\n\t/gopath/src/github.com/gravitational/gravity/tool/gravity/main.go:858 main.run\n\t/gopath/src/github.com/gravitational/gravity/tool/gravity/main.go:55 main.main\n\t/go/src/runtime/proc.go:192 runtime.main\n\t/go/src/runtime/asm_amd64.s:2087 runtime.goexit\nUser Message: database is already using new system account\n" file="gravity/migratetools.go:21" func=main.migrate

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

  5. Ensure that all instances of the gravity component are running by entering the following command:

    $ sudo gravity enter
    $ kubectl get pods --namespace=kube-system

    This command displays output similar to the following:

    NAME                  READY     STATUS    RESTARTS   AGE
    bandwagon             1/1       Running   0          2h
    bandwagon-mulesoft    1/1       Running   0          2h
    grafana-pxsmy         1/1       Running   0          2h
    gravity-site-35wti    1/2       Running   0          5m
    gravity-site-asjda    2/2       Running   0          5m
    gravity-site-xm3vd    1/2       Running   0          4m
    heapster-gv4zl        1/1       Running   0          2h
    influxdb-r3foe        1/1       Running   0          2h
    kube-dns-v18-97jb8    3/3       Running   0          2h
    kube-dns-v18-lntzw    3/3       Running   0          2h
    kube-dns-v18-wvrgi    3/3       Running   0          2h
    log-collector-8kovo   1/1       Running   0          2h
    log-forwarder-9lpxk   1/1       Running   1          2h
    log-forwarder-eiaom   1/1       Running   1          2h
    log-forwarder-q536l   1/1       Running   1          2h
    Ensure that each of the gravity-site-* instances is running before proceeding to the next step.
  6. Login to the Ops Center, then click the Updates tab.

  7. Click Update to this version to update the Anypoint Platform.