Giter Site home page Giter Site logo

google-notr-agones's Introduction

Reliable, Repeatable, and Scalable Multi-cloud Application deployments with Anthos

This repository contains all the code used in the Reliable, Repeatable, and Scalable Multi-cloud Application deployments with Anthos talk at Google Cloud: Next on the Road

Goals

This demo showcases how to use Anthos Config Management (ACM), specifically Config Sync, to deploy consistent configuration across Kubernetes clusters. These clusters can be in a single Cloud environment or span hybrid and multi-cloud environments.

All the infrastructure is stood up using Terraform. Once Terraform completes, ACM takes over to roll-out ArgoCD, Agones, cert-manager, and an NGINX ingress controller in all Kubernetes clusters spanning multiple clouds simultaneously.

Set Up

This demo requires that you have access to a GCP project with the following APIs enabled:

  • GKE Hub API
  • Anthos Config Management API
  • Anthos Multicloud API
  • GKE Connect API
  • Kubernetes Engine API

The terraform configurations below rely on user credentials for Azure, AWS, and GCP

Set up application default credentials for GCP:

gcloud auth application-default login

Login to the Azure CLI:

az login

Set up AWS Access Credentials:

export AWS_ACCESS_KEY_ID="<access key id>"
export AWS_SECRET_ACCESS_KEY="<secret access key>"

Deployment

Create a terraform.tfvars (Use the sample as a starting point)

cp terraform.tfvars.sample terraform.tfvars

Initalize Terraform to download all necessary modules and providers and initalize the backend.

terraform init

Apply the Terraform code to deploy Anthos Clusters in GCP, AWS and Azure cluster along with registering them with ACM to bootstrap the clusters with Agones.

terraform apply

output

Outputs:

generate_gke_credentials = "gcloud container clusters get-credentials agones-cluster --zone us-east1-b --project wlkrahdvd89pzclh9poereuzmb1axq"

Validate Deployment Status

Google provides a CLI tool called nomos which can be used to validate the status of Config Sync and ensure it has consolidated and applied the configuration successfully. nomos uses your kubeconfig to discover and authenticate against your clusters.

Retrieve GKE Credentials

Use the output generate_gke_credentials from the Terraform apply to add the credentials to your kubeconfig.

Retrieve Anthos on Azure Credentials

Use the output generate_azure_credentials from the Terraform apply to add the credentials to your kubeconfig.

Retrieve Anthos on AWS Credentials

Use the output generate_aws_credentials from the Terraform apply to add the credentials to your kubeconfig.

Using Nomos

nomos status

Accessing Gameservers

Once your cluster is synced, you can view your gameservers:

kubectl get gameservers

output

NAME                   STATE   ADDRESS         PORT   NODE             AGE
minetest-mt2ld-49qzw   Ready   35.231.211.56   7500   gke-agones-...   13s
minetest-mt2ld-676gk   Ready   34.138.86.152   7500   gke-agones-...   13s
minetest-mt2ld-xzq92   Ready   34.73.219.236   7500   gke-agones-...   13s

Download the Minetest client and launch it.

Enter an IP address and port number and click Register. Homescreen

Fill in a Name and Password and click Register to be launched into the game. Gameplay

google-notr-agones's People

Contributors

jacobmammoliti avatar jenn-charland avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.