feat: add @localboot tags for machine which can be deployed
colmena does not support netboot deployment, this is fine. We can fix it later. Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
This commit is contained in:
parent
a2eecd1886
commit
c0689e6832
17
flake.nix
17
flake.nix
|
@ -113,18 +113,27 @@
|
||||||
|
|
||||||
./services
|
./services
|
||||||
./common
|
./common
|
||||||
{
|
|
||||||
|
({ config, lib, ... }: {
|
||||||
# This means that anyone with @floral-infra permissions
|
# This means that anyone with @floral-infra permissions
|
||||||
# can ssh on root of every machines handled here.
|
# can ssh on root of every machines handled here.
|
||||||
bagel.admins.allowedGroups = [
|
bagel.admins.allowedGroups = [
|
||||||
"floral-infra"
|
"floral-infra"
|
||||||
];
|
];
|
||||||
}
|
|
||||||
|
# Tag all machines which have local boot as local bootables.
|
||||||
|
deployment.tags = lib.mkIf (config.bagel.baremetal.builders.enable -> !config.bagel.baremetal.builders.netboot)
|
||||||
|
[ "localboot" ];
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
makeBuilder = i: lib.nameValuePair "builder-${toString i}" {
|
makeBuilder = i:
|
||||||
|
let
|
||||||
|
enableNetboot = i >= 6;
|
||||||
|
in
|
||||||
|
lib.nameValuePair "builder-${toString i}" {
|
||||||
imports = commonModules;
|
imports = commonModules;
|
||||||
bagel.baremetal.builders = { enable = true; num = i; netboot = i >= 6; };
|
bagel.baremetal.builders = { enable = true; num = i; netboot = enableNetboot; };
|
||||||
};
|
};
|
||||||
|
|
||||||
builders = lib.listToAttrs (lib.genList makeBuilder 11);
|
builders = lib.listToAttrs (lib.genList makeBuilder 11);
|
||||||
|
|
Loading…
Reference in a new issue