Split the conflated bot-bottle-sidecars image into distinct orchestrator + gateway images
#384
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Today one image —
bot-bottle-sidecars:latest, built fromDockerfile.sidecars— serves two unrelated roles in the consolidated (PRD 0070) control plane:/app/sidecar_init.py. Heavy base (mitmproxy/mitmproxy:11.1.3, debian-slim +git+openssh-client+ gitleaks).OrchestratorServiceruns the same image but overrides the entrypoint topython3 -m bot_bottle.orchestrator(bot_bottle/orchestrator/lifecycle.py:image: str = GATEWAY_IMAGE, and_run_orchestrator_containersets--entrypoint python3 … -m bot_bottle.orchestrator). The orchestrator is stdlib-only by design — its module docstring notes "the orchestrator is stdlib-only, so the bundle image's python is enough" — so it needs none of the gateway's mitmproxy / gitleaks / git payload.Why split
bot_bottlepackage, nothing else) shrinks it.GATEWAY_IMAGEdoubling as the orchestrator's image is confusing —lifecycle.pyimports agateway.pyconstant purely to run non-gateway code. Two purpose-named images make the roles explicit.Dockerfile.sidecarschange even when only gateway daemons moved, and vice-versa.Proposed shape
Dockerfile.gateway→bot-bottle-gateway:latest— currentDockerfile.sidecarscontents (the data plane).Dockerfile.orchestrator→bot-bottle-orchestrator:latest— minimal python base + thebot_bottlepackage;ENTRYPOINT ["python3", "-m", "bot_bottle.orchestrator"].bot-bottle-sidecars:latestname +Dockerfile.sidecars; updateGATEWAY_IMAGE/GATEWAY_DOCKERFILEinorchestrator/gateway.py, and giveOrchestratorServiceits ownORCHESTRATOR_IMAGE/ dockerfile instead of borrowingGATEWAY_IMAGE.Out of scope (note)
The legacy per-bottle sidecar path still names containers
bot-bottle-sidecars-<slug>(backend/docker/sidecar_bundle.py,backend/docker/compose.py, the firecracker/macoslaunch.py, and the enumerate/cleanup prefix constants). This issue is about the consolidated shared images; the per-bottle-bundle naming can be reconciled separately and largely disappears as the consolidated path supersedes per-bottle bundles.Prerequisite refactor split out of the PRD 0070 firecracker consolidated-launch work (PR #354).