Runbook: document the deployed state and fix the NIP-11 check

The submission relay and both promotion paths are live in production, so the
runbook no longer claims that nothing has been deployed. Reframe the deployment
order and pre-go-live checks as completed, and fix the verification command:
strfry only returns the NIP-11 JSON with an Accept header, so the old
curl | jq pipeline could never work.
This commit is contained in:
raucao committed 2026-11-18 14:31:00 +04:00
1 parent ab60ae1ea8
commit 1b1e2fbb3d
2 files changed
+21 -13

No files matched your search

+15 -9
View File
@@ -4,9 +4,11 @@ Chef-side pieces of the public submission relay + image-recognition moderation
MVP ([`raucao/marco#97`](https://gitea.kosmos.org/raucao/marco/issues/97)). The
canonical plan/spec lives in the Marco repo, `doc/nostr/submission-relay-mvp/`.
This document is the Chef runbook: what the code deploys, in which order, and
how to roll it back. **Nothing here has been deployed** — the cookbook changes
are prepared but not converged.
This document is the Chef runbook: what the code deploys, how it was rolled out,
and how to roll it back. **The stack is deployed to production** — the relay is
live at `wss://submit.nostr.kosmos.org` and both promotion paths are enabled.
The deployment order below is kept as a record of the rollout and for rebuilding
the service elsewhere.
## What the Chef code adds
@@ -118,7 +120,10 @@ space, which strfry would not hot-reload). Only stdlib ERB is needed:
ruby site-cookbooks/kosmos_strfry/test/member_bridge_conf_test.rb
```
## Deployment order
## Deployment order (as performed)
All of the steps below have been performed; this is the order that was used.
Keep it for rebuilding the service on another host.
0. **HARD PRECONDITION — akkounts `live` branch.** Before *any* converge, the
`live` branch of `kosmos/akkounts` must contain
@@ -149,15 +154,16 @@ ruby site-cookbooks/kosmos_strfry/test/member_bridge_conf_test.rb
5. **Verify.**
* `systemctl status strfry-submission` / `strfry-sync.timer` /
`strfry-member-bridge`.
* `curl -s https://submit.nostr.kosmos.org | jq -r .name` →
`Kosmos submission relay`.
* `curl -s -H 'Accept: application/nostr+json' https://submit.nostr.kosmos.org | jq -r .name`
→ `Kosmos submission relay`. (Without the `Accept` header strfry serves its
HTML info page, which `jq` cannot parse.)
* `journalctl -u strfry-sync` shows accepted events after an approval.
* `journalctl -u strfry-member-bridge` shows `Connected to ws://localhost:7778`
and rejects non-member events (`pluginDown blocked event … Only members can
publish notes on this relay`).
* The production relay's NIP-11 and `_strfry` upstream are unchanged.
## Pre-go-live verification
## Pre-go-live verification (completed)
* **LMDB concurrency (verified 2026-11-17 on the nuc's `:7777` mirror).** A
`strfry sync --dir down` was run against the same LMDB that the live relay was
@@ -165,7 +171,7 @@ ruby site-cookbooks/kosmos_strfry/test/member_bridge_conf_test.rb
(39 events) during the sync; the relay stayed active and the event count was
unchanged. This is the same access pattern the approved-sync uses on strfry-1
(same DB, separate `strfry sync` process), so no additional lock is needed.
* **No rogue sync path.** Before enabling the timer, confirm that no external
* **No rogue sync path.** Confirmed before the timer was enabled: no external
negentropy/websocket path can produce `sourceType = "Sync"` on the production
relay; the sync policy is fail-closed on the exact staging URL.
@@ -182,7 +188,7 @@ ruby site-cookbooks/kosmos_strfry/test/member_bridge_conf_test.rb
`/var/lib/strfry-submission` can be deleted independently; the production
relay and its database are untouched.
## Node.js caveat (check before converging)
## Node.js caveat (checked before converging)
The Node write policies (`submission-policy.mjs`, `sync-policy.mjs`) are Node 24
ESM scripts, so `role[strfry_submission]` and `role[strfry]` add a
@@ -72,13 +72,15 @@ verify those services do not depend on Node 14 before converging — see
2. Provision/assign `role[strfry_submission]` and converge the relay node.
3. Converge the openresty proxy nodes (`role[openresty_proxy]`), which adds the
`kosmos_strfry_submission::nginx` site.
4. Verify: `curl -s https://submit.nostr.kosmos.org` returns the NIP-11 document
with name `Kosmos submission relay`; `systemctl status strfry-submission`.
4. Verify: `curl -s -H 'Accept: application/nostr+json' https://submit.nostr.kosmos.org`
returns the NIP-11 document with name `Kosmos submission relay` (without the
`Accept` header strfry serves its HTML info page); `systemctl status
strfry-submission`.
Rollback: remove `kosmos_strfry_submission::nginx` from the proxy run list,
converge, and stop/disable `strfry-submission` on the relay node. The database
lives in `/var/lib/strfry-submission` and can be deleted independently from the
production relay.
No deployment is performed by this cookbook change; see
`doc/nostr-submission-relay.md` for the full runbook.
This cookbook is deployed to production; see `doc/nostr-submission-relay.md`
for the full runbook and rollback.