fix(dev-platform): make the local docker-compose deploy actually run a job#496
Open
Weegy wants to merge 1 commit into
Open
fix(dev-platform): make the local docker-compose deploy actually run a job#496Weegy wants to merge 1 commit into
Weegy wants to merge 1 commit into
Conversation
…a job The shipped dev-platform overlay was never exercised end-to-end, so three defects blocked a local run: - Port: the runner base URL and the internal API URL pointed at middleware:3000, but the kernel listens on :8080 -> repoint both. - daemon <-> dind TLS: DOCKER_HOST was tcp://dev-dind:2376, but dind's auto-generated server cert has no dev-dind altname, so --tlsverify failed the hostname check. Pin the dev-engine subnet (172.28.6.0/24) and dind's IP (172.28.6.2) so DOCKER_HOST can target an address the cert covers and stays stable across recreates; TLS verification stays ON. - Image pull policy: the daemon always docker-pull'd the runner image on warm and per job. Locally the image is built + docker-load'ed into dind and the default-deny egress proxy answers a registry pull with 407, so no container could ever be created. Add DEV_RUNNER_PULL_POLICY (always | if-not-present); always (default) preserves the prod posture (re-pull so the boot-time digest-pin + cosign vetting runs each provision), while if-not-present skips the re-pull only when the image is already cached. It does NOT touch the image allowlist or the digest requirement, so an unlisted image is still refused whether or not it is cached. The overlay sets if-not-present for local dev. Verified against a running local omadia-dev stack: daemon connects to dind over TLS with no altname error and warms the pre-loaded image with no 407. Daemon suite green (384 tests, +5 for the pull-policy skip-when-present path).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make the dev-platform local docker-compose deploy actually run a job
Epic #470 shipped the full dev-platform, but the local
docker-compose.dev-platform.yamloverlay was never exercised end-to-end. Standing it up on a localomadia-devstack surfaced three defects that each independently prevented a job from running. All three are fixed here and verified against a live local stack.Fixes
Port mismatch.
DEV_PLATFORM_RUNNER_BASE_URLandOMADIA_INTERNAL_API_URLpointed atmiddleware:3000, but the kernel listens on:8080. Repointed both.daemon ↔ dind TLS altname mismatch.
DOCKER_HOSTwastcp://dev-dind:2376, but dind's auto-generated server cert carries nodev-dindaltname, so--tlsverifyfailed the hostname check and the daemon could not reach the engine at all. Thedev-enginenetwork is now IP-pinned (subnet 172.28.6.0/24, dind172.28.6.2, daemon172.28.6.3) andDOCKER_HOSTtargets dind's pinned IP — which dind's boot-time cert regeneration always covers — so the connection stays valid across recreates. TLS verification stays ON (no--tls-without-verify shortcut).Unconditional registry pull. The daemon
docker pulled the runner image on every warm and every job. Locally the image is built +docker loaded straight into dind and the default-deny egress proxy answers a registry pull with407 Proxy Authentication Required, so no container could ever be created. Added a gatedDEV_RUNNER_PULL_POLICY:always(default — the prod posture): re-pull on every provision, so the boot-time digest-pin + cosign vetting runs each time.if-not-present: skip the re-pull only when the image is already cached in the engine.It changes only whether a present image is re-pulled — it does not touch the image allowlist or the digest requirement (both enforced in
policyClientlong before this runs), so a job naming an unlisted image is still refused whether or not it is cached.imageIsPresentdoes a purely localinspect(404 → pull; any other engine error propagates rather than being coerced to present/absent). The overlay setsif-not-presentfor local dev.Isolation preserved
No isolation property is weakened: egress stays default-deny, middleware still has no docker socket / no
DOCKER_HOST, daemon↔dind TLS verification stays on, and the image allowlist + digest enforcement are untouched. The pull-policy default (always) leaves the production posture exactly as shipped.Verification
Rebuilt the daemon image and recreated the stack on the pinned network. Daemon log: connects to dind over TLS with no altname error, and warms the pre-loaded
omadia-dev-runner:latestwith no 407 (the repeatingimage warm failedline is gone). Daemon suite green: 384 tests (+5 covering the pull-policy skip-when-present path).Local-dev prerequisite (unchanged posture)
With
if-not-present, the runner image must be present in dind first (build it anddocker loadit into the dind engine) — inherent to local dev, since the image is not on an accessible registry. Production is unaffected: it keepsalways+ a real registry.