working stokes setup

This commit is contained in:
Jonas Juselius
2022-08-19 14:59:44 +02:00
parent 2dbbaa1ddd
commit 2f1c75a2f0
5 changed files with 53 additions and 58 deletions

View File

@@ -30,7 +30,7 @@ let
boot = { boot = {
loader.systemd-boot.enable = true; loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true; loader.efi.canTouchEfiVariables = true;
kernelPackages = pkgs.linuxPackages_5_4; # kernelPackages = pkgs.linuxPackages_5_4;
kernelModules = [ "ib_umad" "ib_ipoib" ]; kernelModules = [ "ib_umad" "ib_ipoib" ];
kernelParams = [ kernelParams = [
"console=ttyS0,115200" "console=ttyS0,115200"
@@ -38,10 +38,6 @@ let
]; ];
}; };
services.udev.extraRules = ''
KERNEL=="ibp59s0", SUBSYSTEM=="net", ATTR{create_child}:="0x2222"
'';
console = { console = {
font = "Lat2-Terminus16"; font = "Lat2-Terminus16";
keyMap = "us"; keyMap = "us";
@@ -112,7 +108,7 @@ let
slurm = { slurm = {
client = true; client = true;
mungeKey = ./munge.key; mungeKey = ./munge.key;
mungeUid = 996; # hack mungeUid = 997; # hack
controlMachine = "stokes"; controlMachine = "stokes";
nodeName = [ nodeName = [
"c0-[1-8] Sockets=1 CoresPerSocket=64 ThreadsPerCore=1 RealMemory=256000 TmpDisk=100000 State=UNKNOWN" "c0-[1-8] Sockets=1 CoresPerSocket=64 ThreadsPerCore=1 RealMemory=256000 TmpDisk=100000 State=UNKNOWN"
@@ -128,7 +124,7 @@ let
beegfs = { beegfs = {
mds0-0 = { mds0-0 = {
mgmtdHost = "mds0-0"; mgmtdHost = "mds0-0";
connAuthFile = ""; connAuthFile = "/etc/beegfs/connauthfile";
client = { client = {
enable = true; enable = true;
mountPoint = "/work"; mountPoint = "/work";
@@ -178,6 +174,19 @@ let
''; '';
}; };
fileSystems = {
"/opt" = {
device = "10.1.63.80:/opt";
fsType = "nfs";
options = [ "soft" "rdma" "defaults" "vers=4.2" ];
};
"/data" = {
device = "10.1.63.80:/data";
fsType = "nfs";
options = [ "soft" "rdma" "defaults" "vers=4.2" ];
};
};
environment.variables = {}; environment.variables = {};
systemd.services."serial-getty@ttyS0".enable = true; systemd.services."serial-getty@ttyS0".enable = true;
@@ -198,17 +207,13 @@ let
}; };
}; };
deployment = {
deployment.targetHost = cfg.address;
};
i40efix = { i40efix = {
boot = let kernelExtras = pkgs.callPackage ./kernel.nix { # boot = let kernelExtras = pkgs.callPackage ./kernel.nix {
kernel = pkgs.linuxPackages_5_4.kernel; # kernel = pkgs.linuxPackages_5_4.kernel;
}; in { # }; in {
extraModulePackages = [ kernelExtras.i40e2 ]; # extraModulePackages = [ kernelExtras.i40e2 ];
kernelModules = [ "ib_umad" "ib_ipoib" "i40e2" ]; # kernelModules = [ "ib_umad" "ib_ipoib" "i40e2" ];
}; # };
}; };
shosts = { shosts = {
@@ -310,7 +315,7 @@ let
in { in {
options.node = { options.node = {
i40efix = mkEnableOption "Apply fix for i40e driver"; # i40efix = mkEnableOption "Apply fix for i40e driver";
myvnc = mkEnableOption "Enable myvnc script"; myvnc = mkEnableOption "Enable myvnc script";
}; };
@@ -318,11 +323,11 @@ in {
config = mkMerge [ config = mkMerge [
configuration configuration
deployment # deployment
shosts shosts
(mkIf config.node.i40efix i40efix) # (mkIf config.node.i40efix i40efix)
(mkIf config.node.myvnc myvnc) (mkIf config.node.myvnc myvnc)
]; ];

View File

@@ -6,15 +6,7 @@ let
# }) {}; # }) {};
pkgs = import <nixpkgs> {}; pkgs = import <nixpkgs> {};
nodes = nodes = import ./nodes.nix;
with builtins;
let nodes = genList (n: n + 1) 8; in
map (n: ({ name = "c0-${toString n}"; address = "10.1.61.10${toString n}"; })) nodes;
stokes = import ./frontend.nix {
inherit pkgs;
inherit nodes;
};
compute = { compute = {
# deployment.tags = [ "compute" ]; # deployment.tags = [ "compute" ];
@@ -22,7 +14,7 @@ let
fileSystems = { fileSystems = {
"/stokes" = { "/stokes" = {
device = "10.1.63.100:/home"; device = "10.1.63.100:/home";
fsType = "nfs"; fsType = "nfs4";
options = [ options = [
"soft" "soft"
"defaults" "defaults"
@@ -30,16 +22,6 @@ let
"x-systemd.automount" "x-systemd.automount"
]; ];
}; };
"/opt" = {
device = "10.1.63.80:/opt";
fsType = "nfs";
options = [ "soft" "rdma" "defaults" ];
};
"/data" = {
device = "10.1.63.80:/data";
fsType = "nfs";
options = [ "soft" "rdma" "defaults" ];
};
}; };
systemd.automounts = [ systemd.automounts = [
@@ -63,8 +45,14 @@ let
# k8s = { inherit etcdCluster; }; # k8s = { inherit etcdCluster; };
}; };
deployment.targetHost = host.address;
# services.udev.extraRules = ''
# KERNEL=="ibp65s0", SUBSYSTEM=="net", ATTR{create_child}:="0x2222"
# '';
node = { node = {
i40efix = true; # i40efix = true;
}; };
networking = { networking = {
@@ -82,7 +70,7 @@ let
} ]; } ];
}; };
interfaces."ibp65s0.2222" = { interfaces.ibp65s0 = {
useDHCP = false; useDHCP = false;
ipv4.addresses = [ { ipv4.addresses = [ {
address = ipoib; address = ipoib;
@@ -94,7 +82,8 @@ let
} }
// compute; // compute;
}; };
in { in builtins.foldl' (a: n: a // mkCompute n) {} nodes
#{
## morph ## morph
# network = { # network = {
# inherit pkgs; # inherit pkgs;
@@ -104,6 +93,6 @@ in {
# }; # };
# }; # };
inherit stokes; # inherit stokes;
} // builtins.foldl' (a: n: a // mkCompute n) {} nodes #} // builtins.foldl' (a: n: a // mkCompute n) {} nodes

View File

@@ -1,4 +1,7 @@
{ pkgs, nodes, ...}: { pkgs, ...}:
let
nodes = import ./nodes.nix;
in
{ {
# deployment.tags = [ "frontend" ]; # deployment.tags = [ "frontend" ];
node.myvnc = true; node.myvnc = true;
@@ -85,7 +88,12 @@
}; };
}; };
# services.udev.extraRules = ''
# KERNEL=="ibp59s0", SUBSYSTEM=="net", ATTR{create_child}:="0x2222"
# '';
networking = { networking = {
hostName = "stokes";
useDHCP = false; useDHCP = false;
interfaces.eno1 = { interfaces.eno1 = {
useDHCP = false; useDHCP = false;
@@ -101,7 +109,7 @@
prefixLength = 24; prefixLength = 24;
} ]; } ];
}; };
interfaces."ibp59s0.2222" = { interfaces.ibp59s0 = {
useDHCP = false; useDHCP = false;
ipv4.addresses = [ { ipv4.addresses = [ {
address = "10.1.63.100"; address = "10.1.63.100";
@@ -124,16 +132,6 @@
device = "/home"; device = "/home";
options = [ "bind" ]; options = [ "bind" ];
}; };
"/opt" = {
device = "10.1.63.80:/opt";
fsType = "nfs";
options = [ "soft" "rdma" "defaults" ];
};
"/data" = {
device = "10.1.63.80:/data";
fsType = "nfs";
options = [ "soft" "rdma" "defaults" ];
};
"/vol/local-storage/vol1" = { "/vol/local-storage/vol1" = {
device = "/vol/vol1"; device = "/vol/vol1";
options = [ "bind" ]; options = [ "bind" ];

View File

@@ -40,7 +40,7 @@ in
{ {
i40e2 = i40e; i40e2 = i40e;
overlay = self: super: { overlay = self: super: {
linuxPackages_5_4 = super.linuxPackages_5_4 // { inherit i40e; }; # linuxPackages_5_4 = super.linuxPackages_5_4 // { inherit i40e; };
}; };
} }

View File

@@ -0,0 +1,3 @@
with builtins;
let nodes = genList (n: n + 1) 8; in
map (n: ({ name = "c0-${toString n}"; address = "10.1.61.10${toString n}"; })) nodes