@cryptotaxi247 / infra-1 / commits / 63412bd4

Drop aarch64 t2a-1 (dead) and t2a-4 (spot), add bigmac (spot)

graham christensen committed Dec 18, 2018 at 22:49 UTC 63412bd4a9b8f6b8f967136d32c66e876da9fedf
3 files changed +54 -162
delft/eris.nix
+48 -33
@@ -8,10 +8,12 @@ in { deployment.targetEnv = "hetzner";
8 46.4.67.10 chef
9 147.75.198.47 packet-epyc-1
10 147.75.98.145 packet-t2-4
11 - 147.75.65.54 packet-t2a-1
11 147.75.79.198 packet-t2a-2
12 147.75.198.170 packet-t2a-3
14 - 147.75.111.30 packet-t2a-4
13 + 139.178.82.19 bigmac-host
14 + 139.178.82.19 bigmac-guest
15 +
16 +
17 '' + (let
18 nums = lib.lists.range 1 9;
19 name = num: ''
@@ -46,44 +48,57 @@ in { deployment.targetEnv = "hetzner";
48
49 globalConfig.scrape_interval = "15s";
50 scrapeConfigs = [
49 - { job_name = "node";
51 + {
52 + job_name = "node";
53 static_configs = [
51 - {
52 - targets = [
54 + {
55 + targets = [
56 "chef:9100"
57 ];
55 - labels.role = "hydra";
56 - }
57 - {
58 - targets = [
59 - "packet-epyc-1:9100" "packet-t2-4:9100" "packet-t2a-1:9100"
60 - "packet-t2a-2:9100" "packet-t2a-3:9100" "packet-t2a-4:9100"
61 - "chef:9100"
62 - ];
63 - labels.role = "builder";
64 - }
65 - {
66 - targets = builtins.map (n: "mac${toString n}-host:6010") (lib.lists.range 1 9);
67 - labels.mac = "host";
68 - labels.role = "macos-hypervisor";
69 - }
70 - {
71 - targets = builtins.map (n: "mac${toString n}-guest:6010") (lib.lists.range 1 9);
72 - labels.mac = "guest";
73 - labels.role = "builder";
74 - }
75 - ];
58 + labels.role = "hydra";
59 + }
60 + {
61 + targets = [
62 + "packet-epyc-1:9100" "packet-t2-4:9100"
63 + "packet-t2a-2:9100" "packet-t2a-3:9100"
64 + "chef:9100"
65 + ];
66 + labels.role = "builder";
67 + }
68 + {
69 + targets = builtins.map (n: "mac${toString n}-host:6010") (lib.lists.range 1 9);
70 + labels.mac = "host";
71 + labels.role = "macos-hypervisor";
72 + }
73 + {
74 + targets = builtins.map (n: "mac${toString n}-guest:6010") (lib.lists.range 1 9);
75 + labels.mac = "guest";
76 + labels.role = "builder";
77 + }
78 + {
79 + targets = [ "bigmac-host:9100" ];
80 + labels.mac = "host";
81 + labels.role = "macos-hypervisor";
82 + }
83 + {
84 + targets = [ "bigmac-guest:9101" ];
85 + labels.mac = "guest";
86 + labels.role = "builder";
87 + }
88 +
89 + ];
90 }
91
78 - { job_name = "hydra";
92 + {
93 + job_name = "hydra";
94 metrics_path = "/";
95 static_configs = [
81 - {
82 - targets = [
96 + {
97 + targets = [
98 "status.nixos.org:9200"
99 ];
85 - }
86 - ];
100 + }
101 + ];
102 }
103 ];
104 };
@@ -107,8 +122,8 @@ in { deployment.targetEnv = "hetzner";
122 WorkingDirectory = "/tmp";
123 ExecStart = let
124 python = pkgs.python3.withPackages (p: [
110 - p.requests p.prometheus_client
111 - ]);
125 + p.requests p.prometheus_client
126 + ]);
127 in ''
128 ${python}/bin/python ${./prometheus/hydra-queue-runner-reexporter.py}
129 '';
delft/hydra.nix
+6 -14
@@ -127,6 +127,11 @@ in
127 Port 6009
128 Compression yes
129
130 + Host bigmac-guest
131 + Hostname 139.178.82.19
132 + Port 2200
133 + Compression yes
134 +
135 Host macstadium1
136 Hostname 208.78.106.251
137 Compression yes
@@ -139,10 +144,6 @@ in
144 Hostname 147.75.98.145
145 Compression yes
146
142 - Host packet-t2a-1
143 - Hostname 147.75.65.54
144 - Compression yes
145 -
147 Host packet-t2a-2
148 Hostname 147.75.79.198
149 Compression yes
@@ -151,10 +152,6 @@ in
152 Hostname 147.75.198.170
153 Compression yes
154
154 - Host packet-t2a-4
155 - Hostname 147.75.111.30
156 - Compression yes
157 -
155 Host packet-epyc-1
156 Hostname 147.75.198.47
157 Compression yes
@@ -172,6 +169,7 @@ in
169 { hostNames = [ "[37.153.215.191]:6006" ]; publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICyjTqJsNioHUP0HMmGVfDpej9dCIQH0Bdn5aNbe8oYU"; }
170 { hostNames = [ "[37.153.215.191]:6007" ]; publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKjy5mXHUHqGO+lzeyj09iuADIDtcQtnBtwiPCmV/UBq"; }
171 { hostNames = [ "[37.153.215.191]:6008" ]; publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHHJF0dXSTvZwWtPjN/iUBp2A5pHCPuOUVOvBkjXw+Eu"; }
172 + { hostNames = [ "[139.178.82.19]:2200" ]; publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIyfeCptEJWPP2nsC5jBZ62Z13+Vl1I/5fFQ9acTbQp3"; }
173
174 { hostNames = [ "208.78.106.251" ]; publicKey = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBKrwg2592DfDUG1U0LZxJcBaT35YfEsuKo4helEAzeoujvzOo4DIaBrTCX7+LxcYZlGoi4WvsnwxUG11GY12l2A="; }
175 { hostNames = [ "208.78.106.252" ]; publicKey = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBLV1p6f6Rk3rKwNJbcqvG68wjfT3wPcJfChc1LFU9A3tTFslUDr47FHLmT+FTr+ChkoqD6Gsl+jtSnvkYnTlpGY="; }
@@ -186,18 +184,12 @@ in
184 # packet-t2-4
185 { hostNames = [ "147.75.98.145" ]; publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIABlJeKJ2B5mgK8TujC3FZ7geAOzQFUDJpay6a8Utdg6"; }
186
189 - # packet-t2a-1
190 - { hostNames = [ "147.75.65.54" ]; publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINPipUJuE/vHgrakfIBp+mt7iS3DlMlecRdI/hleGm1W"; }
191 -
187 # packet-t2a-2
188 { hostNames = [ "147.75.79.198" ]; publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDCo+z5d8C6SpCyvC8KAPMAcMEtd5J74tRsk+7sm2KgD"; }
189
190 # packet-t2a-3
191 { hostNames = [ "147.75.198.170" ]; publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPieDw5aeaN88HMIye2t4tL6DBqgJwQbXH0PzPd0HOVl"; }
192
198 - # packet-t2a-4
199 - { hostNames = [ "147.75.111.30" ]; publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBy1RCBg3iTzruHzYxHdy3KgTytZdmXgQPHjlB/ZjAQe"; }
200 -
193 # packet-epyc-1
194 { hostNames = [ "147.75.198.47" ]; publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAt76Jw/xXqvYcrNZSa+BEfKfLCFyvY50LZJuGBWtJwx"; }
195
delft/packet/packet-t2a-1.nix deleted
-115
@@ -1,115 +0,0 @@
1 -{ lib, pkgs, ... }:
2 - {
3 - boot = {
4 - loader = {
5 - grub = {
6 - enable = true;
7 - version = 2;
8 - efiSupport = true;
9 - device = "nodev";
10 - efiInstallAsRemovable = true;
11 - font = null;
12 - splashImage = null;
13 - extraConfig = ''
14 - serial
15 - terminal_input serial console
16 - terminal_output serial console
17 - '';
18 - };
19 - efi = {
20 - efiSysMountPoint = "/boot/efi";
21 - canTouchEfiVariables = lib.mkForce false;
22 - };
23 - };
24 - initrd = {
25 - availableKernelModules = [
26 - "ahci"
27 - "pci_thunder_ecam"
28 - ];
29 - };
30 - kernelParams = [
31 - "cma=0M"
32 - "biosdevname=0"
33 - "net.ifnames=0"
34 - "console=ttyAMA0,115200"
35 - ];
36 - kernelPackages = pkgs.linuxPackages_4_14;
37 - };
38 - networking = {
39 - hostName = "builder-t2a-1";
40 - dhcpcd.enable = false;
41 - defaultGateway = {
42 - address = "147.75.65.53";
43 - interface = "bond0";
44 - };
45 - defaultGateway6 = {
46 - address = "2604:1380:0:d600::";
47 - interface = "bond0";
48 - };
49 - nameservers = [
50 - "147.75.207.207"
51 - "147.75.207.208"
52 - ];
53 - bonds = {
54 - bond0 = {
55 - driverOptions = {
56 - mode = "802.3ad";
57 - xmit_hash_policy = "layer3+4";
58 - lacp_rate = "fast";
59 - downdelay = "200";
60 - miimon = "100";
61 - updelay = "200";
62 - };
63 - interfaces = [ "eth0" "eth1" ];
64 - };
65 - };
66 - };
67 - networking.interfaces.bond0 = {
68 - useDHCP = false;
69 - ipv4 = {
70 - routes = [
71 - {
72 - address = "10.0.0.0";
73 - prefixLength = 8;
74 - via = "10.99.98.128";
75 - }
76 - ];
77 - addresses = [
78 - {
79 - address = "147.75.65.54";
80 - prefixLength = 30;
81 - }
82 - {
83 - address = "10.99.98.129";
84 - prefixLength = 31;
85 - }
86 - ];
87 - };
88 - ipv6 = {
89 - addresses = [
90 - {
91 - address = "2604:1380:0:d600::1";
92 - prefixLength = 127;
93 - }
94 - ];
95 - };
96 - };
97 - fileSystems = {
98 - "/" = {
99 - device = "/dev/sda2";
100 - fsType = "ext4";
101 - };
102 - "/boot/efi" = {
103 - device = "/dev/sda1";
104 - fsType = "vfat";
105 - };
106 - };
107 - nix = {
108 - maxJobs = 96;
109 - buildCores = 4;
110 - };
111 - nixpkgs = {
112 - system = "aarch64-linux";
113 - };
114 - system.stateVersion = lib.mkForce "18.03";
115 - }