aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2024-08-29 13:15:58 +0100
committerArun Isaac2024-08-29 13:18:15 +0100
commit090e1ca67f7c9f641f19aac8593f64962d4d3130 (patch)
treed19027575c6289b60ff98f8bf4bc0260cc45eb8d
parent57ea20615fc0b32ccab0f986a6f483cec124e198 (diff)
downloadgn-machines-090e1ca67f7c9f641f19aac8593f64962d4d3130.tar.gz
Add slurm deployment scripts for octopus.
* slurm-deploy.sh: Delete file. * slurm-head-deploy.sh, slurm-worker-deploy.sh: New files. * slurm.scm: Replace tux04 with octopus in comment.
-rwxr-xr-xslurm-deploy.sh19
-rwxr-xr-xslurm-head-deploy.sh13
-rwxr-xr-xslurm-worker-deploy.sh30
-rw-r--r--slurm.scm2
4 files changed, 44 insertions, 20 deletions
diff --git a/slurm-deploy.sh b/slurm-deploy.sh
deleted file mode 100755
index 8118d56..0000000
--- a/slurm-deploy.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#! /bin/sh -xe
-
-##
-## Test slurm deployment on tux04
-##
-
-slurm=$(guix build -f slurm.scm)
-echo $slurm
-
-# Symlink slurm daemon executables and systemd service files.
-for executable in slurmctld slurmdbd slurmd slurmrestd;
-do
- sudo ln --no-target-directory --force --symbolic $slurm/sbin/$executable /usr/local/sbin/$executable
- sudo ln --no-target-directory --force --symbolic $slurm/etc/$executable.service /etc/systemd/system/$executable.service
-done
-
-# It is enough to register one gcroot as that marks the whole store
-# item as live.
-sudo ln --force --symbolic /usr/local/sbin/slurmd /var/guix/gcroots
diff --git a/slurm-head-deploy.sh b/slurm-head-deploy.sh
new file mode 100755
index 0000000..b921f18
--- /dev/null
+++ b/slurm-head-deploy.sh
@@ -0,0 +1,13 @@
+#! /bin/sh -xe
+
+##
+## slurm deployment on octopus01 (the head node)
+##
+
+## Install slurm in the same way as the worker nodes.
+./slurm-worker-deploy.sh $(guix build -f slurm.scm)
+
+# Register garbage collector root to prevent `guix gc' from garbage
+# collecting slurm. It is enough to register one gcroot as that marks
+# the whole store item as live.
+sudo ln --force --symbolic /usr/local/sbin/slurmd /var/guix/gcroots
diff --git a/slurm-worker-deploy.sh b/slurm-worker-deploy.sh
new file mode 100755
index 0000000..cf7a583
--- /dev/null
+++ b/slurm-worker-deploy.sh
@@ -0,0 +1,30 @@
+#! /bin/sh -xe
+
+##
+## slurm deployment on octopus worker nodes
+##
+
+case $1 in
+ "")
+ echo "Usage: $0 SLURM_STORE_ITEM"
+ exit 1
+ ;;
+ *)
+ slurm=$1
+ echo $slurm
+ ;;
+esac
+
+# Symlink slurm daemon executables and systemd service files.
+# for executable in slurmctld slurmdbd slurmd slurmrestd;
+for executable in slurmctld slurmdbd slurmd;
+do
+ sudo ln --force --symbolic $slurm/sbin/$executable /usr/local/sbin/$executable
+ sudo ln --force --symbolic $slurm/etc/$executable.service /etc/systemd/system/$executable.service
+done
+
+# Symlink slurm client commands.
+for executable in sacct salloc sbatch scancel sdiag smap squeue srun sstat sacctmgr sattach sbcast scontrol sinfo sprio sreport sshare strigger
+do
+ sudo ln --force --symbolic $slurm/bin/$executable /usr/local/bin/$executable
+done
diff --git a/slurm.scm b/slurm.scm
index 1158b1e..7539cf7 100644
--- a/slurm.scm
+++ b/slurm.scm
@@ -1,5 +1,5 @@
;;
-;; Test slurm deployment on tux04
+;; slurm deployment on octopus
;;
(use-modules ((gnu packages check) #:select (check))