From 4801433ae0f6436ff260e60799439318aebc290e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=E2=80=9CNiols=E2=80=9D=20Jeannerod?= Date: Tue, 17 Jun 2025 16:34:29 +0200 Subject: [PATCH] Get rid of the need for `deployer.pub` (#385) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The tests still work because we manually write the deployer's public key in `/root/.ssh/authorized_keys` on the target machines. In itself, however, the configuration that we push does not allow the deployer to push anything on the target machines. Context: https://git.fediversity.eu/Fediversity/Fediversity/pulls/361#issuecomment-7857 Reviewed-on: https://git.fediversity.eu/Fediversity/Fediversity/pulls/385 Reviewed-by: kiara Grouwstra Co-authored-by: Nicolas “Niols” Jeannerod Co-committed-by: Nicolas “Niols” Jeannerod --- deployment/check/cli/deployer.pub | 1 - deployment/check/common/nixosTest.nix | 1 - 2 files changed, 2 deletions(-) delete mode 100644 deployment/check/cli/deployer.pub diff --git a/deployment/check/cli/deployer.pub b/deployment/check/cli/deployer.pub deleted file mode 100644 index 2303ffcb..00000000 --- a/deployment/check/cli/deployer.pub +++ /dev/null @@ -1 +0,0 @@ -## This is a placeholder file. It will be overwritten by the test. diff --git a/deployment/check/common/nixosTest.nix b/deployment/check/common/nixosTest.nix index ceec2726..aa91ae2e 100644 --- a/deployment/check/common/nixosTest.nix +++ b/deployment/check/common/nixosTest.nix @@ -119,7 +119,6 @@ in with subtest("Configure the deployer key"): deployer.succeed("""mkdir -p ~/.ssh && ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa""") deployer_key = deployer.succeed("cat ~/.ssh/id_rsa.pub").strip() - deployer.succeed(f"echo '{deployer_key}' > ${config.pathFromRoot}/deployer.pub") ${forConcat config.targetMachines (tm: '' ${tm}.succeed(f"mkdir -p /root/.ssh && echo '{deployer_key}' >> /root/.ssh/authorized_keys") '')}