Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nanmu42/tart
A toy Gitlab CI Runner backed by Firecracker MicroVM | 基于Firecracker MicroVM的玩具Gitlab CI Runner
https://github.com/nanmu42/tart
firecracker firecracker-microvms gitlab gitlab-ci gitlab-runner go golang
Last synced: 3 months ago
JSON representation
A toy Gitlab CI Runner backed by Firecracker MicroVM | 基于Firecracker MicroVM的玩具Gitlab CI Runner
- Host: GitHub
- URL: https://github.com/nanmu42/tart
- Owner: nanmu42
- License: mit
- Created: 2022-10-24T15:38:57.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-02-14T03:06:56.000Z (almost 2 years ago)
- Last Synced: 2024-10-23T08:27:17.506Z (3 months ago)
- Topics: firecracker, firecracker-microvms, gitlab, gitlab-ci, gitlab-runner, go, golang
- Language: Go
- Homepage:
- Size: 89.8 KB
- Stars: 106
- Watchers: 5
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
**English** | [中文](https://jihulab.com/nanmu42/tart/-/blob/master/README_zh-cn.md)
# Tart
[![GoDoc](https://godoc.org/github.com/nanmu42/tart?status.svg)](https://godoc.org/github.com/nanmu42/tart)
[![Build status](https://jihulab.com/nanmu42/tart/badges/master/pipeline.svg)](https://jihulab.com/nanmu42/tart/-/pipelines)
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](https://jihulab.com/nanmu42/tart/-/jobs/4980020).
Features:
* Fun!
* Uses [Firecracker](https://firecracker-microvm.github.io/) 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 logsIt'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`:
```bash
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
```bash
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].