Add docs to setup aarch64 runner

This commit is contained in:
Ayaz Salikhov
2022-07-04 20:44:12 +04:00
parent aad4f22f41
commit ad4670b171
3 changed files with 35 additions and 0 deletions

23
aarch64-runner/setup.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/bash -e
GITHUB_RUNNER_USER="runner-user"
if [ "$EUID" -ne 0 ]; then
echo "Please run as root"
exit 1
fi
apt-get update --yes
apt-get upgrade --yes
echo "Creating runner-user, who will run GitHub Actions runner"
adduser --disabled-password --gecos "" ${GITHUB_RUNNER_USER}
echo "Setting up python3"
apt-get install --yes --no-install-recommends python3
curl -sS https://bootstrap.pypa.io/get-pip.py | python3
echo "Setting up docker"
apt-get install --yes --no-install-recommends docker.io
usermod -aG docker ${GITHUB_RUNNER_USER}
chmod 666 /var/run/docker.sock

View File

@@ -31,6 +31,7 @@ Table of Contents
:maxdepth: 2 :maxdepth: 2
:caption: Maintainer Guide :caption: Maintainer Guide
maintaining/aarch64-runner
maintaining/tasks maintaining/tasks
.. toctree:: .. toctree::

View File

@@ -0,0 +1,11 @@
# Creating aarch64 self-hosted GitHub runner
For `aarch64` runners, we have self-hosted VMs, provided by [Oracle OCI](https://www.oracle.com/cloud/).
To setup new runner, please:
1. Create an Oracle `VM.Standard.A1.Flex` with `1 OCPU` and `4 GB` using `Ubuntu 22.04` image.
2. Run: `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/mathbunnyru/docker-stacks/asalikhov/new_build_system/aarch64-runner/setup.sh)"`
This will perform initial runner setup and create a non-root user `runner-user`.
3. Setup new GitHub Runner with this user: <https://github.com/jupyter/docker-stacks/settings/actions/runners/new>
4. Run under `root` user in Runner directory: `./svc.sh install runner-user`