AHR Hybrid Small or Large Topology 1.7 Profile - apigee/ahr GitHub Wiki

Using Profiles to Install GCP/GKE Predefined Hybrid Topologies

TODO:

[x] clean 1.6 out

[x] add gxlb script at the end

[/] check big topology

[/] update screenshots

The ahr-runtime-ctl install-profile <profile> asm-gcp command allows you to quickly provision small or large hybrid instance using one-liner invocation.

Simply use small or large value as a first positional parameter of the sub-command.

Properties of the profiles are summarised in a following table.

small large
single-zone cluster; single nodepool; 1 Cassandra node; minimal HA for Components multi-zone cluster;apigee-runtime and apigee-data nodepools; 3 Cassandra nodes; Production-grade HA for Components
Environment Variables hybrid-sz-s-1.7.sh hybrid-mz-l-1.7.shXXX
Cluster Template cluster-single-zone-one-nodepool-template.json cluster-multi-zone-two-nodepools-template.json
Runtime Config overrides-small-1.6-template.yaml overrides-large-1.6-template.yaml

Istio Operator Template: istio-operator-1.9-asm-gcp.yaml


To install chosen topology

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

export AHR_HOME=~/ahr
export PATH=$AHR_HOME/bin:$PATH
  1. [OPTIONAL: SKIP WHEN NOT SURE IF YOU NEED IT] 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.12.6-asm.3
  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. Configure Apigee Hybrid Version we want to install.

As per Hybrid release notes, there are minor.major and patch versions of the Hybrid versions. To set up a specific version, you need to configure a HYBRID_VERSION environment variable. This value will be persisted in the HYBRID_ENV source-able shell file.

This variable is optional. If you don't specify it, the ahr-runtime-ctl install-profile values will be used.

You can if you wish override HYBRID_HOME variable which is a directory where all install artefacts are create. If you don't, the default will be used, which is ~/apigee-hybrid-install

export HYBRID_VERSION=1.7.0
  1. Install a hybrid profile small

NOTE: A default behaviour of install-profile subcommand is to display installation options and ask for confirmation. To suppress the dialog, use --quiet option.

NOTE: Use large if you wish to provision a large topology.

ahr-runtime-ctl install-profile small asm-gcp

Some Useful screenshots

Small topology

Cluster Nodes:

Cluster Workloads:

Large topology

Cluster Nodes:

Cluster Workloads:

TODO:

To reset environment in a new session

source ~/apigee-hybrid-install/source.env

This is a 'shortcut' for:

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-1.6.1.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/$APIGEECTL_TARBALL | grep VERSION.txt | cut -d "/" -f 1)
export PATH=$APIGEECTL_HOME:$PATH

To import and deploy a ping proxy

source ~/apigee-hybrid-install/source.env

$AHR_HOME/proxies/deploy.sh

To execute a test request

  1. Run curl
curl --cacert $RUNTIME_SSL_CERT https://$RUNTIME_HOST_ALIAS/ping -v --resolve "$RUNTIME_HOST_ALIAS:443:$RUNTIME_IP" --http1.1
  1. Test Requst Debug snapshot:

To configure a GXLB and *.nip.io hostname

ahr-verify-ctl prereqs-install-yq

source ~/.profile

$AHR_HOME/bin/apigee-hybrid-gxlb-nip-io.sh

Sample Output:

...
# To Check certificate status:
kubectl describe managedcertificate apigee-ssl-cert -n istio-system

# To check ingress status:
kubectl describe ingress gke-ingress -n istio-system

# NOTE: it takes 8-15 minutes to provision a certificate

Test request:
curl https://12-34-56-789.nip.io/ping

To remove hybrid installation

ahr-runtime-ctl apigeectl delete -f $RUNTIME_CONFIG --all

To remove walkthrough-created objects

ahr-cluster-ctl delete

ahr-sa-ctl delete-sa

gcloud compute addresses delete runtime-ip --region=$REGION
⚠️ **GitHub.com Fallback** ⚠️