add a semi-spread example deploy and a check that evaluates it
This commit is contained in:
parent
793d987a88
commit
538da5a13a
1 changed files with 875 additions and 1 deletions
31
docs/examples/semi-spread/swarm-heavyduty.nix
Normal file
31
docs/examples/semi-spread/swarm-heavyduty.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# swarm-heavyduty: the builder, the forge's CI runner and the binary cache.
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
hyperhive = config.services.hyperhive;
|
||||
|
||||
# Leaves copied from swarm-central, where the secret store runs. See
|
||||
# swarm-services.nix for the helper's naming.
|
||||
pki = "/var/lib/swarm-pki";
|
||||
pair = option: stem: {
|
||||
"${option}ClientCertFile" = "${pki}/${stem}.pem";
|
||||
"${option}ClientKeyFile" = "${pki}/${stem}-key.pem";
|
||||
};
|
||||
in
|
||||
{
|
||||
services.hyperhive = {
|
||||
deploy.builder.enable = true;
|
||||
deploy.ci-runner.enable = true;
|
||||
deploy.attic.enable = true;
|
||||
|
||||
deploy.bao = lib.mergeAttrsList [
|
||||
(pair "builder" "builder")
|
||||
(pair "ciRunner" "ci-runner")
|
||||
(pair "attic" "attic")
|
||||
(pair "forwarderOidc" "forwarder-oidc")
|
||||
(pair "servicesIssuer" "services-issuer")
|
||||
];
|
||||
};
|
||||
|
||||
# The cache is served through the gateway, over the VPN only.
|
||||
networking.firewall.interfaces.wg0.allowedTCPPorts = [ hyperhive.gateway.httpsPort ];
|
||||
}
|
||||
Loading…
Reference in a new issue