Coder Social home page Coder Social logo

xiiapp / tart Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nanmu42/tart

0.0 0.0 0.0 91 KB

A Toy Gitlab CI Runner backed by Firecracker MicroVM | 基于Firecracker MicroVM的玩具Gitlab CI Runner

License: MIT License

Shell 6.34% Go 92.95% Makefile 0.71%

tart's Introduction

English | 中文

Tart

GoDoc Build status

Tart is an educational purpose, unofficial Gitlab Runner, implementing a subset of functionality of Gitlab Runner as experiments and demonstration.

For Example, Tart can run its own CI job, in which its unit tests are executed and its binary got compiled.

Features:

  • Fun!
  • Uses Firecracker and /dev/kvm. Every job runs in a "microVM" that boots under 2 seconds. Tart might be the first example to combine Gitlab runner and Firecracker
  • The codebase is relatively small at around 2000 lines(empty lines included) and the core functionality of Gitlab Runner is implemented: polling jobs, execution in isolation environment, submition of job state and logs

It's a toy runner and functionality like artifact uploading and services are not supported. In other words, don't use it in production.

Usage

Tart runs in a Linux environment with access to /dev/kvm:

sudo setfacl -m u:${USER}:rw /dev/kvm
  1. Download binaries of Tart and Firecracker from release page and put them into $PATH
  2. Download rootFS and Linux kernel from release page and put them into a working directory, such as ~/tart
  3. Create network for microVMs, refer to rootfs/setup-tuntap.sh
  4. cd ~/tart
  5. Register Tart as your project CI runner: tart register --endpoint https://gitlab.example.com --token your_token_here > tart.toml
  6. Run Tart: tart run
  7. Trigger CI job on Gitlab. You may have to disable shared runner to ensure CI jobs are scheduled to Tart
  8. Watch Tart working(or exploding)

Compile

make

The binary can be found under bin directory.

To compile Linux kernel and build rootFS, refer to rootFS directory.

What's with the name?

I like egg tarts.

License

MIT

Licenses of work of third parties lies at THIRD_PARTY_LICENSES.md.

The tart photo in the logo is from Ashley Byrd on Unsplash. Gopher is generated at [gopherize.me].

tart's People

Contributors

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