Skip to content

Deploy swarm stacks that have nothing to build - #1

Merged
MakFly merged 7 commits into
mainfrom
feat/DEV-DEPL-65-image-only-deploy
Dec 1, 2026
Merged

MakFly merged 7 commits into
mainfrom
feat/DEV-DEPL-65-image-only-deploy

Conversation

@MakFly

@MakFly MakFly commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Why

An infrastructure stack made only of published images (a single Redis and a single RabbitMQ shared by several apps) could not be managed by Shuttle: every swarm deploy refused it with no services with build, every app must name a primary service that may not update stop-first, and the compose parser rejected the map form of networks needed to keep aliases.

What changes

  • A swarm deploy whose services all pin their image by digest skips the builder, the build runner and the registry tunnel, and applies the signed stack with those digests. A service without a digest is refused by name.
  • The primary service of an expose: internal app may use update_order: stop-first; the published service of a public app is still refused.
  • A service's networks may be written as a map (aliases are kept in the raw document).
  • Checked before any operation is reserved: a compose service named redis or rabbitmq must run as the account that owns its data and mount <app>_<service>_data. Refused only by the helper, it left the operation in recovery_required, and infra recreate destroyed the guest first.
  • An internal app's compose may not carry dev.shuttle.domain, which would publish it.
  • deploy.pre_deploy on a service that is not built uses the image its compose file pins, unless production.redis/production.rabbitmq replaces that service.

Verification

  • gofmt -l . empty, go vet ./... clean, go test ./... all packages ok.
  • End-to-end on an isolated single-node Swarm VM with a copy of real data: hand-deployed Redis + RabbitMQ stack, then shuttle deploy of the same services as an internal image-only app, then a manual rollback to the hand-deployed stack. Redis key counts, the RabbitMQ node name, queues, users and persisted test messages were identical at each step, and clients reached the services through their network aliases. Three full cycles, including a re-migration.
  • Not covered: shuttle rollback of such an app, and helper refusals other than the data account and volume.

Refs DEV-DEPL-65

🤖 Generated with Claude Code

MakFly and others added 7 commits December 1, 2026 23:32
An infrastructure stack such as a shared Redis and RabbitMQ is made only of
published images, and every swarm deploy refused it with 'no services with
build'. When every service pins its image by digest, the deploy now skips the
builder, the build runner and the registry tunnel and applies the signed stack
with those digests. A service without a digest is still refused, by name.

Refs DEV-DEPL-65

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The published service may not use stop-first because it is the one behind
Caddy. An expose: internal application publishes nothing, yet every app must
name a primary service, so a stack whose only services are a single RabbitMQ
and a single Redis could not avoid two tasks on one data volume.

Refs DEV-DEPL-65

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Compose writes a service's networks as a map to give them aliases, and the
typed parse expected a list, so the whole compose file failed to load. Only the
network keys are read; the raw document keeps the aliases.

Refs DEV-DEPL-65

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs DEV-DEPL-65

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of the image-only deploy: a compose service named redis or rabbitmq
without its data account or <app>_<service>_data volume key passed the client
checks and was refused by the helper only, which left the operation in
recovery_required (seen on the DEV-DEPL-65 recipe) and let infra recreate
destroy the guest first. The same checks now run in checkDeployInputs. An
internal app's compose may no longer carry dev.shuttle.domain, which would
publish the service that may update stop-first, and a pre-deploy hook on a
service that is not built uses the image its compose file pins. The stop-first
test now proves validation went past the update order.

Refs DEV-DEPL-65

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e image

Round 2 of the review: with production.redis or production.rabbitmq, the
generated service replaces the compose one, so the hook must not run the
compose image. The route-label test now goes through the infra recreate
preparation, which shares checkDeployInputs with deploy, and fails if that
check is unplugged.

Refs DEV-DEPL-65

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…oice

Round 3 of the review: the generated-service guard covers both names, the test
only covered Redis.

Refs DEV-DEPL-65

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MakFly
MakFly merged commit bc1c1ee into main Dec 1, 2026
3 checks passed
@MakFly
MakFly deleted the feat/DEV-DEPL-65-image-only-deploy branch December 1, 2026 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant