hydra: reduce number of parallel builds per builder to limit RAM consumption
This commit is contained in:
parent
64079be3c0
commit
293bc52ace
|
@ -13,15 +13,15 @@ let
|
||||||
|
|
||||||
# XXX: to support Nix's dumb public host key syntax (base64'd), this outputs
|
# XXX: to support Nix's dumb public host key syntax (base64'd), this outputs
|
||||||
# a string with shell-style command interpolations: $(...).
|
# a string with shell-style command interpolations: $(...).
|
||||||
mkBaremetalBuilder = { nrCores, publicHostKey, host, speedFactor ? 1, user ? "builder", supportedSystems ? [ "i686-linux" "x86_64-linux" ], supportedFeatures ? [ "big-parallel" "kvm" "nixos-test" ] }:
|
mkBaremetalBuilder = { parallelBuilds, publicHostKey, host, speedFactor ? 1, user ? "builder", supportedSystems ? [ "i686-linux" "x86_64-linux" ], supportedFeatures ? [ "big-parallel" "kvm" "nixos-test" ] }:
|
||||||
"ssh://${user}@${host} ${lib.concatStringsSep "," supportedSystems} ${config.age.secrets.hydra-ssh-key-priv.path} ${toString nrCores} ${toString speedFactor} ${lib.concatStringsSep "," supportedFeatures} - $(echo -n '${publicHostKey}' | base64 -w0)";
|
"ssh://${user}@${host} ${lib.concatStringsSep "," supportedSystems} ${config.age.secrets.hydra-ssh-key-priv.path} ${toString parallelBuilds} ${toString speedFactor} ${lib.concatStringsSep "," supportedFeatures} - $(echo -n '${publicHostKey}' | base64 -w0)";
|
||||||
|
|
||||||
# TODO:
|
# TODO:
|
||||||
# - generalize to new architectures
|
# - generalize to new architectures
|
||||||
# - generalize to new features
|
# - generalize to new features
|
||||||
baremetalBuilders = lib.concatStringsSep "\n"
|
baremetalBuilders = lib.concatStringsSep "\n"
|
||||||
(map (n: mkBaremetalBuilder {
|
(map (n: mkBaremetalBuilder {
|
||||||
nrCores = 40; # TODO: do not hardcode this, use the node's builder configuration.
|
parallelBuilds = 8; # TODO: do not hardcode this, use the node's builder configuration.
|
||||||
publicHostKey = ssh-keys.machines.${n};
|
publicHostKey = ssh-keys.machines.${n};
|
||||||
host = nodes.${n}.config.networking.fqdn;
|
host = nodes.${n}.config.networking.fqdn;
|
||||||
}) cfg.builders);
|
}) cfg.builders);
|
||||||
|
|
Loading…
Reference in a new issue