Kraken CI, New Kid on the CI Block
Tags: ci, cd, buildautomation
Published: 2021-04-30 08:41:39

[Kraken CI](https://kraken.ci) is a new Continuous Integration tool. It is a modern, open-source, on-premise CI/CD system that is highly scalable and focused on testing. It is licensed under Apache 2.0 license. Its source code is available on [Kraken CI GitHub page](https://github.com/kraken-ci/kraken).

The main features of the system are:

- flexible workflow planning using Starlark/Python
- distributed building and testing
- various executors: bare metal, Docker, LXD
- highly scalable to thousands of executors
- sophisticated test results analysis
- email and Slack notifications

### 1. Download Kraken Files for Docker Compose

Download configuration files for Docker Compose from [Kraken GitHub releases page](https://github.com/Kraken-CI/kraken/releases).
They are:

- **kraken-docker-compose-X.Y.yaml** - a services configuration file for Docker Compose
- **kraken-X.Y.env** - an example configuration for Kraken services that is used by Docker Compose file

### 2. Start Kraken Services

In a terminal, in the folder where downloaded files are located, run:

```console
docker-compose --env-file kraken-X.Y.env -f kraken-docker-compose-X.Y.yaml up
```

Now you should see lots of logs. They will not stop. First, Docker
images are downloaded, and then services are started.

![Logs after starting docker-compose](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/034ed3wyxqwgv6jt2fn5.png)

Try to get to the web page on [http://localhost:8080](http://localhost:8080).

### 3. Log In

On the main page, log in as admin using `admin/admin` credentials.

![Login page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4x26abuhrx5jl5cuz0dx.png)

After logging in, the dashboard page will appear. It shows tiles with
projects and their branches.  There is already a prepared project
called `Demo`.

But first, a built-in agent that will be executing jobs needs to be
authorized.

### 4. Authorize Agent

Go to the menu Agents -> Discovered. The Discovered Agents page shows
agents that try to connect to the Kraken server but were not yet
authorized by an admin.

![Dashboard page and a menu to Discovered Agents](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pzxgxy0cd48ihj78yu7i.png)

Select the checkbox and click the `Authorized` button.

Now we can go back to the main page (the dashboard) and explore
`Demo` project. Click on the Kraken logo in the top left corner.

### 5. The First Project and its Branch

Click the cog icon on the right side of `Project Demo`. It leads to
the project settings page.

![Dashboard page and a cog link to project settings page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bo2qhjsf81olwo0cciwq.png)

On the project page, there is a list of branches. Let's go to the
already prepared `Master` branch:

![Project settings page and a link to branch page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nfhzllbxxh21qhjq26zq.png)

On the branch page, there is a defined workflow that consists of stages.

![Branch page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/40fly35p0xzvuxo0z5bf.png)

On the screen, on the left, there is visible one stage, `Tests`. The
right side presents details of this stage. The black box shows the
critical part of the stage: it is a workflow schema that is written in
Starlark/Python.

Currently, the stage's workflow pulls a sample project from
https://github.com/Kraken-CI/sample-project-python.git and then run
`pytest` tests.

### 6. Trigger the First Flow

Click the `Run CI Flow` button to trigger the first flow of the branch
workflow, and then confirm it by clicking the `Submit` button.

The next page shows triggered flow details.

![Flow page and a link to Stage Run page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rpozn9pwqsai44usvimz.png)

On the left side, there is a list of runs of stages (currently there is
only one run: `Tests`), and on the right, there are details of this
stage run. All is green, so it means that all completed successfully.

### 7. Results of The Run

Click the `Tests` run link to get to results of the run.

![Run page and Jobs tab](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2rc61q2vvy59imzecnhl.png)

The first tab, Jobs, on the run results page, shows a list of executed
jobs. Our job was pretty quick, so we see the final results. If a
job takes more time, then here will be presented its live status and
logs.

The next tab, Test Results, presents a table with test cases and their
status (passed, failed, etc.).

![Run page and Test Results tab](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rymreichu4sajgpv5irk.png)

We may conclude the quick start guide here. We encourage you to try
play with the workflow schema and check what can be accomplished more.