Upgrading Apigee hybrid

Upgrading to a new version

Follow these steps to upgrade Apigee hybrid to a new version:

Download and install a new version of apigeectl.

apigeectl is the command-line interface (CLI) for installing and managing Apigee hybrid in a Kubernetes cluster.

Download the version of apigeectl that you want to upgrade to:

  1. Download the release package for your operating system:

    Mac 64 bit:

    curl -LO \
        https://storage.googleapis.com/apigee-release/hybrid/apigee-hybrid-setup/version_number/apigeectl_mac_64.tar.gz

    Linux 64 bit

    curl -LO \
        https://storage.googleapis.com/apigee-release/hybrid/apigee-hybrid-setup/version_number/apigeectl_linux_64.tar.gz

    Mac 32 bit:

    curl -LO \
        https://storage.googleapis.com/apigee-release/hybrid/apigee-hybrid-setup/version_number/apigeectl_mac_32.tar.gz

    Linux 32 bit

    curl -LO \
        https://storage.googleapis.com/apigee-release/hybrid/apigee-hybrid-setup/version_number/apigeectl_linux_32.tar.gz
  2. Identify the base installation directory that was created when Apigee hybrid was originally installed. The base directory is directory in which the $APIGEEGTL_HOME directory resides. In the following example, the base directory is /Users/myhome/hybrid:

    echo $APIGEECTL_HOME
    /Users/myhome/hybrid/apigeectl
  3. Extract the downloaded gzip file contents into the Apigee hybrid base directory:

    tar xvzf filename.tar.gz -C path-to-base-directory
  4. cd to the base directory.
  5. The tar contents are, by default, expanded into a directory with the version and platform in its name. For example: ./apigeectl_1.2.0-f7b96a8_linux_64.

  6. Rename the current apigeectl directory. For example, if the current version is 1.1.1, rename the apigeectl directory to apigeectl_1.1.1.
  7. Rename the newly extracted installation directory to apigeectl. This is now where the environment $APIGEECTL_HOME points to.
  8. Clean up completed jobs for the hybrid runtime namespace, where namespace is the namespace specified in your overrides file, if you specified a namespace. If not, the default namespace is apigee:
    kubectl delete job -n namespace \
      $(kubectl get job -n namespace -o=jsonpath='{.items[?(@.status.succeeded==1)].metadata.name}')
  9. Clean up completed jobs for the apigee-system namespace:
    kubectl delete job -n apigee-system \
      $(kubectl get job -n apigee-system -o=jsonpath='{.items[?(@.status.succeeded==1)].metadata.name}')
  10. Clean up completed jobs for the istio-system namespace:
    kubectl delete job -n istio-system \
      $(kubectl get job -n istio-system -o=jsonpath='{.items[?(@.status.succeeded==1)].metadata.name}')
  11. cd to the ./hybrid-files directory:
  12. Initialize apigeectl for the new version:
    $APIGEECTL_HOME/apigeectl init -f my-overrides.yaml
  13. Check to determine when the initialization is complete:
    $APIGEECTL_HOME/apigeectl check-ready -f my-overrides.yaml
  14. When check-ready passes, run apigeectl apply:
    $APIGEECTL_HOME/apigeectl apply -f my-overrides.yaml
  15. Re-run check-ready to determine when the upgrade is complete.

Rolling back an upgrade

Follow these steps to roll back a previous upgrade:

  1. Clean up completed jobs:
    kubectl delete job -n namespace $(kubectl get job -n namespace -o=jsonpath='{.items[?(@.status.succeeded==1)].metadata.name}')
  2. In the root directory of the installation you want to roll back to, run apigeectl init and then run apigeectl apply:
      $APIGEECTL_HOME/apigeectl init -f my-overrides.yaml
      $APIGEECTL_HOME/apigeectl apply -f my-overrides.yaml