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