From 49a98c60662d64ceee5de2eba2b0897742467cc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=E2=80=9CNiols=E2=80=9D=20Jeannerod?= Date: Mon, 16 Dec 2024 13:30:58 +0100 Subject: [PATCH] Make fedi300 a CI runner --- infra/fedi300/default.nix | 1 + .../forgejo-actions-runner.nix} | 1 + infra/vm02179/gitea-runner.nix | 36 ------------------- secrets/forgejo-runner-token.age | 16 ++++----- secrets/secrets.nix | 5 +-- 5 files changed, 9 insertions(+), 50 deletions(-) rename infra/{vm02186/gitea-runner.nix => fedi300/forgejo-actions-runner.nix} (99%) delete mode 100644 infra/vm02179/gitea-runner.nix diff --git a/infra/fedi300/default.nix b/infra/fedi300/default.nix index a614ae3..49f1e93 100644 --- a/infra/fedi300/default.nix +++ b/infra/fedi300/default.nix @@ -3,6 +3,7 @@ { imports = [ ../common + ./forgejo-actions-runner.nix ]; procolix.vm = { diff --git a/infra/vm02186/gitea-runner.nix b/infra/fedi300/forgejo-actions-runner.nix similarity index 99% rename from infra/vm02186/gitea-runner.nix rename to infra/fedi300/forgejo-actions-runner.nix index 5310add..39024b6 100644 --- a/infra/vm02186/gitea-runner.nix +++ b/infra/fedi300/forgejo-actions-runner.nix @@ -29,6 +29,7 @@ "docker:docker://node:16-bullseye" "native:host" ]; + hostPackages = with pkgs; [ bash git diff --git a/infra/vm02179/gitea-runner.nix b/infra/vm02179/gitea-runner.nix deleted file mode 100644 index 632fc73..0000000 --- a/infra/vm02179/gitea-runner.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ config, pkgs, ... }: - -{ - virtualisation.docker.enable = true; - - services.gitea-actions-runner = { - package = pkgs.forgejo-actions-runner; - instances.default = { - enable = true; - name = "vm02179.procolix.com"; - url = "https://git.fediversity.eu"; - tokenFile = config.age.secrets.forgejo-runner-token.path; - labels = [ - "docker:docker://node:16-bullseye" - "native:host" - ]; - hostPackages = with pkgs; [ - bash - git - nix - nodejs - ]; - settings = { - log.level = "info"; - runner = { - file = ".runner"; - capacity = 8; - timeout = "3h"; - insecure = false; - fetch_timeout = "5s"; - fetch_interval = "2s"; - }; - }; - }; - }; -} diff --git a/secrets/forgejo-runner-token.age b/secrets/forgejo-runner-token.age index a0e126a..015f003 100644 --- a/secrets/forgejo-runner-token.age +++ b/secrets/forgejo-runner-token.age @@ -1,11 +1,7 @@ age-encryption.org/v1 --> ssh-ed25519 1MUEqQ 5Bvi8UvLbifM2vlDOr4NRaZLRfIg6kAPY0oiwiSy50o -TnbS5BHO4hmjs7Ux9rRMzK9ahsIkU9GpmAx59MzIpI0 --> ssh-ed25519 h0QWFg 4Cu85VZM6zyysIYwMFccXUWUGejkylHiytJA4+2nN1Q -e8XuOUfrOZ6xoWNK4gvVgs0H5pgtqUfrv/DBeh1WIsU --> ssh-ed25519 pJV4iw JQgQMTxfDZ/26In72UHPU+k0ZGBK1DRQWoOwfxS0xwI -8De1c3d95ySwjqjQn9rHlYDfMDTHct1kbyjVx+8EZyA ---- neht26C0cEHeTGVa+epEwoO+oqXvyO94xwp25zAX6wY -DN+VU8ؼQvҐA~+āLw`EXfV0@qHj -RGOY -.?D9O[%\ \ No newline at end of file +-> ssh-ed25519 1MUEqQ QbrQLCnwsw79a0fjmKK0nSHl6n/+qRGg9E2vwufiCDM +z7SiyeLgJK7ueDyox4eXLxYNjJUPD2N4V+2IyV6Yibc +-> ssh-ed25519 rJoYaw jn0foZgtavsFhVVoXKHkp+1ZU1SeFqkff2D89I5k3iQ +YA58TNYkEhBvNHuSBfZv1uxaeJoQ1T4Wb+VswWgi5ck +--- crnhqJNO+eMBMgAgJjQsS0EOxee/UazYlssOXxlcp1g +U$1ȱ{il_ yG)(D\Y`2/lƢwnOC \ No newline at end of file diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 3bc5281..10520da 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -26,10 +26,7 @@ concatMapAttrs { forgejo-database-password = [ vm02116 ]; forgejo-email-password = [ vm02116 ]; - forgejo-runner-token = [ - vm02179 - vm02186 - ]; + forgejo-runner-token = [ fedi300 ]; wiki-basicauth-htpasswd = [ vm02187 ]; wiki-password = [ vm02187 ]; wiki-smtp-password = [ vm02187 ];