This config uses the gcp/cloudrun module to define a CI environment to run TesseraCT on Cloud Run, backed by Tessera.
At a high level, this environment consists of:
- One Spanner instance with two databases:
- one for Tessera
- one for antispam
- A GCS Bucket
- Secret Manager
- Cloud Run
This GCP TesseraCT conformance CI environment is designed to be deployed by the Cloud Build (OpenTofu module, Terragrunt configuration).
First authenticate via gcloud as a principal with sufficient ACLs for
the project:
gcloud auth application-default loginSet the required environment variables:
export GOOGLE_PROJECT={VALUE}
export GOOGLE_REGION={VALUE} # e.g: us-central1
unset TESSERA_BASE_NAMEYou need an Artifact Registry repository to store container images; adapt the
configs and commands below to use your registry of choice. The rest of these
instructions assume that the repository is hosted on GCP, and called
${GOOGLE_REGION}-docker.pkg.dev/${GOOGLE_PROJECT}/docker-ci. For reference,
here's a OpenTofu module you can
use to set up such a registry.
Build and push the Docker image to Artifact Registry repository:
gcloud auth configure-docker ${GOOGLE_REGION}-docker.pkg.dev
docker build -f ./cmd/tesseract/gcp/Dockerfile -t tesseract-gcp:latest .
docker build -f ./cmd/tesseract/gcp/ci/Dockerfile -t conformance-gcp:latest .
docker tag conformance-gcp:latest ${GOOGLE_REGION}-docker.pkg.dev/${GOOGLE_PROJECT}/docker-ci/conformance-gcp:latest
docker push ${GOOGLE_REGION}-docker.pkg.dev/${GOOGLE_PROJECT}/docker-ci/conformance-gcpDeploy the Terraform config with OpenTofu:
cdto /deployment/live/gcp/static-ct-ci/logs/ci/.- Run
terragrunt apply.