From 141d77e2b61ebe912175f82bcf4ea505f143a6fb Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Thu, 27 Apr 2023 16:27:04 +0200 Subject: [PATCH] Refacto slurm configuration into compute/control --- common/main.nix | 1 + {xeon01 => common}/slurm.nix | 0 xeon01/configuration.nix | 5 +---- xeon07/configuration.nix | 2 +- xeon07/slurm-daemon.nix | 10 ++++++++++ xeon07/slurm.nix | 17 ----------------- 6 files changed, 13 insertions(+), 22 deletions(-) rename {xeon01 => common}/slurm.nix (100%) create mode 100644 xeon07/slurm-daemon.nix delete mode 100644 xeon07/slurm.nix diff --git a/common/main.nix b/common/main.nix index ad54622..8a76649 100644 --- a/common/main.nix +++ b/common/main.nix @@ -6,6 +6,7 @@ ./fs.nix ./hw.nix ./net.nix + ./slurm.nix ./ssh.nix ./users.nix ]; diff --git a/xeon01/slurm.nix b/common/slurm.nix similarity index 100% rename from xeon01/slurm.nix rename to common/slurm.nix diff --git a/xeon01/configuration.nix b/xeon01/configuration.nix index 9f651d8..1daecec 100644 --- a/xeon01/configuration.nix +++ b/xeon01/configuration.nix @@ -1,10 +1,7 @@ { config, pkgs, ... }: { - imports = [ - ../common/main.nix - ./slurm.nix - ]; + imports = [ ../common/main.nix ]; # Select the this using the ID to avoid mismatches boot.loader.grub.device = "/dev/disk/by-id/wwn-0x55cd2e414d53566c"; diff --git a/xeon07/configuration.nix b/xeon07/configuration.nix index 4cb68cc..f3b6ab4 100644 --- a/xeon07/configuration.nix +++ b/xeon07/configuration.nix @@ -7,7 +7,7 @@ ./gitlab-runner.nix ./monitoring.nix ./nfs.nix - ./slurm.nix + ./slurm-daemon.nix ]; # Select the this using the ID to avoid mismatches diff --git a/xeon07/slurm-daemon.nix b/xeon07/slurm-daemon.nix new file mode 100644 index 0000000..a8dd3b8 --- /dev/null +++ b/xeon07/slurm-daemon.nix @@ -0,0 +1,10 @@ +{ ... }: + +{ + services.slurm = { + server.enable = true; + partitionName = [ + "xeon Nodes=xeon[01-02,07] Default=YES MaxTime=INFINITE State=UP" + ]; + }; +} diff --git a/xeon07/slurm.nix b/xeon07/slurm.nix deleted file mode 100644 index 48a77d7..0000000 --- a/xeon07/slurm.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ ... }: - -{ - services.slurm = { - client.enable = true; - server.enable = true; - controlMachine = "xeon07"; - clusterName = "owl"; - nodeName = [ - "xeon[01-02,07] Sockets=2 CoresPerSocket=14 ThreadsPerCore=2 Feature=xeon" - ]; - - partitionName = [ - "xeon Nodes=xeon[01-02,07] Default=YES MaxTime=INFINITE State=UP" - ]; - }; -}