wf-agent4/deploy
Ilgiz Kamelyev 03c59d4b0b Document configuration yaml files 2026-04-24 17:38:19 +05:00
..
systemd Document configuration yaml files 2026-04-24 17:38:19 +05:00
sysusers.d Initial repository snapshot 2026-04-23 20:54:42 +05:00
tmpfiles.d Initial repository snapshot 2026-04-23 20:54:42 +05:00
README.md fix: working dir - /opt/wf-agent 2026-04-24 16:51:41 +05:00

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 phase
  • systemd/wf-agent.env.example - optional environment file example
  • sysusers.d/wf-agent.conf - user/group definition
  • tmpfiles.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.bridge and commands.bridge sections

Install notes

  1. Install the application package and its runtime dependencies.
  2. Install the systemd unit into /etc/systemd/system/wf-agent.service.
  3. Install the sysusers entry into /usr/lib/sysusers.d/wf-agent.conf.
  4. Install the tmpfiles entry into /usr/lib/tmpfiles.d/wf-agent.conf.
  5. Create /opt/wf-agent/.env from the example file if you want to override defaults.
  6. Place configuration YAML files under /etc/wf-agent/.
  7. Create system user/group entries:
    • systemd-sysusers
  8. Create directories and permissions:
    • systemd-tmpfiles --create
  9. Reload and start the backend service unit:
    • systemctl daemon-reload
    • systemctl 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-agent and 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-agent for file-backed logs when needed.
  • Backend bootstrap loads both events: and commands: sections when present.
  • Command contour settings come from etc/wf-agent/commands.yaml, executor discovery from etc/wf-agent/executors/*.yaml, and cron jobs from etc/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.service and environment-specific overrides in /opt/wf-agent/.env; do not duplicate the same variable in both unless you intentionally want the .env value to override the unit default.