Compare commits
5 Commits
slurm-grou
...
use-pam
| Author | SHA1 | Date | |
|---|---|---|---|
| c69ec34c1e | |||
|
f6c8c78305
|
|||
| 4832e7bc34 | |||
| 39eddb76c1 | |||
| cf47139ebe |
@@ -134,7 +134,7 @@
|
|||||||
home = "/home/Computational/varcila";
|
home = "/home/Computational/varcila";
|
||||||
description = "Vincent Arcila";
|
description = "Vincent Arcila";
|
||||||
group = "Computational";
|
group = "Computational";
|
||||||
hosts = [ "apex" "hut" "tent" "fox" ];
|
hosts = [ "apex" "hut" "tent" "fox" "owl1" "owl2" ];
|
||||||
hashedPassword = "$6$oB0Tcn99DcM4Ch$Vn1A0ulLTn/8B2oFPi9wWl/NOsJzaFAWjqekwcuC9sMC7cgxEVb.Nk5XSzQ2xzYcNe5MLtmzkVYnRS1CqP39Y0";
|
hashedPassword = "$6$oB0Tcn99DcM4Ch$Vn1A0ulLTn/8B2oFPi9wWl/NOsJzaFAWjqekwcuC9sMC7cgxEVb.Nk5XSzQ2xzYcNe5MLtmzkVYnRS1CqP39Y0";
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKGt0ESYxekBiHJQowmKpfdouw0hVm3N7tUMtAaeLejK vincent@varch"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKGt0ESYxekBiHJQowmKpfdouw0hVm3N7tUMtAaeLejK vincent@varch"
|
||||||
@@ -224,8 +224,6 @@
|
|||||||
|
|
||||||
groups = {
|
groups = {
|
||||||
Computational = { gid = 564; };
|
Computational = { gid = 564; };
|
||||||
fox = { gid = 565; };
|
|
||||||
owl = { gid = 566; };
|
|
||||||
tracing = { };
|
tracing = { };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -61,6 +61,8 @@
|
|||||||
registrationFlags = [
|
registrationFlags = [
|
||||||
# Increase build log length to 64 MiB
|
# Increase build log length to 64 MiB
|
||||||
"--output-limit 65536"
|
"--output-limit 65536"
|
||||||
|
# Allow the runner to be used in multiple projects
|
||||||
|
"--locked=false"
|
||||||
];
|
];
|
||||||
preBuildScript = pkgs.writeScript "setup-container" ''
|
preBuildScript = pkgs.writeScript "setup-container" ''
|
||||||
mkdir -p -m 0755 /nix/var/log/nix/drvs
|
mkdir -p -m 0755 /nix/var/log/nix/drvs
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
closing = pkgs.writeText "closing.txt"
|
closing = pkgs.writeText "closing.txt"
|
||||||
''
|
''
|
||||||
Subject: OmpSs-2 release enters closing period
|
Subject: OmpSs-2 release enters closing period
|
||||||
|
To: star@bsc.es
|
||||||
|
|
||||||
Hi,
|
Hi,
|
||||||
|
|
||||||
@@ -42,6 +43,7 @@
|
|||||||
freeze = pkgs.writeText "freeze.txt"
|
freeze = pkgs.writeText "freeze.txt"
|
||||||
''
|
''
|
||||||
Subject: OmpSs-2 release enters freeze period
|
Subject: OmpSs-2 release enters freeze period
|
||||||
|
To: star@bsc.es
|
||||||
|
|
||||||
Hi,
|
Hi,
|
||||||
|
|
||||||
@@ -55,6 +57,7 @@
|
|||||||
release = pkgs.writeText "release.txt"
|
release = pkgs.writeText "release.txt"
|
||||||
''
|
''
|
||||||
Subject: OmpSs-2 release now
|
Subject: OmpSs-2 release now
|
||||||
|
To: star@bsc.es
|
||||||
|
|
||||||
Hi,
|
Hi,
|
||||||
|
|
||||||
@@ -69,7 +72,7 @@
|
|||||||
script = ''
|
script = ''
|
||||||
set -eu
|
set -eu
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
cat ${mail} | ${config.security.wrapperDir}/sendmail star@bsc.es
|
cat ${mail} | ${config.security.wrapperDir}/sendmail -t star@bsc.es
|
||||||
'';
|
'';
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
|
|||||||
@@ -17,13 +17,8 @@ with lib;
|
|||||||
allowedUser = host: userConf: builtins.elem host userConf.hosts;
|
allowedUser = host: userConf: builtins.elem host userConf.hosts;
|
||||||
filterUsers = host: users: filterAttrs (n: v: allowedUser host v) users;
|
filterUsers = host: users: filterAttrs (n: v: allowedUser host v) users;
|
||||||
removeHosts = users: mapAttrs (n: v: builtins.removeAttrs v [ "hosts" ]) users;
|
removeHosts = users: mapAttrs (n: v: builtins.removeAttrs v [ "hosts" ]) users;
|
||||||
addExtraGroups = mapAttrs (_: user: user // {
|
|
||||||
extraGroups = (user.extraGroups or [ ])
|
|
||||||
++ (lib.optionals (allowedUser "fox" user) [ "fox" ])
|
|
||||||
++ (lib.optionals (allowedUser "owl1" user || allowedUser "owl2" user) [ "owl" ]);
|
|
||||||
});
|
|
||||||
currentHost = config.networking.hostName;
|
currentHost = config.networking.hostName;
|
||||||
in {
|
in {
|
||||||
users.users = removeHosts (addExtraGroups (filterUsers currentHost config.users.jungleUsers));
|
users.users = removeHosts (filterUsers currentHost config.users.jungleUsers);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
partitionName = [
|
partitionName = [
|
||||||
"owl Nodes=owl[1-2] Default=YES DefaultTime=01:00:00 MaxTime=INFINITE State=UP AllowGroups=wheel,owl"
|
"owl Nodes=owl[1-2] Default=YES DefaultTime=01:00:00 MaxTime=INFINITE State=UP"
|
||||||
"fox Nodes=fox Default=NO DefaultTime=01:00:00 MaxTime=INFINITE State=UP AllowGroups=wheel,fox"
|
"fox Nodes=fox Default=NO DefaultTime=01:00:00 MaxTime=INFINITE State=UP"
|
||||||
];
|
];
|
||||||
|
|
||||||
# See slurm.conf(5) for more details about these options.
|
# See slurm.conf(5) for more details about these options.
|
||||||
@@ -54,6 +54,11 @@
|
|||||||
LaunchParameters=use_interactive_step
|
LaunchParameters=use_interactive_step
|
||||||
SlurmdDebug=debug5
|
SlurmdDebug=debug5
|
||||||
#DebugFlags=Protocol,Cgroup
|
#DebugFlags=Protocol,Cgroup
|
||||||
|
|
||||||
|
# Follow PAM rules for users requesting access to a node via SLURM, so
|
||||||
|
# that the need to have a local account. Otherwise SLURM only takes into
|
||||||
|
# account the credentials at the login node.
|
||||||
|
UsePAM=1
|
||||||
'';
|
'';
|
||||||
|
|
||||||
extraCgroupConfig = ''
|
extraCgroupConfig = ''
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
, lib
|
, lib
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, cmake
|
, cmake
|
||||||
|
, ninja
|
||||||
, bash
|
, bash
|
||||||
, python3
|
, python3
|
||||||
, perl
|
, perl
|
||||||
@@ -62,6 +63,7 @@ in stdenv.mkDerivation {
|
|||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
bash
|
bash
|
||||||
cmake
|
cmake
|
||||||
|
ninja
|
||||||
elfutils
|
elfutils
|
||||||
llvmPackages_latest.lld
|
llvmPackages_latest.lld
|
||||||
pkg-config
|
pkg-config
|
||||||
|
|||||||
Reference in New Issue
Block a user