* Updated hydra-module.nix to use the new program names. * Removed some tabs.
* Updated hydra-module.nix to use the new program names. * Removed some tabs. svn path=/configurations/trunk/tud/; revision=30640
Eelco Dolstra committed
Dec 1, 2011 at 09:46 UTC
01ee682d181f5878323a344b11e2a39f4b2958ad
1 file changed
+26
-25
hydra-module.nix
+26
-25
@@ -144,16 +144,16 @@ in
144
{ name = "hydra-server";
145
startOn = "started network-interfaces and started hydra-init";
146
exec = ''
147
- ${pkgs.su}/bin/su - ${cfg.user} -c '${server_env} exec hydra_server.pl -h \* --max_spare_servers 20 --max_servers 50 > ${cfg.baseDir}/data/server.log 2>&1'
147
+ ${pkgs.su}/bin/su - ${cfg.user} -c '${server_env} exec hydra-server -f -h \* --max_spare_servers 5 --max_servers 25 --max_requests 100 > ${cfg.baseDir}/data/server.log 2>&1'
148
'';
149
};
150
151
jobs.hydra_queue_runner =
152
{ name = "hydra-queue-runner";
153
startOn = "started network-interfaces and started hydra-init";
154
- preStart = "${pkgs.su}/bin/su - ${cfg.user} -c 'hydra_queue_runner.pl --unlock'";
154
+ preStart = "${pkgs.su}/bin/su - ${cfg.user} -c 'hydra-queue-runner --unlock'";
155
exec = ''
156
- ${pkgs.su}/bin/su - ${cfg.user} -c 'exec hydra_queue_runner.pl > ${cfg.baseDir}/data/queue_runner.log 2>&1'
156
+ ${pkgs.su}/bin/su - ${cfg.user} -c 'exec hydra-queue-runner > ${cfg.baseDir}/data/queue_runner.log 2>&1'
157
'';
158
};
159
@@ -161,34 +161,35 @@ in
161
{ name = "hydra-evaluator";
162
startOn = "started network-interfaces";
163
exec = ''
164
- ${pkgs.su}/bin/su - ${cfg.user} -c '${env} exec hydra_evaluator.pl > ${cfg.baseDir}/data/evaluator.log 2>&1'
164
+ ${pkgs.su}/bin/su - ${cfg.user} -c '${env} exec hydra-evaluator > ${cfg.baseDir}/data/evaluator.log 2>&1'
165
'';
166
};
167
168
services.cron.systemCronJobs =
169
- let
170
- # If there is less than ... GiB of free disk space, stop the queue
171
- # to prevent builds from failing or aborting.
172
- checkSpace = pkgs.writeScript "hydra-check-space"
173
- ''
174
- #! /bin/sh
175
- if [ $(($(stat -f -c '%a' /nix/store) * $(stat -f -c '%S' /nix/store))) -lt $((${toString cfg.minimumDiskFree} * 1024**3)) ]; then
169
+ let
170
+ # If there is less than ... GiB of free disk space, stop the queue
171
+ # to prevent builds from failing or aborting.
172
+ checkSpace = pkgs.writeScript "hydra-check-space"
173
+ ''
174
+ #! /bin/sh
175
+ if [ $(($(stat -f -c '%a' /nix/store) * $(stat -f -c '%S' /nix/store))) -lt $((${toString cfg.minimumDiskFree} * 1024**3)) ]; then
176
stop hydra-queue-runner
177
- fi
178
- if [ $(($(stat -f -c '%a' /nix/store) * $(stat -f -c '%S' /nix/store))) -lt $((${toString cfg.minimumDiskFreeEvaluator} * 1024**3)) ]; then
177
+ fi
178
+ if [ $(($(stat -f -c '%a' /nix/store) * $(stat -f -c '%S' /nix/store))) -lt $((${toString cfg.minimumDiskFreeEvaluator} * 1024**3)) ]; then
179
stop hydra-evaluator
180
- fi
181
- '';
182
- compressLogs = pkgs.writeScript "compress-logs" ''
183
- #! /bin/sh -e
184
- touch -d 'last month' r
185
- find /nix/var/log/nix/drvs -type f -a ! -newer r -name '*.drv' | xargs bzip2 -v
186
- '';
187
- in
188
- [ "*/5 * * * * root ${checkSpace} &> ${cfg.baseDir}/data/checkspace.log"
189
- "15 5 * * * root ${compressLogs} &> ${cfg.baseDir}/data/compress.log"
190
- "15 02 * * * ${cfg.user} ${env} /home/${cfg.user}/.nix-profile/bin/hydra_update_gc_roots.pl &> ${cfg.baseDir}/data/gc-roots.log"
191
- ];
180
+ fi
181
+ '';
182
+ compressLogs = pkgs.writeScript "compress-logs"
183
+ ''
184
+ #! /bin/sh -e
185
+ touch -d 'last month' r
186
+ find /nix/var/log/nix/drvs -type f -a ! -newer r -name '*.drv' | xargs bzip2 -v
187
+ '';
188
+ in
189
+ [ "*/5 * * * * root ${checkSpace} &> ${cfg.baseDir}/data/checkspace.log"
190
+ "15 5 * * * root ${compressLogs} &> ${cfg.baseDir}/data/compress.log"
191
+ "15 02 * * * ${cfg.user} ${env} /home/${cfg.user}/.nix-profile/bin/hydra-update-gc-roots &> ${cfg.baseDir}/data/gc-roots.log"
192
+ ];
193
194
};
195
}