Skip to main content
Command cheat sheet for day-to-day operations against a GCP LangSmith deployment provisioned with the GCP Terraform modules. All make targets run from modules/gcp/. Run make help for an inline summary. Commands reflect the main branch and v0.17.x tags, which deploy Helm chart 0.17. The smithdb-* targets do not exist on v0.16.x tags.

Deployment overview

Each stage builds on the previous. Verify pods are healthy before enabling the next.

First-time setup

make deploy-all chains apply, init-values, and deploy in one command. Run make init-values and make deploy from the shell where you sourced setup-env.sh; the deploy script reads the TF_VAR_* secrets and LANGSMITH_ADMIN_EMAIL from it.

Day-2 operations

make kubeconfig wraps helm/scripts/get-kubeconfig.sh. To call the script directly, pass the cluster name, region, and project as arguments, or omit them to read the Terraform outputs. make smithdb-configure and make smithdb-phase only edit terraform.tfvars, and make deploy-all applies the change. A size change can replace the SmithDB node pools. Leaving the backfill phase removes the backfill Job and its task database; make smithdb-phase PHASE=cutover refuses until every backfill row is promoted, but an earlier phase has no such check. For the SmithDB rollout stages, see SmithDB in the deployment guide.

Add-ons

Set flags in terraform.tfvars, then make init-values && make deploy. init-values.sh copies the matching example file into helm/values/ automatically.
To add an add-on after initial install without re-running init-values.sh, copy manually:

Sizing profiles

Set sizing_profile in terraform.tfvars, then re-run make init-values && make deploy.

kubectl

gcloud

Terraform

Key constraints

  • Uninstall Helm before terraform destroy. The Envoy Gateway load balancer references the VPC; leaving it blocks network deletion. Always run make uninstall first.
  • config.deployment.url must include https://. Without the protocol, operator-spawned agents stay stuck in DEPLOYING.
  • config.deployment.enabled: true is required for the LangSmith Deployment add-on. Setting only the URL without enabled: true silently skips listener and operator.
  • Encryption keys must never change after first enable. Rotating langsmith_insights_encryption_key or langsmith_polly_encryption_key permanently breaks existing encrypted data.
  • Envoy Gateway IP changes on teardown. GCP releases the external IP when the Gateway is deleted. After terraform destroy and re-apply, update your DNS A record.
  • Upgrading from chart 0.16 has gates. deploy.sh refuses the upgrade while values-overrides.yaml still has a sandboxes.juicefs.csi block, while JuiceFS CSI volumes or mount pods remain, or while helm/values/ still has the chart 0.16 SmithDB overlay. Each refusal prints the commands that clear it. For the full procedure, see Upgrade from chart 0.16.
  • langsmith-ksa annotation is not permanent. Terraform creates the ServiceAccount in the k8s-bootstrap module, outside the Helm release, so it does not survive namespace deletion. deploy.sh re-creates and re-annotates it idempotently.

Teardown

Teardown permanently deletes the Cloud SQL instances. Cloud SQL takes no final snapshot on delete: its automated backups, on-demand backups, and point-in-time recovery logs are deleted with the instance. To keep the data, export it to a bucket outside this deployment before step 1. Skip the export for a disposable test stack.
Deletion protection also applies at the Cloud SQL API level, so the targeted apply in step 4 must run before make destroy, even when protection is already off. Drop the module.smithdb target if you never enabled SmithDB. To also delete the persistent disks of in-cluster databases, run DELETE_DATA_PVCS=true make uninstall in step 2.