Patinas User Guide
Copyright 2025 Black Moth Holdings Pty Ltd Author/s: Scott Gemmell
Audience
Engineers and integrators deploying and testing Patinas on edge devices and hubs, via Docker or bare metal.
Prerequisites
- Docker 24+ and Docker Compose
- Rust toolchain (if building locally) or prebuilt images
- Open ports: proxy metrics 9640, hub metrics 9641, RTSP egress 8555 via patinas-vms-bridge (defaults)
Quickstart (Docker)
- Build images:
- docker compose -f deploy/docker/docker-compose.yml build
- Start services:
- docker compose -f deploy/docker/docker-compose.yml up -d
- Check health:
- curl http://localhost:9640/healthz
- curl http://localhost:9641/healthz
- Inspect metrics:
- curl http://localhost:9640/metrics | head
- curl http://localhost:9641/metrics | head
Illustrative diagram, rendered to an image so this page needs no JavaScript.
Configuration
- Proxy config:
proxy.toml(bind-mounted to/opt/patinas/proxy.tomlin the proxy container) - Hub config:
hub.toml(bind-mounted to/opt/patinas/hub.tomlin the hub container) - Environment overrides use
PATINAS_prefix, mapping section.sub.key → PATINAS_SECTION_SUB_KEY.
Running workloads
- Ingest at the edge proxy and publish to the hub over QUIC.
- RTSP egress for VMS/ONVIF clients is served by
patinas-vms-bridgeon0.0.0.0:8555by default (bridge.bind); the hub's own RTSP serving (rtsp-io) is optional local tooling.
Control CLI (patinas-ctl)
- Health check:
- patinas-ctl health --addr 127.0.0.1:9640
- Metrics snapshot:
- patinas-ctl metrics-snapshot --addr 127.0.0.1:9641 --out hub.prom
- KPI sampling (CSV):
- patinas-ctl kpi-sample --endpoints 127.0.0.1:9640,127.0.0.1:9641 --interval-s 2 --duration-s 60 --out kpi.csv
- Chaos plan (print-only):
- patinas-ctl chaos-plan --profile tests/scenarios/pit_rough_day.yaml --iface eth0
- Capture plan (print-only):
- patinas-ctl capture-plan --out dump.pcapng --duration-s 30 --iface eth0
End-to-end testing with link simulators
Optional router containers emulate wireless links via tc netem/tbf.
- Start with E2E compose overlay (infra):
- docker compose -f deploy/docker/docker-compose.yml -f deploy/docker/docker-compose.infra.yml up -d --build
- or multi-hop: docker compose -f deploy/docker/docker-compose.yml -f deploy/docker/docker-compose.multi-hop.yml up -d --build
- Apply impairments (both directions):
- curl -X POST http://localhost:18080/impairments/apply -H "Content-Type: application/json" -d '{"direction":"both","latency_ms":120,"jitter_ms":40,"loss_pct":2.0,"rate_mbit":10}'
- Clear impairments:
- curl -X POST http://localhost:18080/impairments/clear
- Use YAML scenarios in
tests/e2e/and collect KPIs withpatinas-ctl.
See docs/testing/E2E_TESTS.md for details.
Observability
- Metrics at
/metrics, health at/healthzon both proxy and hub. - Use
patinas-ctlto snapshot or periodically sample KPIs.
Troubleshooting
- Ports busy: ensure 9640/9641/8555 are free on host.
- No metrics: confirm containers are running and
RUST_LOG=infois set. - Shaping ineffective: verify
patinas-link-ais up and traffic routes via it; start with device-wide shaping, then refine with tc filters.
Security notes
- Restrict the link simulator API to a control network and require a token via
NET_SIM_TOKENin shared environments.