aboutsummaryrefslogtreecommitdiff
path: root/gn/deploy/octopus.scm
diff options
context:
space:
mode:
authorEfraim Flashner2020-12-01 21:15:21 +0200
committerEfraim Flashner2020-12-01 21:15:21 +0200
commit1d456b37cabefe6caa94cab22e952622c0d26c1f (patch)
treeaf89d0e45062d2a3776bb629710f617e03118399 /gn/deploy/octopus.scm
parent091e1391ffffa54431a224f38c3d64a9a1f63ce2 (diff)
downloadguix-bioinformatics-1d456b37cabefe6caa94cab22e952622c0d26c1f.tar.gz
octopus: add slurm services
Diffstat (limited to 'gn/deploy/octopus.scm')
-rw-r--r--gn/deploy/octopus.scm98
1 files changed, 91 insertions, 7 deletions
diff --git a/gn/deploy/octopus.scm b/gn/deploy/octopus.scm
index f707462..9d1e7d3 100644
--- a/gn/deploy/octopus.scm
+++ b/gn/deploy/octopus.scm
@@ -2,10 +2,70 @@
(use-modules (gnu)
(gn services science)
- )
-(use-service-modules ssh web)
+ (gn packages parallel))
+(use-service-modules networking ssh web)
(use-package-modules certs tmux screen vim)
+(define %slurm.conf
+ (plain-file "slurm.conf"
+ (string-append
+"ClusterName=linux
+ControlMachine=octopus
+
+SlurmUser=slurm
+#SlurmdUser=root
+SlurmctldPort=6817
+SlurmdPort=6818
+AuthType=auth/munge
+StateSaveLocation=/var/spool/slurmd/ctld
+SlurmdSpoolDir=/var/spool/slurmd
+SwitchType=switch/none
+MpiDefault=none
+SlurmctldPidFile=/var/run/slurm/slurmctld.pid
+SlurmdPidFile=/var/run/slurm/slurmd.pid
+ProctrackType=proctrack/pgid
+ReturnToService=1
+
+# TIMERS
+InactiveLimit=0
+MinJobAge=300
+KillWait=30
+#
+
+# LOGGING
+SlurmctldDebug=3
+SlurmctldLogFile=/var/log/slurm/slurmctld.log
+SlurmdDebug=3
+SlurmdLogFile=/var/log/slurm/slurmd.log
+JobCompType=jobcomp/none
+
+# COMPUTE NODES
+NodeName=octopus CPUs=1 Boards=1 SocketsPerBoard=1 CoresPerSocket=1 ThreadsPerCore=1 RealMemory=1024
+PartitionName=debug Nodes=ALL Default=YES MaxTime=INFINITE State=UP")))
+
+(define %cgroup.conf
+ (plain-file "cgroup.conf"
+ (string-append
+"###
+# Slurm cgroup support configuration file
+###
+CgroupAutomount=yes
+ConstrainCores=yes
+#")))
+
+(define %slurmdbd.conf
+ (plain-file "slurmdbd.conf"
+ (string-append
+"AuthType=auth/munge
+AuthInfo=/var/run/munge/munge.socket.2
+DbdHost=localhost
+StorageHost=localhost
+StorageType=accounting_storage/none
+StorageUser=slurm
+PidFile=/var/run/slurm/slurmdbd.pid
+LogFile=/var/log/slurm/slurmdbd.log
+SlurmUser=slurm")))
+
(operating-system
(host-name "octopus")
(timezone "Etc/UTC")
@@ -34,7 +94,9 @@
;(file-system
; (device "octopus01:/home")
; (mount-point "/home")
- ; (type "nfs"))
+ ; (type "nfs")
+ ; (mount? #f) ; is this necessary?
+ ; (check? #f))
)
%base-file-systems))
@@ -48,13 +110,13 @@
(comment "Efraim Flashner")
(uid 1000)
(group "users")
- (supplementary-groups '("wheel")))
+ (supplementary-groups '("wheel" "kvm")))
(user-account
(name "wrk")
(comment "Pjotr Prins")
(uid 502)
(group "users")
- (supplementary-groups '("wheel")))
+ (supplementary-groups '("wheel" "kvm")))
%base-user-accounts))
@@ -75,8 +137,30 @@
; (term "vt100")
; (tty "ttyS0")))
- (service openssh-service-type)
+ (service openssh-service-type
+ (openssh-configuration
+ (authorized-keys
+ `(("efraimf" ,(local-file "/home/efraimf/.ssh/id_rsa.pub"))))))
(service munge-service-type)
- )
+ (service slurmd-service-type
+ (slurm-configuration
+ (package slurm-18.08)))
+ (service slurmdbd-service-type
+ (slurm-configuration
+ (package slurm-18.08)
+ (run-slurmdbd? #t)))
+ (service slurmctld-service-type
+ (slurm-configuration
+ (package slurm-18.08)
+ (run-slurmctld? #t)))
+
+ ;; Some slurm configuration files
+ (simple-service 'slurm-conf etc-service-type
+ `(("slurm/slurm.conf" ,%slurm.conf)
+ ("slurm/cgroup.conf" ,%cgroup.conf)
+ ("slurm/slurmdbd.conf" ,%slurmdbd.conf)))
+
+ (service dhcp-client-service-type)
+ (service openntpd-service-type))
%base-services)))