A Complete Guide to Deploying a Containerized Application Using Managed Instance Groups (MIGs) in Google Cloud (GCP) with Continuous Integration (CICD) — Part 1
In the first part of this guide, we will walk through setting up a high-availability low-cost solution capable of supporting multiple backend/frontends deployed to Google Cloud (GCP) using managed instance groups (MIGs), Cloud SQL, Cloud Storage, and GCP’s load balancer.
Scenario
We want to deploy a web application consisting of one or more frontends using a client side framework such as ReactJS which connects to one (or more) backends that have been containerized with Docker. Our backend will connect to a CloudSQL instance for storage and all environment variables will be encrypted with GCP’s Key Management Service (KMS). GIT commits to a specific branch on GitHub will trigger a build and deploy of the application. A load balancer will direct traffic and serve as a proxy for HTTPS using a managed certificate.
Pre-requisites
- You have access to GCP (including its command line tools: gcloud, gsutil) and have it configured to a new GCP project. All the code shown in this tutorial can be copied and pasted into the local command line tool (bash, etc).