system-adminUpdated 2026-04-17

Deploy Tessallite to Google Cloud Platform

What this covers

Deploying Tessallite to Google Cloud Platform using Cloud Run. The deploy script handles all steps.

Before you start

Steps

  1. Open a terminal and navigate to deploy/gcp/.
  2. Run the deploy script. On Windows, type deploy.bat. On Mac or Linux, type ./deploy.sh.
  3. When prompted, enter your GCP project ID and the region you want to deploy to (for example, us-central1).
  4. The script enables the required GCP APIs, creates a Cloud SQL PostgreSQL 15 instance, creates four secrets in Secret Manager (encryption key, JWT key, database URL, database password), and sets IAM permissions for the Cloud Run service account.
  5. The script builds Docker images for all services and pushes them to Container Registry.
  6. The script deploys five services to Cloud Run in order: Model Service first, then Query Router, Optimizer, Scheduler, and Gateway.
  7. The script runs database migrations and creates the first workspace and admin user. It prints prompts for the workspace slug and admin credentials.
  8. When deployment completes, the script prints the public URL of each service. The Gateway's XMLA endpoint is reachable immediately. Note the Gateway URL — this is what Excel and Power BI connect to.

JDBC on GCP

Cloud Run does not route raw TCP traffic. The JDBC endpoint (PostgreSQL wire protocol, port 5433) requires a separate TCP load balancer. For Excel and Power BI connections using XMLA, no load balancer is needed — the HTTPS URL works directly.

Re-running the script

The script skips completed steps. To force a step to re-run, set its flag to 0 in deploy/gcp/config.env.

Updating after code changes

Re-run the script. It always rebuilds images and redeploys services, even if other steps are skipped.

Removing the deployment

Run teardown.bat or ./teardown.sh from deploy/gcp/. This removes Cloud Run services, Cloud SQL, and secrets from Secret Manager.

Troubleshooting

SymptomLikely causeWhat to do
"API not enabled"Script could not enable APIs automaticallyEnable them manually in the GCP console and re-run
Build failsDocker not running or network issueStart Docker and check connectivity
JDBC connection refusedNo TCP load balancer configuredSet up a Network Load Balancer or use XMLA instead
Services show unhealthySecrets not created before deployRe-run; the script creates secrets before deploying

Related