Include the accumulated workflow scheduling, run history, subtree rerun, operator UI, deployment, data asset, object storage, database browser, and documentation changes currently in the worktree.
5.2 KiB
Deployment Guide
Images
This project deploys three images:
droboticflow-apidroboticflow-workerdroboticflow-operator-runner
Default Baidu registry naming:
ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow/droboticflow-api:<tag>ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow/droboticflow-worker:<tag>ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow/droboticflow-operator-runner:<tag>
1. Log In to the Registry
Use the public endpoint unless you are deploying from the same VPC as the registry:
docker login ccr-29eug8s3-pub.cnc.bj.baidubce.com --username <registry-user>
2. Build and Push Images
IMAGE_TAG=20260408 ./scripts/build-and-push-images.sh
Image contents:
droboticflow-api: Vite frontend assets + Go API binarydroboticflow-worker: Go worker binarydroboticflow-operator-runner: Python runtime +backend/operator-runner/main.py
The script prints the exact image URLs. Reuse those values for deployment:
API_IMAGE=...
WORKER_IMAGE=...
OPERATOR_RUNNER_IMAGE=...
You can also load a named deployment preset:
DEPLOY_ENV=wjzh IMAGE_TAG=20260421 ./scripts/build-and-push-images.sh
3. Prepare Kubernetes Access
Point kubectl at the target cluster before deploying. The deployment scripts do not store kubeconfig in the repository.
Recommended environment variables:
export K8S_NAMESPACE=droboticflow
export API_IMAGE=ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow/droboticflow-api:20260408
export WORKER_IMAGE=ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow/droboticflow-worker:20260408
export OPERATOR_RUNNER_IMAGE=ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow/droboticflow-operator-runner:20260408
export MONGO_URI=mongodb://<user>:<password>@<external-host>:27017/
export REGISTRY_SERVER=ccr-29eug8s3-pub.cnc.bj.baidubce.com
export REGISTRY_USERNAME=<registry-user>
export REGISTRY_PASSWORD=<registry-password>
export K8S_IMAGE_PULL_SECRET_NAME=droboticflow-registry
export AI_API_BASE_URL=https://coding.dashscope.aliyuncs.com/v1
export AI_MODEL=glm-5
export AI_API_KEY=<dashscope-compatible-server-key>
For the wjzh environment, the repo now carries non-secret defaults in scripts/deploy-envs/wjzh.env. Sensitive values stay out of git and can be stored in either:
$HOME/.config/droboticflow/deploy/wjzh.secrets.env.env.wjzh.local
The loader also looks for $HOME/.config/droboticflow/kubeconfigs/wjzh.config and exports KUBECONFIG automatically when DEPLOY_ENV=wjzh is set.
4. Deploy
./scripts/deploy-k8s.sh
Or, with the reusable preset:
DEPLOY_ENV=wjzh ./scripts/deploy-k8s.sh
The deploy script performs these actions:
- creates the namespace if it does not exist
- creates or updates the image pull secret
- loads
MONGO_URIfrom the current cluster secret when omitted, then validates that it points to an external MongoDB instance - creates or updates the
droboticflow-mongo-secretSecret withMONGO_URI - creates or updates the
droboticflow-ai-secretSecret for server-side AI generation - renders
k8s/droboticflow.template.yaml - applies the manifest to the cluster
- waits for API and worker rollouts
The main deployment path no longer creates a platform MongoDB Pod or Service. You must provision the backing MongoDB outside this manifest and provide its URI explicitly.
5. Services Created
droboticflow-api: NodePort service that exposes the frontend and APIdroboticflow-worker: ClusterIP service for worker health/debugging
Default API NodePort:
30080
If the cluster node IP is reachable, the UI and API are exposed at:
http://<node-ip>:30080
6. Manifest Variables
scripts/render-manifests.sh accepts:
K8S_NAMESPACEMONGO_DBMONGO_CONNECT_RETRIESMONGO_CONNECT_RETRY_DELAY_MSWORKER_POLL_INTERVAL_MSAPI_NODE_PORTAPI_REPLICASWORKER_REPLICASK8S_IMAGE_PULL_SECRET_NAMEAI_API_BASE_URLAI_MODELAPI_IMAGEWORKER_IMAGEOPERATOR_RUNNER_IMAGE
7. Notes
- The main manifest only deploys the application components. It does not create MongoDB resources in-cluster.
MONGO_URImust reference an external MongoDB instance; localhost,mongodb:27017, and in-cluster.svcaddresses are rejected byscripts/deploy-k8s.sh.- API and worker entrypoints are Go binaries with Mongo startup retry, so they tolerate the database becoming ready after the Deployments start.
- The worker runs with Kubernetes RBAC that allows creating and watching Jobs in the namespace.
- The operator-runner Job template inherits the private registry pull secret name from
K8S_IMAGE_PULL_SECRET_NAME. - The operator-runner is not a standalone Deployment. It is launched on demand as a Python Job container.
- AI generation runs through the API Deployment.
AI_API_KEYis mounted through thedroboticflow-ai-secretSecret and must not be baked into frontend env vars. - If you use DashScope-compatible models, prefer a backend-allowed API key. Do not deploy tool-only Coding Plan keys into the cluster.
- Production hardening still depends on the target cluster policy: TLS ingress, network policies, backup strategy, and secret rotation.