How DevOps works — IaC principles, everything scriptable, phase-appropriate infrastructure, deployment manifests
Everything scriptable. Everything reproducible. Everything idempotent. No manual steps after checkout. A fresh machine runs setup.sh and gets a running fleet. Zero drift between what's scripted and what's deployed.
This is Fleet Principle #4 — IaC only.
Don't overengineer POC. Don't underengineer production.
| Phase | Infrastructure Level |
|---|---|
| poc | Docker compose. Manual steps documented in README. Local only. |
| mvp | Automated CI (lint, test, build). Docker images tagged. Env vars for config. Basic health checks. |
| staging | Full CI/CD pipeline. Staging mirrors production. Health checks. Basic monitoring. Secrets managed. Blue-green or rolling deploy. |
| production | Production pipeline. Blue-green/canary. Full monitoring + alerting. Auto-scaling. Runbook. Rollback procedure tested. |
./script.sh [specific-target] or all by defaultsource "$FLEET_DIR/.env" 2>/dev/null || true#!/usr/bin/env bash
set -euo pipefail
FLEET_DIR="$(cd "$(dirname "$0")/.." && pwd)"
source "$FLEET_DIR/.env" 2>/dev/null || true
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
NC='\033[0m'
# ... idempotent operations ...
$FLEET_DIR, $VENV{{placeholders}} in templates, resolve at deploy time| Service | What | Script | Config |
|---|---|---|---|
| MC Backend | Docker, API on :8000 | setup-mc.sh | docker-compose |
| MC Frontend | Web UI on :3000 | setup-mc.sh | docker-compose |
| Gateway | Agent sessions on :18789 | start-fleet.sh | gateway config |
| IRC | miniircd on :6667 | setup-irc.sh | 10 channels |
| The Lounge | Web IRC on :9000 | setup-lounge.sh | fleet/fleet |
| ntfy | Notifications on :8080 | (external) | 3 topics |
| Orchestrator | 30s cycle daemon | daemon.py | fleet.yaml |
| Sync daemon | 60s interval | daemon.py | fleet.yaml |
| Monitor daemon | 300s interval | daemon.py | fleet.yaml |
| Auth daemon | 120s interval | daemon.py | fleet.yaml |
When another agent's task needs infrastructure input:
devops_deployment_contribution(task_id) — gathers phase contextfleet_contribute(task_id, "deployment_manifest", manifest)| Call | When |
|---|---|
devops_infrastructure_health() | Heartbeat — check MC, gateway, agents |
devops_deployment_contribution(task_id) | Contribution task — produce manifest |
devops_cicd_review(task_id) | Review — check CI/CD changes |
devops_phase_infrastructure(task_id) | Assessment — gap between current and phase requirements |
Fleet patches are in patches/ and applied by scripts/apply-patches.sh.
Patches survive git clone of the vendor repo. When the vendor updates,
check if patches are still needed.
Current patches: