|
|
||
|---|---|---|
| .. | ||
| systemd | ||
| sysusers.d | ||
| tmpfiles.d | ||
| README.md | ||
README.md
WF-Agent Linux Packaging Baseline
This directory captures the Linux deployment baseline for wf-agent.
Identity and directories
- system user:
wifi-agent - system group:
wifi-agent - config dir:
/etc/wf-agent - state dir:
/var/lib/wf-agent - runtime dir:
/run/wf-agent - log dir:
/var/log/wf-agent - application dir:
/opt/wf-agent
Files
systemd/wf-agent.service- systemd unit for the backend service phasesystemd/wf-agent.env.example- optional environment file examplesysusers.d/wf-agent.conf- user/group definitiontmpfiles.d/wf-agent.conf- runtime and state directory layout
Runtime entrypoints
- backend service:
python -m app.main - CLI:
python -m app.cli - backend bootstrap loads both event and command contours from
/etc/wf-agent/app.yaml - CLI reads the same root config and resolves websocket bridge URIs from the
event.bridgeandcommands.bridgesections
Install notes
- Install the application package and its runtime dependencies.
- Install the systemd unit into
/etc/systemd/system/wf-agent.service. - Install the sysusers entry into
/usr/lib/sysusers.d/wf-agent.conf. - Install the tmpfiles entry into
/usr/lib/tmpfiles.d/wf-agent.conf. - Create
/opt/wf-agent/.envfrom the example file if you want to override defaults. - Place configuration YAML files under
/etc/wf-agent/. - Create system user/group entries:
systemd-sysusers
- Create directories and permissions:
systemd-tmpfiles --create
- Reload and start the backend service unit:
systemctl daemon-reloadsystemctl enable --now wf-agent.service
Policy notes
- The backend service is intended to run as
wifi-agent:wifi-agent. - The backend service is intended to run from
/opt/wf-agentand launch the interpreter from/opt/wf-agent/.venv/bin/python. - Runtime state is kept under
/var/lib/wf-agent. - The template supports a journald-first logging policy while also reserving
/var/log/wf-agentfor file-backed logs when needed. - Backend bootstrap loads both
events:andcommands:sections when present. - Command contour settings come from
etc/wf-agent/commands.yaml, executor discovery frometc/wf-agent/executors/*.yaml, and cron jobs frometc/wf-agent/cron.yaml. - Event contour settings come from
etc/wf-agent/events.yaml. - The CLI uses the same config layout for local submissions, subscriptions, and cancellation flows.
- Keep invariant service wiring in
wf-agent.serviceand environment-specific overrides in/opt/wf-agent/.env; do not duplicate the same variable in both unless you intentionally want the.envvalue to override the unit default.