Giter Club home page Giter Club logo

aws-batch-github-runner's Introduction

AWS Batch for self hosted GitHub action runners

Launch a self-hosted runner with the flag "--ephemeral" via AWS Batch.
It will be automatically terminated under any of the following conditions of the instance.

  • The processing of the first job is finished
  • I did not receive a job for a certain period of time after starting (default:120sec)

Configuration Diagram

Setup

Step1. fork repository

  • this repository fork

Step2. Create Github Personal access token

  • Note: github self hosted runner
  • Expiration: <Any>
  • Select scopes: repo

Step3. Regist Github Personal access token in AWS Secrets Manager

  • run terraform
$ cd regist-secret-key
$ terraform init
$ terraform plan
$ terraform apply
var.github_personal_access_token
  Enter a value: `<Github Personal access token>`
$ cd ..

Step4. Setup AWS Batch

  • run terraform
./generate-region.sh
$ cd terraform
$ terraform init
$ terraform plan
$ terraform apply
var.github_account
  Inputs github user or organization or '*'.

  Enter a value: 
var.github_repository
  Inputs repository or '*'.

  Enter a value: 
$ cd ..
  • memo Value of AWS_ROLE_ARN.

Step5. Regist Secret in GitHub repository

  • Key
    • AWS_ROLE_ARN
  • Value
    • <memo of Step4>

Step6. Build Github Self Hosted Runner

  • run .github/workflows/updateSelfHostRunner.yml on forked repository

Step7. test

  • run .github/workflows/hello.yml on forked repository

aws-batch-github-runner's People

Contributors

sakamoto66 avatar aii-koichi-sakamoto avatar

Stargazers

Chris L. avatar Alessandro Baccini avatar Tatsuro Fuchino avatar Tomáš Linhart avatar Hoàng Mạnh Tùng avatar Henry Vu avatar Nat Anderson avatar

Watchers

 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.