about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPjotr <wrk@bosa.lan>2026-11-14 22:16:16 +0000
committerPjotr <wrk@bosa.lan>2026-11-14 22:16:16 +0000
commit7e52abdde8d36cb2f805d2c2d40aa123e9d168c1 (patch)
tree919602d4d78a398d26ef3f46387cea7266d4a53c
parent174f8c72ec749f77b39534d56ce34fbcbc774aeb (diff)
downloadgn-machines-7e52abdde8d36cb2f805d2c2d40aa123e9d168c1.tar.gz
Note the topology: slurm stays a separate box from the GN4AI webserver
Comments only; the gn4ai container derivation is byte-identical before and
after (bfmdmdznzs2p0wa65z31zpcwzmq0wdk4-run-container.drv), which is the
check that nothing but prose moved.

gn4ai.scm's header now says why a batch scheduler is not in it: the
controller, the compute daemon and munge would join a public webserver's
failure domain; slurm, slurmrestd and munge accounts would enter a
container that has none; and every slurm configuration change would become
a webserver rebuild. GN4 needs the client half -- ravanan and ccwl -- and a
--slurm-api-endpoint, which is the production shape anyway: the cluster is
another machine, not a neighbour process. It also records the argument in
the other direction, since it is real: run-guix-container supervises one
container at a time, so the two cannot be up together on one host -- which
is a reason to fix the daemon or use a second box, not to merge them.

specials/slurm-container.scm says the same from its own side, and that it
deploys on a machine of its own as it stands.
-rw-r--r--gn4ai.scm14
-rw-r--r--specials/slurm-container.scm8
2 files changed, 22 insertions, 0 deletions
diff --git a/gn4ai.scm b/gn4ai.scm
index 669ff59..1864531 100644
--- a/gn4ai.scm
+++ b/gn4ai.scm
@@ -47,6 +47,20 @@
 ;;; $base/gn4-container is the only one that must be writable, and the check
 ;;; is `ls` inside the container.
 ;;;
+;;; Slurm is deliberately NOT in here. A batch scheduler inside the container
+;;; that faces the internet would take the controller, the compute daemon and
+;;; munge into the webserver's failure domain; it would add slurm, slurmrestd
+;;; and munge accounts to a container that otherwise has none; and it would
+;;; make every slurm configuration change a webserver rebuild. GN4 needs only
+;;; the client half -- ravanan and ccwl -- pointed at a slurmrestd elsewhere
+;;; (--slurm-api-endpoint), which is also the shape production has: the cluster
+;;; is another box, not a neighbour process. The test fixture for that endpoint
+;;; is specials/slurm-container.scm, deployable on a machine of its own exactly
+;;; like this one. (There is a practical argument in the other direction --
+;;; run-guix-container supervises one container at a time, so the two cannot be
+;;; up together on one host -- and that argues for fixing the daemon or using a
+;;; second box, not for merging them.)
+;;;
 ;;; Configuration is in $base/gn4-container/gn4.env (mode 0600, sourced by the
 ;;; wrapper below), not in this file: it carries SQL_URI's password, and store
 ;;; paths are world-readable.
diff --git a/specials/slurm-container.scm b/specials/slurm-container.scm
index eed5b33..f50ce28 100644
--- a/specials/slurm-container.scm
+++ b/specials/slurm-container.scm
@@ -22,6 +22,14 @@
 ;;; slurmd, slurmrestd with JWT auth) -- one node, one partition, no
 ;;; accounting database.
 ;;;
+;;; It stays a *separate* box from the GN4AI webserver (gn4ai.scm in the repo
+;;; root): genenetwork4 drives it over the slurm REST API
+;;; (--slurm-api-endpoint), so the scheduler is not in the webserver's failure
+;;; domain, the scheduler's accounts and munge key stay out of the container
+;;; that faces the internet, and this file can be deployed on a second machine
+;;; as it stands. Reasoned in gn4ai.scm's header; recorded in the ai-memory
+;;; store of this repository.
+;;;
 ;;; Unlike a rootless `guix shell -C` sandbox, this is a real `guix
 ;;; system container`, started with real root on the host via the
 ;;; run-guix-system-container daemon (see ../../run-guix-container),