Cirrus CI Stack

Usually it’s advised for a startup to launch as soon as possible and usually it means as hacky as possible. If a startup survives further down the road, tech debt is just growing and there is never time to fix it. It’s just like a snow ball.

When we started building Cirrus CI we decided to not compromise and to built it the right way from day one. Here is a very high-level overview of what we’ve used to build Cirrus CI.

At the moment Cirrus CI is a set of 20 micro-services all written in Kotlin language. With Kotlin we can benefit from the enormous JVM ecosystem of tools and libraries without sacrificing pleasure of writing code.

GRPC is used for communication between all services. GRPC provides fast, safe and backward compatible way to manage communication between services. GRPC also supports streaming and has implementations for many languages which we use for our agent written in Go (more details about the agent below).

All of the micro-services are living in a single repository. It’s a single Gradle multi-project with almost 200 sub-projects. We built everything with Gradle thanks to awesome plugins ecosystem. Starting with Docker containers and finishing with Go binaries for multiple platforms.

Diagram of core Cirrus CI services

All of the micro-services are orchestrated by Kubernetes and hosted by Google Kubernetes Engine. Beside many other benefits Kubernetes really nailed an abstraction for services which makes developing micro-services enjoyable. We actively using auto-scaling for our GKE clusters and containers inside of these clusters. GKE also powers Community Cluster which is used by Open Source Community.

Cirrus CI Agent that sits inside of a Docker Container or a Virtual Machine is written in Go. Go allows to produce static binaries for all major platforms. These binaries are self-contained and doesn’t require any libraries to be installed in a Docker Container or a Virtual Machine. Cirrus CI Agent uses GRPC to stream results of execution.

Cirrus CI Front End is written using Relay Framework. Since Cirrus CI exposes only GraphQL API and overall Cirrus CI Front End is a really thin client, Relay became an obvious choice. Relay manages data fetching and storing. Relay also updates corresponding React components on any changes to relative data objects.

This was a brief overview of technologies that power Cirrus CI. More detailed posts about particular parts of the stack are coming in the near future. Stay tuned and please follow us on Twitter for future updates.