about summary refs log tree commit diff
path: root/docs
diff options
context:
space:
mode:
authorPjotr Prins <pjotr.public01@thebird.nl>2026-11-15 12:34:27 +0000
committerPjotr Prins <pjotr.public01@thebird.nl>2026-11-15 12:34:27 +0000
commit93d48485ba1b366ae4b161e5f70e70603725db96 (patch)
treeaf4fad87781bcd386a0b81cdcf34c3bc078955e2 /docs
parent6dc92df74ebfc1f54889d247946a16ba6af6c056 (diff)
downloadgenenetwork4-93d48485ba1b366ae4b161e5f70e70603725db96.tar.gz
operator checklist: how production actually runs now (store binary, no container)
The layout, the restart command, where mutable state lives, and the two
mistakes that cost time today: the CWL comes from the checkout rather than
the store, and only two of the four ravanan 0.2.0 builds on this box
convert --slurm-api-endpoint to a URI -- the others die inside
slurm-api.scm with struct-vtable on a string, after staging every input,
which reads like a Slurm fault rather than an argument one.
Diffstat (limited to 'docs')
-rw-r--r--docs/www/operator-checklist.md44
1 files changed, 44 insertions, 0 deletions
diff --git a/docs/www/operator-checklist.md b/docs/www/operator-checklist.md
index 25cc2c0..b5e2dc4 100644
--- a/docs/www/operator-checklist.md
+++ b/docs/www/operator-checklist.md
@@ -377,3 +377,47 @@ changes on every build, so it distinguishes two builds of the same commit.
 * A `/search` `total`/facet would end the paging-to-count pattern that
   costs ~23 s per 15 000 hits; see
   [`../search-engines.md`](../search-engines.md).
+
+## Production layout on this box (2026-11-15, no container)
+
+The API runs the **store binary directly**, as `wrk`, with no `guix shell`
+container around it. Two instances (3000, 3001) are started by
+`factory/gn4-prod/run.sh`, which sources `factory/gn4-prod/env.sh`:
+
+```sh
+runuser -u wrk -- /home/wrk/tmp/ai-root/factory/gn4-prod/run.sh restart
+```
+
+`run.sh` also takes `start`, `stop` and `status`; the instances log to
+`factory/gn4-prod/logs/<port>.log` (appending across restarts, so the access
+lines survive a deploy). Deploying is therefore: `guix build -f guix.scm`,
+edit `env.sh`'s `GEN4=`, `run.sh restart`, then check `/version` (it reports
+the commit and `database: reachable`).
+
+Everything mutable is under `factory/gn4-prod/` — `tokens.sqlite` (the only
+copy: losing it loses every token), `gemma-cache`, `rqtl-cache`,
+`qtl2-cache`, `bulklmm-cache`, `bnw-cache`. The ravanan cache is the
+exception: it must be under `/home/wrk/tmp/ai-root/slurm-share/` because the
+Slurm container bind-mounts nothing else (see
+[`../ravanan-slurm.md`](../ravanan-slurm.md)).
+
+Two things that are easy to get wrong, both measured on this box:
+
+* **The workflow and manifest come from the checkout**, not from the store
+  build: `GEMMA_RAVANAN_WORKFLOW` and `GEMMA_RAVANAN_MANIFEST` point into
+  `factory/code/genenetwork/genenetwork4/cwl/gemma/`, so the checkout has to
+  be at the commit the binary was built from — otherwise the CWL that runs
+  is not the one that was tested.
+* **ravanan 0.2.0 exists on this box in two variants**, and only one works
+  with `--slurm-api-endpoint`. In `/gnu/store/1ydn2bdw…-ravanan-0.2.0`
+  (and `20aqba00…`) the option handler converts its argument,
+  `(acons 'slurm-api-endpoint (string->uri arg) result)`; in
+  `rim2v0pi…` and `vyqs04g9…` it does not, so `slurm-api.scm` calls
+  `uri-scheme` on a string and the run dies with
+  `In procedure struct-vtable: Wrong type argument …: "http://127.0.0.1:6820"`
+  *after* staging every input, i.e. looking like a Slurm problem. `env.sh`
+  pins the working one.
+
+`GENENETWORK4_TEST_TOKEN=false` in production: `/get-test-token` mints a
+token for any local caller, which is a development convenience only. Mint
+with `POST /tokens` (localhost-only) instead.