App in a Box - BasicLB

App in a Box is a series of applications that are prebuilt and architected to demonstrate common application architectures and share projects that can repurposed to support your needs. Each one just requires one command to run and when the process is done, a fully function version of the app is available and running, ready to use or modify.

BasicLB

BasicLB is a simple infrastructure building script that sets up a cluster of VMs and puts a Load Balancer in front of them to expose publically:

  • Compute - VMs - Compute Engine
  • Compute - Cluster - Managed Instance Group
  • Compute - Machine Template - Instance Template
  • Networking - Load Balancing - Cloud Load Balancer

Example sets up a simple static HTML site using NGINX, and load balances across your cluster.

Get Started

Click on the link below to a copy of the source code in Cloud Shell. Once there, a single command will spin up a workng copy of the application in your project.

Open in Cloud Shell

Also feel free to review the source code directly in github.

View source code

Learn More

Use the links below to get more information on the piece we used in this Application. Choose how you learn best: video, product documentation, or interactive walkthrough.

Infrastructure

Compute Engine

Compute Engine is Google Cloud's Virtual technology. With it you can spin up many different configurations of VM to fit the shape of whatever computing needs you have.

Cloud Load Balancing

Google Cloud Load Balancer allows you to place a load balancer in front of the Storage Bucket - allowing you to use SSL certificates, Logging and Monitoring.

Scripts

The install script uses the gcloud and gsutil CLI tools to take an empty project and install the application in it. The output should be a working application and a url to the Cloud Run service for the front end.

./install