Unify Hydra's NixOS module with the one used for hydra.nixos.org
[?]
Jul 1, 2015, 11:01 PM
TTZ26BJQKIASUK7MT6KGQOIOOHEYWNV4UASO2ZQWGK4ADGK6SR6QCDependencies
- [2]
KNJ6Y5FZhydra-module.nix: Use -p instead of HYDRA_PORT - [3]
KVDOL4OZhydra-module: Don't rely on su being available. - [4]
G2RULGMMhydra-module: add config.extraEnv - [5]
25ZWSE7Thydra-server.service: Shut up warning about the terminal size being unknown - [6]
LKRD3SHEAllow a different state directory for hydra-server - [7]
F6LZSPNCGive services.hydra.package a reasonable default - [8]
4HDPYRJ6Update the hydra-queue-runner unit - [9]
PID2JI77Add a unit for hydra-send-stats - [10]
5KYQ4PNGFix type - [11]
LLCM5ADWThe new queue runner requires "hydra" to be a trusted Nix user - [12]
E3M46H7TKeep session state across hydra-server restarts - [13]
IE2PRAQUhydra-queue-runner: Send build notifications - [14]
BBF7ZJWHhydra-module.nix: Use startAt - [15]
ZVGQP2SXhydra-module: Add a `logo' option. - [16]
ZYEFL36QPorted/merged properties from the TUD configuration's hydra-module - [17]
7XOH2DGHhydra-module.nix: Give types to options - [18]
HSVVEKTY* Start of a JSON API to get information about a specific build. - [19]
5DEWIOO4hydra-module.nix: Export the HYDRA_* environment variables - [20]
EKHL23VIKeep sessions for a week - [21]
4J33F22Thydra-module.nix: Make it possible to add extra config lines - [22]
J57PR4O3hydra-module: Allow to specify the listen host. - [23]
X6XVDE2Chydra-module: Set GIT_SSL_CAINFO for git over https - [24]
EE5RRP3Xhydra-module.nix: Make services require hydra-init - [25]
JKX7AAB6hydra-module.nix: Remove log compression which is a local policy - [26]
ASPNI2AOhydra-module.nix: Automatically create postgres db user for hydra and an admin hydra account - [27]
KMPLMG7Thydra-module.nix: Cleanup - [28]
INUGMXTGhydra-module: Add a `port' option. - [29]
K5G5GZY7Guard against concurrent invocations of hydra-queue-runner - [30]
UYOMSOGJhydra-module/compressLogs: Avoid creating /root/r. - [31]
BT6SNXUAAdd an option to run the hydra server in debug mode - [32]
GS4BE6TBAsynchronously compress build logs - [33]
3PNG7NIBRemove trailing whitespace - [34]
T4DBPQOFhydra-module: Run hydra-init during hydra-init.service - [35]
V4R3SIRMhydra-module.nix: Don't use a password - [36]
F3M47DHJhydra-module.nix: More paranoid permissions on the data directory - [37]
D3MDJONY - [38]
PMDWFZHWhydra-module.nix: Fix setting the logo - [39]
L62I7CPIDon't put ssmtp in hydra's paths - [40]
3FTM52B2hydra-module: Always GC to have at least 100 GiB available. - [*]
ALLSLBFXWhoops - [*]
24BMQDZAStart of single-process hydra-queue-runner - [*]
J5UVLXOK* Start of a basic Catalyst web interface.
Change contents
- edit in hydra-module.nix at line 6
- replacement in hydra-module.nix at line 15
HYDRA_CONFIG = "${baseDir}/data/hydra.conf";HYDRA_DATA = "${baseDir}/data";HYDRA_CONFIG = "${baseDir}/hydra.conf";HYDRA_DATA = "${baseDir}"; - replacement in hydra-module.nix at line 21
OPENSSL_X509_CERT_FILE = "/etc/ssl/certs/ca-bundle.crt";GIT_SSL_CAINFO = "/etc/ssl/certs/ca-bundle.crt";SSL_CERT_FILE = "/etc/ssl/certs/ca-certificates.crt";PGPASSFILE = "${baseDir}/pgpass"; - edit in hydra-module.nix at line 27
COLUMNS = "80"; - edit in hydra-module.nix at line 29
localDB = "dbi:Pg:dbname=hydra;user=hydra;";haveLocalDB = cfg.dbi == localDB; - replacement in hydra-module.nix at line 52
default = "dbi:Pg:dbname=hydra;user=hydra;";default = localDB; - replacement in hydra-module.nix at line 92
default = 5;default = 0; - replacement in hydra-module.nix at line 100
default = 2;default = 0; - replacement in hydra-module.nix at line 125
File name of an alternate logo to be displayed on the web pages.Path to a file containing the logo of your Hydra instance. - replacement in hydra-module.nix at line 132
description = "Whether to run the server in debug mode";description = "Whether to run the server in debug mode."; - replacement in hydra-module.nix at line 137
description = "Extra lines for the hydra config";description = "Extra lines for the Hydra configuration."; - replacement in hydra-module.nix at line 143
description = "Extra environment variables for Hydra";description = "Extra environment variables for Hydra."; - edit in hydra-module.nix at line 153
users.extraGroups.hydra = { };users.extraUsers.hydra ={ description = "Hydra";group = "hydra";createHome = true;home = baseDir;useDefaultShell = true;};users.extraUsers.hydra-queue-runner ={ description = "Hydra queue runner";group = "hydra";useDefaultShell = true;}; - edit in hydra-module.nix at line 170
users.extraUsers.hydra-www ={ description = "Hydra web server";group = "hydra";useDefaultShell = true;};nix.trustedUsers = [ "hydra-queue-runner" ]; - edit in hydra-module.nix at line 195[12.197]→[12.191:251](∅→∅),[12.2641]→[12.191:251](∅→∅),[12.251]→[12.0:24](∅→∅),[12.24]→[12.2750:2809](∅→∅),[12.2750]→[12.2750:2809](∅→∅),[12.2809]→[12.25:34](∅→∅),[12.34]→[12.87:88](∅→∅),[12.87]→[12.87:88](∅→∅)
users.extraUsers.hydra ={ description = "Hydra";home = baseDir;createHome = true;useDefaultShell = true;}; - edit in hydra-module.nix at line 203
nix.trustedUsers = [ "hydra" ]; - replacement in hydra-module.nix at line 210[3.22]→[12.0:43](∅→∅),[12.927]→[12.0:43](∅→∅),[12.43]→[12.100:195](∅→∅),[12.287]→[12.100:195](∅→∅),[12.195]→[12.131:208](∅→∅)
mkdir -m 0700 -p ${baseDir}/datachown hydra ${baseDir}/dataln -sf ${hydraConf} ${baseDir}/data/hydra.conf${optionalString (cfg.dbi == "dbi:Pg:dbname=hydra;user=hydra;") ''mkdir -p ${baseDir}chown hydra.hydra ${baseDir}chmod 0750 ${baseDir}ln -sf ${hydraConf} ${baseDir}/hydra.confmkdir -m 0700 -p /var/lib/hydra/wwwchown hydra-www.hydra /var/lib/hydra/wwwmkdir -m 0700 -p /var/lib/hydra/queue-runnermkdir -m 0750 -p /var/lib/hydra/build-logschown hydra-queue-runner.hydra /var/lib/hydra/queue-runner /var/lib/hydra/build-logs${optionalString haveLocalDB '' - replacement in hydra-module.nix at line 242
environment = serverEnv // { COLUMNS = "80"; };environment = serverEnv; - replacement in hydra-module.nix at line 248[2.272]→[12.330:358](∅→∅),[12.397]→[12.330:358](∅→∅),[12.436]→[12.330:358](∅→∅),[12.923]→[12.330:358](∅→∅),[12.1324]→[12.330:358](∅→∅)
User = "hydra";User = "hydra-www";PermissionsStartOnly = true; - replacement in hydra-module.nix at line 261
{ ExecStart = "@${cfg.package}/bin/hydra-queue-runner hydra-queue-runner";{ ExecStartPre = "${cfg.package}/bin/hydra-queue-runner --unlock";ExecStart = "@${cfg.package}/bin/hydra-queue-runner hydra-queue-runner"; - replacement in hydra-module.nix at line 264
User = "hydra";User = "hydra-queue-runner"; - replacement in hydra-module.nix at line 290
startAt = "02:15";startAt = "2,14:15"; - replacement in hydra-module.nix at line 303
services.cron.systemCronJobs =let# If there is less than ... GiB of free disk space, stop the queue# to prevent builds from failing or aborting.checkSpace = pkgs.writeScript "hydra-check-space"# If there is less than a certain amount of free disk space, stop# the queue/evaluator to prevent builds from failing or aborting.systemd.services.hydra-check-space ={ script = - edit in hydra-module.nix at line 308
#! ${pkgs.stdenv.shell} - replacement in hydra-module.nix at line 317[12.1511]→[12.1511:1520](∅→∅),[12.1520]→[12.306:384](∅→∅),[12.3089]→[12.1945:1956](∅→∅),[12.1945]→[12.1945:1956](∅→∅)
in[ "*/5 * * * * root ${checkSpace} &> ${baseDir}/data/checkspace.log"];startAt = "*:0/5";};services.postgresql.enable = mkIf haveLocalDB true;services.postgresql.identMap = optionalString haveLocalDB''hydra-users hydra hydrahydra-users hydra-queue-runner hydrahydra-users hydra-www hydrahydra-users root hydra'';services.postgresql.authentication = optionalString haveLocalDB''local hydra all ident map=hydra-users''; - edit in hydra-module.nix at line 336
- replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 1571
Path lockPath = hydraData + "/queue-runner";Path lockPath = hydraData + "/queue-runner/lock";createDirs(dirOf(lockPath)); - replacement in src/lib/Hydra.pm at line 58
storage => ($ENV{'HYDRA_SERVER_DATA'} // Hydra::Model::DB::getHydraPath) . "/session_data",storage => Hydra::Model::DB::getHydraPath . "/www/session_data",