A Complete Guide to Deploying a Containerized Application Using Managed Instance Groups (MIGs) in Google Cloud (GCP) with Continuous Integration (CICD) — Part 1

Paulo Carvalho
8 min readFeb 19, 2020
Saturn V Rocket Engines by Good Free Photos

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

  1. 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).

--

--

Paulo Carvalho
Paulo Carvalho

Written by Paulo Carvalho

Want to chat about startups, consulting or engineering? Just send me an email on paulo@avantsoft.com.br.

No responses yet