Skip to content

UCL-ARC/terraform-gha-runners-k8s

Repository files navigation

terraform-gha-runners-k8s

Warning

This repository is a work in progress

  • Ephemeral, auto-scaling GitHub Actions runners on Kubernetes.
  • Installs actions-runner-controller on Kubernetes via Terraform.

Usage

This repository contains terraform for deploying a k3s cluster on EC2 instances which can be used to test the actions-runner-controller deployment.

Create a .env file

Create a .env file from .env.sample. Terraform variables (e.g. TF_VAR_x) will be prompted for if unset.

Required variables

  • REPOSITORIES: A comma seperated list of repositories e.g. octo-org/octo-repoA,octo-org/octo-repoB

Deploy

make ec2-k3s         # Deploy the k3s cluster
make ec2-k3s-ssh     # SSH onto the server instance
make gha-runners     # Deploy the GitHub runners
kubectl get pods -A  # Check the runner pods are up

Modules