main

PASS Digital Ocean Deployment

This will document how to run PASS in Digital Ocean as Self-Hosted GitHub Runners.

Create Server

You will first need a linux server as your base OS with sudo privileges.

Going forward, the following scripts will be RUN ON THE SERVER, for example after you SSH into the box.

ssh <IP>

Install PASS Dependencies

On the server, you will need docker / docker-compose and pass-docker

The following script will install those dependencies (these should be run as sudo)

apt-get -y update
apt-get install -y gnupg2 pass docker-compose
mkdir -p /src
cd /src
git clone git@github.com:eclipse-pass/pass-docker.git
cd pass-docker
git checkout minimal-assets

Or, you can run this directly on your server

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/eclipse-pass/main/main/tools/github_runner/deps.sh)"

If the installation worked, then you can pull and run the application

cd /src/pass-docker && \
  docker-compose pull && \
  docker-compose up

Install GitHub Runner Scripts

If you also wanted to use this server as a self-Hosted GitHub Runners software then run

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/eclipse-pass/main/main/tools/github_runner/install.sh)"

Connect Server to GitHub Runner

You can then connect the server to GitHub using the following variables

PASSORG=eclipse-pass
GITHUB_RUNNER_TOKEN=ghp_abc123def456abc123def456abc123def456

To execute the following script.

(cd /opt/githubrunner && \
  sudo -u githubrunner ./config.sh \
    --unattended \
    --url https://github.com/${PASSORG}/pass-docker \
    --token $GITHUB_RUNNER_TOKEN \
    --name $NAME \
    --runnergroup default \
    --labels $NAME \
    --work pass-docker \
    --replace && \
  ./svc.sh install githubrunner && \
  ./svc.sh start)

These scripts to add.sh and remove.sh your server from GitHub Runner are available in /tools/github_runner.