Giter Club home page Giter Club logo

auto-scaling-github-runners-kubernetes-issueops's Introduction

setup-self-hosted-runner-kubernetes-cluster

awesome-runners

IssueOps example on how to set up an autoscaling, self-hosted runner fleet in kubernetes using summerwind/actions-runner-controller.

Watch a three minute demo to see what this project can do for you.

In order to setup or modify an auto-scaling runner set, just create an issue:

image

and /approve the Kubernetes config changes in the resulting pull request:

image

The resulting pull request also contains a workflow file snippet to test your newly created runner group:

image

Using custom images

In order to use your own Docker runner images, follow the suggestions here. The Dockerfile used to produce the default image for the issue template has been checked into this repository.

Setting up a copy of this IssueOps based repository

If you like to work directly with this repository, there is no further need but to follow the comments in the issues created by the template and the approved PR.

If you like to setup a copy of this repository somewhere else, you would need to install the actions-runner controller in a Kubernetes cluster as described here.

While most code in this IssueOps example has been written to be cloud agnostic, the part to authenticate to the cluster is currently specific to GCP. If you are also using GCP, set the following GitHub Action credentials to authenticate to the cluster:

  • CLUSTER_LOCATION: GCP cluster location where you setup the actions-runner controller
  • CLUSTER_NAME: GCP cluster name
  • GCP_SA_KEY: GCP service account with permissions to create new namespaces and objects within
  • PROJECT_ID: GCP project id of your cluster

If you are using a different cloud, you would only need to adjust the steps needed to get to the point where your runner can successfully execute kubectl commands - pull requests are welcome :octocat: ❤️

Needed issue labels

Last but not least, you would need to create two labels in the copy of this repository: self-hosted-runner-scale-set and delete-self-hosted-runner-scale-set

auto-scaling-github-runners-kubernetes-issueops's People

Contributors

jonico avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

auto-scaling-github-runners-kubernetes-issueops's Issues

Self-hosted runner scale set create/update request for dOcto-diego

Issue created by this issue template will create or edit the necessary Kubernetes configuration needed for a self-hosted runner scale set running in its own Kubernetes namespace operated by the summerwind/actions-runner-controller.

Please insert the runner configuration values in the JSON below. It is advised but not mandatory that you create a runner group with the name of your environment first to control which repositories have access to your runner scale set.

Because this setup is using a quite small Kubernetes cluster and we like to avoid process churn, please do not set the number of maxRunners per environment greater than 16.

{
  "environment": "docto-diego-runners",
  "organization": "docto-diego",
  "minRunners": "1",
  "maxRunners": "2",
  "runnerImage": "jonico/actions-runner:latest",
  "runnerGroup": "default",
  "dockerEnabled": "false",
  "cloud": "gcp"
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.