Git Product home page Git Product logo

liquidmetal-microvm-action-runner's Introduction

microvm-action-runner

This is a POC service for creating on-the-fly self-hosted action runners on flintlock microvms.

Usage

Clone and build the binary:

git clone https://github.io/weaveworks-liquidmetal/microvm-action-runner
cd microvm-action-runner
make build

Start the service:

./microvm-action-runner start \
	--host <flintlock address and port> \
	--token <pat token>

# run --help for more flag options

# more flintlock hosts can be added with additional `host` flags
# eg, --host foo:9090 --host bar:9090
#     or --hosts foo:9090,bar:9090

Setup

  1. Start a flintlockd service. Note the address and port.

  2. Create a Github PAT token with repo scope.

  3. Start the service.

  4. Expose the service.

  5. Navigate to the repo/org/ent where you want to use these runners.

  6. Go to Settings then Webhooks.

  7. Select Add webhook.

  8. Fill in the Payload URL with your https url plus /webhook. eg: https://my-service.org/webhook.

  9. Change the Content type to be application/json.

  10. If you wish to set a plaintext secret, set that in the Secret field. Remember to restart the service with the --secret flag.

  11. For the question Which events would you like to trigger this webhook?, select Let me select individual events., then from the expanded options deselect Pushes, and select Workflow jobs.

  12. Click Add webhook.

Your service should now be ready to receive webhook requests from workflow jobs in that repo/org/ent.

Contributing / Local Development

  1. Fork the repo.

  2. Clone your fork.

  3. Run make test.

  4. Make your changes, ensuring there are new tests and everything passes.

  5. Manually test using ngrok (below). (Integration/acceptance tests are coming, for now we must manually verify).

  6. Open a PR.

Local testing

To check out the service without going to the effort of exposing the service properly, you can use ngrok. You can get a free plan as an individual.

After you have started your microvm-action-runner service, use ngrok to expose it:

ngrok http localhost:3000

Use the https endpoint generated by ngrok for your Payload URL when setting up the webhook.

liquidmetal-microvm-action-runner's People

Contributors

callisto13 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.