Skip to content

AHR Hybrid Small topology 1.3 Profile

Yuriy Lesyuk edited this page Oct 9, 2020 · 27 revisions

To install small, single-zone topology and asm-gcp, using profiles

  1. Get ahr sources and set up AHR_HOME and PATH for ahr bin/ directory
git clone https://github.com/yuriylesyuk/ahr.git

export AHR_HOME=$PWD/ahr
export PATH=$AHR_HOME/bin:$PATH
  1. [OPTIONAL] If you want override an installation platform, default region and zone for a cluster location, as well as ASM version, define appropriate variable.

NOTE: Don't forget to either incorporate those values in the $HYBRID_ENV or re-apply them at the beginning of every new session.

export PLATFORM=${PLATFORM:-linux}  # linux | osx | win

export REGION=us-central1
export ZONE=us-central1-f

# export ASM_VERSION=1.5.10-asm.2
export ASM_VERSION=1.6.11-asm.1
  1. Set up PROJECT environment variable.

NOTE: Depending on which console session you're running and how, you may use different ways to set it up. $GOOGLE_CLOUD_PROJECT is populated when you open Terminal inside GCP Console window. Fro Qwiklabs project, you can use:

export PROJECT=$(gcloud projects list --filter='project_id~qwiklabs-gcp' --format=value'(project_id)')
gcloud config set project $PROJECT
export PROJECT=$(gcloud config get-value project)
echo $PROJECT
  1. Install a hybrid profile small
ahr-runtime-ctl install-profile $PROJECT small asm-gcp

To reset environment in a new session

export AHR_HOME=~/ahr
export PATH=$AHR_HOME/bin:$PATH

source $AHR_HOME/bin/ahr-completion.bash

export PROJECT=$(gcloud config get-value project)
export HYBRID_HOME=~/apigee-hybrid-install
export HYBRID_ENV=$HYBRID_HOME/hybrid-130.env
source $HYBRID_ENV

source <(kubectl completion bash)

export ASM_HOME=$HYBRID_HOME/istio-$ASM_VERSION
export PATH=$ASM_HOME/bin:$PATH

source $ASM_HOME/tools/istioctl.bash

export APIGEECTL_HOME=$HYBRID_HOME/$(tar tf $HYBRID_HOME/$HYBRID_TARBALL | grep VERSION.txt | cut -d "/" -f 1)
export PATH=$APIGEECTL_HOME:$PATH

To create a proxy

export PROJECT=$(gcloud config get-value project)
export HYBRID_HOME=~/apigee-hybrid-install
export HYBRID_ENV=$HYBRID_HOME/hybrid-130.env
source $HYBRID_ENV
$AHR_HOME/proxies/deploy.sh

To execute a test request

?. If in a new session, to repopulate environment variables, execute

export PROJECT=$(gcloud config get-value project)
export HYBRID_HOME=~/apigee-hybrid-install
export HYBRID_ENV=$HYBRID_HOME/hybrid-130.env
source $HYBRID_ENV

?. Run curl

curl --cacert $RUNTIME_SSL_CERT https://$RUNTIME_HOST_ALIAS/ping -v --resolve "$RUNTIME_HOST_ALIAS:443:$RUNTIME_IP" --http1.1
Clone this wiki locally