Dustin Frisch
1 year ago
No known key found for this signature in database
GPG Key ID: B4C3BF012D9B26BE
13 changed files with 129 additions and 49 deletions
-
44flake.lock
-
16flake.nix
-
26gather.sh
-
2machines/manager/default.nix
-
11machines/manager/ldap.nix
-
13machines/manager/mpi.nix
-
19machines/manager/rdma.nix
-
2machines/manager/users.nix
-
9machines/node/users.nix
-
10modules/hostFile.nix
-
13shared/default.nix
-
11shared/rdma.nix
-
2shared/users.nix
@ -0,0 +1,26 @@ |
|||||
|
#!/usr/bin/env bash |
||||
|
|
||||
|
# Get all nodes with deployment data |
||||
|
NODES="$(colmena eval -E ' |
||||
|
{nodes, lib, ...}: |
||||
|
with lib; |
||||
|
|
||||
|
mapAttrs |
||||
|
(_: node: with node.config.deployment; "${targetUser}@${targetHost}") |
||||
|
nodes |
||||
|
')" |
||||
|
|
||||
|
# Filter to single node if parameter is set |
||||
|
if [[ "$1" != "" ]]; then |
||||
|
NODES="$(jq "{ \"$1\" }" <<< "$NODES")" |
||||
|
fi |
||||
|
|
||||
|
# Convert nodes to array of <user>@<host> |
||||
|
mapfile -t NODES < <(jq -r '.[]' <<< "$NODES") |
||||
|
|
||||
|
for NODE in "${NODES[@]}"; do |
||||
|
echo "-- ${NODE} --" |
||||
|
ssh "${NODE}" "/run/gather" \ |
||||
|
| tar xv --dereference --directory "." \ |
||||
|
|| true |
||||
|
done |
@ -0,0 +1,13 @@ |
|||||
|
{ pkgs, lib, config, nodes, ... }: |
||||
|
|
||||
|
with lib; |
||||
|
|
||||
|
{ |
||||
|
environment.etc."mpi/hosts" = { |
||||
|
text = concatMapStringsSep "\n" |
||||
|
(node: "${node.config.networking.hostName}") |
||||
|
(filter |
||||
|
(node: elem "node" node.config.deployment.tags) |
||||
|
(attrValues nodes)); |
||||
|
}; |
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
{ pkgs, lib, config, ... }: |
||||
|
|
||||
|
with lib; |
||||
|
|
||||
|
{ |
||||
|
systemd.services."opensm" = { |
||||
|
unitConfig = { |
||||
|
Before = [ "network.target" "remote-fs-pre.target" ]; |
||||
|
ConditionPathExists = [ "/sys/class/infiniband_mad/abi_version" ]; |
||||
|
}; |
||||
|
|
||||
|
serviceConfig = { |
||||
|
Type = "simple"; |
||||
|
ExecStart = "${pkgs.opensm}/bin/opensm --guid '0x0002c9030052188b'"; |
||||
|
}; |
||||
|
|
||||
|
wantedBy = [ "network-online.target" ]; |
||||
|
}; |
||||
|
} |
@ -0,0 +1,11 @@ |
|||||
|
{ lib, pkgs, config, ... }: |
||||
|
|
||||
|
with lib; |
||||
|
|
||||
|
{ |
||||
|
boot.kernelModules = [ "ib_umad" "ib_ipoib" ]; |
||||
|
|
||||
|
environment.systemPackages = [ |
||||
|
pkgs.rdma-core |
||||
|
]; |
||||
|
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue