Skip to content

Deploying Workflows

Deploy workflow artifacts with the same CI/CD process as your environment.

Artifacts to Deploy

  • flows/workflows/
  • flows/triggers/
  • flows/edge-routes/ (optional webhooks / static edge routes)
  • flows/artifacts/
  • flows/connections/
  • flows/policies/
  • flows/policy_chains/ (global chains)
  • flows/schedules/
  • flows/dashboards/ (Operations dashboard definitions; seeded with overwrite=false)
  • flows/settings/ (if applicable)
  • flows/settings/settings/runtime-config.yaml
  • flows/settings/settings/ssh_known_hosts (optional, if using repo-managed host keys)
  1. Commit changes to Git.
  2. Run validation checks in CI.
  3. Apply manifests or artifact upload process.
  4. Reload runtime if required.
  5. Validate with test runs and traces.

Post-Deployment Validation

  • GET /workflows shows expected entries.
  • Test invocations succeed via trigger paths (/v1/api/...) or dashboard.
  • Trigger-event and trace APIs show healthy behavior.

Runtime Settings Workflow (Dashboard → Repo → Deploy)

To manage allowlists and other runtime settings in the Dashboard and promote them to TST/ACC/PRD, use this flow:

  1. Update settings in Dashboard → Admin → Settings.
  2. Download YAML and copy it into flows/settings/settings/runtime-config.yaml.
  3. Commit and deploy to the target environment.

Notes:

  • SSH host keys can be managed in Settings via egress.ssh.known_hosts or via the repo file flows/settings/settings/ssh_known_hosts.
  • Storage does not auto-seed runtime-config.yaml at startup. Upload it via Dashboard/deploy (POST /internal/upload/config) or leave external installs empty.
  • Operations dashboard YAML under flows/dashboards/*.yaml is uploaded to artifacts/dashboards/ with overwrite=false. A 409 means the cluster already has that file (UI edits are kept). Workflows/triggers still overwrite on every deploy. To reset a definition, delete it in Operations (admin) or remove the storage artifact, then redeploy.

Selective Uploads (Collaboration Mode)

For teams iterating in a shared environment, you can upload individual assets instead of syncing the entire flows tree. These uploads use the storage service and require the runtime-admin token.

curl -X POST http://storage:8080/internal/upload/workflows/order-create \
  -H "Authorization: Bearer <runtime-admin-token>" \
  -H "Content-Type: application/yaml" \
  --data-binary @flows/workflows/order-create.yaml

Notes:

  • Use selective uploads for dev/test; prefer GitOps for consistent prod promotion.
  • Policy uploads support types throttle, headers, xml_json, and oauth_outbound (not the old required_headers model).
  • After uploading a workflow, call POST /admin/reload on the orchestrator.

Kubernetes PV/PVC Sync (All Flows Data)

cd engine
./scripts/sync-flows-pv.sh meshflows

The shared PVC contains (among others):

  • workflows/
  • triggers/
  • connections/
  • policies/
  • schedules/
  • artifacts/
  • settings/

Services read from /app/flows/* (for example WORKFLOWS_DIR=/app/flows/workflows).

Public Endpoint Routing

Preferred public invoke: HTTP triggers with gateway_public_path → Gateway /v1/api/... (and edge routes / webhooks where configured).

Internal invoke: Orchestrator POST /run/{workflow_name} (and /run/{name}/enqueue for async).

Gateway POST /v1/run/{workflow_name} is a legacy/dev path and may be disabled when the gateway is trigger-only. Do not document it as the primary public contract.

To expose or customize routes beyond trigger-derived paths, configure edge routes (flows/edge-routes/) and see Gateway API — Edge Route Configuration (Forgejo mirror: Gateway API — Edge Route Configuration).

Edge routes allow you to:

  • Alias a workflow to a public path (e.g. webhook under /v1/webhooks/...)
  • Apply request/response transforms via policy chains
  • Add authentication or rate limiting
  • Support multiple HTTP methods on the same workflow (via triggers / routes)