Skip to content

Commit

Permalink
terraform/jenkins-controller: add static builders
Browse files Browse the repository at this point in the history
This adds builder.vedenemo.dev and hetzarm.vedenemo.dev as static
builders to /etc/nix/machines, as well as the keyscan machinery.

#171 already ensured that ssh
key works.

maxJobs is set to the number of cores the system sees, and speedFactor
is set to 3, making it more attractive than the other builders.

Signed-off-by: Florian Klink <flokli@flokli.de>
  • Loading branch information
flokli committed Jun 5, 2024
1 parent d8d62be commit c069a75
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions terraform/jenkins-controller.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,20 @@ module "jenkins_controller_vm" {
{
content = join("\n", concat(
[for ip in toset(module.builder_vm[*].virtual_machine_ip_address) : "ssh://remote-build@${ip} x86_64-linux /etc/secrets/remote-build-ssh-key 10 1 kvm,nixos-test,benchmark,big-parallel - -"],
[for ip in toset(module.arm_builder_vm[*].virtual_machine_ip_address) : "ssh://remote-build@${ip} aarch64-linux /etc/secrets/remote-build-ssh-key 8 1 kvm,nixos-test,benchmark,big-parallel - -"]
[for ip in toset(module.arm_builder_vm[*].virtual_machine_ip_address) : "ssh://remote-build@${ip} aarch64-linux /etc/secrets/remote-build-ssh-key 8 1 kvm,nixos-test,benchmark,big-parallel - -"],
(var.envtype == "dev" || var.envtype == "priv") ? [
"ssh://remote-build@builder.vedenemo.dev x86_64-linux /etc/secrets/remote-build-ssh-key 64 3 kvm,nixos-test,benchmark,big-parallel - -",
"ssh://remote-build@hetzarm.vedenemo.dev aarch64-linux /etc/secrets/remote-build-ssh-key 80 3 kvm,nixos-test,benchmark,big-parallel - -"
] : []
)),
"path" = "/etc/nix/machines"
},
# Render /var/lib/builder-keyscan/scanlist, so known_hosts can be populated.
{
content = join("\n", toset(concat(
module.builder_vm[*].virtual_machine_ip_address,
module.arm_builder_vm[*].virtual_machine_ip_address
module.arm_builder_vm[*].virtual_machine_ip_address,
(var.envtype == "dev" || var.envtype == "priv") ? ["builder.vedenemo.dev", "hetzarm.vedenemo.dev"] : []
))),
"path" = "/var/lib/builder-keyscan/scanlist"
},
Expand Down

0 comments on commit c069a75

Please sign in to comment.