modules/cluster/deployment: add option deployment.needForSpeed
This commit is contained in:
parent
b9e42515c7
commit
de9ce610e9
|
@ -11,7 +11,7 @@
|
|||
hq.statistics.enable = true;
|
||||
};
|
||||
|
||||
boot= {
|
||||
boot = {
|
||||
loader.grub = {
|
||||
enable = true;
|
||||
version = 2;
|
||||
|
@ -49,6 +49,7 @@
|
|||
"data-hoarder"
|
||||
"staging-data-hoarder"
|
||||
];
|
||||
skyflake.nomad.client.meta."c3d2.cpuSpeed" = "4";
|
||||
|
||||
system.stateVersion = "21.11"; # Did you read the comment?
|
||||
}
|
||||
|
|
|
@ -38,4 +38,5 @@
|
|||
# deployment.microvmBaseZfsDataset = "tank/storage";
|
||||
hq.statistics.enable = true;
|
||||
};
|
||||
skyflake.nomad.client.meta."c3d2.cpuSpeed" = "3";
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
deployment.microvmBaseZfsDataset = "tank/storage";
|
||||
hq.statistics.enable = true;
|
||||
};
|
||||
skyflake.nomad.client.meta."c3d2.cpuSpeed" = "3";
|
||||
|
||||
# XXX: enable for zw-ev and poelzi-ha until we find a better solution
|
||||
virtualisation.libvirtd = {
|
||||
|
|
|
@ -21,6 +21,16 @@
|
|||
storage = mkOption {
|
||||
type = types.enum [ "fast" "big" ];
|
||||
default = "fast";
|
||||
description = ''
|
||||
Which glusterfs volume to use for persistedShares
|
||||
'';
|
||||
};
|
||||
needForSpeed = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Prefer deployment on Nomad clients with a higher c3d2.cpuSpeed
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -77,10 +77,17 @@ in
|
|||
};
|
||||
|
||||
skyflake = {
|
||||
nomadJob.constraints = lib.optionals (config.deployment.storage == "big") [ {
|
||||
attribute = "\${meta.c3d2.storage}";
|
||||
value = "big";
|
||||
} ];
|
||||
nomadJob = {
|
||||
constraints = lib.optionals (config.deployment.storage == "big") [ {
|
||||
attribute = "\${meta.c3d2.storage}";
|
||||
value = "big";
|
||||
} ];
|
||||
affinities = lib.optionals config.deployment.needForSpeed (builtins.genList (i: {
|
||||
attribute = "\${meta.c3d2.cpuSpeed}";
|
||||
value = toString (i + 1);
|
||||
weight = 10 + i;
|
||||
}) 10);
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
|
|
Loading…
Reference in New Issue