From a8cb9d41bdefe8a5dc72ca76b3ebc5b4047ddf65 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 30 Dec 2015 02:45:47 +0100 Subject: [PATCH 1/3] s 1 test-all-krebs-modules: init --- krebs/3modules/shared/default.nix | 1 + shared/1systems/test-all-krebs-modules.nix | 45 ++++++++++++++++++++++ shared/2configs/buildbot-standalone.nix | 17 ++++++-- 3 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 shared/1systems/test-all-krebs-modules.nix diff --git a/krebs/3modules/shared/default.nix b/krebs/3modules/shared/default.nix index b332676c6..518e46587 100644 --- a/krebs/3modules/shared/default.nix +++ b/krebs/3modules/shared/default.nix @@ -7,6 +7,7 @@ let "test-arch" "test-centos6" "test-centos7" + "test-all-krebs-modules" ] (name: { inherit name; cores = 1; diff --git a/shared/1systems/test-all-krebs-modules.nix b/shared/1systems/test-all-krebs-modules.nix new file mode 100644 index 000000000..b98004dfe --- /dev/null +++ b/shared/1systems/test-all-krebs-modules.nix @@ -0,0 +1,45 @@ +{ config, pkgs, lib, ... }: +let + en = { enable = true;}; +in { + krebs = { + enable = true; + build.user = config.krebs.users.shared; + build.host = config.krebs.hosts.test-all-krebs-modules; + Reaktor.enable = true; + apt-cacher-ng.enable = true; + backup.enable = true; + bepasty.enable = true; + buildbot.master.enable = true; + buildbot.slave = { + enable = true; + username = "lol"; + password = "wut"; + }; + exim-retiolum.enable = true; + exim-smarthost = { + enable = true; + system-aliases = [ { from = "dick"; to = "butt"; } ]; + }; + go.enable = true; + iptables = { + enable = true; + tables = {}; + }; + nginx.enable = true; + realwallpaper.enable = true; + retiolum.enable = true; + retiolum-bootstrap.enable = true; + tinc_graphs.enable = true; + urlwatch.enable = true; + fetchWallpaper = { + enable = true; + url ="localhost"; + }; + }; + # just get the system running + boot.loader.grub.devices = ["/dev/sda"]; + fileSystems."/" = { + device = "/dev/lol"; + }; +} diff --git a/shared/2configs/buildbot-standalone.nix b/shared/2configs/buildbot-standalone.nix index 28d1eef2e..22e9861cc 100644 --- a/shared/2configs/buildbot-standalone.nix +++ b/shared/2configs/buildbot-standalone.nix @@ -8,12 +8,9 @@ in { }; networking.firewall.allowedTCPPorts = [ 8010 9989 ]; krebs.buildbot.master = { - secrets = [ - "cac.json" - ]; + secrets = [ "retiolum-ci.rsa_key.priv" "cac.json" ]; slaves = { testslave = "krebspass"; - omo = "krebspass"; }; change_source.stockholm = '' stockholm_repo = 'http://cgit.gum/stockholm' @@ -85,6 +82,18 @@ in { addShell(f,name="eval-cross-check",env=env, command=nixshell + ["! make eval get=krebs.deploy filter=json system=test-failing"]) + addShell(f,name="instaniate-test-all-modules",env=env, + command=nixshell + \ + ["touch retiolum.rsa_key.priv; \ + nix-instantiate --eval -A \ + users.shared.test-all-krebs-modules.system \ + -I stockholm=. \ + -I secrets=. '' \ + --argstr current-date lol \ + --argstr current-user-name shared \ + --argstr current-host-name lol \ + --strict --json"]) + bu.append(util.BuilderConfig(name="fast-tests", slavenames=slavenames, factory=f)) From 2bee6a0f6d71fbb1e1f02bd0df396bc38d3b6f67 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 30 Dec 2015 04:43:16 +0100 Subject: [PATCH 2/3] s 2 buildbot-standalone: cosmetics --- shared/2configs/buildbot-standalone.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/shared/2configs/buildbot-standalone.nix b/shared/2configs/buildbot-standalone.nix index 22e9861cc..c62f8920c 100644 --- a/shared/2configs/buildbot-standalone.nix +++ b/shared/2configs/buildbot-standalone.nix @@ -73,16 +73,16 @@ in { fast-tests = '' f = util.BuildFactory() f.addStep(grab_repo) - addShell(f,name="centos7-eval",env=env, + addShell(f,name="deploy-eval-centos7",env=env, command=nixshell + ["make -s eval get=krebs.deploy filter=json system=test-centos7"]) - addShell(f,name="wolf-eval",env=env, + addShell(f,name="deploy-eval-wolf",env=env, command=nixshell + ["make -s eval get=krebs.deploy filter=json system=wolf"]) - addShell(f,name="eval-cross-check",env=env, + addShell(f,name="deploy-eval-cross-check",env=env, command=nixshell + ["! make eval get=krebs.deploy filter=json system=test-failing"]) - addShell(f,name="instaniate-test-all-modules",env=env, + addShell(f,name="instantiate-test-all-modules",env=env, command=nixshell + \ ["touch retiolum.rsa_key.priv; \ nix-instantiate --eval -A \ @@ -110,7 +110,7 @@ in { addShell(s, name="infest-cac-centos7",env=env, sigtermTime=60, # SIGTERM 1 minute before SIGKILL - timeout=5400, # 1.5h timeout + timeout=7200, # 2h command=nixshell + ["infest-cac-centos7"]) bu.append(util.BuilderConfig(name="full-tests", @@ -137,6 +137,7 @@ in { username = "testslave"; password = "krebspass"; packages = with pkgs;[ git nix ]; + # all nix commands will need a working nixpkgs installation extraEnviron = { NIX_PATH="nixpkgs=${toString }"; }; }; } From 1798dbaf47fea7793545be2bc78ac5f1c8e27e18 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 30 Dec 2015 04:56:53 +0100 Subject: [PATCH 3/3] k 5 test: fix endless loop in test --- krebs/5pkgs/test/infest-cac-centos7/notes | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/krebs/5pkgs/test/infest-cac-centos7/notes b/krebs/5pkgs/test/infest-cac-centos7/notes index 3f4fcd859..eee0bfc34 100755 --- a/krebs/5pkgs/test/infest-cac-centos7/notes +++ b/krebs/5pkgs/test/infest-cac-centos7/notes @@ -81,9 +81,10 @@ while true;do if ! wait_login_cac $id;then echo "unable to boot a working system within time frame, retrying..." >&2 echo "Cleaning up old image,last status: $(cac update;cac getserver $id | jq -r .status)" - eval "$(clear_defer)" + eval "$(clear_defer | sed 's/;exit//')" else echo "got a working system" >&2 + break fi done clear_defer >/dev/null