feat(cloud): single-shot deploy.sh + FROST stack + healthchecks
Stage 5 — make the cloud composition spin up in one command and add
the SensorThings (FROST) stack as a fully segregated tenant.
cloud/deploy.sh — idempotent, 7-step bring-up:
preflight → validate → up + wait → cert state → issue/renew →
service status → endpoint smoke test. Reissues LE cert only when
current issuer no longer matches ACME_CA_URI. Move-aside-then-
restore-on-failure so the bootstrap cert survives a failed certbot.
stacks/frost — new stack, segregated from shared sql/rabbitmq:
- dedicated postgis container (frost-db)
- dedicated internal mosquitto bus (frost-mosquitto)
- frost-http + frost-mqtt on a private frost-internal network,
joined to cloud-app only for nginx ingress at frost.wbd-rd.nl
- shared mosquitto stack deleted; rabbitmq remains the only public
MQTT broker (mqtt.wbd-rd.nl:8883 via stream proxy)
stacks/sql — pg_isready healthcheck so keycloak/gitea/mlflow can gate
on service_healthy via cloud-level depends_on overrides.
stacks/nginx-proxy:
- nginx-init service generates a self-signed bootstrap cert on
fresh deploy so nginx starts before certbot has issued a real one
- frost.wbd-rd.nl vhost (/FROST-Server → frost-http:8080,
/mqtt → frost-mqtt:9876 WebSocket)
stacks/mlflow — custom Dockerfile (upstream + psycopg2-binary) so the
official image can speak to the shared sql backend.
stacks/jupyterhub — DummyAuthenticator stub gated by
JUPYTERHUB_ADMIN_PASSWORD; TODO comments point at OIDC + DockerSpawner.
stacks/rabbitmq — config/{enabled_plugins,rabbitmq.conf} stubs
(management + mqtt plugins, MQTT auth required).
stacks/portainer — ports unpublished; nginx now the only ingress.
stacks/node-red — pin to 4.1 (the floating "4" tag does not exist).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,40 +1,60 @@
|
||||
# Cloud / Central layer composition.
|
||||
# Includes all cloud-relevant stacks and defines the 4-network topology.
|
||||
# Run: cp .env.example .env && docker compose up -d
|
||||
# Pulls in every stack that runs on the central hub and adds cross-stack
|
||||
# dependencies (the per-stack composes stay standalone-runnable).
|
||||
#
|
||||
# Fresh-deploy procedure (see ../docs/architecture.md for the long version):
|
||||
# 1. cp .env.example .env && fill secrets
|
||||
# 2. Set DNS A records for the 10 short subdomains + vpn.wbd-rd.nl
|
||||
# 3. docker compose up -d
|
||||
# - nginx-init creates a self-signed bootstrap cert
|
||||
# - sql comes up, init.d/01-databases.sh provisions per-app DBs
|
||||
# - keycloak / gitea / mlflow wait on sql healthcheck before starting
|
||||
# 4. ./deploy.sh — single command. Brings everything up, runs first-time cert
|
||||
# issuance via certbot HTTP-01 (SAN over all *.wbd-rd.nl), reloads nginx,
|
||||
# smoke-tests every vhost. Idempotent; safe to rerun.
|
||||
# 5. Flip ACME_CA_URI from staging → prod in .env, ./deploy.sh again.
|
||||
|
||||
name: cloud
|
||||
|
||||
# Uncomment includes as each stack is hardened beyond stub.
|
||||
include:
|
||||
# Foundation (round 3) — ingress, auth backing store, ops console
|
||||
# Foundation — ingress, DB, ops console
|
||||
- ../stacks/nginx-proxy/compose.yml
|
||||
- ../stacks/sql/compose.yml
|
||||
- ../stacks/portainer/compose.yml
|
||||
# Core identity + VPN
|
||||
# - ../stacks/wireguard-server/compose.yml
|
||||
# Identity + VPN
|
||||
- ../stacks/keycloak/compose.yml
|
||||
- ../stacks/wireguard-server/compose.yml
|
||||
# Data
|
||||
# - ../stacks/influxdb/compose.yml
|
||||
- ../stacks/influxdb/compose.yml
|
||||
# Apps
|
||||
# - ../stacks/node-red/compose.yml
|
||||
# - ../stacks/grafana/compose.yml
|
||||
- ../stacks/node-red/compose.yml
|
||||
- ../stacks/grafana/compose.yml
|
||||
- ../stacks/gitea/compose.yml
|
||||
# - ../stacks/jenkins/compose.yml
|
||||
- ../stacks/jenkins/compose.yml
|
||||
# Messaging + mail
|
||||
# - ../stacks/rabbitmq/compose.yml
|
||||
# - ../stacks/postfix/compose.yml
|
||||
- ../stacks/rabbitmq/compose.yml
|
||||
- ../stacks/postfix/compose.yml
|
||||
# ML / notebooks
|
||||
# - ../stacks/mlflow/compose.yml
|
||||
# - ../stacks/jupyterhub/compose.yml
|
||||
# FROST (when deployed)
|
||||
# - ../stacks/mosquitto/compose.yml
|
||||
- ../stacks/mlflow/compose.yml
|
||||
- ../stacks/jupyterhub/compose.yml
|
||||
# SensorThings
|
||||
- ../stacks/frost/compose.yml
|
||||
|
||||
# NOTE on portainer transition:
|
||||
# The portainer stack publishes 9443+8000 for standalone first-run use.
|
||||
# When bringing it up through this cloud compose, take the standalone
|
||||
# instance down first (`cd stacks/portainer && docker compose down`) and
|
||||
# comment out the `ports:` block in stacks/portainer/compose.yml so
|
||||
# nginx-proxy is the only ingress. Access then via https://portainer.wbd-rd.nl/.
|
||||
# Cross-stack dependencies. Declared at the cloud level so each stack's
|
||||
# own compose.yml stays standalone-runnable (no required peers).
|
||||
services:
|
||||
keycloak:
|
||||
depends_on:
|
||||
sql:
|
||||
condition: service_healthy
|
||||
gitea:
|
||||
depends_on:
|
||||
sql:
|
||||
condition: service_healthy
|
||||
mlflow:
|
||||
depends_on:
|
||||
sql:
|
||||
condition: service_healthy
|
||||
|
||||
networks:
|
||||
edge:
|
||||
|
||||
Reference in New Issue
Block a user