From dd9f52b9975cf0b3c3e192a80c6933fed3b7b37e Mon Sep 17 00:00:00 2001 From: Jean-Pierre PRUNARET Date: Mon, 31 Oct 2016 14:28:17 +0100 Subject: [PATCH] import confing hydra de pedro --- public/service-hydra-core.nix | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/public/service-hydra-core.nix b/public/service-hydra-core.nix index c34249a..3231310 100644 --- a/public/service-hydra-core.nix +++ b/public/service-hydra-core.nix @@ -13,12 +13,28 @@ mkIf cfg.hydra-core { environment.systemPackages = with pkgs; [ ]; + # Documentation HYDRA + + ## Installation + + # 1. créer clef SSH : + # ssh-keygen -C "hydra@pedro.dubronetwork.fr" -N "" -f /etc/nixos/id_buildfarm + # 2. récupérer la clef publique du serveur ssh + l'ajouter dans les `knownHosts` : + # ssh-keyscan localhost + # 3. créer un utilisateur pour gérer hydra + # su - hydra + # hydra-create-user jpierre03 --password xxx --role 'admin' + # 4. relancer hydra + # 5. ajouter un vhost à nginx + # 6. relancer nginx + # 7. le service accessible à hydra. + + ## Tutoriel + # * https://github.com/peti/hydra-tutorial + # Services ## Hydra - # 2. créer un utilisateur pour gérer hydra - # su - hydra - # hydra-create-user jpierre03 --password xxx --role 'admin' services.hydra = { enable = true; @@ -26,6 +42,7 @@ mkIf cfg.hydra-core { notificationSender = "hydra@${config.networking.hostName}"; listenHost = "localhost"; minimumDiskFree = 50; # Go + smtpHost = "localhost"; }; ## Ménage @@ -50,11 +67,10 @@ mkIf cfg.hydra-core { # accessible à hydra.pedro.dubnronetwork.fr nix = { - distributedBuilds = true; + distributedBuilds = false; buildMachines = [ - # { hostName = "pedro.dubronetwork.fr"; maxJobs = 2; speedFactor = 10; sshKey = "/etc/nixos/id_buildfarm"; sshUser = "root"; system = "x86_64-linux"; } + # { hostName = "pedro.dubronetwork.fr"; maxJobs = 5; speedFactor = 10; sshKey = "/etc/nixos/id_buildfarm"; sshUser = "root"; system = "x86_64-linux"; } ]; extraOptions = "auto-optimise-store = true"; }; - }