summaryrefslogtreecommitdiffstats
path: root/krebs/3modules
diff options
context:
space:
mode:
Diffstat (limited to 'krebs/3modules')
-rw-r--r--krebs/3modules/ci.nix192
-rw-r--r--krebs/3modules/default.nix1
-rw-r--r--krebs/3modules/lass/default.nix40
-rw-r--r--krebs/3modules/lass/pgp/blue.pgp51
-rw-r--r--krebs/3modules/lass/ssh/blue.rsa1
5 files changed, 90 insertions, 195 deletions
diff --git a/krebs/3modules/ci.nix b/krebs/3modules/ci.nix
deleted file mode 100644
index e97aa16eb..000000000
--- a/krebs/3modules/ci.nix
+++ /dev/null
@@ -1,192 +0,0 @@
-{ config, pkgs, ... }:
-with import <stockholm/lib>;
-let
- cfg = config.krebs.ci;
-
- hostname = config.networking.hostName;
-in
-{
- options.krebs.ci = {
- enable = mkEnableOption "krebs continous integration";
- stockholmSrc = mkOption {
- type = types.str;
- default = "http://cgit.${hostname}.r/stockholm";
- };
- treeStableTimer = mkOption {
- type = types.int;
- default = 10;
- description = "how long to wait until we test changes (in minutes)";
- };
- hosts = mkOption {
- type = types.listOf types.host;
- default = [];
- description = ''
- List of hosts that should be build
- '';
- };
- tests = mkOption {
- type = types.listOf types.str;
- default = [];
- description = ''
- List of tests that should be build
- '';
- };
- };
-
- config = mkIf cfg.enable {
- services.nginx = {
- enable = true;
- virtualHosts.build = {
- serverAliases = [ "build.${hostname}.r" ];
- locations."/".extraConfig = ''
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- proxy_pass http://127.0.0.1:${toString config.krebs.buildbot.master.web.port};
- '';
- };
- };
-
- krebs.buildbot.master = {
- slaves = {
- testslave = "lasspass";
- };
- change_source.stockholm = ''
- stockholm_repo = '${cfg.stockholmSrc}'
- cs.append(
- changes.GitPoller(
- stockholm_repo,
- workdir='stockholm-poller', branches=True,
- project='stockholm',
- pollinterval=10
- )
- )
- '';
- scheduler = {
- build-scheduler = ''
- sched.append(
- schedulers.SingleBranchScheduler(
- change_filter=util.ChangeFilter(branch_re=".*"),
- treeStableTimer=${toString cfg.treeStableTimer}*60,
- name="build-all-branches",
- builderNames=[
- ${optionalString (cfg.hosts != []) ''"hosts",''}
- ${optionalString (cfg.tests != []) ''"tests",''}
- ]
- )
- )
- '';
- force-scheduler = ''
- sched.append(
- schedulers.ForceScheduler(
- name="force",
- builderNames=[
- ${optionalString (cfg.hosts != []) ''"hosts",''}
- ${optionalString (cfg.tests != []) ''"tests",''}
- ]
- )
- )
- '';
- };
- builder_pre = ''
- # prepare grab_repo step for stockholm
- grab_repo = steps.Git(
- repourl=stockholm_repo,
- mode='full'
- )
-
- # prepare addShell function
- def addShell(factory,**kwargs):
- factory.addStep(steps.ShellCommand(**kwargs))
- '';
- builder = {
- hosts = mkIf (cfg.hosts != []) ''
- f = util.BuildFactory()
- f.addStep(grab_repo)
-
- def build_host(user, host):
- addShell(f,
- name="{}".format(host),
- env={
- "NIX_PATH": "secrets=/var/src/stockholm/null:/var/src",
- "NIX_REMOTE": "daemon",
- "dummy_secrets": "true",
- },
- command=[
- "nix-shell", "-I", "stockholm=.", "--run", " ".join(["test",
- "--user={}".format(user),
- "--system={}".format(host),
- "--force-populate",
- "--target=$LOGNAME@${config.krebs.build.host.name}$HOME/{}".format(user),
- ])
- ],
- timeout=90001
- )
-
- ${concatMapStringsSep "\n" (host:
- "build_host(\"${host.owner.name}\", \"${host.name}\")"
- ) cfg.hosts}
-
- bu.append(
- util.BuilderConfig(
- name="hosts",
- slavenames=slavenames,
- factory=f
- )
- )
- '';
- tests = mkIf (cfg.tests != []) ''
- f = util.BuildFactory()
- f.addStep(grab_repo)
-
- def run_test(test):
- addShell(f,
- name="{}".format(test),
- env={
- "NIX_PATH": "secrets=/var/src/stockholm/null:/var/src",
- "NIX_REMOTE": "daemon",
- "dummy_secrets": "true",
- },
- command=[
- "nix-build", "-I", "stockholm=.", "krebs/0tests",
- "-A", "{}".format(test)
- ],
- timeout=90001
- )
-
- ${concatMapStringsSep "\n" (test:
- "run_test(\"${test}\")"
- ) cfg.tests}
-
- bu.append(
- util.BuilderConfig(
- name="tests",
- slavenames=slavenames,
- factory=f
- )
- )
- '';
- };
- enable = true;
- web.enable = true;
- irc = {
- enable = true;
- nick = "build|${hostname}";
- server = "irc.r";
- channels = [ "xxx" "noise" ];
- allowForce = true;
- };
- extraConfig = ''
- c['buildbotURL'] = "http://build.${hostname}.r/"
- '';
- };
-
- krebs.buildbot.slave = {
- enable = true;
- masterhost = "localhost";
- username = "testslave";
- password = "lasspass";
- packages = with pkgs; [ gnumake jq nix populate ];
- };
-
- };
-}
diff --git a/krebs/3modules/default.nix b/krebs/3modules/default.nix
index 6fe01e466..afc96e9ee 100644
--- a/krebs/3modules/default.nix
+++ b/krebs/3modules/default.nix
@@ -13,7 +13,6 @@ let
./buildbot/master.nix
./buildbot/slave.nix
./build.nix
- ./ci.nix
./current.nix
./exim.nix
./exim-retiolum.nix
diff --git a/krebs/3modules/lass/default.nix b/krebs/3modules/lass/default.nix
index aa0b43f9a..fd74983fa 100644
--- a/krebs/3modules/lass/default.nix
+++ b/krebs/3modules/lass/default.nix
@@ -671,9 +671,45 @@ with import <stockholm/lib>;
ssh.privkey.path = <secrets/ssh.id_ed25519>;
ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKd/6eCR8yxC14zBJLIQgVa4Zbutv5yr2S8k08ztmBpp";
};
+ blue = {
+ cores = 1;
+ nets = {
+ retiolum = {
+ ip4.addr = "10.243.0.77";
+ ip6.addr = "42:0:0:0:0:0:0:77";
+ aliases = [
+ "blue.r"
+ ];
+ tinc.pubkey = ''
+ -----BEGIN PUBLIC KEY-----
+ MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA28b+WMiQaWbwUPcJlacd
+ QwyX4PvVm9WItPmmNy+RE2y0Mf04LxZ7RLm5+e0wPuhXXQyhZ06CNd6tjeaKfXUc
+ sNeC1Vjuh1hsyYJLR5Xf/YRNJQKoaHjbkXGt+rSK7PPuCcsUPOSZSEAgHYVvcFzM
+ wWE4kTDcBZeISB4+yLmPIZXhnDImRRMEurFNRiocoMmEIu/zyYVq8rnlTl972Agu
+ PMGo1HqVxCouEWstRvtX5tJmV8yruRbH4tADAruLXErLLwUAx/AYDNRjY1TYYetJ
+ RoaxejmZVVIvR+hWaDLkHZO89+to6wS5IVChs1anFxMNN6Chq2v8Bb2Nyy1oG/H/
+ HzXxj1Rn7CN9es5Wl0UX4h9Zg+hfspoI75lQ509GLusYOyFwgmFF02eMpxgHBiWm
+ khSJzPkFdYJKUKaZI0nQEGGsFJOe/Se5jj70x3Q5XEuUoQqyahAqwQIYh6uwhbuP
+ 49RBPHpE+ry6smhUPLTitrRsqeBU4RZRNsUAYyCbwyAH1i+K3Q5PSovgPtlHVr2N
+ w+VZCzsrtOY2fxXw0e+mncrx/Qga62s4m6a/dyukA5RytA9f6bBsvSTqr7/EQTs6
+ ZEBoPudk7ULNEbfjmJtBkeG7wKIlpgzVg/JaCAwMuSgVjrpIHrZmjOVvmOwB8W6J
+ Ch/o7chVljAwW4JmyRnhZbMCAwEAAQ==
+ -----END PUBLIC KEY-----
+ '';
+ };
+ };
+ ssh.privkey.path = <secrets/ssh.id_ed25519>;
+ ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILSBxtPf8yJfzzI7/iYpoRSc/TT+zYmE/HM9XWS3MZlv";
+ };
};
- users = {
- lass = {
+ users = rec {
+ lass = lass-blue;
+ lass-blue = {
+ mail = "lass@blue.r";
+ pubkey = builtins.readFile ./ssh/blue.rsa;
+ pgp.pubkeys.default = builtins.readFile ./pgp/blue.pgp;
+ };
+ lass-mors = {
mail = "lass@mors.r";
pubkey = builtins.readFile ./ssh/mors.rsa;
pgp.pubkeys.default = builtins.readFile ./pgp/mors.pgp;
diff --git a/krebs/3modules/lass/pgp/blue.pgp b/krebs/3modules/lass/pgp/blue.pgp
new file mode 100644
index 000000000..e7a1ac0e1
--- /dev/null
+++ b/krebs/3modules/lass/pgp/blue.pgp
@@ -0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