Skip to content

feat(templates): cloud-emulation engines — localstack, nats, kafka (redpanda), rabbitmq (spec 28) - #86

Merged
gustavobertoi merged 1 commit into
mainfrom
feat/spec28-cloud-engines
Jul 1, 2026
Merged

feat(templates): cloud-emulation engines — localstack, nats, kafka (redpanda), rabbitmq (spec 28)#86
gustavobertoi merged 1 commit into
mainfrom
feat/spec28-cloud-engines

Conversation

@gustavobertoi

Copy link
Copy Markdown
Contributor

Spec 28 — four net-new shared-engine templates turn devstack into a local cloud. Built in a worktree, verified locally (make ci + determinism green).

  • localstackprovides: aws, exports [host,port,endpoint,region], port 4566, SERVICES param, /_localstack/health check.
  • natsprovides: nats, port 4222 (+8222 monitor), JetStream (-js).
  • kafkaprovides: kafka, Redpanda default (major-stable tag, image: escape hatch), port 9092, dual advertised listeners, rpk cluster health.
  • rabbitmqprovides: amqp, port 5672 (+15672 mgmt), RABBITMQ_DEFAULT_PASS as a valueless secret env key.

Each declares the standard provides:/exports:/defaultPort:/healthcheck: engine contract, is added to templates/embed.go, and passes template lint/template test (golden per dir). The sharedAttr resolver gains non-secret endpoint/region cases + a per-template secondary-port lookup (nats monitor / kafka admin / rabbitmq mgmt) so every exported attr resolves. template list shows all four.

Determinism green (existing built-ins untouched); CGO-free 4-target cross-build clean; no new Go deps. ministack skipped — its ministack.org image tag/port/SERVICES/health are unconfirmed offline (a deferral note is in the spec); authored as a follow-up once confirmed.

🤖 Generated with Claude Code

…edpanda), rabbitmq (spec 28)

Add four net-new shared-engine templates under templates/<name>/template.yaml,
each declaring provides:/exports:/defaultPort:/params:/service:/volumes: — the
same shared-engine contract postgres/redis/minio satisfy:

- localstack  provides aws   (defaultPort 4566; exports endpoint/region)
- nats        provides nats  (4222 client + 8222 monitor; JetStream -js)
- kafka       provides kafka (Redpanda single-binary; 9092 + dual listeners)
- rabbitmq    provides amqp  (5672 + 15672 mgmt; secret pass via env.import)

Resolver (internal/generate/resolver.go) gains the non-secret AWS-emulation
export attrs endpoint (in-network alias URL) and region (param, default
us-east-1), plus a per-template export-attr→secondary-port lookup so
monitorPort/adminPort/mgmtPort resolve. Secret attrs stay rejected inline.

Each template passes `template lint`/`template test` (golden.yaml added) and is
embedded via go:embed. Determinism, CGO=0 build, and the four cross-compile
targets stay green. ministack deferred (image/port/health unconfirmed offline);
noted in the spec open-question.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gustavobertoi
gustavobertoi merged commit 7bdc714 into main Jul 1, 2026
4 checks passed
@gustavobertoi
gustavobertoi deleted the feat/spec28-cloud-engines branch July 1, 2026 00:22
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