Skip to content

Instantly share code, notes, and snippets.

@mikesparr
Created November 17, 2022 18:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikesparr/99bedfbb8d476d8c529547740ccabef3 to your computer and use it in GitHub Desktop.
Save mikesparr/99bedfbb8d476d8c529547740ccabef3 to your computer and use it in GitHub Desktop.
Project setup for an example Anthos deployment
#!/usr/bin/env bash
#####################################################################
# REFERENCES
# - https://cloud.google.com/anthos/docs/tutorials/explore-anthos
#####################################################################
export PROJECT_ID=$(gcloud config get-value project)
export PROJECT_USER=$(gcloud config get-value core/account) # set current user
export PROJECT_NUMBER=$(gcloud projects describe $PROJECT_ID --format="value(projectNumber)")
export IDNS=${PROJECT_ID}.svc.id.goog # workflow identity domain
export GCP_REGION="us-central1" # CHANGEME (OPT)
export GCP_ZONE="us-central1-a" # CHANGEME (OPT)
export NETWORK_NAME="default"
# enable apis
gcloud services enable compute.googleapis.com \
storage.googleapis.com \
deploymentmanager.googleapis.com \
runtimeconfig.googleapis.com \
servicemanagement.googleapis.com
# configure gcloud sdk
gcloud config set compute/region $GCP_REGION
gcloud config set compute/zone $GCP_ZONE
# project check
curl -sL https://github.com/GoogleCloudPlatform/anthos-sample-deployment/releases/latest/download/asd-prereq-checker.sh | sh -
# launch example
# Ref: https://console.cloud.google.com/marketplace/details/click-to-deploy-images/anthos-sample-deployment
@mikesparr
Copy link
Author

mikesparr commented Nov 17, 2022

Anthos Example

Google Cloud Platform's Anthos is a collection of services and Cloud Console features to enable management, configuration, monitoring of a fleet of Kubernetes Clusters (and now VMs) across GCP, AWS, Azure, and on premises.

This quick start allows you to spin up an example Anthos environment on a new GCP project in a few simple steps to try or demo

Features

Screenshot 2022-11-17 at 10 42 19 AM

Configuration Management

Screenshot 2022-11-17 at 10 42 01 AM

Security

Screenshot 2022-11-17 at 10 38 56 AM

Screenshot 2022-11-17 at 10 41 07 AM

Single Control Plane for all Kubernetes Clusters

Screenshot 2022-11-17 at 10 39 46 AM

Service Mesh (managed Istio + Dashboard)

The example deploys the Online Boutique e-commerce microservice demo to a cluster, and you can play around with the visualization features of Anthos Service Mesh (ASM).

Other features

  • Cloud Run (based on KNative, launch and manage serverless apps on any cluster)
  • Migrate (containerize legacy VM workloads and deploy to cluster)
  • VMs (create and manage virtual machines)

Setup

Simply follow the steps in the script above, and as described in the "REFERENCES" documentation, and in a single-click, everything will be set up like below

Configuration

Screenshot 2022-11-17 at 8 47 00 AM

Automated setup

Screenshot 2022-11-17 at 8 48 34 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment