From b5abd4606c457530a36d1c5b09b68d06effb8fc9 Mon Sep 17 00:00:00 2001 From: Pascal Grange Date: Thu, 16 Mar 2023 16:50:34 +0100 Subject: [PATCH] Explain how to setup a new runner for the project --- .github/workflows/README.md | 55 +++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/README.md diff --git a/.github/workflows/README.md b/.github/workflows/README.md new file mode 100644 index 00000000000..8535182295c --- /dev/null +++ b/.github/workflows/README.md @@ -0,0 +1,55 @@ +This explains how to install a cardano runner for the Hydra project. + +This runner is used by our smoke-tests and allows us to keep on disk +an, as up to date as possible, cardano-node database. + +# prepare pre-requisites + +Install the following pre-requisites: +* git + +For instance on Debian: +```bash +sudo apt install git +``` + +Prepare the common directory for cardano database: +```bash +sudo mkdir -p /srv/var/cardano +sudo chown /srv/var/cardano "$(whoami)" +``` + +# Add the server as a github runner + +In the project settings, go to Actions/Runners and click on [New self-hostd runner](https://github.com/input-output-hk/hydra/settings/actions/runners/new) and follow the procedure. + +:warning: When asked, add the following label to this runner: `cardano` + +# Customize github runner for nix + +So that the jobs can find nix later, you should customize the runner settings by adding some +variables to the `.env` file: + +```bash +cat <>$HOME/actions-runner/.env +PATH=$HOME/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/bin:/usr/bin:/bin +NIX_PROFILES="/nix/var/nix/profiles/default $HOME/.nix-profile" +NIX_SSL_CERT_FILE="/etc/ssl/certs/ca-certificates.crt" +EOF +``` + +# Install github runner as a systemd unit + + +So that github runner runs as a daemon on the machine, [install it](https://docs.github.com/en/actions/hosting-your-own-runners/configuring-the-self-hosted-runner-application-as-a-service): + + +```bash +sudo ./svc.sh install +``` + +You can now start the service: + +```bash +actions.runner.input-output-hk-hydra.to-remove.service +```