chore(overlay): auto-create bus networks + document NATS_BIND - #1830
Conversation
Two safe follow-ups from the NATS fleet-bus work: 1. overlay-up-bus now depends on a new `ensure-overlay-networks` target that creates pmoves_bus + pmoves_external if missing. The split overlays declare networks `external: true` (so each overlay parses standalone), so they must pre-exist at runtime — base.yml owns them but only materializes them in a full `up`. This closes the manual `docker network create` gate hit when bringing NATS up on a fresh node. Subnets match docker-compose.base.yml. The deploy-nats-bus workflow drops its hardcoded network-create and relies on the target. 2. Document NATS_BIND in env.shared.example (blank default = 0.0.0.0). On a public VPS, set it to the node tailnet IP so the bus is mesh-only, not exposed on the public IP (nats:pmoves is a weak cred). Node-specific; never commit a real IP. Note: per the storage direction (minio is EOL → JuiceFS), the dedicated published-bus network (pmoves_bus_pub) is intentionally deferred until JuiceFS is wired into compose, so it can be designed with its real co-tenants. nats stays on pmoves_external for now. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughAdds an ChangesOverlay Network Pre-creation for NATS Bus
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Two safe follow-ups from the NATS fleet-bus restoration (#1813/#1824/#1826).
1.
overlay-up-busauto-creates its networksNew
ensure-overlay-networksprerequisite createspmoves_bus+pmoves_externalif missing. The split overlays declare networksexternal: true(so each parses standalone) → they must pre-exist at runtime;base.ymlowns them but only materializes them in a fullup. This closes the manualdocker network creategate hit when bringing NATS up on a fresh node. Subnets matchbase.yml. Thedeploy-nats-busworkflow drops its hardcoded create and relies on the target.2. Documented
NATS_BINDinenv.shared.exampleBlank default =
0.0.0.0. On a public VPS, set it to the node tailnet IP so the bus is mesh-only, not on the public IP (nats:pmovesis a weak cred). Node-specific; never commit a real IP.Deferred (intentionally)
Per the storage direction (minio is EOL → JuiceFS), the dedicated published-bus network (
pmoves_bus_pub, option 3) is deferred until JuiceFS is wired into compose, so it's designed with its real co-tenants.natsstays onpmoves_externalfor now.🤖 Generated with Claude Code
Summary by CodeRabbit
NATS_BINDenvironment variable configuration option to specify the host interface for NATS port binding.