Dustin Frisch
1 year ago
No known key found for this signature in database
GPG Key ID: B4C3BF012D9B26BE
12 changed files with 146 additions and 61 deletions
-
33machines/manager/dhcp.nix
-
2machines/manager/mpi.nix
-
15machines/manager/netinstall/default.nix
-
9machines/manager/network.nix
-
17machines/node/default.nix
-
19machines/node/network.nix
-
28machines/nodes.nix
-
3modules/default.nix
-
29modules/dhcp.nix
-
20modules/netinstall.nix
-
30modules/node.nix
-
2shared/slurm.nix
@ -1,30 +1,30 @@ |
|||
{ |
|||
"node-00" = { |
|||
networking.interfaces."mngt".macAddress = "50:46:5D:DA:0C:C9"; |
|||
networking.interfaces."data".macAddress = "50:46:5d:da:0b:d6"; |
|||
mngt = "50:46:5D:DA:0C:C9"; |
|||
data = "50:46:5d:da:0b:d6"; |
|||
}; |
|||
"node-01" = { |
|||
networking.interfaces."mngt".macAddress = "50:46:5D:DA:0C:07"; |
|||
networking.interfaces."data".macAddress = "50:46:5d:da:0c:56"; |
|||
mngt = "50:46:5D:DA:0C:07"; |
|||
data = "50:46:5d:da:0c:56"; |
|||
}; |
|||
"node-02" = { |
|||
networking.interfaces."mngt".macAddress = "10:BF:48:19:B0:04"; |
|||
networking.interfaces."data".macAddress = "10:bf:48:1f:a6:8f"; |
|||
mngt = "10:BF:48:19:B0:04"; |
|||
data = "10:bf:48:1f:a6:8f"; |
|||
}; |
|||
"node-03" = { |
|||
networking.interfaces."mngt".macAddress = "10:BF:48:19:A4:FE"; |
|||
networking.interfaces."data".macAddress = "10:bf:48:1b:57:47"; |
|||
mngt = "10:BF:48:19:A4:FE"; |
|||
data = "10:bf:48:1b:57:47"; |
|||
}; |
|||
"node-04" = { |
|||
networking.interfaces."mngt".macAddress = "10:BF:48:19:A2:E2"; |
|||
networking.interfaces."data".macAddress = "10:bf:48:19:a2:4d"; |
|||
mngt = "10:BF:48:19:A2:E2"; |
|||
data = "10:bf:48:19:a2:4d"; |
|||
}; |
|||
"node-05" = { |
|||
networking.interfaces."mngt".macAddress = "10:BF:48:15:00:F5"; |
|||
networking.interfaces."data".macAddress = "10:bf:48:1b:56:df"; |
|||
mngt = "10:BF:48:15:00:F5"; |
|||
data = "10:bf:48:1b:56:df"; |
|||
}; |
|||
"node-06" = { |
|||
networking.interfaces."mngt".macAddress = "50:46:5D:DA:0C:09"; |
|||
networking.interfaces."data".macAddress = "50:46:5d:da:0c:52"; |
|||
mngt = "50:46:5D:DA:0C:09"; |
|||
data = "50:46:5d:da:0c:52"; |
|||
}; |
|||
} |
@ -1,6 +1,9 @@ |
|||
{ |
|||
imports = [ |
|||
./node.nix |
|||
./hostFile.nix |
|||
./dhcp.nix |
|||
./netinstall.nix |
|||
./beegfs.nix |
|||
]; |
|||
} |
@ -0,0 +1,29 @@ |
|||
{ lib, config, ... }: |
|||
|
|||
with lib; |
|||
|
|||
{ |
|||
options.hpc.dhcp = { |
|||
reservations = mkOption { |
|||
description = '' |
|||
DHCP reservations for this host. |
|||
''; |
|||
type = types.attrsOf (types.submodule { |
|||
options = { |
|||
hwAddress = mkOption { |
|||
description = '' |
|||
MAC address of the interface in this network. |
|||
''; |
|||
type = types.str; |
|||
}; |
|||
ipAddress = mkOption { |
|||
description = '' |
|||
IP address of the host. |
|||
''; |
|||
}; |
|||
}; |
|||
}); |
|||
default = { }; |
|||
}; |
|||
}; |
|||
} |
@ -0,0 +1,20 @@ |
|||
{ config, lib, ... }: |
|||
|
|||
with lib; |
|||
|
|||
{ |
|||
options.hpc.netinstall = { |
|||
enable = mkEnableOption "NetInstall"; |
|||
}; |
|||
|
|||
config = mkIf config.hpc.netinstall.enable { |
|||
deployment.tags = [ "netinstall" ]; |
|||
|
|||
assertions = [ |
|||
{ |
|||
assertion = elem "data" config.hpc.dhcp.reservations; |
|||
message = "NetInstall needs DHCP reservation in data network"; |
|||
} |
|||
]; |
|||
}; |
|||
} |
@ -0,0 +1,30 @@ |
|||
{ lib, config, ... }: |
|||
|
|||
with lib; |
|||
|
|||
{ |
|||
options.hpc.node = { |
|||
enable = mkEnableOption "Compute Node"; |
|||
|
|||
id = mkOption { |
|||
description = '' |
|||
ID of the compute node. |
|||
''; |
|||
type = types.ints.unsigned; |
|||
}; |
|||
|
|||
name = mkOption { |
|||
description = '' |
|||
Name of the node. |
|||
''; |
|||
type = types.str; |
|||
readOnly = true; |
|||
}; |
|||
}; |
|||
|
|||
config = mkIf config.hpc.node.enable { |
|||
hpc.node.name = "node-${fixedWidthNumber 2 config.hpc.node.id}"; |
|||
|
|||
deployment.tags = [ "node" ]; |
|||
}; |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue