dc-agent
dc-agent is a small HTTP agent that runs on each managed host and performs CI/CD chores
on demand. Every task is a single authenticated HTTP call, so it drops straight into a
GitLab CI or GitHub Actions job with curl — no SSH scripting on the runner.
What it does:
- Save build artifacts to a directory on the host (
save-artifact). - Deliver config bundles by extracting an uploaded ZIP into a target directory
(
zip-archive,zip-dirs). - Publish versioned bundles — an immutable version directory, a pointer file and the service’s
reload in one call, rolled back if the service refuses it (
zip-archive-version). - Deploy services — replace a
war/jar/nodeartifact, restart it under daemontools, and wait on a health URL. - Apply Docker service definitions to the host (
docker/push,docker/check). - Proxy a URL fetch from the host’s network vantage point (
fetch-url).
When to use it
Section titled “When to use it”Reach for dc-agent when a build pipeline needs to push artifacts, configs, or services onto one or more servers, and you want a small, per-host, token-authenticated HTTP surface instead of ad-hoc SSH commands. For a multi-host web console, dc-agent ships a companion tool built on the same engine.
30-second example
Section titled “30-second example”Store an uploaded APK on the host as /opt/sbp-android/master-216018.apk:
curl \ --data-binary @app/build/outputs/apk/release/app-release.apk \ --fail \ -H "api-key: $UPLOAD_KEY" \ https://dc-agent.example.com/dc-agent/save-artifact/sbp-android/$CI_COMMIT_REF_NAME-$CI_JOB_IDThe sbp-android segment selects the host-side config file config/sbp-android.json, and
the last segment becomes the file name. See save-artifact for the
full walkthrough.