deploy: Panorama off the platform (Atrium#53)
Panorama's trends live on Atrium's home (GET /home/trends) and 0018 hides its catalogue row. Now the kit drops it: front door MODULES, compose services/networks/volume, init.sh/push.sh/preflight cases, env templates, the submodule, and the seed (existing rows stay, hidden by 0018). The event READER tier stays, empty by default. Runbooks mark it retired. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -19,7 +19,7 @@ ROOT_PATH=
|
||||
# streams every other module to its backend. This is that FIXED map, slug=http://service:port,
|
||||
# comma-separated; the upstream never comes from a request. A slug left out answers 404. Empty for
|
||||
# the standalone stack in docker-compose.yml (Atrium alone, at /atrium).
|
||||
# FRONTDOOR_UPSTREAMS=galena=http://galena-backend:8000,sygna=http://sygna-backend:8000,counsel=http://counsel-backend:8000,insider=http://insider-backend:8000,arbiter=http://arbiter-backend:8000,lexicon=http://lexicon-backend:8000,agora=http://agora-backend:8000,panorama=http://panorama-backend:8000,parafa=http://parafa-backend:8000,scribe=http://scribe-backend:8000,workflow=http://workflow-backend:8000
|
||||
# FRONTDOOR_UPSTREAMS=galena=http://galena-backend:8000,sygna=http://sygna-backend:8000,counsel=http://counsel-backend:8000,insider=http://insider-backend:8000,arbiter=http://arbiter-backend:8000,lexicon=http://lexicon-backend:8000,agora=http://agora-backend:8000,parafa=http://parafa-backend:8000,scribe=http://scribe-backend:8000,workflow=http://workflow-backend:8000
|
||||
FRONTDOOR_UPSTREAMS=
|
||||
|
||||
# ── Database ─────────────────────────────────────────────────────────────────
|
||||
@@ -140,7 +140,7 @@ CORS_ALLOW_ORIGINS=
|
||||
# ── Bootstrap admin (seed) ───────────────────────────────────────────────────
|
||||
BOOTSTRAP_ADMIN_EMAIL=admin@example.com
|
||||
BOOTSTRAP_ADMIN_PASSWORD=admin12345
|
||||
# The seed also puts the Dredd family (Galena, Sygna, Counsel Scorecard, Insider, Arbiter, Lexicon, Agora, Panorama, Parafa, Scribe, Workflow) into the module
|
||||
# The seed also puts the Dredd family (Galena, Sygna, Counsel Scorecard, Insider, Arbiter, Lexicon, Agora, Parafa, Scribe, Workflow) into the module
|
||||
# catalog — once per instance, without addresses; add those under Administration → Modules.
|
||||
|
||||
# ── App tokens ───────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
[submodule "deploy/modules/agora"]
|
||||
path = deploy/modules/agora
|
||||
url = https://github.com/Alpaq92/Agora
|
||||
[submodule "deploy/modules/panorama"]
|
||||
path = deploy/modules/panorama
|
||||
url = https://github.com/Alpaq92/Panorama
|
||||
[submodule "deploy/modules/parafa"]
|
||||
path = deploy/modules/parafa
|
||||
url = https://github.com/Alpaq92/Parafa
|
||||
|
||||
@@ -6,7 +6,7 @@ Guidance for Claude Code when working in this repository.
|
||||
|
||||
**Atrium** — the Dredd family's front door: a launcher (the sidebar's *Apps*), a home page
|
||||
(*Strona główna*: search over the modules, the figures,
|
||||
your pending access requests and, for an administrator, the platform's state), a **marketplace** of modules (Galena, Sygna, Counsel Scorecard, Insider, Arbiter, …; Workflow/`compass` was retired 2026-11-14 — revision `0014` drops its catalogue row and `module_permission` rows) and the
|
||||
your pending access requests and, for an administrator, the platform's state), a **marketplace** of modules (Galena, Sygna, Counsel Scorecard, Insider, Arbiter, …; Workflow/`compass` was retired 2026-11-14 — revision `0014` drops its catalogue row and `module_permission` rows; Panorama was taken off the platform in Atrium#53 — its trends are home's `GET /home/trends`, revision `0018` hides its row) and the
|
||||
administration that decides who is offered what. Built on **dredd-core**, the shared substrate of
|
||||
this app family:
|
||||
identity, sessions, auth, the access-control resolver, the org tree, audit and the security
|
||||
|
||||
@@ -126,7 +126,7 @@ class Settings(BaseSettings):
|
||||
# role here and migrating revokes it.
|
||||
module_event_emitter_roles: str = ""
|
||||
# The READER tier (dredd-core 0.23.0): runtime roles that may SELECT the log and nothing else
|
||||
# (`panorama_app`, whose trends aggregate it and which says nothing itself). Same rules: only
|
||||
# (none since Panorama left the platform, Atrium#53; kept for a module that reports on the log). Same rules: only
|
||||
# once also in IDENTITY_READER_ROLES, removed = revoked on the next migrate, and a role is an
|
||||
# emitter or a reader, never both (the grant block refuses the overlap).
|
||||
module_event_reader_roles: str = ""
|
||||
|
||||
@@ -53,7 +53,7 @@ Send = Callable[[dict], Awaitable[None]]
|
||||
#: Atrium is served in-process; these are the modules it may proxy to. A slug outside this set can
|
||||
#: never be configured, so a typo in FRONTDOOR_UPSTREAMS refuses start-up.
|
||||
ATRIUM = "atrium"
|
||||
MODULES = ("galena", "sygna", "counsel", "insider", "arbiter", "lexicon", "agora", "panorama",
|
||||
MODULES = ("galena", "sygna", "counsel", "insider", "arbiter", "lexicon", "agora",
|
||||
"parafa", "scribe", "workflow")
|
||||
SLUGS = (ATRIUM, *MODULES)
|
||||
|
||||
@@ -65,7 +65,7 @@ MAX_BODY = 100 * 1024 * 1024
|
||||
TIMEOUT = httpx.Timeout(connect=5.0, read=300.0, write=300.0, pool=10.0)
|
||||
|
||||
NOT_FOUND = (b"Not found. This server serves /atrium, /galena, /sygna, /counsel, /insider, "
|
||||
b"/arbiter, /lexicon, /agora, /panorama, /parafa, /scribe and /workflow.")
|
||||
b"/arbiter, /lexicon, /agora, /parafa, /scribe and /workflow.")
|
||||
|
||||
# RFC 9110 7.6.1, plus the two non-standard ones still seen in the wild. Never forwarded either way,
|
||||
# together with every header a `Connection` header names.
|
||||
|
||||
+4
-15
@@ -35,8 +35,10 @@ CATALOG_SEEDED = "_seed.catalog"
|
||||
# is already in the catalogue — an administrator added it by hand — only the marker is written; once
|
||||
# the marker exists the entry is never offered again, so deleting it afterwards sticks. A fresh
|
||||
# install gets these with the rest of FAMILY and sets their markers then. The next module that
|
||||
# joins appends its slug here; nothing ever leaves this tuple.
|
||||
ADDED_AFTER_FIRST_SEED: tuple[str, ...] = ("insider", "arbiter", "lexicon", "agora", "panorama",
|
||||
# joins appends its slug here. The one exception is Panorama, retired from the platform (Atrium#53):
|
||||
# it left FAMILY and this tuple, a box seeded earlier keeps its row, hidden from the menu by
|
||||
# revision 0018, and a fresh install never offers it.
|
||||
ADDED_AFTER_FIRST_SEED: tuple[str, ...] = ("insider", "arbiter", "lexicon", "agora",
|
||||
"parafa", "scribe", "workflow")
|
||||
|
||||
|
||||
@@ -151,19 +153,6 @@ FAMILY: list[dict] = [
|
||||
"jako kolejne wersje w Galenie, porównanie dwóch rund i wewnętrzne komentarze zespołu."
|
||||
),
|
||||
},
|
||||
{
|
||||
# The platform's dashboard (the split plan's M4). Pink is Panorama's own brand colour (Open
|
||||
# Color pink, its CLAUDE.md). In English the tagline reads "The platform dashboard".
|
||||
"slug": "panorama", "name": "Panorama", "hue": "pink", "glyph": "chart", "sort_order": 90,
|
||||
# Folded into Atrium's home (Atrium#53, stage 3): its trends are the home page's now.
|
||||
"in_menu": False,
|
||||
"category": "Pulpit",
|
||||
"tagline": "Pulpit platformy.",
|
||||
"description": (
|
||||
"Panorama zbiera bieżące liczby z modułów platformy, każdą z uprawnieniami oglądającej "
|
||||
"osoby, i pokazuje trendy z dziennika zdarzeń."
|
||||
),
|
||||
},
|
||||
{
|
||||
# Electronic signing of PDFs (the split plan's M6): PAdES signatures through pyHanko, on an
|
||||
# uploaded file or a Galena document. Yellow is Parafa's own brand colour (Open Color yellow,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""deploy/push.sh checks Lexicon, Agora and Panorama (the split plan's M2-M4) with exactly the lists each
|
||||
"""deploy/push.sh checks Lexicon and Agora (the split plan's M2-M3) with exactly the lists each
|
||||
declares, and with the platform tier each is granted.
|
||||
|
||||
Each module's evidence lists are `app.models.APPEND_ONLY_TABLES` / `NO_DELETE_TABLES`, which its 0002
|
||||
@@ -6,8 +6,8 @@ grants from and its CI's managed check passes, so push.sh's CHECK_EXTRA is compa
|
||||
the submodule is checked out: an evidence table a module adds later must not deploy unchecked.
|
||||
|
||||
The tiers: Lexicon calls the models (a model-provider KEY reader), Agora writes the event log (an
|
||||
EMITTER), Panorama reads it and writes nothing (dredd-core 0.23.0's READER tier). The hub's template
|
||||
and init.sh list each in exactly its own tier.
|
||||
EMITTER). The hub's template and init.sh list each in exactly its own tier. Panorama (M4), the one
|
||||
module of the READER tier, left the platform (Atrium#53): the tier stays, and nothing is listed in it.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -20,7 +20,7 @@ ROOT = pathlib.Path(__file__).resolve().parents[2]
|
||||
PUSH = ROOT / "deploy" / "push.sh"
|
||||
INIT = ROOT / "deploy" / "init.sh"
|
||||
ATRIUM_ENV = ROOT / "deploy" / "env" / "atrium.env.example"
|
||||
MODULES = ("lexicon", "agora", "panorama")
|
||||
MODULES = ("lexicon", "agora")
|
||||
|
||||
|
||||
def _tuple(src: str, name: str) -> list[str]:
|
||||
@@ -58,7 +58,7 @@ def test_each_module_is_checked_in_its_own_tier():
|
||||
push = PUSH.read_text(encoding="utf-8")
|
||||
assert 'case $slug in lexicon) IDENTITY_CHECK_ARGS="$IDENTITY_CHECK_ARGS --model-provider-keys" ;; esac' in push
|
||||
assert "case $slug in galena|agora|parafa|workflow|arbiter)" in push
|
||||
assert 'case $slug in panorama) IDENTITY_CHECK_ARGS="$IDENTITY_CHECK_ARGS --events-reader" ;; esac' in push
|
||||
assert "case $slug in panorama)" not in push and "--events-reader\" ;;" not in push
|
||||
|
||||
|
||||
def test_the_hub_template_lists_each_in_exactly_its_tier():
|
||||
@@ -66,14 +66,13 @@ def test_the_hub_template_lists_each_in_exactly_its_tier():
|
||||
_list("MODULE_EVENT_READER_ROLES"))
|
||||
assert "lexicon_app" in keys and "lexicon_migrator" not in _list("MODEL_PROVIDER_MIGRATOR_ROLES")
|
||||
assert "agora_app" in emitters and "agora_app" not in readers
|
||||
assert readers == ["panorama_app"] and "panorama_app" not in emitters
|
||||
assert readers == [] and "panorama_app" not in emitters
|
||||
assert _list("MODEL_PROVIDER_MIGRATOR_ROLES") == ["arbiter_migrator"]
|
||||
|
||||
|
||||
def test_init_add_puts_each_module_in_its_tier():
|
||||
init = INIT.read_text(encoding="utf-8")
|
||||
assert "case $ADD in galena|agora|parafa|workflow|arbiter)" in init
|
||||
assert 'add_to_list "$OUT/env/atrium.env" MODULE_EVENT_READER_ROLES "$ROLE_PREFIX${ADD}_app"' in init
|
||||
assert '"env/atrium.env:MODULE_EVENT_READER_ROLES"' in init
|
||||
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ PUSH = DEPLOY / "push.sh"
|
||||
PREFLIGHT = DEPLOY / "preflight.sh"
|
||||
ENVFILE_LIB = DEPLOY / "lib" / "envfile.sh"
|
||||
FAMILY = ("atrium", "galena", "sygna", "counsel", "insider", "arbiter", "lexicon", "agora",
|
||||
"panorama", "parafa", "scribe", "workflow")
|
||||
"parafa", "scribe", "workflow")
|
||||
#: Where an app's tree sits inside its checkout — push.sh's SUBDIR and preflight.sh's. Arbiter's
|
||||
#: repository also carries the analysis engine and holds the application in a subdirectory; every other
|
||||
#: app's repository is the application. The fixture has to lay the scratch tree out the same way, or
|
||||
@@ -144,7 +144,7 @@ def rig(tmp_path_factory):
|
||||
base_env = f"MODULES_DIR={root / 'modules'}\nDEPLOY_ENV_DIR={root / 'env'}\n"
|
||||
# The rig is a box with every module deployed, the switched-off ones included, so the tests above mean
|
||||
# "all of them" without each having to say so. .env.off is the same box before either was switched on.
|
||||
_write(root / ".env", base_env + "COMPOSE_PROFILES=insider,arbiter,lexicon,agora,panorama,parafa,scribe,workflow\n")
|
||||
_write(root / ".env", base_env + "COMPOSE_PROFILES=insider,arbiter,lexicon,agora,parafa,scribe,workflow\n")
|
||||
_write(root / ".env.off", base_env)
|
||||
# Records the command line and succeeds, so the push walks all five steps without a database.
|
||||
_write(root / "recorder.sh", '#!/usr/bin/env bash\nprintf \'%s\\n\' "$*" >> "$PUSH_TRACE"\nexit 0\n')
|
||||
@@ -161,8 +161,8 @@ HUB_ON_THE_PLATFORM = {
|
||||
"IDENTITY_MIGRATOR_ROLES": ",".join(f"{app}_migrator" for app in FAMILY[1:]),
|
||||
# The modules taking part in the shared event log (dredd-core 0.20.0), init.sh's default.
|
||||
"MODULE_EVENT_EMITTER_ROLES": "galena_app,agora_app,parafa_app,workflow_app,arbiter_app",
|
||||
# The event log's reader tier (dredd-core 0.23.0) and the model-provider key readers.
|
||||
"MODULE_EVENT_READER_ROLES": "panorama_app",
|
||||
# The event log's reader tier (dredd-core 0.23.0; empty since Panorama left) and the key readers.
|
||||
"MODULE_EVENT_READER_ROLES": "",
|
||||
"MODEL_PROVIDER_KEY_READER_ROLES": "arbiter_app,lexicon_app",
|
||||
# The shared counterparty register (dredd-core 0.21.0), init.sh's default: Sygna writes and its
|
||||
# migrator moves its own rows in through the hub's import door; nobody reads since Workflow left.
|
||||
@@ -371,7 +371,7 @@ class TestTheHalfDoneShapesOfOneAccountAreRefused:
|
||||
and must not be a refusal here."""
|
||||
done, _ = _push(rig, platform=True, trace="spaces", settings={"atrium": {
|
||||
"IDENTITY_READER_ROLES": "galena_app, sygna_app, counsel_app, insider_app, arbiter_app, "
|
||||
"lexicon_app, agora_app, panorama_app, parafa_app, scribe_app, "
|
||||
"lexicon_app, agora_app, parafa_app, scribe_app, "
|
||||
"workflow_app"}})
|
||||
assert done.returncode == 0, done.stdout + done.stderr
|
||||
|
||||
|
||||
@@ -313,28 +313,29 @@ class TestEventEmitters:
|
||||
assert tiers == {"emitters": ["atrium_app"], "readers": [], "pending": []}
|
||||
|
||||
def test_the_reader_tier_once_joined(self):
|
||||
"""dredd-core 0.23.0: MODULE_EVENT_READER_ROLES (Panorama) is SELECT only, joined like an
|
||||
emitter, and never added to the emitters."""
|
||||
"""dredd-core 0.23.0: MODULE_EVENT_READER_ROLES is SELECT only, joined like an
|
||||
emitter, and never added to the emitters. No module uses it since Panorama
|
||||
left the platform (Atrium#53), so the role here is a stand-in."""
|
||||
tiers = identity_grants.event_emitters(_platform(
|
||||
identity_reader_roles="galena_app,agora_app,panorama_app",
|
||||
identity_reader_roles="galena_app,agora_app,reporter_app",
|
||||
module_event_emitter_roles="galena_app,agora_app",
|
||||
module_event_reader_roles="panorama_app, lexicon_app"))
|
||||
module_event_reader_roles="reporter_app, lexicon_app"))
|
||||
assert tiers == {"emitters": ["atrium_app", "galena_app", "agora_app"],
|
||||
"readers": ["panorama_app"], "pending": ["lexicon_app"]}
|
||||
"readers": ["reporter_app"], "pending": ["lexicon_app"]}
|
||||
|
||||
def test_the_readers_reach_the_grant_block(self, monkeypatch):
|
||||
monkeypatch.setattr(identity_grants, "event_table_exists", lambda conn, s: True)
|
||||
sql = identity_grants.event_statements(_platform(
|
||||
identity_reader_roles="panorama_app", module_event_reader_roles="panorama_app"),
|
||||
identity_reader_roles="reporter_app", module_event_reader_roles="reporter_app"),
|
||||
"atrium_migrator", object())
|
||||
assert len(sql) == 2 and "panorama_app" in sql[1]
|
||||
assert len(sql) == 2 and "reporter_app" in sql[1]
|
||||
|
||||
def test_a_role_in_both_tiers_is_refused(self, monkeypatch):
|
||||
monkeypatch.setattr(identity_grants, "event_table_exists", lambda conn, s: True)
|
||||
with pytest.raises(identity_grants.GrantsRefused, match="MODULE_EVENT_READER_ROLES"):
|
||||
identity_grants.event_statements(_platform(
|
||||
identity_reader_roles="panorama_app", module_event_emitter_roles="panorama_app",
|
||||
module_event_reader_roles="panorama_app"), "atrium_migrator", object())
|
||||
identity_reader_roles="reporter_app", module_event_emitter_roles="reporter_app",
|
||||
module_event_reader_roles="reporter_app"), "atrium_migrator", object())
|
||||
|
||||
def test_standalone_renders_nothing(self):
|
||||
assert identity_grants.event_statements(_settings(), "atrium_migrator", None) == []
|
||||
|
||||
@@ -230,8 +230,10 @@ class TestServiceModules:
|
||||
def test_galena_is_seeded_as_a_service(self):
|
||||
from app.seed import FAMILY
|
||||
flags = {e["slug"]: e.get("in_menu", True) for e in FAMILY}
|
||||
assert flags["galena"] is False and flags["arbiter"] is False and flags["panorama"] is False
|
||||
assert all(flags[s] for s in flags if s not in ("galena", "arbiter", "panorama"))
|
||||
assert flags["galena"] is False and flags["arbiter"] is False
|
||||
# Panorama left the platform (Atrium#53): no longer seeded; 0018 hides an existing row.
|
||||
assert "panorama" not in flags
|
||||
assert all(flags[s] for s in flags if s not in ("galena", "arbiter"))
|
||||
|
||||
def test_the_catalogue_hides_it_from_people_not_administrators(self):
|
||||
body = inspect.getsource(marketplace.browse)
|
||||
|
||||
@@ -81,3 +81,15 @@ def test_0018_retires_only_panorama_from_the_menu(monkeypatch):
|
||||
assert (rev.revision, rev.down_revision) == ("0018", "0017")
|
||||
up, = _run(rev, monkeypatch, "upgrade")
|
||||
assert up.startswith("UPDATE module SET in_menu=false") and "module.slug = 'panorama'" in up
|
||||
|
||||
|
||||
def test_panorama_is_off_the_platform():
|
||||
"""Atrium#53: the seed no longer offers Panorama and the front door no longer routes it; an
|
||||
existing row stays, hidden from the menu by 0018 (above)."""
|
||||
from app import frontdoor
|
||||
from app.seed import ADDED_AFTER_FIRST_SEED, FAMILY
|
||||
|
||||
assert "panorama" not in {e["slug"] for e in FAMILY}
|
||||
assert "panorama" not in ADDED_AFTER_FIRST_SEED
|
||||
assert "panorama" not in frontdoor.MODULES
|
||||
assert b"/panorama" not in frontdoor.NOT_FOUND
|
||||
|
||||
+2
-2
@@ -38,10 +38,10 @@ MODULES_DIR=./modules
|
||||
# Its optional OCR worker is a second profile, `ocr`, which only means something with `insider` on.
|
||||
# Arbiter (contract analysis, built from the arbiter submodule's apps/arbiter) ships switched off too,
|
||||
# under the `arbiter` profile (deploy/RUNBOOK-arbiter.md).
|
||||
# Lexicon, Agora and Panorama (the split plan's M2-M4) the same, each under a profile of its own name
|
||||
# Lexicon and Agora (the split plan's M2-M3) the same, each under a profile of its own name
|
||||
# (deploy/RUNBOOK-m2-m4.md); Parafa and Scribe (M6, M7) likewise (deploy/RUNBOOK-m6-m7.md),
|
||||
# and Workflow, the approval engine (deploy/RUNBOOK-workflow.md).
|
||||
# COMPOSE_PROFILES=insider,arbiter,lexicon,agora,panorama,parafa,scribe,workflow
|
||||
# COMPOSE_PROFILES=insider,arbiter,lexicon,agora,parafa,scribe,workflow
|
||||
# Parafa's signer: a directory holding the operator's PKCS#12 signing file and its passphrase file,
|
||||
# mounted READ-ONLY into parafa-backend at /run/parafa-signer (env/parafa.env names the files).
|
||||
# Relative to this directory; empty or missing = signing unconfigured (409 signing_unconfigured).
|
||||
|
||||
+8
-5
@@ -60,19 +60,22 @@ deployment, and the kit in this directory does the per-app work for all four app
|
||||
| Arbiter (off by default) | `arbiter` | `arbiter_migrator`, `arbiter_app` | none | `audit_log`, `analysis_signoff`, `agent_version`, `frozen_card` append-only; `analysis` never deleted |
|
||||
| Lexicon (off by default) | `lexicon` | `lexicon_migrator`, `lexicon_app` | none | `audit_log` append-only |
|
||||
| Agora (off by default) | `agora` | `agora_migrator`, `agora_app` | none | `audit_log`, `module_event`, `module_event_receipt` append-only; `negotiation_room`, `negotiation_round`, `negotiation_comment` never deleted |
|
||||
| Panorama (off by default) | `panorama` | `panorama_migrator`, `panorama_app` | none | `audit_log` append-only |
|
||||
| Parafa (off by default) | `parafa` | `parafa_migrator`, `parafa_app` | none | `audit_log`, `module_event`, `module_event_receipt` append-only; `signing_request` never deleted |
|
||||
| Scribe (off by default) | `scribe` | `scribe_migrator`, `scribe_app` | none | `audit_log` append-only; `draft_export` never deleted |
|
||||
| Workflow (off by default) | `workflow` | `workflow_migrator`, `workflow_app` | `pgcrypto` | `audit_log`, `module_event`, `module_event_receipt`, `workflow_event` append-only; `workflow_run`, `request`, `workflow_template`, `request_type`, `approver_group` never deleted |
|
||||
|
||||
**Workflow (codename `compass`) was retired on 2026-11-14** and is no longer in the kit; a box that ran
|
||||
it is taken down by the removal runbook kept outside the kit (dump, stop, DROP SCHEMA, DROP ROLE), and Atrium's
|
||||
revision `0014` removes its catalogue entry and its `module_permission` rows. **Insider** (legal acts and case law, REST + MCP at
|
||||
revision `0014` removes its catalogue entry and its `module_permission` rows. **Panorama (the dashboard, M4) was
|
||||
retired in Atrium#53**: its trends are Atrium's home page now (`GET /home/trends`), Atrium's revision `0018` hides
|
||||
its catalogue entry, and its services, env templates and submodule are gone from the kit. On a box that ran it,
|
||||
`docker compose up -d --remove-orphans` stops its containers; its schema, roles and `panorama-data` volume stay
|
||||
until the operator drops them, and `panorama_app` should leave `MODULE_EVENT_READER_ROLES`. **Insider** (legal acts and case law, REST + MCP at
|
||||
`/insider/mcp`), ships switched off the same way (profile `insider`, with an optional OCR worker under a
|
||||
second profile, `ocr`); bringing it in is [`RUNBOOK-insider.md`](RUNBOOK-insider.md). **Arbiter** (contract analysis, split out of
|
||||
Compass; built from the `arbiter` submodule's `apps/arbiter`, repository `Alpaq92/Arbiter`), ships switched off under the profile `arbiter`;
|
||||
bringing it in is [`RUNBOOK-arbiter.md`](RUNBOOK-arbiter.md). **Lexicon, Agora and Panorama, the eighth to tenth**
|
||||
(the clause library, negotiation rooms and the dashboard, the split plan's M2-M4) ship switched off the same way,
|
||||
bringing it in is [`RUNBOOK-arbiter.md`](RUNBOOK-arbiter.md). **Lexicon and Agora, the eighth and ninth**
|
||||
(the clause library and negotiation rooms, the split plan's M2-M3) ship switched off the same way,
|
||||
each under a profile of its own name; bringing them in is [`RUNBOOK-m2-m4.md`](RUNBOOK-m2-m4.md). **Parafa and Scribe, the
|
||||
eleventh and twelfth** (PAdES signing of PDFs and drafting from templates and clauses, M6 and M7) the same; bringing
|
||||
them in is [`RUNBOOK-m6-m7.md`](RUNBOOK-m6-m7.md). **Workflow** (`Alpaq92/Workflow`, slug `workflow`: the
|
||||
@@ -147,7 +150,7 @@ Then verify as in §7 step 7, and set Atrium's module addresses as in §8.
|
||||
|
||||
**One address, a path per module, and Atrium is the front door.** There is no reverse proxy:
|
||||
`atrium-backend` publishes `:80` and serves the whole family as one site — `<site>/atrium`,
|
||||
`<site>/galena`, `<site>/sygna`, `<site>/counsel`, `<site>/insider`, `<site>/arbiter`, `<site>/lexicon`, `<site>/agora`, `<site>/panorama`, `<site>/parafa`, `<site>/scribe`, `<site>/workflow`; `/` redirects to `/atrium/` and a
|
||||
`<site>/galena`, `<site>/sygna`, `<site>/counsel`, `<site>/insider`, `<site>/arbiter`, `<site>/lexicon`, `<site>/agora`, `<site>/parafa`, `<site>/scribe`, `<site>/workflow`; `/` redirects to `/atrium/` and a
|
||||
bare `/<slug>` to `/<slug>/`. It serves Atrium itself and streams every other path to that module's
|
||||
backend, from a **fixed** map in `compose.yaml` (`FRONTDOOR_UPSTREAMS`; no target ever comes from a
|
||||
request), refuses encoded or dot-segment path tricks, drops inbound `X-Forwarded-*` and sets them anew
|
||||
|
||||
+18
-21
@@ -1,6 +1,10 @@
|
||||
# Runbook: Lexicon, Agora and Panorama onto a running platform
|
||||
# Runbook: Lexicon and Agora onto a running platform
|
||||
|
||||
The eighth to tenth modules, split out of Compass (the split plan's M2, M3 and M4). Each is a
|
||||
> **Panorama (M4) is retired** (Atrium#53): its trends are Atrium's home page now (`GET /home/trends`),
|
||||
> Atrium's revision `0018` hides its catalogue entry, and the kit no longer carries it. Its steps are
|
||||
> gone from this runbook; `deploy/README.md` says what to do on a box that ran it.
|
||||
|
||||
The eighth and ninth modules, split out of Compass (the split plan's M2 and M3). Each is a
|
||||
dredd-core app in simple tenancy with its own repository, its own submodule under
|
||||
`deploy/modules/<slug>`, its own schema and roles, `MODULE_SLUG=<slug>`, one account through Atrium,
|
||||
and each ships **switched off** under a Compose profile of its own name.
|
||||
@@ -9,14 +13,13 @@ and each ships **switched off** under a Compose profile of its own name.
|
||||
|---|---|---|---|---|---|
|
||||
| Lexicon (clause and standards library) | `/lexicon` | `Alpaq92/Lexicon` | 172.30.17.0/24 / 172.30.27.0/24 | `MODEL_PROVIDER_KEY_READER_ROLES` += `lexicon_app` | `--append-only audit_log --model-provider-keys` |
|
||||
| Agora (negotiation rooms) | `/agora` | `Alpaq92/Agora` | 172.30.18.0/24 / 172.30.28.0/24 | `MODULE_EVENT_EMITTER_ROLES` += `agora_app` | `--append-only audit_log module_event module_event_receipt --no-delete negotiation_room negotiation_round negotiation_comment --events` |
|
||||
| Panorama (dashboard) | `/panorama` | `Alpaq92/Panorama` | 172.30.19.0/24 / 172.30.29.0/24 | `MODULE_EVENT_READER_ROLES` += `panorama_app` | `--append-only audit_log --events-reader` |
|
||||
|
||||
What the kit carries for each: `<slug>-migrate` / `<slug>-backend` in `compose.yaml`
|
||||
(`FORWARDED_ALLOW_IPS` = its own subnet, `FRAME_ANCESTORS='self'`, no published port, volume
|
||||
`<slug>-data`, health at `/healthz`), the front door's `<slug>=http://<slug>-backend:8000`,
|
||||
`env/<slug>.env.example` + `env/<slug>.migrate.env.example`, `./init.sh --add <slug>`, and push.sh's
|
||||
provision, migrate and check. The catalogue tiles (Lexicon green `file`, Agora red `users`, Panorama
|
||||
pink `chart`) are offered once to an already-seeded Atrium by its seed (`ADDED_AFTER_FIRST_SEED`).
|
||||
provision, migrate and check. The catalogue tiles (Lexicon green `file`, Agora red `users`)
|
||||
are offered once to an already-seeded Atrium by its seed (`ADDED_AFTER_FIRST_SEED`).
|
||||
|
||||
**What each needs from the others.**
|
||||
|
||||
@@ -30,11 +33,6 @@ pink `chart`) are offered once to an already-seeded Atrium by its seed (`ADDED_A
|
||||
- **Agora** writes `negotiation.round_received` to the hub's event log when the other side sends a
|
||||
round: `agora_app` must be an event EMITTER before Agora goes live, or every such round fails.
|
||||
`GALENA_BASE_URL` (hairpin) makes a Galena room's rounds new versions of its document.
|
||||
- **Panorama** reads every other module's `GET /api/v1/stats` with the viewer's own token (the
|
||||
`*_BASE_URL` hairpins in `env/panorama.env`, all written by init) and the event log as a READER
|
||||
only (dredd-core 0.23.0's reader tier). The hub grants that tier only from this Atrium release on:
|
||||
Atrium pins dredd-core **v0.23.0** and passes `MODULE_EVENT_READER_ROLES` to `event_grants_sql`; the
|
||||
push's check (`--events-reader`) runs with Atrium's dredd-core too.
|
||||
|
||||
**Rules for the whole sitting.** Run everything from `/srv/atrium/deploy` (Option A). Never
|
||||
`./init.sh --force` and never `docker compose down -v`. Pass `-T` to every `docker compose run`/`exec`
|
||||
@@ -47,7 +45,7 @@ in `env/atrium.env` and refuses a listed role that does not exist.
|
||||
## Step 0 — Before the box
|
||||
|
||||
- This Atrium release is merged and pushed; its submodule pins are commits on each module's `main`.
|
||||
- The deploy token reaches `Lexicon`, `Agora`, `Panorama`, `dredd-core` and `Arbiter`.
|
||||
- The deploy token reaches `Lexicon`, `Agora`, `dredd-core` and `Arbiter`.
|
||||
|
||||
## Step 1 — A dump
|
||||
|
||||
@@ -60,7 +58,7 @@ docker compose exec -T postgres sh -c 'pg_dump -U postgres -d "$POSTGRES_DB" -Fc
|
||||
|
||||
```bash
|
||||
git -C .. pull --ff-only
|
||||
git -C .. submodule update --init deploy/modules/lexicon deploy/modules/agora deploy/modules/panorama
|
||||
git -C .. submodule update --init deploy/modules/lexicon deploy/modules/agora
|
||||
```
|
||||
|
||||
## Step 3 — Write their settings
|
||||
@@ -68,13 +66,12 @@ git -C .. submodule update --init deploy/modules/lexicon deploy/modules/agora de
|
||||
```bash
|
||||
./init.sh --add lexicon
|
||||
./init.sh --add agora
|
||||
./init.sh --add panorama
|
||||
```
|
||||
|
||||
Each writes `env/<slug>.env` / `env/<slug>.migrate.env` (mode 600), puts `<SLUG>_*_PASSWORD` in
|
||||
`db.env`, adds `<slug>_app` / `<slug>_migrator` to `IDENTITY_*_ROLES` and its opt-in (table above) in
|
||||
`env/atrium.env`, and `<slug>` to `COMPOSE_PROFILES` in `.env`. A box whose `env/atrium.env` predates
|
||||
`MODULE_EVENT_READER_ROLES` gets the key appended. Check that `panorama_app` is in no emitter list.
|
||||
`MODULE_EVENT_READER_ROLES` gets the key appended (empty: no module reads the log alone now).
|
||||
|
||||
**Connections.** Ten apps at 4 / 8 are 130 connections. `compose.yaml` now sets `max_connections=170`
|
||||
(136 at 80%); if `db.env` sets `LOCAL_DB_MAX_CONNECTIONS` explicitly (120 after Arbiter), raise it to
|
||||
@@ -85,7 +82,7 @@ Each writes `env/<slug>.env` / `env/<slug>.migrate.env` (mode 600), puts `<SLUG>
|
||||
|
||||
```bash
|
||||
read -rs DREDD_CORE_TOKEN && export DREDD_CORE_TOKEN
|
||||
docker compose build atrium-backend lexicon-backend agora-backend panorama-backend && unset DREDD_CORE_TOKEN
|
||||
docker compose build atrium-backend lexicon-backend agora-backend && unset DREDD_CORE_TOKEN
|
||||
```
|
||||
|
||||
`atrium-backend` is rebuilt for dredd-core 0.23.0 (the event reader tier).
|
||||
@@ -93,23 +90,23 @@ docker compose build atrium-backend lexicon-backend agora-backend panorama-backe
|
||||
## Step 5 — Push
|
||||
|
||||
```bash
|
||||
./push.sh --dry-run atrium lexicon agora panorama # complete, the three in the plan, budget fits
|
||||
./push.sh atrium lexicon agora panorama
|
||||
./push.sh --dry-run atrium lexicon agora # complete, the two in the plan, budget fits
|
||||
./push.sh atrium lexicon agora
|
||||
```
|
||||
|
||||
Order: all four provisioned, Atrium migrates and re-applies the identity, model-provider and event
|
||||
tiers to the new roles (`emitters=...,agora_app readers=panorama_app` in its log), then each module's
|
||||
tiers to the new roles (`emitters=...,agora_app` in its log), then each module's
|
||||
own revisions, then the checks.
|
||||
|
||||
## Step 6 — Start
|
||||
|
||||
```bash
|
||||
docker compose up -d atrium-backend lexicon-backend agora-backend panorama-backend
|
||||
for slug in lexicon agora panorama; do curl -fsS "$SITE/$slug/healthz"; done
|
||||
docker compose up -d atrium-backend lexicon-backend agora-backend
|
||||
for slug in lexicon agora; do curl -fsS "$SITE/$slug/healthz"; done
|
||||
```
|
||||
|
||||
Then, in Atrium as the administrator: give people a `user` or `moderator` row for each (Administration
|
||||
→ Modules); no row is no access. Panorama's tiles for a module someone has no row for stay empty.
|
||||
→ Modules); no row is no access.
|
||||
|
||||
## Local models (Lexicon)
|
||||
|
||||
|
||||
+9
-12
@@ -3,8 +3,9 @@
|
||||
The eleventh and twelfth modules, split out of Compass (the split plan's M6 and M7). Each is a
|
||||
dredd-core app in simple tenancy with its own repository, its own submodule under
|
||||
`deploy/modules/<slug>`, its own schema and roles, `MODULE_SLUG=<slug>`, one account through Atrium,
|
||||
and each ships **switched off** under a Compose profile of its own name — exactly like Lexicon, Agora
|
||||
and Panorama ([`RUNBOOK-m2-m4.md`](RUNBOOK-m2-m4.md), whose rules for the sitting apply unchanged).
|
||||
and each ships **switched off** under a Compose profile of its own name — exactly like Lexicon and Agora
|
||||
([`RUNBOOK-m2-m4.md`](RUNBOOK-m2-m4.md), whose rules for the sitting apply unchanged). Panorama, once
|
||||
listed here too, is retired (Atrium#53: its trends are Atrium's home page now; `deploy/README.md`).
|
||||
|
||||
| Module | Path / profile | Repository | Network / db network | Opt-ins in `env/atrium.env` | Evidence (push.sh check) |
|
||||
|---|---|---|---|---|---|
|
||||
@@ -33,10 +34,6 @@ tile hue in this release.
|
||||
- **Scribe** takes clauses from Lexicon and exports drafts into Galena, each call with the person's
|
||||
own token: `LEXICON_URL` / `GALENA_URL` in `env/scribe.env` (hairpins, written by init),
|
||||
`MODULE_CALL_TIMEOUT` (seconds, default 15). It takes no part in the event log.
|
||||
- **Panorama** shows a card for each once `PARAFA_BASE_URL` / `SCRIBE_BASE_URL` are set in
|
||||
`env/panorama.env`. A fresh init writes them; on a box whose Panorama predates them, add the two
|
||||
lines by hand (`http://<site>/parafa`, `http://<site>/scribe`) and repin Panorama (it learnt the two
|
||||
slugs in its feat/parafa-scribe commit).
|
||||
|
||||
---
|
||||
|
||||
@@ -56,7 +53,7 @@ docker compose exec -T postgres sh -c 'pg_dump -U postgres -d "$POSTGRES_DB" -Fc
|
||||
|
||||
```bash
|
||||
git -C .. pull --ff-only
|
||||
git -C .. submodule update --init deploy/modules/parafa deploy/modules/scribe deploy/modules/panorama
|
||||
git -C .. submodule update --init deploy/modules/parafa deploy/modules/scribe
|
||||
```
|
||||
|
||||
## Step 3 — Write their settings, and the signer
|
||||
@@ -70,7 +67,7 @@ install -d -m 750 parafa-signer # then copy signer.p12 + passphrase in, and
|
||||
Each `--add` writes `env/<slug>.env` / `env/<slug>.migrate.env` (mode 600), puts `<SLUG>_*_PASSWORD`
|
||||
in `db.env`, adds `<slug>_app` / `<slug>_migrator` to `IDENTITY_*_ROLES` (and, for Parafa,
|
||||
`parafa_app` to `MODULE_EVENT_EMITTER_ROLES`) in `env/atrium.env`, and `<slug>` to `COMPOSE_PROFILES`
|
||||
in `.env`. Add `PARAFA_BASE_URL` / `SCRIBE_BASE_URL` to `env/panorama.env` (above).
|
||||
in `.env`.
|
||||
|
||||
**Connections.** Twelve apps at 4 / 8 are 156 connections. `compose.yaml` now sets
|
||||
`max_connections=200` (160 at 80%); if `db.env` sets `LOCAL_DB_MAX_CONNECTIONS` explicitly, raise it
|
||||
@@ -82,7 +79,7 @@ reconnects). Or set `DB_POOL_SIZE=3` / `DB_MAX_OVERFLOW=6` in every `env/<app>.e
|
||||
|
||||
```bash
|
||||
read -rs DREDD_CORE_TOKEN && export DREDD_CORE_TOKEN
|
||||
docker compose build atrium-backend parafa-backend scribe-backend panorama-backend && unset DREDD_CORE_TOKEN
|
||||
docker compose build atrium-backend parafa-backend scribe-backend && unset DREDD_CORE_TOKEN
|
||||
```
|
||||
|
||||
`atrium-backend` is rebuilt for the front door's two new paths, the catalogue tiles and the `yellow`
|
||||
@@ -91,8 +88,8 @@ tile hue.
|
||||
## Step 5 — Push
|
||||
|
||||
```bash
|
||||
./push.sh --dry-run atrium parafa scribe panorama # complete, both in the plan, budget fits
|
||||
./push.sh atrium parafa scribe panorama
|
||||
./push.sh --dry-run atrium parafa scribe # complete, both in the plan, budget fits
|
||||
./push.sh atrium parafa scribe
|
||||
```
|
||||
|
||||
Atrium migrates first and re-applies the event tiers (`emitters=...,parafa_app` in its log), then each
|
||||
@@ -101,7 +98,7 @@ module's own revisions, then the checks.
|
||||
## Step 6 — Start
|
||||
|
||||
```bash
|
||||
docker compose up -d atrium-backend parafa-backend scribe-backend panorama-backend
|
||||
docker compose up -d atrium-backend parafa-backend scribe-backend
|
||||
for slug in parafa scribe; do curl -fsS "$SITE/$slug/healthz"; done
|
||||
```
|
||||
|
||||
|
||||
@@ -116,14 +116,6 @@ services:
|
||||
volumes:
|
||||
- *db_ca
|
||||
|
||||
panorama-migrate:
|
||||
networks:
|
||||
panorama-db: !reset null
|
||||
depends_on:
|
||||
postgres: !reset null
|
||||
volumes:
|
||||
- *db_ca
|
||||
|
||||
parafa-migrate:
|
||||
networks:
|
||||
parafa-db: !reset null
|
||||
@@ -213,14 +205,6 @@ services:
|
||||
volumes:
|
||||
- *db_ca
|
||||
|
||||
panorama-backend:
|
||||
networks:
|
||||
panorama-db: !reset null
|
||||
depends_on:
|
||||
postgres: !reset null
|
||||
volumes:
|
||||
- *db_ca
|
||||
|
||||
parafa-backend:
|
||||
networks:
|
||||
parafa-db: !reset null
|
||||
|
||||
+6
-84
@@ -22,7 +22,7 @@
|
||||
# ONE ADDRESS, ONE MODULE PER PATH, AND ATRIUM IS THE FRONT DOOR. There is no reverse proxy: Atrium's
|
||||
# backend (backend/app/frontdoor.py) redirects `/` to /atrium/ and `/<slug>` to `/<slug>/`, serves Atrium
|
||||
# itself under /atrium, and streams /galena, /sygna, /counsel, /insider, /arbiter, /lexicon, /agora,
|
||||
# /panorama, /parafa, /scribe and /workflow to the backends named in
|
||||
# /parafa, /scribe and /workflow to the backends named in
|
||||
# FRONTDOOR_UPSTREAMS below — a FIXED map; no target ever comes from a request. It strips the prefix on
|
||||
# the way, and each module's ROOT_PATH (env/<app>.env, handed to uvicorn as --root-path by its image's
|
||||
# CMD) puts it back on every URL that module generates. Both halves or neither: change one without the
|
||||
@@ -36,7 +36,7 @@
|
||||
# The consoles are COPIED into the images at build time, from the second build context `frontend`.
|
||||
#
|
||||
# Where the code comes from: Atrium is this repository (../backend, ../frontend); the modules are
|
||||
# ${MODULES_DIR}/galena, /sygna, /counsel, /insider, /arbiter, /lexicon, /agora, /panorama, /parafa, /scribe and /workflow: the git submodules under ./modules
|
||||
# ${MODULES_DIR}/galena, /sygna, /counsel, /insider, /arbiter, /lexicon, /agora, /parafa, /scribe and /workflow: the git submodules under ./modules
|
||||
# (Arbiter's repository also carries the analysis engine, so its app sits at apps/arbiter of its checkout)
|
||||
# (MODULES_DIR=./modules in .env.example), or sibling checkouts next to this repository (MODULES_DIR=../..;
|
||||
# modules/README.md).
|
||||
@@ -125,7 +125,7 @@ services:
|
||||
retries: 20
|
||||
start_period: 30s
|
||||
networks: [atrium-db, galena-db, sygna-db, counsel-db, insider-db, arbiter-db, lexicon-db,
|
||||
agora-db, panorama-db, parafa-db, scribe-db, workflow-db]
|
||||
agora-db, parafa-db, scribe-db, workflow-db]
|
||||
logging: *logging
|
||||
|
||||
# ── Atrium, the hub ────────────────────────────────────────────────────────────
|
||||
@@ -167,10 +167,10 @@ services:
|
||||
MIGRATION_DATABASE_URL: ""
|
||||
# THE FRONT DOOR's fixed routing table (backend/app/frontdoor.py): slug=backend, nothing else. A slug
|
||||
# outside the family refuses start-up; a module listed here whose backend is not running (Insider,
|
||||
# Arbiter, Lexicon, Agora, Panorama, Parafa, Scribe or Workflow while its profile is off) answers 502 at its path. Each name resolves on that module's own
|
||||
# Arbiter, Lexicon, Agora, Parafa, Scribe or Workflow while its profile is off) answers 502 at its path. Each name resolves on that module's own
|
||||
# network below. No FORWARDED_ALLOW_IPS: nothing stands in front of this process, so its image runs
|
||||
# uvicorn with --no-proxy-headers and the peer address IS the client (the audit log's IP).
|
||||
FRONTDOOR_UPSTREAMS: "galena=http://galena-backend:8000,sygna=http://sygna-backend:8000,counsel=http://counsel-backend:8000,insider=http://insider-backend:8000,arbiter=http://arbiter-backend:8000,lexicon=http://lexicon-backend:8000,agora=http://agora-backend:8000,panorama=http://panorama-backend:8000,parafa=http://parafa-backend:8000,scribe=http://scribe-backend:8000,workflow=http://workflow-backend:8000"
|
||||
FRONTDOOR_UPSTREAMS: "galena=http://galena-backend:8000,sygna=http://sygna-backend:8000,counsel=http://counsel-backend:8000,insider=http://insider-backend:8000,arbiter=http://arbiter-backend:8000,lexicon=http://lexicon-backend:8000,agora=http://agora-backend:8000,parafa=http://parafa-backend:8000,scribe=http://scribe-backend:8000,workflow=http://workflow-backend:8000"
|
||||
# The ONE published port of the whole stack: plain HTTP. TLS is optional and off by default:
|
||||
# compose.tls.yaml (switched on in deploy/.env, RUNBOOK-tls.md) adds :443 here and the certbot sidecar.
|
||||
ports:
|
||||
@@ -192,7 +192,6 @@ services:
|
||||
arbiter: {}
|
||||
lexicon: {}
|
||||
agora: {}
|
||||
panorama: {}
|
||||
parafa: {}
|
||||
scribe: {}
|
||||
workflow: {}
|
||||
@@ -745,78 +744,6 @@ services:
|
||||
retries: 10
|
||||
logging: *logging
|
||||
|
||||
# ── Panorama (repository Alpaq92/Panorama): the platform dashboard (M4) ──────────────────────────────────────────
|
||||
# SWITCHED OFF until deploy/.env names `panorama` in COMPOSE_PROFILES, exactly like Insider and
|
||||
# Arbiter (deploy/RUNBOOK-m2-m4.md).
|
||||
# It reads every other module's /api/v1/stats with the viewer's own token (a hairpin through the
|
||||
# front door, the *_BASE_URL settings in env/panorama.env) and the hub's event log as a READER only
|
||||
# (MODULE_EVENT_READER_ROLES in env/atrium.env, dredd-core 0.23.0's reader tier).
|
||||
panorama-migrate:
|
||||
profiles: ["panorama"]
|
||||
build:
|
||||
context: ${MODULES_DIR:-./modules}/panorama/backend
|
||||
# The module's console ships in its image (its Dockerfile: COPY --from=frontend).
|
||||
additional_contexts:
|
||||
frontend: ${MODULES_DIR:-./modules}/panorama/frontend
|
||||
secrets: [dredd_core_token]
|
||||
image: dredd-family/panorama-backend:local
|
||||
# `required: false` for Insider's reason: a missing env_file breaks the whole PROJECT, and the
|
||||
# profile keeps the service off until the files exist (push.sh refuses a missing one by name).
|
||||
env_file:
|
||||
- path: ${DEPLOY_ENV_DIR:-./env}/panorama.env
|
||||
required: false
|
||||
- path: ${DEPLOY_ENV_DIR:-./env}/panorama.migrate.env
|
||||
required: false
|
||||
command: ["sh", "-c", "alembic upgrade head && python -m app.seed"]
|
||||
restart: "no"
|
||||
volumes:
|
||||
- panorama-data:/data
|
||||
networks:
|
||||
panorama-db: {}
|
||||
depends_on:
|
||||
# Identity and the event log are shared and Atrium's migration is what creates them (and grants
|
||||
# panorama_app SELECT on the log through MODULE_EVENT_READER_ROLES).
|
||||
atrium-migrate: { condition: service_completed_successfully }
|
||||
postgres: { condition: service_healthy }
|
||||
logging: *logging
|
||||
|
||||
panorama-backend:
|
||||
profiles: ["panorama"]
|
||||
build:
|
||||
context: ${MODULES_DIR:-./modules}/panorama/backend
|
||||
# The module's console ships in its image (its Dockerfile: COPY --from=frontend).
|
||||
additional_contexts:
|
||||
frontend: ${MODULES_DIR:-./modules}/panorama/frontend
|
||||
secrets: [dredd_core_token]
|
||||
image: dredd-family/panorama-backend:local
|
||||
env_file:
|
||||
- path: ${DEPLOY_ENV_DIR:-./env}/panorama.env
|
||||
required: false
|
||||
environment:
|
||||
MIGRATION_DATABASE_URL: ""
|
||||
# Trust X-Forwarded-* only from this module's own network, where atrium-backend (the front door) is
|
||||
# the one other member; change it together with the subnet at the bottom of this file.
|
||||
FORWARDED_ALLOW_IPS: "172.30.19.0/24"
|
||||
# Atrium frames this module's console at the one origin: SAMEORIGIN / frame-ancestors 'self'
|
||||
# (the module's own default is 'none' / DENY). Set here, not in env/, so no env file can undo it.
|
||||
FRAME_ANCESTORS: "'self'"
|
||||
expose: ["8000"]
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- panorama-data:/data
|
||||
networks:
|
||||
panorama: {}
|
||||
panorama-db: {}
|
||||
depends_on:
|
||||
panorama-migrate: { condition: service_completed_successfully }
|
||||
postgres: { condition: service_healthy }
|
||||
healthcheck:
|
||||
test: ["CMD", "python", "-c", "import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://localhost:8000/healthz').status==200 else 1)"]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
logging: *logging
|
||||
|
||||
# ── Parafa (repository Alpaq92/Parafa): PAdES signing of PDFs (M6) ──────────────────────────────────────────
|
||||
# SWITCHED OFF until deploy/.env names `parafa` in COMPOSE_PROFILES, exactly like the modules above
|
||||
# (deploy/RUNBOOK-m6-m7.md).
|
||||
@@ -1074,10 +1001,6 @@ networks:
|
||||
ipam: { config: [{ subnet: 172.30.18.0/24 }] }
|
||||
agora-db:
|
||||
ipam: { config: [{ subnet: 172.30.28.0/24 }] }
|
||||
panorama:
|
||||
ipam: { config: [{ subnet: 172.30.19.0/24 }] }
|
||||
panorama-db:
|
||||
ipam: { config: [{ subnet: 172.30.29.0/24 }] }
|
||||
parafa:
|
||||
ipam: { config: [{ subnet: 172.30.30.0/24 }] }
|
||||
parafa-db:
|
||||
@@ -1096,7 +1019,7 @@ volumes:
|
||||
# something: pgdata is the whole family's database (Option A), galena-data is Galena's git
|
||||
# repositories, which are not in the database at all, sygna-data holds uploads, and
|
||||
# insider-data is Insider's DATA_DIR (shared with its optional OCR worker), arbiter-data Arbiter's,
|
||||
# and lexicon-data / agora-data / panorama-data theirs (Lexicon's sources, Agora's plain-file rounds),
|
||||
# and lexicon-data / agora-data theirs (Lexicon's sources, Agora's plain-file rounds),
|
||||
# parafa-data / scribe-data Parafa's uploaded and signed PDFs and Scribe's exports,
|
||||
# workflow-data Workflow's run files and request attachments.
|
||||
# `down` without -v keeps them; to stop the stack, use `docker compose down` or `stop`. Back them up
|
||||
@@ -1109,7 +1032,6 @@ volumes:
|
||||
arbiter-data:
|
||||
lexicon-data:
|
||||
agora-data:
|
||||
panorama-data:
|
||||
parafa-data:
|
||||
scribe-data:
|
||||
workflow-data:
|
||||
|
||||
@@ -105,7 +105,7 @@ PLATFORM_IDENTITY_SCHEMA=dredd
|
||||
# With Arbiter switched on as well, seven apps: 7 x 13 = 91 does NOT fit 80 — raise max_connections
|
||||
# (compose.yaml) and LOCAL_DB_MAX_CONNECTIONS to 120 (91 of 96), or use 3 / 6 -> 7 x 10 = 70 of 80.
|
||||
# Option B with seven: 3 / 5 -> 7 x 9 = 63 of 72 at 90; with 60, 2 / 2 -> 7 x 5 = 35 of 48.
|
||||
# With Lexicon, Agora and Panorama too, ten apps: 10 x 13 = 130 — compose.yaml now sets max_connections
|
||||
# With Lexicon and Agora too (and Panorama, retired since — Atrium#53), ten apps: 10 x 13 = 130 — compose.yaml now sets max_connections
|
||||
# to 170 (130 of 136; LOCAL_DB_MAX_CONNECTIONS defaults to the same 170), or use 3 / 6 -> 10 x 10 = 100.
|
||||
# Option B with ten: 2 / 4 -> 10 x 7 = 70 of 72 at 90 (tight); with 60, 1 / 2 -> 10 x 4 = 40 of 48.
|
||||
# With Parafa and Scribe too, twelve apps: 12 x 13 = 156 — compose.yaml now sets max_connections to
|
||||
@@ -145,8 +145,6 @@ LEXICON_MIGRATOR_PASSWORD=
|
||||
LEXICON_APP_PASSWORD=
|
||||
AGORA_MIGRATOR_PASSWORD=
|
||||
AGORA_APP_PASSWORD=
|
||||
PANORAMA_MIGRATOR_PASSWORD=
|
||||
PANORAMA_APP_PASSWORD=
|
||||
PARAFA_MIGRATOR_PASSWORD=
|
||||
PARAFA_APP_PASSWORD=
|
||||
SCRIBE_MIGRATOR_PASSWORD=
|
||||
@@ -173,8 +171,6 @@ WORKFLOW_APP_PASSWORD=
|
||||
# LEXICON_APP_ROLE=lexicon_app
|
||||
# AGORA_MIGRATOR_ROLE=agora_migrator
|
||||
# AGORA_APP_ROLE=agora_app
|
||||
# PANORAMA_MIGRATOR_ROLE=panorama_migrator
|
||||
# PANORAMA_APP_ROLE=panorama_app
|
||||
# PARAFA_MIGRATOR_ROLE=parafa_migrator
|
||||
# PARAFA_APP_ROLE=parafa_app
|
||||
# SCRIBE_MIGRATOR_ROLE=scribe_migrator
|
||||
|
||||
Vendored
+5
-4
@@ -57,7 +57,7 @@ IDENTITY_SCHEMA=dredd
|
||||
# does not exist. So Insider, switched off by default, is not listed; switch it on by adding
|
||||
# insider_app / insider_migrator here together with `insider` in COMPOSE_PROFILES in deploy/.env,
|
||||
# before the first push (`./init.sh --add insider` writes both). Arbiter the same: arbiter_app / arbiter_migrator with `arbiter` in COMPOSE_PROFILES
|
||||
# (`./init.sh --add arbiter`). Lexicon, Agora, Panorama, Parafa, Scribe and Workflow likewise (`./init.sh --add lexicon` etc.).
|
||||
# (`./init.sh --add arbiter`). Lexicon, Agora, Parafa, Scribe and Workflow likewise (`./init.sh --add lexicon` etc.).
|
||||
# Insider is a reader of the shared model providers like every listed module, never a key reader. Atrium's own two roles are never listed — its runtime role IS the writer tier
|
||||
# (DB_APP_ROLE) and its migrator owns the schema. The grants are applied by Atrium's revisions, once
|
||||
# each: after the last one has run, a module joining later also needs a revision that re-applies them
|
||||
@@ -87,9 +87,10 @@ MODEL_PROVIDER_MIGRATOR_ROLES=arbiter_migrator
|
||||
# `analysis.accepted` when a lawyer accepts an analysis, so arbiter_app is listed too.
|
||||
MODULE_EVENT_EMITTER_ROLES=galena_app,agora_app,parafa_app,workflow_app,arbiter_app
|
||||
# The event log's READER tier (dredd-core 0.23.0): SELECT and nothing else, for a module that reports
|
||||
# on the log and says nothing itself — Panorama's trends. Joined the same way; a role is an emitter or
|
||||
# a reader, never both (the grant block refuses the overlap). push.sh checks it with --events-reader.
|
||||
MODULE_EVENT_READER_ROLES=panorama_app
|
||||
# on the log and says nothing itself. Empty since Panorama left the platform (its trends are Atrium's
|
||||
# home now, Atrium#53). Joined the same way; a role is an emitter or a reader, never both (the grant
|
||||
# block refuses the overlap). push.sh checks a module checked with --events-reader against it.
|
||||
MODULE_EVENT_READER_ROLES=
|
||||
# The shared counterparty register (dredd-core 0.21.0, revision 0012), in the same schema. Writers:
|
||||
# SELECT, INSERT, UPDATE, never DELETE a counterparty (Sygna). Readers: SELECT only. Migrators: SELECT + REFERENCES, and the import door while
|
||||
# their module still holds counterparties of its own. Each takes effect once joined; a module not
|
||||
|
||||
Vendored
-93
@@ -1,93 +0,0 @@
|
||||
# deploy/env/panorama.env — Panorama's backend, on the platform.
|
||||
#
|
||||
# Copy to panorama.env (init.sh writes it; `./init.sh --add panorama` on a box that predates Panorama) and
|
||||
# fill in. Read by panorama-backend and panorama-migrate; the migrator's URL lives in panorama.migrate.env,
|
||||
# which only the one-shot reads.
|
||||
#
|
||||
# The app's own template is modules/panorama/.env.example, and it is the authority on every key below
|
||||
# that is not about this platform. Where the two differ, that one wins: this file exists to say what
|
||||
# changes when Panorama is a module rather than a standalone stack. Leave out POSTGRES_DB /
|
||||
# DB_*_PASSWORD (the kit's postgres service is configured in deploy/.env).
|
||||
|
||||
APP_ENV=production
|
||||
|
||||
# The front door (atrium-backend) strips /panorama before the request arrives; this puts it back on
|
||||
# every URL the app generates (the image's CMD hands it to uvicorn as --root-path). The two are one
|
||||
# decision — see compose.yaml's header. FORWARDED_ALLOW_IPS and FRAME_ANCESTORS='self' are set by
|
||||
# compose.yaml, not here: the first names the subnet the front door forwards from (172.30.19.0/24).
|
||||
ROOT_PATH=/panorama
|
||||
APP_BASE_URL=http://<site>/panorama
|
||||
|
||||
# ── one account (the default) ──────────────────────────────────────────────────────────────────
|
||||
# The shared identity schema. Set, this app reads the platform's accounts and never writes them;
|
||||
# empty, it is a standalone Panorama with its own sign-in. It must equal PLATFORM_IDENTITY_SCHEMA in
|
||||
# deploy/db.env — push.sh refuses the half-done combination by name. Switching Panorama on also means
|
||||
# listing panorama_app / panorama_migrator in env/atrium.env's IDENTITY_*_ROLES (the push refuses
|
||||
# without them; `./init.sh --add panorama` does both, and the event READER list (Panorama's trends read the hub's event log, SELECT only)). STANDALONE (`./init.sh --standalone`):
|
||||
# both lines commented out, with every other app's identity settings blanked to match.
|
||||
#
|
||||
# SESSION_COOKIE_NAME must match every other app's: one origin plus one cookie plus one session row
|
||||
# IS the single sign-on, and there is no handoff protocol to configure.
|
||||
IDENTITY_SCHEMA=dredd
|
||||
SESSION_COOKIE_NAME=dredd_session
|
||||
# The name this module answers to, and the slug Atrium's catalogue uses for it: a permission row and
|
||||
# an app token are both addressed by it, and two spellings fail silently.
|
||||
MODULE_SLUG=panorama
|
||||
# Where the console sends somebody who is not signed in. Blank is correct here: the hub is a sibling
|
||||
# path at the same origin.
|
||||
IDENTITY_HUB_URL=
|
||||
|
||||
# ── database ───────────────────────────────────────────────────────────────────────────────────
|
||||
# Option A (the default): the runtime role panorama_app on this box's own PostgreSQL — plain role
|
||||
# name, the compose service `postgres`, LOCAL_DB_NAME from deploy/.env, NO sslmode / sslrootcert.
|
||||
# Password: PANORAMA_APP_PASSWORD from db.env, percent-encoded.
|
||||
DATABASE_URL=postgresql+pg8000://panorama_app:<percent-encoded-password>@postgres:5432/dredd
|
||||
# Must be DATABASE_URL's role (Panorama refuses to start otherwise).
|
||||
DB_APP_ROLE=panorama_app
|
||||
# Option B: a managed PostgreSQL provider's database (deploy/README.md, "Option B").
|
||||
# DATABASE_URL=postgresql+pg8000://panorama_app.<tenant>:<percent-encoded-password>@<host>:5432/postgres?sslmode=verify-full&sslrootcert=/run/certs/db-ca.crt
|
||||
# Every app shares one connection limit (db.env.example, "Connection budget"). Do not raise these for
|
||||
# one app without redoing that arithmetic.
|
||||
DB_POOL_SIZE=4
|
||||
DB_MAX_OVERFLOW=8
|
||||
|
||||
CORS_ALLOW_ORIGINS=
|
||||
|
||||
DATA_DIR=/data
|
||||
# A production module seeds no demo content: the platform's people and documents are real.
|
||||
SEED_DEMO=false
|
||||
|
||||
# ── the modules it reports on ──────────────────────────────────────────────────────────────────
|
||||
# Each module's PUBLIC address, a hairpin back through the front door (no module shares a network with
|
||||
# another). Panorama asks each one's GET /api/v1/stats with the viewer's own token and never reads
|
||||
# another module's tables. Empty: that tile is off. A module whose profile is off answers 502 at its
|
||||
# path, which the dashboard shows as unavailable; blank its line here to hide it instead.
|
||||
GALENA_BASE_URL=http://<site>/galena
|
||||
SYGNA_BASE_URL=http://<site>/sygna
|
||||
COUNSEL_BASE_URL=http://<site>/counsel
|
||||
ARBITER_BASE_URL=http://<site>/arbiter
|
||||
LEXICON_BASE_URL=http://<site>/lexicon
|
||||
AGORA_BASE_URL=http://<site>/agora
|
||||
PARAFA_BASE_URL=http://<site>/parafa
|
||||
SCRIBE_BASE_URL=http://<site>/scribe
|
||||
INSIDER_BASE_URL=http://<site>/insider
|
||||
# Seconds per module call; the calls run in parallel.
|
||||
STATS_TIMEOUT_SECONDS=3
|
||||
# Who sees the trends (aggregates over the shared event log, never per person): moderators or
|
||||
# everyone. The log is readable only because env/atrium.env lists panorama_app in
|
||||
# MODULE_EVENT_READER_ROLES (push.sh checks it with --events-reader).
|
||||
TRENDS_AUDIENCE=moderators
|
||||
|
||||
# ── auth ───────────────────────────────────────────────────────────────────────────────────────
|
||||
SESSION_TTL_HOURS=12
|
||||
LOGIN_MAX_ATTEMPTS=5
|
||||
LOGIN_LOCKOUT_MINUTES=15
|
||||
# Empty = auto-detect from the request scheme (Secure over HTTPS only).
|
||||
SESSION_COOKIE_SECURE=
|
||||
# App tokens (panorama_pat_...) stay listable and revocable here; on the platform they are minted at
|
||||
# the hub.
|
||||
APP_TOKENS_ENABLED=true
|
||||
|
||||
OTEL_ENABLED=false
|
||||
OTEL_SERVICE_NAME=panorama-backend
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
# Panorama's one-shot settings: loaded ONLY by panorama-migrate (together with panorama.env), never by the
|
||||
# long-running backend. Alembic runs as the migrator; the seed after it runs as the runtime role
|
||||
# (panorama_app, panorama.env's DATABASE_URL). init.sh writes env/panorama.migrate.env from this template
|
||||
# (git-ignored); on a deployment that already exists, `./init.sh --add panorama` does.
|
||||
|
||||
# ── Option A (the default): the migrator panorama_migrator on this box's own PostgreSQL ──────────
|
||||
# Plain role name, the `postgres` service, LOCAL_DB_NAME from deploy/.env, no TLS parameters (see
|
||||
# panorama.env). Password: PANORAMA_MIGRATOR_PASSWORD, percent-encoded.
|
||||
MIGRATION_DATABASE_URL=postgresql+pg8000://panorama_migrator:<percent-encoded-password>@postgres:5432/dredd
|
||||
|
||||
# ── Option B: a managed PostgreSQL provider's database (deploy/README.md, "Option B") ───────────
|
||||
# Comment MIGRATION_DATABASE_URL above and uncomment this one, together with DATABASE_URL in panorama.env.
|
||||
# MIGRATION_DATABASE_URL=postgresql+pg8000://panorama_migrator.<tenant>:<percent-encoded-password>@<host>:5432/postgres?sslmode=verify-full&sslrootcert=/run/certs/db-ca.crt
|
||||
|
||||
# One account (the default): nobody is created here — Atrium is the one place accounts are made, and
|
||||
# this module holds no INSERT on the shared `app_user` — so the EMAIL names the hub's first
|
||||
# administrator, whom the seed looks up. The PASSWORD is inert on the platform, but push.sh's
|
||||
# preflight refuses an empty, default or short one (12+ characters), so it stays set; init.sh
|
||||
# generates it. Standalone (`./init.sh --standalone`): the seed creates this module's own first
|
||||
# administrator with them when no user has the EMAIL.
|
||||
BOOTSTRAP_ADMIN_EMAIL=admin@example.com
|
||||
BOOTSTRAP_ADMIN_PASSWORD=
|
||||
+9
-21
@@ -3,7 +3,7 @@
|
||||
# its own PostgreSQL (deploy/README.md, "Option A"): every setting, every secret, every file, mode 600.
|
||||
#
|
||||
# The family is ONE SITE with one module per path — <site>/atrium, /galena, /sygna, /counsel,
|
||||
# /insider, /arbiter, /lexicon, /agora, /panorama, /parafa, /scribe, /workflow, and / goes to Atrium (atrium-backend is the front door, compose.yaml) — so what this asks for is ONE
|
||||
# /insider, /arbiter, /lexicon, /agora, /parafa, /scribe, /workflow, and / goes to Atrium (atrium-backend is the front door, compose.yaml) — so what this asks for is ONE
|
||||
# address:
|
||||
#
|
||||
# ./init.sh --ip 1.2.3.4 # a plain-HTTP trial: http://dredd.1.2.3.4.sslip.io/atrium ...
|
||||
@@ -19,9 +19,8 @@
|
||||
# ./init.sh --add insider # ONE app joins a deployment that already exists (deploy/, or --into;
|
||||
# # Insider: deploy/RUNBOOK-insider.md)
|
||||
# ./init.sh --add arbiter # (and for Arbiter: deploy/RUNBOOK-arbiter.md)
|
||||
# ./init.sh --add lexicon # (Lexicon, Agora and Panorama: deploy/RUNBOOK-m2-m4.md)
|
||||
# ./init.sh --add lexicon # (Lexicon and Agora: deploy/RUNBOOK-m2-m4.md)
|
||||
# ./init.sh --add agora
|
||||
# ./init.sh --add panorama
|
||||
# ./init.sh --add parafa # (Parafa and Scribe: deploy/RUNBOOK-m6-m7.md)
|
||||
# ./init.sh --add scribe
|
||||
# ./init.sh --add workflow # (Workflow: deploy/RUNBOOK-workflow.md)
|
||||
@@ -29,7 +28,7 @@
|
||||
# ONE ACCOUNT FOR THE WHOLE PLATFORM is what it writes by default: PLATFORM_IDENTITY_SCHEMA=dredd in
|
||||
# db.env, IDENTITY_SCHEMA=dredd and SESSION_COOKIE_NAME=dredd_session in every env/<app>.env, and in
|
||||
# env/atrium.env the module roles Atrium's migration grants the shared schema to (IDENTITY_READER_ROLES /
|
||||
# IDENTITY_MIGRATOR_ROLES: Galena's, Sygna's and Counsel's — Insider, Arbiter, Lexicon, Agora, Panorama, Parafa, Scribe and Workflow ship switched off, so
|
||||
# IDENTITY_MIGRATOR_ROLES: Galena's, Sygna's and Counsel's — Insider, Arbiter, Lexicon, Agora, Parafa, Scribe and Workflow ship switched off, so
|
||||
# their roles join the lists when they do). People sign in once, at /atrium, as the one first administrator in
|
||||
# env/atrium.migrate.env. --standalone writes the opt-out instead, all of it at once: those keys blank
|
||||
# (and each module's commented out, so each app keeps its own cookie name), four apps with four sets
|
||||
@@ -42,7 +41,7 @@
|
||||
# app's IDENTITY_SCHEMA and SESSION_COOKIE_NAME to the platform's and adds the app's two roles to
|
||||
# env/atrium.env's IDENTITY_READER_ROLES / IDENTITY_MIGRATOR_ROLES (for arbiter also the
|
||||
# model-provider key reader and migrator lists, for lexicon the key reader list, for agora, parafa and workflow the event
|
||||
# emitters, for panorama the event readers), and for every module that ships switched off it adds
|
||||
# emitters), and for every module that ships switched off it adds
|
||||
# the app's own profile to COMPOSE_PROFILES in .env: Atrium's identity grants will name the new roles, so the next push must
|
||||
# provision them, and it does only for an app that is switched on. When db.env does not, the app is
|
||||
# written standalone (its identity lines commented out). It refuses when APP's files exist, when
|
||||
@@ -101,9 +100,9 @@
|
||||
set -euo pipefail
|
||||
|
||||
DEPLOY_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
FAMILY="atrium galena sygna counsel insider arbiter lexicon agora panorama parafa scribe workflow"
|
||||
FAMILY="atrium galena sygna counsel insider arbiter lexicon agora parafa scribe workflow"
|
||||
# The modules that ship switched off, each under a compose profile of its own name (compose.yaml).
|
||||
PROFILED="insider arbiter lexicon agora panorama parafa scribe workflow"
|
||||
PROFILED="insider arbiter lexicon agora parafa scribe workflow"
|
||||
refuse() { printf 'init: %s\n' "$*" >&2; exit 2; }
|
||||
usage() { sed -n '2,/^set -euo pipefail$/p' "${BASH_SOURCE[0]}" | sed -e '$d' -e 's/^# \{0,1\}//'; }
|
||||
|
||||
@@ -429,9 +428,10 @@ write_app_files() {
|
||||
# The modules that take part in the shared event log (dredd-core 0.20.0, revision 0011); like
|
||||
# the opt-ins above, each takes effect once its role is also an identity reader.
|
||||
# Agora emits (a round from the other side), Parafa too (document.signed), and Workflow (every
|
||||
# step of a run, dredd_core.workflow_contract), and Arbiter (analysis.accepted); Panorama only reads (dredd-core 0.23.0's reader tier).
|
||||
# step of a run, dredd_core.workflow_contract), and Arbiter (analysis.accepted).
|
||||
set_key "$runtime" MODULE_EVENT_EMITTER_ROLES "$ROLE_PREFIX"galena_app,"$ROLE_PREFIX"agora_app,"$ROLE_PREFIX"parafa_app,"$ROLE_PREFIX"workflow_app,"$ROLE_PREFIX"arbiter_app
|
||||
set_key "$runtime" MODULE_EVENT_READER_ROLES "$ROLE_PREFIX"panorama_app
|
||||
# No module only reads the log since Panorama left the platform (Atrium#53): the reader tier starts empty.
|
||||
set_key "$runtime" MODULE_EVENT_READER_ROLES ""
|
||||
# The shared counterparty register (dredd-core 0.21.0, revision 0012): Sygna writes, and its
|
||||
# migrator moves its own counterparties in. No reader since Workflow (Compass) was retired.
|
||||
set_key "$runtime" COUNTERPARTY_WRITER_ROLES "$ROLE_PREFIX"sygna_app
|
||||
@@ -484,13 +484,6 @@ write_app_files() {
|
||||
set_key "$runtime" GALENA_BASE_URL "$PUBLIC/galena"
|
||||
# Workflow's approval of a negotiation's result, trusted by its REAL role name.
|
||||
set_key "$runtime" WORKFLOW_EVENT_ROLES "$ROLE_PREFIX"workflow_app ;;
|
||||
panorama)
|
||||
set_key "$runtime" APP_BASE_URL "$PUBLIC/panorama"
|
||||
# Every module's PUBLIC address (hairpins through the front door): Panorama asks each one's
|
||||
# /api/v1/stats with the viewer's own token.
|
||||
for other in galena sygna counsel arbiter lexicon agora parafa scribe insider; do
|
||||
set_key "$runtime" "$(printf '%s' "$other" | tr '[:lower:]' '[:upper:]')_BASE_URL" "$PUBLIC/$other"
|
||||
done ;;
|
||||
parafa)
|
||||
set_key "$runtime" APP_BASE_URL "$PUBLIC/parafa"
|
||||
# A request on a Galena document reads it and writes the signed PDF back as a new version,
|
||||
@@ -547,11 +540,6 @@ if [ -n "$ADD" ]; then
|
||||
add_to_list "$OUT/env/atrium.env" MODULE_EVENT_EMITTER_ROLES "$ROLE_PREFIX${ADD}_app"
|
||||
CHANGED="$CHANGED\n env/atrium.env MODULE_EVENT_EMITTER_ROLES += $ROLE_PREFIX${ADD}_app" ;;
|
||||
esac
|
||||
# Panorama reads the event log and writes nothing (dredd-core 0.23.0's reader tier; --events-reader).
|
||||
case $ADD in panorama)
|
||||
add_to_list "$OUT/env/atrium.env" MODULE_EVENT_READER_ROLES "$ROLE_PREFIX${ADD}_app"
|
||||
CHANGED="$CHANGED\n env/atrium.env MODULE_EVENT_READER_ROLES += $ROLE_PREFIX${ADD}_app" ;;
|
||||
esac
|
||||
# Lexicon's typing calls the models (a key reader); no table of its references model_provider.
|
||||
case $ADD in lexicon)
|
||||
add_to_list "$OUT/env/atrium.env" MODEL_PROVIDER_KEY_READER_ROLES "$ROLE_PREFIX${ADD}_app"
|
||||
|
||||
@@ -21,9 +21,9 @@ both modes (the front door)
|
||||
- apart from the front door on each module's `<app>` network, no two apps share any network
|
||||
|
||||
local (Option A, this box's own PostgreSQL)
|
||||
- the twenty-five services: postgres, and <app>-migrate and <app>-backend for the twelve apps (Insider's
|
||||
- the twenty-three services: postgres, and <app>-migrate and <app>-backend for the eleven apps (Insider's
|
||||
optional OCR worker is under its own `ocr` profile, which the preflight does not activate)
|
||||
- postgres on all twelve `<app>-db` networks; each module backend on its `<app>` + `<app>-db` networks,
|
||||
- postgres on all eleven `<app>-db` networks; each module backend on its `<app>` + `<app>-db` networks,
|
||||
atrium-backend on `atrium` + `atrium-db` + every module's `<app>`; each one-shot on `<app>-db` only;
|
||||
everything that connects waits for postgres
|
||||
- postgres keeps its data in a named volume, mounts local-db/ read-only as its init directory, probes
|
||||
@@ -41,13 +41,13 @@ local (Option A, this box's own PostgreSQL)
|
||||
|
||||
managed (Option B, a managed PostgreSQL provider)
|
||||
- postgres is switched off (absent from the rendered model, or present only under a profile), the
|
||||
other twenty-four services are there
|
||||
other twenty-two services are there
|
||||
- no service is on any `<app>-db` network: each module backend on its `<app>` network only,
|
||||
atrium-backend on `atrium` + every module's `<app>`, each one-shot on the default network only (the
|
||||
one-shots listen on nothing and exit; that is the one network two apps' services share, and no
|
||||
backend is on it); nothing waits for postgres
|
||||
- all twenty-four app services mount the provider's CA read-only at /run/certs/db-ca.crt; Galena's,
|
||||
Sygna's, Insider's, Arbiter's, Lexicon's, Agora's, Panorama's,
|
||||
- all twenty-two app services mount the provider's CA read-only at /run/certs/db-ca.crt; Galena's,
|
||||
Sygna's, Insider's, Arbiter's, Lexicon's, Agora's,
|
||||
Parafa's, Scribe's and Workflow's data volumes survived the merge
|
||||
|
||||
Standard library only. Exit 0 = every property holds, 1 = a property failed (each one printed),
|
||||
@@ -59,14 +59,14 @@ import json
|
||||
import sys
|
||||
|
||||
HUB = "atrium"
|
||||
MODULES = ("galena", "sygna", "counsel", "insider", "arbiter", "lexicon", "agora", "panorama",
|
||||
MODULES = ("galena", "sygna", "counsel", "insider", "arbiter", "lexicon", "agora",
|
||||
"parafa", "scribe", "workflow")
|
||||
APPS = (HUB, *MODULES)
|
||||
FRONT_DOOR = f"{HUB}-backend"
|
||||
PG = "postgres"
|
||||
CA_TARGET = "/run/certs/db-ca.crt"
|
||||
DATA_VOLUMES = {"galena": "/data", "sygna": "/data", "insider": "/data", "arbiter": "/data",
|
||||
"lexicon": "/data", "agora": "/data", "panorama": "/data", "parafa": "/data",
|
||||
"lexicon": "/data", "agora": "/data", "parafa": "/data",
|
||||
"scribe": "/data", "workflow": "/data"}
|
||||
#: Optional workers, each under a compose profile of its own that the preflight never activates — so the
|
||||
#: rendered model leaves them out, while compose.yaml read as YAML (test_deploy_front_door_kit.py) has
|
||||
|
||||
@@ -47,7 +47,7 @@ _envfile_value_pick() {
|
||||
}
|
||||
|
||||
# Compose's own settings (deploy/.env): the ones the kit reads besides Compose.
|
||||
# COMPOSE_PROFILES is how a module ships in the kit switched off (Insider, Arbiter, Lexicon, Agora, Panorama, Parafa, Scribe, Workflow) and is switched on per box.
|
||||
# COMPOSE_PROFILES is how a module ships in the kit switched off (Insider, Arbiter, Lexicon, Agora, Parafa, Scribe, Workflow) and is switched on per box.
|
||||
# PARAFA_SIGNER_DIR is the host directory compose.yaml mounts read-only into parafa-backend.
|
||||
# The TLS switch (compose.tls.yaml): TLS, the site's ATRIUM_DOMAIN, ACME_EMAIL, ACME_STAGING,
|
||||
# HSTS_MAX_AGE, and COMPOSE_FILE, which is how a plain `docker compose up` finds that override.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Module checkouts
|
||||
|
||||
`deploy/compose.yaml` builds Galena, Sygna and Counsel Scorecard from `${MODULES_DIR}/galena`,
|
||||
`${MODULES_DIR}/sygna` and `${MODULES_DIR}/counsel` (and Arbiter from `${MODULES_DIR}/arbiter/apps/arbiter`, Insider from `${MODULES_DIR}/insider`, Lexicon, Agora, Panorama, Parafa, Scribe and Workflow from `${MODULES_DIR}/lexicon`, `/agora`, `/panorama`, `/parafa`, `/scribe` and `/workflow`),
|
||||
`${MODULES_DIR}/sygna` and `${MODULES_DIR}/counsel` (and Arbiter from `${MODULES_DIR}/arbiter/apps/arbiter`, Insider from `${MODULES_DIR}/insider`, Lexicon, Agora, Parafa, Scribe and Workflow from `${MODULES_DIR}/lexicon`, `/agora`, `/parafa`, `/scribe` and `/workflow`),
|
||||
each image with a second build context, `frontend`, the module's console, which the image serves itself. Atrium itself is the repository this directory is in.
|
||||
`MODULES_DIR` is set in `deploy/.env`, which Compose, `push.sh` and `preflight.sh` all read (`init.sh
|
||||
--modules-dir` writes it).
|
||||
|
||||
Submodule deploy/modules/panorama deleted from 31ecd59ca6
+21
-22
@@ -99,7 +99,7 @@ missing=""
|
||||
# repository also carries the analysis engine (packages/*), so its app is apps/arbiter; the others are the app.
|
||||
module_subdir() { case $1 in arbiter) printf 'apps/arbiter' ;; *) printf '' ;; esac; }
|
||||
module_checkout() { printf '%s' "$1"; }
|
||||
for slug in galena sygna counsel insider arbiter lexicon agora panorama parafa scribe workflow; do
|
||||
for slug in galena sygna counsel insider arbiter lexicon agora parafa scribe workflow; do
|
||||
sub=$(module_subdir "$slug")
|
||||
[ -d "$modules/$(module_checkout "$slug")${sub:+/$sub}/backend" ] || missing="$missing $slug"
|
||||
done
|
||||
@@ -116,7 +116,7 @@ kit_modules=$modules
|
||||
if [ -n "$missing" ]; then
|
||||
kit_modules=$tmp/modules
|
||||
echo " (steps 2, 5 and 6 use empty stand-ins for every module: they check the kit's files, not the modules)"
|
||||
for slug in galena sygna counsel insider arbiter lexicon agora panorama parafa scribe workflow; do
|
||||
for slug in galena sygna counsel insider arbiter lexicon agora parafa scribe workflow; do
|
||||
sub=$(module_subdir "$slug")
|
||||
root=$tmp/modules/$(module_checkout "$slug")${sub:+/$sub}
|
||||
mkdir -p "$root/backend" "$root/frontend" "$root/db/managed"
|
||||
@@ -168,7 +168,7 @@ CLEAN_KEYS="$COMPOSE_KEYS POSTGRES_PASSWORD
|
||||
MANAGED_DB_MAX_CONNECTIONS
|
||||
DB_POOL_SIZE DB_MAX_OVERFLOW CHECK_REQUIRE_TLS PLATFORM_IDENTITY_SCHEMA
|
||||
DB_HOST DB_PORT DB_NAME ROLE_PREFIX OUT"
|
||||
for upper in ATRIUM GALENA SYGNA COUNSEL INSIDER ARBITER LEXICON AGORA PANORAMA PARAFA SCRIBE WORKFLOW; do
|
||||
for upper in ATRIUM GALENA SYGNA COUNSEL INSIDER ARBITER LEXICON AGORA PARAFA SCRIBE WORKFLOW; do
|
||||
for suffix in MIGRATOR_PASSWORD APP_PASSWORD MIGRATOR_ROLE APP_ROLE PYTHON; do
|
||||
CLEAN_KEYS="$CLEAN_KEYS ${upper}_$suffix"
|
||||
done
|
||||
@@ -179,11 +179,11 @@ for key in $CLEAN_KEYS; do CLEAN_ARGS+=(-u "$key"); done
|
||||
clean() { env "${CLEAN_ARGS[@]}" "$@"; }
|
||||
compose() {
|
||||
clean docker compose --project-directory "$DEPLOY_DIR" -f "$DEPLOY_DIR/compose.yaml" --env-file "$tmp/.env" \
|
||||
--profile insider --profile arbiter --profile lexicon --profile agora --profile panorama --profile parafa --profile scribe --profile workflow "$@"
|
||||
--profile insider --profile arbiter --profile lexicon --profile agora --profile parafa --profile scribe --profile workflow "$@"
|
||||
}
|
||||
compose_managed_db() {
|
||||
clean docker compose --project-directory "$DEPLOY_DIR" -f "$DEPLOY_DIR/compose.yaml" \
|
||||
-f "$DEPLOY_DIR/compose.managed-db.yaml" --env-file "$tmp/.env.managed-db" --profile insider --profile arbiter --profile lexicon --profile agora --profile panorama --profile parafa --profile scribe --profile workflow "$@"
|
||||
-f "$DEPLOY_DIR/compose.managed-db.yaml" --env-file "$tmp/.env.managed-db" --profile insider --profile arbiter --profile lexicon --profile agora --profile parafa --profile scribe --profile workflow "$@"
|
||||
}
|
||||
# Steps 2 and 2b render with every profile a module can be switched on by, so a switched-off module is
|
||||
# still checked like the others. Step 2c renders WITHOUT them, which is what a box that has not deployed
|
||||
@@ -204,7 +204,7 @@ elif ! compose config -q; then
|
||||
else
|
||||
ok "compose.yaml is valid"
|
||||
services=$(compose config --services | sort | tr '\n' ' ') || services="(failed)"
|
||||
expected="agora-backend agora-migrate arbiter-backend arbiter-migrate atrium-backend atrium-migrate counsel-backend counsel-migrate galena-backend galena-migrate insider-backend insider-migrate lexicon-backend lexicon-migrate panorama-backend panorama-migrate parafa-backend parafa-migrate postgres scribe-backend scribe-migrate sygna-backend sygna-migrate workflow-backend workflow-migrate "
|
||||
expected="agora-backend agora-migrate arbiter-backend arbiter-migrate atrium-backend atrium-migrate counsel-backend counsel-migrate galena-backend galena-migrate insider-backend insider-migrate lexicon-backend lexicon-migrate parafa-backend parafa-migrate postgres scribe-backend scribe-migrate sygna-backend sygna-migrate workflow-backend workflow-migrate "
|
||||
if [ "$services" = "$expected" ]; then ok "services: $services"; else bad "services are '$services', expected '$expected'"; fi
|
||||
compose config --format json > "$tmp/compose.json" || bad "docker compose config --format json"
|
||||
if "$PYTHON" "$DEPLOY_DIR/lib/compose_checks.py" local "$tmp/compose.json"; then
|
||||
@@ -224,7 +224,7 @@ elif ! compose_managed_db config -q; then
|
||||
else
|
||||
ok "the merge is valid"
|
||||
services=$(compose_managed_db config --services | sort | tr '\n' ' ') || services="(failed)"
|
||||
expected="agora-backend agora-migrate arbiter-backend arbiter-migrate atrium-backend atrium-migrate counsel-backend counsel-migrate galena-backend galena-migrate insider-backend insider-migrate lexicon-backend lexicon-migrate panorama-backend panorama-migrate parafa-backend parafa-migrate scribe-backend scribe-migrate sygna-backend sygna-migrate workflow-backend workflow-migrate "
|
||||
expected="agora-backend agora-migrate arbiter-backend arbiter-migrate atrium-backend atrium-migrate counsel-backend counsel-migrate galena-backend galena-migrate insider-backend insider-migrate lexicon-backend lexicon-migrate parafa-backend parafa-migrate scribe-backend scribe-migrate sygna-backend sygna-migrate workflow-backend workflow-migrate "
|
||||
if [ "$services" = "$expected" ]; then ok "services: $services (postgres switched off)"; else bad "services are '$services', expected '$expected'"; fi
|
||||
compose_managed_db config --format json > "$tmp/compose.managed-db.json" || bad "docker compose config --format json (merged)"
|
||||
if "$PYTHON" "$DEPLOY_DIR/lib/compose_checks.py" managed "$tmp/compose.managed-db.json"; then
|
||||
@@ -245,7 +245,7 @@ else
|
||||
mkdir -p "$tmp/env-aside"
|
||||
mv "$tmp/env/insider.env" "$tmp/env/insider.migrate.env" \
|
||||
"$tmp/env/arbiter.env" "$tmp/env/arbiter.migrate.env" "$tmp/env/lexicon.env" "$tmp/env/lexicon.migrate.env" \
|
||||
"$tmp/env/agora.env" "$tmp/env/agora.migrate.env" "$tmp/env/panorama.env" "$tmp/env/panorama.migrate.env" \
|
||||
"$tmp/env/agora.env" "$tmp/env/agora.migrate.env" \
|
||||
"$tmp/env/parafa.env" "$tmp/env/parafa.migrate.env" "$tmp/env/scribe.env" "$tmp/env/scribe.migrate.env" \n "$tmp/env/workflow.env" "$tmp/env/workflow.migrate.env" "$tmp/env-aside/"
|
||||
if ! compose_off config -q 2> "$tmp/compose-off.err"; then
|
||||
sed 's/^/ | /' "$tmp/compose-off.err"
|
||||
@@ -253,14 +253,14 @@ else
|
||||
else
|
||||
services=$(compose_off config --services | sort | tr '\n' ' ') || services="(failed)"
|
||||
case " $services " in
|
||||
*" insider-"*|*" arbiter-"*|*" lexicon-"*|*" agora-"*|*" panorama-"*|*" parafa-"*|*" scribe-"*|*" workflow-"*) bad "a switched-off module's services are active without the profile: $services" ;;
|
||||
*" insider-"*|*" arbiter-"*|*" lexicon-"*|*" agora-"*|*" parafa-"*|*" scribe-"*|*" workflow-"*) bad "a switched-off module's services are active without the profile: $services" ;;
|
||||
*) ok "the switched-off modules' env files absent and their profiles off: the kit loads, and up -d would start none of them" ;;
|
||||
esac
|
||||
fi
|
||||
mv "$tmp/env-aside/insider.env" "$tmp/env-aside/insider.migrate.env" \
|
||||
"$tmp/env-aside/arbiter.env" "$tmp/env-aside/arbiter.migrate.env" "$tmp/env-aside/lexicon.env" \
|
||||
"$tmp/env-aside/lexicon.migrate.env" "$tmp/env-aside/agora.env" "$tmp/env-aside/agora.migrate.env" \
|
||||
"$tmp/env-aside/panorama.env" "$tmp/env-aside/panorama.migrate.env" "$tmp/env-aside/parafa.env" \
|
||||
"$tmp/env-aside/parafa.env" \
|
||||
"$tmp/env-aside/parafa.migrate.env" "$tmp/env-aside/scribe.env" "$tmp/env-aside/scribe.migrate.env" \n "$tmp/env-aside/workflow.env" "$tmp/env-aside/workflow.migrate.env" "$tmp/env/"
|
||||
fi
|
||||
|
||||
@@ -282,7 +282,7 @@ else
|
||||
files=(-f "$DEPLOY_DIR/compose.yaml" -f "$DEPLOY_DIR/compose.managed-db.yaml" -f "$DEPLOY_DIR/compose.tls.yaml")
|
||||
envf=$tmp/.env.managed-db.tls
|
||||
fi
|
||||
if ! clean docker compose --project-directory "$DEPLOY_DIR" "${files[@]}" --env-file "$envf" --profile insider --profile arbiter --profile lexicon --profile agora --profile panorama --profile parafa --profile scribe --profile workflow \
|
||||
if ! clean docker compose --project-directory "$DEPLOY_DIR" "${files[@]}" --env-file "$envf" --profile insider --profile arbiter --profile lexicon --profile agora --profile parafa --profile scribe --profile workflow \
|
||||
config --format json > "$tmp/compose.$shape.tls.json"; then
|
||||
bad "docker compose config ($shape + compose.tls.yaml)"
|
||||
elif "$PYTHON" "$DEPLOY_DIR/lib/compose_checks.py" "$shape" "$tmp/compose.$shape.tls.json" --tls; then
|
||||
@@ -312,7 +312,7 @@ step "4. header parity: each module exposes the FRAME_ANCESTORS switch the kit s
|
||||
# Atrium tab framing it would go blank with nothing in any log. So each checkout must carry the field
|
||||
# (default 'none'), the validator that refuses anything but 'none' / 'self', and the SAMEORIGIN its edge
|
||||
# stamps for 'self'. The headers' VALUES are each module's own tests' business (tests/test_edge.py there).
|
||||
for slug in galena sygna counsel insider arbiter lexicon agora panorama parafa scribe workflow; do
|
||||
for slug in galena sygna counsel insider arbiter lexicon agora parafa scribe workflow; do
|
||||
sub=$(module_subdir "$slug")
|
||||
app=$modules/$(module_checkout "$slug")${sub:+/$sub}/backend/app
|
||||
if [ ! -d "$app" ]; then
|
||||
@@ -459,7 +459,7 @@ if clean bash "$DEPLOY_DIR/init.sh" --ip 203.0.113.10 --modules-dir "$kit_module
|
||||
# app's env file, one cookie name, and the hub's grants naming the modules that ship switched on.
|
||||
one_account=1
|
||||
grep -q '^PLATFORM_IDENTITY_SCHEMA=dredd$' "$init_out/db.env" || one_account=0
|
||||
for slug in atrium galena sygna counsel insider arbiter lexicon agora panorama parafa scribe workflow; do
|
||||
for slug in atrium galena sygna counsel insider arbiter lexicon agora parafa scribe workflow; do
|
||||
grep -q '^IDENTITY_SCHEMA=dredd$' "$init_out/env/$slug.env" || one_account=0
|
||||
grep -q '^SESSION_COOKIE_NAME=dredd_session$' "$init_out/env/$slug.env" || one_account=0
|
||||
done
|
||||
@@ -517,27 +517,26 @@ if clean bash "$DEPLOY_DIR/init.sh" --ip 203.0.113.10 --modules-dir "$kit_module
|
||||
sed 's/^/ | /' "$tmp/dry-run.init.arbiter.log"
|
||||
bad "push.sh --dry-run with Arbiter switched on (and listed) is not complete, or does not include arbiter"
|
||||
fi
|
||||
# Lexicon, Agora, Panorama, Parafa, Scribe and Workflow (M2-M4, M6, M7) together: their opt-ins (model-provider
|
||||
# key reader, event emitters, event reader) are in env/atrium.env from the first init, so only the
|
||||
# Lexicon, Agora, Parafa, Scribe and Workflow (M2-M4, M6, M7) together: their opt-ins (model-provider
|
||||
# key reader, event emitters) are in env/atrium.env from the first init, so only the
|
||||
# identity lists change here.
|
||||
all_profiles=insider,arbiter,lexicon,agora,panorama,parafa,scribe,workflow
|
||||
sed -e 's/^IDENTITY_READER_ROLES=.*/&,lexicon_app,agora_app,panorama_app,parafa_app,scribe_app,workflow_app/' \
|
||||
-e 's/^IDENTITY_MIGRATOR_ROLES=.*/&,lexicon_migrator,agora_migrator,panorama_migrator,parafa_migrator,scribe_migrator,workflow_migrator/' \
|
||||
all_profiles=insider,arbiter,lexicon,agora,parafa,scribe,workflow
|
||||
sed -e 's/^IDENTITY_READER_ROLES=.*/&,lexicon_app,agora_app,parafa_app,scribe_app,workflow_app/' \
|
||||
-e 's/^IDENTITY_MIGRATOR_ROLES=.*/&,lexicon_migrator,agora_migrator,parafa_migrator,scribe_migrator,workflow_migrator/' \
|
||||
"$init_out/env/atrium.env" > "$tmp/atrium.env.m2m4" && install -m 600 "$tmp/atrium.env.m2m4" "$init_out/env/atrium.env"
|
||||
if clean env COMPOSE_PROFILES=$all_profiles bash "$DEPLOY_DIR/push.sh" --dry-run --db-env "$init_out/db.env" \
|
||||
--compose-env "$init_out/.env" > "$tmp/dry-run.init.m2m4.log" 2>&1 \
|
||||
&& grep -q "^Dry run: the inputs are complete.$" "$tmp/dry-run.init.m2m4.log" \
|
||||
&& grep -q "^\[lexicon\] schema lexicon, roles " "$tmp/dry-run.init.m2m4.log" \
|
||||
&& grep -q "^\[agora\] schema agora, roles " "$tmp/dry-run.init.m2m4.log" \
|
||||
&& grep -q "^\[panorama\] schema panorama, roles " "$tmp/dry-run.init.m2m4.log" \
|
||||
&& grep -q "^\[parafa\] schema parafa, roles " "$tmp/dry-run.init.m2m4.log" \
|
||||
&& grep -q "^\[scribe\] schema scribe, roles " "$tmp/dry-run.init.m2m4.log" \
|
||||
&& grep -q "^\[workflow\] schema workflow, roles " "$tmp/dry-run.init.m2m4.log" \
|
||||
&& grep -q "^ budget 12 apps" "$tmp/dry-run.init.m2m4.log"; then
|
||||
ok "with every profile on and every module's roles listed the files are complete, the plan includes lexicon, agora, panorama, parafa, scribe and workflow, and the budget counts twelve apps"
|
||||
&& grep -q "^ budget 11 apps" "$tmp/dry-run.init.m2m4.log"; then
|
||||
ok "with every profile on and every module's roles listed the files are complete, the plan includes lexicon, agora, parafa, scribe and workflow, and the budget counts eleven apps"
|
||||
else
|
||||
sed 's/^/ | /' "$tmp/dry-run.init.m2m4.log"
|
||||
bad "push.sh --dry-run with Lexicon, Agora, Panorama, Parafa, Scribe and Workflow switched on (and listed) is not complete, or does not include them"
|
||||
bad "push.sh --dry-run with Lexicon, Agora, Parafa, Scribe and Workflow switched on (and listed) is not complete, or does not include them"
|
||||
fi
|
||||
# The opt-out: separate accounts per app, written whole, and a push that accepts it as it stands.
|
||||
if clean bash "$DEPLOY_DIR/init.sh" --ip 203.0.113.10 --standalone --modules-dir "$kit_modules" \
|
||||
|
||||
+12
-15
@@ -8,11 +8,11 @@
|
||||
# [--stop-backend] [--lock-timeout DURATION]
|
||||
# [--db-env FILE] [--compose-env FILE] [--env-dir DIR]
|
||||
# [atrium] [galena] [sygna] [counsel] [insider] [arbiter] [lexicon] [agora]
|
||||
# [panorama] [parafa] [scribe] [workflow]
|
||||
# [parafa] [scribe] [workflow]
|
||||
#
|
||||
# No app named = every DEPLOYED app: all four, plus insider, arbiter, lexicon, agora,
|
||||
# panorama, parafa, scribe and workflow when COMPOSE_PROFILES names them (deploy/.env). Apps always run in the
|
||||
# family order (atrium, galena, sygna, counsel, insider, arbiter, lexicon, agora, panorama,
|
||||
# parafa, scribe and workflow when COMPOSE_PROFILES names them (deploy/.env). Apps always run in the
|
||||
# family order (atrium, galena, sygna, counsel, insider, arbiter, lexicon, agora,
|
||||
# parafa, scribe, workflow).
|
||||
#
|
||||
# 1. preflight before anything connects, for EVERY selected app: the platform admin's URL is
|
||||
@@ -117,9 +117,9 @@ CONTAINER_CA=/run/certs/db-ca.crt
|
||||
MANAGED_DB_COMPOSE=$DEPLOY_DIR/compose.managed-db.yaml
|
||||
# The database service of compose.yaml, which is also LOCAL_DB_HOST's default.
|
||||
LOCAL_DB_SERVICE=postgres
|
||||
FAMILY="atrium galena sygna counsel insider arbiter lexicon agora panorama parafa scribe workflow"
|
||||
FAMILY="atrium galena sygna counsel insider arbiter lexicon agora parafa scribe workflow"
|
||||
# The modules that ship in the kit switched OFF, each under a compose profile of its own name.
|
||||
PROFILED="insider arbiter lexicon agora panorama parafa scribe workflow"
|
||||
PROFILED="insider arbiter lexicon agora parafa scribe workflow"
|
||||
# The Compose service every step of the platform admin runs in.
|
||||
PROVISIONER=atrium-migrate
|
||||
ORIG_ARGS=("$@")
|
||||
@@ -156,7 +156,7 @@ while [ $# -gt 0 ]; do
|
||||
--env-dir) [ $# -ge 2 ] || refuse "--env-dir needs a directory"; ENV_DIR_ARG=$2; shift ;;
|
||||
--env-dir=*) ENV_DIR_ARG=${1#*=} ;;
|
||||
-h|--help) usage; exit 0 ;;
|
||||
atrium|galena|sygna|counsel|insider|arbiter|lexicon|agora|panorama|parafa|scribe|workflow) SELECTED="$SELECTED $1" ;;
|
||||
atrium|galena|sygna|counsel|insider|arbiter|lexicon|agora|parafa|scribe|workflow) SELECTED="$SELECTED $1" ;;
|
||||
*) refuse "unknown argument: $1 (see --help)" ;;
|
||||
esac
|
||||
shift
|
||||
@@ -201,7 +201,7 @@ push_key() { # the settings deploy/db.env may carry (anything else is refused,
|
||||
# alembic and seed in --local mode, where env/<app>.env is silent about it, and the migration
|
||||
# would run with a setting the deployed backend will not have.
|
||||
PLATFORM_IDENTITY_SCHEMA) return 0 ;;
|
||||
ATRIUM_*|GALENA_*|SYGNA_*|COUNSEL_*|INSIDER_*|ARBITER_*|LEXICON_*|AGORA_*|PANORAMA_*|PARAFA_*|SCRIBE_*|WORKFLOW_*)
|
||||
ATRIUM_*|GALENA_*|SYGNA_*|COUNSEL_*|INSIDER_*|ARBITER_*|LEXICON_*|AGORA_*|PARAFA_*|SCRIBE_*|WORKFLOW_*)
|
||||
case ${1#*_} in MIGRATOR_PASSWORD|APP_PASSWORD|MIGRATOR_ROLE|APP_ROLE|PYTHON) return 0 ;; esac ;;
|
||||
esac
|
||||
return 1
|
||||
@@ -306,7 +306,7 @@ resolve_compose_key() {
|
||||
resolve_compose_key MODULES_DIR ./modules; MODULES_ROOT=$(abspath "$RESOLVED") MODULES_SOURCE=$SOURCE
|
||||
resolve_compose_key DEPLOY_ENV_DIR ./env; ENV_DIR=$(abspath "$RESOLVED") ENV_DIR_SOURCE=$SOURCE
|
||||
|
||||
# Insider, Arbiter, Lexicon, Agora, Panorama, Parafa, Scribe and Workflow ship in the kit switched OFF: compose.yaml puts their services under a profile
|
||||
# Insider, Arbiter, Lexicon, Agora, Parafa, Scribe and Workflow ship in the kit switched OFF: compose.yaml puts their services under a profile
|
||||
# of the module's own name, so `docker compose up -d` leaves each alone until deploy/.env names it in
|
||||
# COMPOSE_PROFILES. A push with no app named follows the same switch — otherwise the four deployed apps
|
||||
# would be held up by one that is not, refused over env files and passwords nobody has written yet.
|
||||
@@ -361,7 +361,6 @@ module_repo() {
|
||||
arbiter) printf 'https://github.com/Alpaq92/Arbiter' ;;
|
||||
lexicon) printf 'https://github.com/Alpaq92/Lexicon' ;;
|
||||
agora) printf 'https://github.com/Alpaq92/Agora' ;;
|
||||
panorama) printf 'https://github.com/Alpaq92/Panorama' ;;
|
||||
parafa) printf 'https://github.com/Alpaq92/Parafa' ;;
|
||||
scribe) printf 'https://github.com/Alpaq92/Scribe' ;;
|
||||
workflow) printf 'https://github.com/Alpaq92/Workflow' ;;
|
||||
@@ -397,7 +396,7 @@ app_setup() { # sets the per-app globals for $1
|
||||
arbiter) UP=ARBITER; EXTENSIONS=""
|
||||
CHECK_EXTRA="--append-only audit_log analysis_signoff agent_version frozen_card module_event module_event_receipt --no-delete analysis"
|
||||
SUBDIR=apps/arbiter ;;
|
||||
# Lexicon, Agora and Panorama (the split plan's M2, M3, M4): each app.models APPEND_ONLY_TABLES /
|
||||
# Lexicon and Agora (the split plan's M2, M3): each app.models APPEND_ONLY_TABLES /
|
||||
# NO_DELETE_TABLES, the lists their 0002 grants from and their CI's managed check passes
|
||||
# (test_deploy_m2_m4_check_args.py compares them). Each 0001 runs CREATE EXTENSION IF NOT EXISTS
|
||||
# "pgcrypto", which Galena's provisioning has already put in the database, and each committed
|
||||
@@ -406,7 +405,6 @@ app_setup() { # sets the per-app globals for $1
|
||||
lexicon) UP=LEXICON; EXTENSIONS=""; CHECK_EXTRA="--append-only audit_log" ;;
|
||||
agora) UP=AGORA; EXTENSIONS=""
|
||||
CHECK_EXTRA="--append-only audit_log module_event module_event_receipt --no-delete negotiation_room negotiation_round negotiation_comment" ;;
|
||||
panorama) UP=PANORAMA; EXTENSIONS=""; CHECK_EXTRA="--append-only audit_log" ;;
|
||||
# Parafa and Scribe (M6, M7): the same rule, their app.models lists (test_deploy_m6_m7_check_args.py).
|
||||
# Parafa's event tables are Agora's case (it emits document.signed: --events); a signing request is
|
||||
# evidence and is never deleted. Scribe takes no part in the event log; an export is never deleted.
|
||||
@@ -474,10 +472,9 @@ app_setup() { # sets the per-app globals for $1
|
||||
pin=$(sed -n 's/^dredd-core @ .*@v\([0-9.]*\).*/\1/p' "$MODULE/backend/requirements.txt" 2>/dev/null | head -1 || true)
|
||||
case $pin in 0.[0-9].*|0.1[0-9].*) ;; *) IDENTITY_CHECK_ARGS="$IDENTITY_CHECK_ARGS --events" ;; esac ;;
|
||||
esac
|
||||
# Panorama READS the log and writes nothing (dredd-core 0.23.0's reader tier, MODULE_EVENT_READER_ROLES):
|
||||
# its check proves SELECT and nothing more. The flag is new in 0.23.0, and the check runs with
|
||||
# Atrium's dredd-core (pinned 0.23.0 for exactly this).
|
||||
case $slug in panorama) IDENTITY_CHECK_ARGS="$IDENTITY_CHECK_ARGS --events-reader" ;; esac
|
||||
# No module reads the log without writing it since Panorama left the platform (Atrium#53): nothing is
|
||||
# checked with --events-reader now. The reader tier (MODULE_EVENT_READER_ROLES) and its consistency
|
||||
# check below stay for the next module that needs it.
|
||||
# The shared counterparty register (dredd-core 0.21.0): the module's tier is the one the hub
|
||||
# grants it (COUNTERPARTY_WRITER_ROLES / COUNTERPARTY_READER_ROLES in env/atrium.env; a role in
|
||||
# both is a writer, as app.identity_grants decides), so the check proves exactly that tier; a
|
||||
|
||||
Reference in New Issue
Block a user