English | 中文
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.
Tart runs in a Linux environment with access to /dev/kvm
:
sudo setfacl -m u:${USER}:rw /dev/kvm
- Download binaries of Tart and Firecracker from release page and put them into
$PATH
- Download rootFS and Linux kernel from release page and put them into a working directory, such as
~/tart
- Create network for microVMs, refer to
rootfs/setup-tuntap.sh
cd ~/tart
- Register Tart as your project CI runner:
tart register --endpoint https://gitlab.example.com --token your_token_here > tart.toml
- Run Tart:
tart run
- Trigger CI job on Gitlab. You may have to disable shared runner to ensure CI jobs are scheduled to Tart
- Watch Tart working(or exploding)
make
The binary can be found under bin
directory.
To compile Linux kernel and build rootFS, refer to rootFS
directory.
I like egg tarts.
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].