Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
set -e
export KPT_VERSION='v0.33.0'
export APIGEE_CTL_VERSION='1.3.2'
OS_NAME=$(uname -s)
if [[ "$OS_NAME" == "Linux" ]]; then
echo "🐧 Using Linux binaries"
export APIGEE_CTL='apigeectl_linux_64.tar.gz'
export ISTIO_ASM_CLI='istio-1.5.9-asm.0-linux.tar.gz'
export KPT_BINARY='kpt_linux_amd64_0.33.0.tar.gz'
elif [[ "$OS_NAME" == "Darwin" ]]; then
echo "🍏 Using macOS binaries"
export APIGEE_CTL='apigeectl_mac_64.tar.gz'
export ISTIO_ASM_CLI='istio-1.5.9-asm.0-osx.tar.gz'
export KPT_BINARY='kpt_darwin_amd64_0.33.0.tar.gz'
echo "💣 Only Linux and macOS are supported at this time. You seem to be running on $OS_NAME."
exit 2
echo "Verifying prerequisites..."
kubectl version
tar --help
openssl version
gcloud auth list
mkdir /tmp/hybrid
pushd /tmp/hybrid
echo "🏗️ Downloading Anthos Service Mesh..."
mkdir -p ./tools/istio-asm
curl -L -o ./tools/istio-asm/istio-asm.tar.gz "${ISTIO_ASM_CLI}"
tar xzf ./tools/istio-asm/istio-asm.tar.gz -C ./tools/istio-asm
mv ./tools/istio-asm/istio-*/* ./tools/istio-asm/.
mkdir -p ./tools/kpt
echo "🏗️ Downloading KPT..."
curl -L -o ./tools/kpt/kpt.tar.gz "${KPT_VERSION}/${KPT_BINARY}"
tar xzf ./tools/kpt/kpt.tar.gz -C ./tools/kpt
export APIGEECTL_HOME=$PWD/tools/apigeectl/apigeectl_$APIGEE_CTL_VERSION
mkdir -p ./tools/apigeectl
echo "🏗️ Downloading Apigee Hybrid CLI (apigeectl)..."
curl -L \
-o ./tools/apigeectl/apigeectl.tar.gz \
tar xvzf ./tools/apigeectl/apigeectl.tar.gz -C ./tools/apigeectl
rm ./tools/apigeectl/apigeectl.tar.gz
mv ./tools/apigeectl/apigeectl_*_64/* $APIGEECTL_HOME
rm -fd ./tools/apigeectl/apigeectl_*_64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment