Files
jbod-monitor/compose.infra.yml
adam ea045433e5 Split host-poller into separate env (IPMI/CPU) and drive (SMART) loops
Two concurrent loops in one process sharing the lock + hardware gate (IPMI and
SMART never run concurrently) but on separate schedules: env every
HOST_ENV_INTERVAL (60s, responsive inlet/CPU) and drives every
HOST_DRIVE_INTERVAL (300s, gentle SMART). Each loop has its own heartbeat
(env_meta/drive_meta) + restart-storm guard.
2026-06-16 18:50:16 +00:00

75 lines
2.2 KiB
YAML

# Infra stack: the hardware poller + Redis. This is the STABLE substrate —
# deploy once, pin to a known-good image SHA, and touch it deliberately
# (never as part of a web iteration). Web redeploys use compose.web.yml and
# can never name these services.
#
# docker compose -f compose.infra.yml up -d # bring up / update poller+redis
#
name: jbod-infra
services:
poller:
image: docker.adamksmith.xyz/jbod-poller:latest # pin to a SHA in deploy
container_name: jbod-poller
restart: unless-stopped
privileged: true
pid: host
network_mode: host
volumes:
- /dev:/dev
- /sys:/sys:ro
- /run/udev:/run/udev:ro
environment:
- TZ=America/Denver
- ZFS_USE_NSENTER=true
- REDIS_HOST=127.0.0.1
- REDIS_PORT=6379
- REDIS_DB=0
# Pacing — keep the SAS bus quiet. POLL_CONCURRENCY=1 fully serializes.
- POLL_SWEEP_INTERVAL=300
- POLL_DRIVE_GAP=0.5
- POLL_CONCURRENCY=1
- POLL_STARTUP_JITTER=10
- POLL_DATA_TTL=900
depends_on:
- redis
# Chassis producer: IPMI/iDRAC + CPU coretemp + on-metal drives → Redis.
# Separate from the SAS poller (different subsystem); writes host_sensors +
# host_drives. The web consumer publishes these on the hub device.
host-poller:
image: docker.adamksmith.xyz/jbod-host-poller:latest # pin to a SHA in deploy
container_name: jbod-host-poller
restart: unless-stopped
privileged: true
network_mode: host
volumes:
- /dev:/dev
- /sys:/sys:ro
- /run/udev:/run/udev:ro
environment:
- TZ=America/Denver
- REDIS_HOST=127.0.0.1
- REDIS_PORT=6379
- REDIS_DB=0
- HOST_ENV_INTERVAL=60 # IPMI/iDRAC + CPU — responsive (inlet temp 1/min)
- HOST_DRIVE_INTERVAL=300 # on-metal SMART — gentle, isolated from env
- POLL_DRIVE_GAP=0.5
- POLL_CONCURRENCY=1
- POLL_STARTUP_JITTER=10
- POLL_DATA_TTL=900
depends_on:
- redis
redis:
image: redis:7-alpine
container_name: jbod-redis
restart: unless-stopped
network_mode: host
volumes:
- redis-data:/data
command: redis-server --save 60 1 --loglevel warning
volumes:
redis-data: