Commands you use most live at the top. Advanced and experimental commands are listed at the bottom.
Check that required tools are installed and authenticated. Optionally checks enabled APIs and IAM roles on a project.
deployml doctor
deployml doctor --project-id YOUR_GCP_PROJECT_IDOptions:
--project-id,-j: GCP project to probe for enabled APIs and IAM role coverage.
The doctor checks: tool versions for docker, terraform, gcloud, bq; gcloud auth and Application Default Credentials; Infracost (optional); and for a given project, required APIs and IAM roles.
Enable required GCP APIs for a project and create a local docker/ folder plus a runnable config.yaml starter. Run once per project.
deployml init --provider gcp --project-id YOUR_GCP_PROJECT_IDOptions:
--provider,-p: Cloud provider. Currentlygcpis fully supported.awsandazurewrite skeleton configs.--project-id,-j: GCP project ID.--path: Directory where the project is initialized. Defaults to current directory.--overwrite: Overwrite an existingdocker/folder orconfig.yaml.
The generated config.yaml includes a provider.image_tag field set to the deployml version. Override this to pin to a specific build tag.
Build Docker images and push them to GCP Artifact Registry. Reads project ID, region, and image_tag from config.yaml by default.
deployml build-images --create-repoOptions:
--config-path,-c: Path to config YAML file. Defaultconfig.yaml.--docker-root,-d: Folder containing subfolders with Dockerfiles. Default is the built-in deployml docker directory.--gcp-project,-p: GCP project ID. Default inferred from config.--region: GCP region. Default inferred from config.--repository: Artifact Registry repository name. Defaultmlops-images.--tag,-t: Image tag. Default readsconfig.provider.image_tag, falls back tov{deployml_version}.--create-repo: Create the Artifact Registry repository on first run.--dry-run: Print commands without executing.--platform: Local build platform. Defaults to the host architecture so images run on a local minikube node, including arm64 Macs. Passlinux/amd64only when building locally for a manual amd64 push. Ignored in GCP Cloud Build mode.
Builds run on Cloud Build, so a local Docker daemon is not required for GCP mode. In local mode a daemon probe runs first and the build targets the host architecture.
Deploy infrastructure from a YAML config file. Prompts for confirmation by default.
deployml deploy --verbose
deployml deploy --verbose --yesOptions:
--config-path,-c: Path to config YAML. Defaultconfig.yaml.--verbose,-v: Stream Terraform logs to stdout. Without this you get a progress bar.--yes,-y: Skip the[y/N]deploy confirmation. Required for non-interactive scripts.--generate-only,-g: For the GKE flow, render the Kubernetes manifests without applying them, so you can review and then apply withgke-apply.
Before any cloud work, deploy validates the config shape and, for GCP, preflights both gcloud auth and Application Default Credentials. A missing ADC fails fast with gcloud auth application-default login guidance instead of an opaque "default credentials not found" at apply. A malformed stack entry also fails here with a clear message rather than crashing mid-deploy.
First-time deploy takes about 20 minutes because Cloud SQL Postgres provisioning is slow.
Print service URLs from the last deployment and write them to a .env file. Database credentials are masked.
deployml get-urls
deployml get-urls --show-secretsOptions:
--config-path,-c: Path to config YAML. Defaultconfig.yaml.--env-path: Where to write the.env. Default.env.--show-secrets: Additionally fetch and print the Grafana admin password and the Cloud SQL Auth Proxy connection command.
Tear down all infrastructure for a given config. Also removes the Artifact Registry repo and the Cloud Build staging bucket created by build-images, so a destroyed project leaves no billing residue. Pass --keep-images when other workspaces in the same project share those images.
deployml destroy --yesOptions:
--config-path,-c: Path to config YAML. Defaultconfig.yaml.--clean-workspace: Remove the local.deployml/workspace folder after destroy.--yes,-y: Skip both the destroy confirmation and the Terraform state cleanup prompt. Also auto-confirms image cleanup.--workspace: Override the workspace name from config.--keep-images: Keep the Artifact Registry repo and the Cloud Build staging bucket. Use when other workspaces in the same project still run on those images.--repository: Artifact Registry repo to delete. Defaultmlops-images. Match the--repositoryyou passed to build-images.
On partial failure, Terraform state is preserved and the command prints recovery instructions including gcloud asset search-all-resources for finding residual resources.
Top-level fields used by deploy and destroy:
name: string # workspace name. defaults to "default" if omitted
provider:
name: gcp | aws | azure
project_id: string # required for gcp
region: string # required for gcp
image_tag: string # optional. default v{deployml_version}
deployment:
type: cloud_run | cloud_vm | gke # required
stack:
- <stage_name>:
name: mlflow | fastapi | grafana | feast | cron
params: {} # tool-specificSupported stage names: experiment_tracking, artifact_tracking, model_registry, model_serving, model_monitoring, feature_store, workflow_orchestration.
These exist in the CLI but are not part of the documented happy path. Use at your own risk and inspect the source.
deployml generate: Interactive YAML generator. Less useful sinceinitnow writes a runnable config. Pass--force,-fto overwrite an existingconfig.yamlwithout the confirm prompt.deployml status: Stub. Reports deployment status of current workspace.deployml terraform: Run raw terraform actions (plan, apply, destroy) on a rendered workspace.deployml teardown: Manage scheduled auto-teardown jobs.deployml vm: Placeholder for VM deployment.deployml mlflow-init,deployml mlflow-deploy: MLflow-only minikube flow.mlflow-initprovisions a PersistentVolumeClaim by default with--persistent-storageso the sqlite backend and artifacts survive pod restarts, with--pvc-sizeto size it and--ephemeral-storageto opt out.mlflow-deploytakes--namespace,-nto isolate the stack.deployml minikube-init,deployml minikube-deploy: Local Kubernetes flow for testing without GCP.minikube-deploytakes--namespace,-n. Build local images withbuild-imagesin local mode, which targets the host architecture so they run on the minikube node.deployml gke-cluster-create: Create a GKE cluster. Autopilot by default with--region; pass--standardfor a small zonal cluster.deployml gke-init,deployml gke-deploy,deployml gke-apply,deployml gke-destroy: GKE deployment path. MLflow on GKE provisions a PersistentVolumeClaim by default so experiment data survives pod restarts. Deploy commands take--namespace,-n, and MLflow and FastAPI must share a namespace for in-cluster service DNS to resolve.gke-destroyremoves the deployed manifests including the PVC and the referencedgcr.ioimage so nothing keeps billing, with--keep-imagesto retain images for a quick redeploy and--delete-clusterto remove the cluster. See the GKE flow notes in the tutorial.
The fully supported and tested path is GCP Cloud Run via init, build-images, deploy, get-urls, destroy.