Requirements

The following items need to be setup for the Playground cluster deployment on GCP:

Deployment steps

0. Create GCS bucket for state

$ gsutil mb -p ${PROJECT_ID} gs://state-bucket-name
$ gsutil versioning set on gs://state-bucket-name

1. Create new environment

To provide information about the terraform backend, run the following commands

  • New environment folder
mkdir /path/to/beam/playground/terraform/environment/{env-name}
  • Backend config
echo 'bucket = "put your state bucket name here"' > /path/to/beam/playground/terraform/environment/{env-name}/state.tfbackend
  • Terraform variables config and provide necessary variables
touch /path/to/beam/playground/terraform/environment/{env-name}/terraform.tfvars

Then provide necessary variables.

2. Provision infrastructure

To deploy Playground infrastructure run gradle task:

./gradlew playground:terraform:InitInfrastructure -Pproject_environment="env-name"

3. Deploy application

To deploy application run following steps:

  • Authinticate in Artifact registry
gcloud auth configure-docker us-central1-docker.pkg.dev
  • Š’eploy backend services
./gradlew playground:terraform:deployBackend -Pproject_environment="env-name" -Pdocker-tag="tag"
  • Deploy frontend service
./gradlew playground:terraform:deployFrontend -Pproject_environment="env-name" -Pdocker-tag="tag" ```