New third producer container (host-poller) owning the server chassis subsystem, separate from the SAS-shelf poller: - services/host_sensors.py: in-band IPMI (ipmitool sdr) for Inlet/Exhaust/etc. + CPU package temps from coretemp hwmon - host_poller.py: own single-instance lock + heartbeat (host_poll keys), restart-storm guard, paced; writes jbod:host_sensors + jbod:host_drives - move host/on-metal drive collection off the SAS poller to host-poller (reads jbod:zfs_map for annotation) - store: generalized lock/meta with a key param; host_sensors + host-poll keys - mqtt_publisher: publish env/CPU/host-drive temps as entities on the hub device (JBOD Monitor) - Dockerfile host-poller target (ipmitool+smartmontools); compose.infra adds host-poller; build.sh gains host-poller/all
74 lines
2.1 KiB
YAML
74 lines
2.1 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_POLL_INTERVAL=120
|
|
- 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:
|