Giter VIP home page Giter VIP logo

actions-runners's Introduction

nf-core actions-runner logo.

Introduction

nf-core uses GitHub Actions to run continuous integration (CI) tests for every change on every repository. As we get bigger, the number of those tests increases and can start to overwhelm our free allowance at GitHub (20 concurrent jobs). This gets very annoying, as people need to wait quite a long time for jobs to run on their pull requests before they can be merged. The problem is particularly acute during events such as hackathons.

To get around this, we can create custom self-hosteed GitHub Actions runners to provide more compute power for the CI jobs. We do this on the nf-core AWS account, which is kindly funded by credits provided by AWS for our project.

Runners are created at the organisation level and share the same tags as the default GitHub runners. This means that all jobs may run on them, and they simply help to drain the job queue. They are automatically scaled up and down based using Philips-labs/terraform-aws-github-runner.

Requirements

  • Terraform
  • AWS account with permissions to create EC2 instances and IAM roles

Instructions

  1. Setup a org level GitHub app as described in Philips-labs/terraform-aws-github-runner.

  2. Create a terraform.tfvars file with the following variables:

github_app = {
    id = YOUR_ID
    key_base64 = BASE64_CONVERTED_KEY
}

Note

On MacOS you can create the base64 converted key with cat YOUR_PEM_KEY_FILE | base64 -w0

  1. Download lambda function dependencies with:
cd lambdas-download
terraform init
terraform apply
cd ..
  1. Run terraform init to initialize the terraform modules.

  2. Run terraform apply to set everything up.

Troubleshooting

  • Runners are not starting:

  • Check that the runs-on: value in the github action matches one of the values in labelMatchers in the linux-x64-ubuntu.yaml

  • Check in the settings of the Github App that they are installed and have the permission to run in the corresponding repository (click on the gear icon next to the installed app)

  • Stop using the self-hosted runners

    • Terminate all instances named multi-runner* on AWS
    • Remove all runners in the list of runners in the github settings.
    • deactivate the webhook in the Github settings for the app.
  • touch: .command.trace: Permission denied error: When running tests with Docker in self-hosted runners the user needs to be fixed. Add the following to the docker profile:

    docker.fixOwnership = true
    
    • nf-core/tools test:
      • Check the config file in the nf-test-tests branch from GitLab: modules-test/tests/config/nf-test.config
    • nf-core/modules tests:
      • tests/config/nextflow.config
      • modules/tests/config/nf-test.config

actions-runners's People

Contributors

apeltzer avatar mirpedrol avatar ewels avatar mashehu avatar

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.