@cryptotaxi247 / infra / commits / 103bd5a5

rhea: add hydra-scale-equinix-metal

Linus Heckemann committed Apr 3, 2023 at 14:05 UTC 103bd5a58d0283fbde4c332bdef5541f2759dfc8
5 files changed +120 -6
delft/flake.lock
+38 -5
@@ -2,7 +2,7 @@
2 "nodes": {
3 "cpiotools": {
4 "inputs": {
5 - "nixpkgs": "nixpkgs_2"
5 + "nixpkgs": "nixpkgs_3"
6 },
7 "locked": {
8 "lastModified": 1655642194,
@@ -42,6 +42,22 @@
42 "type": "github"
43 }
44 },
45 + "hydra-scale-equinix-metal": {
46 + "inputs": {
47 + "nixpkgs": "nixpkgs_2"
48 + },
49 + "locked": {
50 + "lastModified": 1680520422,
51 + "narHash": "sha256-p4A153+jfa76AbNsrs2I0hNeb0PDUIs3rE78/126ROo=",
52 + "type": "git",
53 + "url": "file:///home/linus/ds/hydra-scale-equinix-metal"
54 + },
55 + "original": {
56 + "owner": "DeterminateSystems",
57 + "repo": "hydra-scale-equinix-metal",
58 + "type": "github"
59 + }
60 + },
61 "lowdown-src": {
62 "flake": false,
63 "locked": {
@@ -82,7 +98,7 @@
98 "nix-netboot-serve": {
99 "inputs": {
100 "cpiotools": "cpiotools",
85 - "nixpkgs": "nixpkgs_3"
101 + "nixpkgs": "nixpkgs_4"
102 },
103 "locked": {
104 "lastModified": 1664484325,
@@ -131,6 +147,22 @@
147 }
148 },
149 "nixpkgs_2": {
150 + "locked": {
151 + "lastModified": 1680213900,
152 + "narHash": "sha256-cIDr5WZIj3EkKyCgj/6j3HBH4Jj1W296z7HTcWj1aMA=",
153 + "owner": "nixos",
154 + "repo": "nixpkgs",
155 + "rev": "e3652e0735fbec227f342712f180f4f21f0594f2",
156 + "type": "github"
157 + },
158 + "original": {
159 + "owner": "nixos",
160 + "ref": "nixos-unstable",
161 + "repo": "nixpkgs",
162 + "type": "github"
163 + }
164 + },
165 + "nixpkgs_3": {
166 "locked": {
167 "lastModified": 1655567057,
168 "narHash": "sha256-Cc5hQSMsTzOHmZnYm8OSJ5RNUp22bd5NADWLHorULWQ=",
@@ -146,7 +178,7 @@
178 "type": "github"
179 }
180 },
149 - "nixpkgs_3": {
181 + "nixpkgs_4": {
182 "locked": {
183 "lastModified": 1655306633,
184 "narHash": "sha256-nv4FfWWV/dEelByjXJtJkoDPOHIsKfLq50RN3Hqq5Yk=",
@@ -162,7 +194,7 @@
194 "type": "github"
195 }
196 },
165 - "nixpkgs_4": {
197 + "nixpkgs_5": {
198 "locked": {
199 "lastModified": 1669249876,
200 "narHash": "sha256-IWuH9FJgwmKyXpea+g1zpn6NImBMSjA1j5HioHQjReY=",
@@ -180,12 +212,13 @@
212 "root": {
213 "inputs": {
214 "hydra": "hydra",
215 + "hydra-scale-equinix-metal": "hydra-scale-equinix-metal",
216 "nix": [
217 "hydra",
218 "nix"
219 ],
220 "nix-netboot-serve": "nix-netboot-serve",
188 - "nixpkgs": "nixpkgs_4"
221 + "nixpkgs": "nixpkgs_5"
222 }
223 }
224 },
delft/flake.nix
+4 -1
@@ -4,8 +4,11 @@
4 inputs.nix.follows = "hydra/nix";
5 inputs.hydra.url = "github:NixOS/hydra/lazy-trees";
6 inputs.nix-netboot-serve.url = "github:DeterminateSystems/nix-netboot-serve";
7 + inputs.hydra-scale-equinix-metal.url = "github:DeterminateSystems/hydra-scale-equinix-metal";
8 #inputs.hydra.url = "github:DeterminateSystems/hydra/queue-runner-exporter";
8 - outputs = flakes @ { self, nixpkgs, nix, hydra, nix-netboot-serve /*, dwarffs */ }: {
9 + outputs = flakes @ { self, nixpkgs, nix, hydra, nix-netboot-serve, hydra-scale-equinix-metal /*, dwarffs */ }:
10 + let inherit (nixpkgs) lib;
11 + in {
12 nixopsConfigurations.default =
13 { inherit nixpkgs; }
14 // import ./network.nix flakes;
delft/hydra-scaler.nix new
+76
@@ -0,0 +1,76 @@
1 +{ config, pkgs, lib, ... }: {
2 + deployment.keys."hydra-scale-equinix-metal-env".keyFile = /home/deploy/src/nixos-org-configurations/keys/hydra-scale-equinix-metal-env;
3 + services.hydra-scale-equinix-metal = {
4 + enable = true;
5 + hydraRoot = "https://hydra.nixos.org/";
6 + prometheusRoot = "https://status.nixos.org/prometheus";
7 + secretFile = "/run/keys/hydra-scale-equinix-metal-env";
8 + config = let
9 + netboot_base = https://netboot.nixos.org/dispatch/hydra/hydra.nixos.org/equinix-metal-builders/main;
10 + in {
11 + facilities = ["???"];
12 + tags = ["???"];
13 + categories = {
14 + aarch64-linux = rec {
15 + bigparallel = {
16 + divisor = 2000;
17 + minimum = 1;
18 + maximum = 5;
19 + plans = [
20 + {
21 + bid = 2.0;
22 + plan = "c3.large.arm64";
23 + netboot_url = "${netboot_base}/c3-large-arm--big-parallel";
24 + }
25 + ];
26 + };
27 + small = bigparallel // {
28 + plans = [
29 + {
30 + bid = 2.0;
31 + plan = "c3.large.arm64";
32 + netboot_url = "${netboot_base}/c3-large-arm";
33 + }
34 + ];
35 + };
36 + };
37 + x86_64-linux = rec {
38 + bigparallel = {
39 + divisor = 2000;
40 + minimum = 1;
41 + maximum = 5;
42 + plans = [
43 + {
44 + bid = 2.0;
45 + netboot_url = "${netboot_base}/c3-medium-x86--big-parallel";
46 + plan = "c3.medium.x86";
47 + }
48 + {
49 + bid = 2.0;
50 + netboot_url = "${netboot_base}/m3-large-x86--big-parallel";
51 + plan = "m3.large.x86";
52 + }
53 + ];
54 + };
55 + small = {
56 + divisor = 2000;
57 + minimum = 1;
58 + maximum = 5;
59 + plans = [
60 + {
61 + bid = 2.0;
62 + netboot_url = "${netboot_base}/c3-medium-x86";
63 + plan = "c3.medium.x86";
64 + }
65 + {
66 + bid = 2.0;
67 + netboot_url = "${netboot_base}/m3-large-x86";
68 + plan = "m3.large.x86";
69 + }
70 + ];
71 + };
72 + };
73 + };
74 + };
75 + };
76 +}
delft/network.nix
+1
@@ -44,6 +44,7 @@ in
44 imports = [
45 ./rhea
46 flakes.hydra.nixosModules.hydra
47 + flakes.hydra-scale-equinix-metal.nixosModules.default
48 ];
49 };
50 }
delft/rhea/default.nix
+1
@@ -6,6 +6,7 @@
6 ../common.nix
7 ../hydra.nix
8 ../hydra-proxy.nix
9 + ../hydra-scaler.nix
10 ../packet-importer.nix
11 ];
12