Enable Docker Swarm discovery in WHOOSH for complete agent visibility
WHOOSH now discovers all 10 CHORUS agent replicas using Docker Swarm API instead of DNS-based discovery which was limited by VIP load balancing. Changes: - Enable WHOOSH_DOCKER_ENABLED=true - Mount /var/run/docker.sock for Swarm API access - Add HMMM monitor service to docker-compose - Add WHOOSH_API_BASE_URL config for CHORUS agents Results: - WHOOSH discovers 20/21 agent tasks (vs 3/10 previously) - Bootstrap endpoint returns 22 peers with 19 unique peer IDs - Complete agent manifest for task assignment and churn handling 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -38,6 +38,10 @@ services:
|
|||||||
- TASK_ID=${TASK_ID:-} # Optional: Task identifier
|
- TASK_ID=${TASK_ID:-} # Optional: Task identifier
|
||||||
- NODE_ID=${NODE_ID:-} # Optional: Node identifier
|
- NODE_ID=${NODE_ID:-} # Optional: Node identifier
|
||||||
|
|
||||||
|
# WHOOSH API configuration for bootstrap peer discovery
|
||||||
|
- WHOOSH_API_BASE_URL=${WHOOSH_API_BASE_URL:-http://whoosh:8080}
|
||||||
|
- WHOOSH_API_ENABLED=true
|
||||||
|
|
||||||
# Bootstrap pool configuration (supports JSON and CSV)
|
# Bootstrap pool configuration (supports JSON and CSV)
|
||||||
- BOOTSTRAP_JSON=/config/bootstrap.json # Optional: JSON bootstrap config
|
- BOOTSTRAP_JSON=/config/bootstrap.json # Optional: JSON bootstrap config
|
||||||
- CHORUS_BOOTSTRAP_PEERS=${CHORUS_BOOTSTRAP_PEERS:-} # CSV fallback
|
- CHORUS_BOOTSTRAP_PEERS=${CHORUS_BOOTSTRAP_PEERS:-} # CSV fallback
|
||||||
@@ -209,8 +213,8 @@ services:
|
|||||||
WHOOSH_BACKBEAT_AGENT_ID: "whoosh"
|
WHOOSH_BACKBEAT_AGENT_ID: "whoosh"
|
||||||
WHOOSH_BACKBEAT_NATS_URL: "nats://backbeat-nats:4222"
|
WHOOSH_BACKBEAT_NATS_URL: "nats://backbeat-nats:4222"
|
||||||
|
|
||||||
# Docker integration configuration (disabled for agent assignment architecture)
|
# Docker integration configuration - ENABLED for complete agent discovery
|
||||||
WHOOSH_DOCKER_ENABLED: "false"
|
WHOOSH_DOCKER_ENABLED: "true"
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
- whoosh_db_password
|
- whoosh_db_password
|
||||||
@@ -221,9 +225,9 @@ services:
|
|||||||
- redis_password
|
- redis_password
|
||||||
volumes:
|
volumes:
|
||||||
- whoosh_ui:/app/ui:ro
|
- whoosh_ui:/app/ui:ro
|
||||||
# - /var/run/docker.sock:/var/run/docker.sock # Disabled for agent assignment architecture
|
- /var/run/docker.sock:/var/run/docker.sock # Required for Docker Swarm agent discovery
|
||||||
deploy:
|
deploy:
|
||||||
replicas: 2
|
replicas: 1
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: on-failure
|
condition: on-failure
|
||||||
delay: 5s
|
delay: 5s
|
||||||
@@ -591,6 +595,38 @@ services:
|
|||||||
command: --interval 300 --cleanup --revive-stopped --include-stopped
|
command: --interval 300 --cleanup --revive-stopped --include-stopped
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
|
# HMMM Traffic Monitor - Observes P2P pub/sub traffic
|
||||||
|
hmmm-monitor:
|
||||||
|
image: anthonyrawlins/hmmm-monitor:latest
|
||||||
|
environment:
|
||||||
|
- WHOOSH_API_BASE_URL=http://whoosh:8080
|
||||||
|
ports:
|
||||||
|
- "9001:9001" # P2P port for peer discovery
|
||||||
|
deploy:
|
||||||
|
replicas: 1
|
||||||
|
restart_policy:
|
||||||
|
condition: on-failure
|
||||||
|
delay: 5s
|
||||||
|
max_attempts: 3
|
||||||
|
window: 120s
|
||||||
|
placement:
|
||||||
|
constraints:
|
||||||
|
- node.hostname == acacia # Keep monitor on acacia for stable peer ID
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
memory: 128M
|
||||||
|
cpus: '0.25'
|
||||||
|
reservations:
|
||||||
|
memory: 64M
|
||||||
|
cpus: '0.1'
|
||||||
|
networks:
|
||||||
|
- chorus_net
|
||||||
|
logging:
|
||||||
|
driver: "json-file"
|
||||||
|
options:
|
||||||
|
max-size: "10m"
|
||||||
|
max-file: "3"
|
||||||
|
tag: "hmmm-monitor/{{.Name}}/{{.ID}}"
|
||||||
|
|
||||||
# KACHING services are deployed separately in their own stack
|
# KACHING services are deployed separately in their own stack
|
||||||
# License validation will access https://kaching.chorus.services/api
|
# License validation will access https://kaching.chorus.services/api
|
||||||
|
|||||||
Reference in New Issue
Block a user