Agent mode
Agent mode attaches dflux Runik to the control plane as a stateless worker. The agent dials out, registers, executes jobs in memory, streams the report back, and holds nothing between jobs. Use this for a continuous test plane; use run-flow / run-suite for CI one-shots.
rk binary does not open a listen port for the admin API, does not embed a web UI,
and does not keep a local catalog database. Durable state lives in the control plane. For
CI, prefer run-flow / run-suite — no control plane
required.Starting the agent
The agent dials the control plane's ControlPlane endpoint, registers (id defaults to the hostname), and waits for jobs. It has no listen address — it dials out, which is NAT-friendly.
Flags
| Flag | Default | Purpose |
|---|---|---|
-console <host:port> | required | Control plane address |
-token <t> | — | Join token presented at Register |
-id <id> | hostname | Worker id |
-labels k=v,... | — | Scheduler labels (e.g. region=eu,env=lab) |
-allow-cmd-actions | off | DANGEROUS. Lets console-dispatched flows run type: cmd, executing local programs on this host. Off by default; only set it for a console you fully trust. |
-debug, -trace, -json, -logfile, -log-caller | — | Logging knobs |
How jobs run
- The control plane owns the catalog, schedules, subscribers, and report history.
- When a run is due, it dispatches a job to a free agent that matches labels.
- The agent materializes the flow/suite, environment, and subscriber set in memory (subscribers are inline on the job, capped per job).
- The same engine as the CLI executes the job, streams events, and returns the report.
- The agent holds nothing after the job completes — ready for the next dispatch.
One job at a time per worker; scale out with more agents. See Architecture for the full model.
When to use which
| Goal | Use |
|---|---|
| Gate a PR / CI pipeline | rk run-flow / run-suite with exit code + JSON/JUnit |
| Continuous lab test plane | rk daemon -console … + control plane |
| Probe transports before a run | rk check -c lab.yaml |
| Terminate GTP-U for user-plane tests | rk server uspace (or dpdk) |
Troubleshooting
Agent never receives jobs — confirm the console address is reachable from the agent host, the join token is valid, and labels match what the scheduler expects.
Job fails immediately on transport — the environment on the job must still reach the NFs under test from the agent host. Use rk check from that host with an equivalent config to probe connectivity.
Need a local report without the control plane — use CLI one-shot with -output json -output-file report.json.
Where to go next
- Architecture — CLI one-shot vs agent, and where durable state lives.
- Running flows and suites — CLI one-shots when you do not need a control plane.
- CLI reference — every
daemonflag fromrk --help.