@cryptotaxi247 / infra-1 / commits / 5c3c12d1

Run the build farm as an Upstart job.

svn path=/configurations/trunk/tud/; revision=9787

Eelco Dolstra committed Nov 23, 2007 at 17:27 UTC 5c3c12d17834c1b79d5a73e25946e12a3006cbe1
2 files changed +21 -22
main.nix
+21
@@ -16,6 +16,13 @@ let
16 };
17 in map addKey (pkgs.lib.filter (machine: machine ? buildUser) machineList);
18
19 + supervisor = import ../../release/supervisor/supervisor.nix {
20 + stateDir = "/home/buildfarm/buildfarm-state";
21 + jobsURL = https://svn.cs.uu.nl:12443/repos/trace/configurations/trunk/tud/supervisor/jobs.conf;
22 + smtpHost = "smtp.st.ewi.tudelft.nl";
23 + fromAddress = "TU Delft Nix Buildfarm <martin@st.ewi.tudelft.nl>";
24 + };
25 +
26 in
27
28 rec {
@@ -103,6 +110,20 @@ rec {
110 interfaces = ["eth0"];
111 };
112
113 + extraJobs = [
114 + { name = "buildfarm-supervisor";
115 + job = "
116 + description \"Build farm job starter\"
117 +
118 + start on network-interfaces/started
119 + stop on network-interfaces/stop
120 +
121 + #respawn ${pkgs.su}/bin/su - root -c 'NIX_REMOTE= ${supervisor}/bin/run' > /var/log/buildfarm 2>&1
122 + respawn ${pkgs.su}/bin/su - buildfarm -c ${supervisor}/bin/run > /var/log/buildfarm 2>&1
123 + ";
124 + }
125 + ];
126 +
127 nagios = {
128 enable = true;
129 enableWebInterface = true;
supervisor/default.nix deleted
-22
@@ -1,22 +0,0 @@
1 -# Buildfarm configuration for the TUD buildfarm.
2 -
3 -# The following makes it easy to build a supervisor that uses a
4 -# different current-load directory. This is to prevent one-shot jobs
5 -# from failing due to all machines being in use by the "main"
6 -# supervisor. To build:
7 -#
8 -# $ nix-build ./st-lab.nix --arg currentLoadDir \"/tmp/current-load\" -o tmp-supervisor
9 -{currentLoadDir ? "/home/buildfarm/buildfarm-state/current-load"}:
10 -
11 -{
12 - supervisor =
13 - (import ../../../release/supervisor/supervisor.nix) {
14 - stateDir = "/home/buildfarm/buildfarm-state";
15 - jobsURL = https://svn.cs.uu.nl:12443/repos/trace/configurations/trunk/tud/supervisor/jobs.conf;
16 - machinesList = ./machines;
17 - pkgsPath = "/etc/nixos/nixpkgs/pkgs";
18 - smtpHost = "smtp.st.ewi.tudelft.nl";
19 - fromAddress = "TU Delft Nix Buildfarm <martin@st.ewi.tudelft.nl>";
20 - inherit currentLoadDir;
21 - };
22 -}