This repository, is meant for provisioning a demo platform to showcase various aspects of Google Cloud as a complete architecture framework for deploying applications.
Code management (GitHub)
Google Cloud
Infrastructure as Code
Platform Tooling
To use this repository it is recommended that you first create a fork.
After creating a fork, there are a handful of quick bootrap scripts to get your repository up and running.
-
Setup specific environment variables unique to your GitHub Repository and Google Cloud Project. The script will request a couple inputs about the environment and output
./.envfiles with relevant variables.. ./scripts/bootstrap/01-setup-env.shinput(s): "Enter GitHub organization or owner [${_GITHUB_ORG}]: " "Enter GitHub repository name [${_GITHUB_REPO}]: " "Enter GCP project ID [${_GCP_PROJECT_ID}]: " "Enter default value region for this setup [${_GCP_LOCATION}]: " "Enter short (3-5 char) identifier for cloud resources (e.g. gcp) [$_GCP_CUSTOMER_ID]: "
output: ./.env
-
Enable applicable Google Cloud APIs
. ./scripts/bootstrap/02-enable-api.sh -
Enable GitHub Actions by setting up variables in forked repository. GitHub Actions leverages Workload Identity Federation for "keyless" authentication. In this setup we use Worklaod Identity Federation through a Service Account (
sa-terraform).. ./scripts/bootstrap/03-enable-gh-actions.sh -
Setup IAM permissions for Google Service Account
sa-terraformto deploy resources on our behalf.. ./scripts/bootstrap/04-enable-iam.sh -
Finally we will setup Terraform backend on Google Cloud Storage for when we start deploying our resources with Terraform through GitHub Actions.
. ./scripts/bootstrap/05-setup-tf.sh