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:
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.gzLinux 64 bit
curl -LO \ https://storage.googleapis.com/apigee-release/hybrid/apigee-hybrid-setup/version_number/apigeectl_linux_64.tar.gzMac 32 bit:
curl -LO \ https://storage.googleapis.com/apigee-release/hybrid/apigee-hybrid-setup/version_number/apigeectl_mac_32.tar.gzLinux 32 bit
curl -LO \ https://storage.googleapis.com/apigee-release/hybrid/apigee-hybrid-setup/version_number/apigeectl_linux_32.tar.gz- Identify the base installation directory that was created when Apigee hybrid
was originally installed. The
base directory is directory in which the
$APIGEEGTL_HOMEdirectory resides. In the following example, the base directory is/Users/myhome/hybrid:echo $APIGEECTL_HOME /Users/myhome/hybrid/apigeectl
-
Extract the downloaded gzip file contents into the Apigee hybrid base directory:
tar xvzf filename.tar.gz -C path-to-base-directory
cdto the base directory.-
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. - Rename the current
apigeectldirectory. For example, if the current version is 1.1.1, rename theapigeectldirectory toapigeectl_1.1.1. -
Rename the newly extracted installation directory to
apigeectl. This is now where the environment$APIGEECTL_HOMEpoints to. - 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}') - Clean up completed jobs for the
apigee-systemnamespace:kubectl delete job -n apigee-system \ $(kubectl get job -n apigee-system -o=jsonpath='{.items[?(@.status.succeeded==1)].metadata.name}') - Clean up completed jobs for the
istio-systemnamespace:kubectl delete job -n istio-system \ $(kubectl get job -n istio-system -o=jsonpath='{.items[?(@.status.succeeded==1)].metadata.name}') cdto the./hybrid-filesdirectory:- Initialize
apigeectlfor the new version:$APIGEECTL_HOME/apigeectl init -f my-overrides.yaml
- Check to determine when the initialization is complete:
$APIGEECTL_HOME/apigeectl check-ready -f my-overrides.yaml
- When
check-readypasses, runapigeectl apply:$APIGEECTL_HOME/apigeectl apply -f my-overrides.yaml
- Re-run
check-readyto determine when the upgrade is complete.
Rolling back an upgrade
Follow these steps to roll back a previous upgrade:
- Clean up completed jobs:
kubectl delete job -n namespace $(kubectl get job -n namespace -o=jsonpath='{.items[?(@.status.succeeded==1)].metadata.name}') - In the root directory of the installation you want to roll back to, run
apigeectl initand then runapigeectl apply:$APIGEECTL_HOME/apigeectl init -f my-overrides.yaml$APIGEECTL_HOME/apigeectl apply -f my-overrides.yaml