Skip to main content

Installation

The easiest method for installing Kraken is based on Docker and Docker Compose.

Pre-requisites#

There are several things that are required to run Kraken. In short:

  • Linux-based operating system
  • Docker Engine and Docker Compose

The operating system must be Linux based. Kraken was tested on Ubuntu 20.04 but other distributions should be ok.

The next thing is Docker. Docker Compose is used to spawn all the Kraken services. These services are described in Architecture chapter.

Kraken Download#

Kraken installation artifacts can be downloaded from Kraken GitHub releases page. There 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

Docker Compose file is using pre-built Kraken container images. On first run, it will download and install Kraken image and all required dependencies.

Download these 2 files to your local machine that will host Kraken services. Put them in the same folder.

Kraken Configuration#

kraken-X.Y.env file contains Kraken basic configuration that is required to start Kraken services. Default content of this file looks as follows:

File

POSTGRES_USER=kraken
POSTGRES_PASSWORD=kk123
POSTGRES_DB=kraken
MINIO_ACCESS_KEY=UFSEHRCFU4ACUEWHCHWU
MINIO_SECRET_KEY=HICSHuhIIUhiuhMIUHIUhGFfUHugy6fGJuyyfiGY
KRAKEN_REDIS_ADDR=redis
KRAKEN_DB_URL=postgresql://kraken:[email protected]:5432/kraken
KRAKEN_CLICKHOUSE_PORT=9001
KRAKEN_CLICKHOUSE_ADDR=clickhouse-proxy:9001
KRAKEN_CLICKHOUSE_URL=http://clickhouse:8123/
KRAKEN_SERVER_PORT=6000
KRAKEN_SERVER_ADDR=server:6000
KRAKEN_PLANNER_URL=http://controller:7997/
KRAKEN_UI_PUBLIC_PORT=8080
KRAKEN_MINIO_PORT=9999
KRAKEN_MINIO_ADDR=minio:9999

Configuration of ClickHouse#

ClickHouse is used to store logs from all Kraken services and from jobs execution.

These parameters are used when ClickHouse is run internally in Docker together with Kraken services from the same Docker Compose file. It is possible to set up ClickHouse externally to Kraken services on another machine.

No specific configuration.

Configuration of Minio#

MinIO is object storage database with API compatible with AWS S3. It is used in Kraken to store build artifacts, cache files and Git repositories bundles.

These parameters are used when MinIO is run internally in Docker together with Kraken services from the same Docker Compose file. It is possible to set up MinIO externally to Kraken services on another machine.

ParameterDescription / Default value
MINIO_ACCESS_KEYAccess key to MinIO
Default: UFSEHRCFU4ACUEWHCHWU
MINIO_SECRET_KEYSecret key to MinIO
Default: HICSHuhIIUhiuhMIUHIUhGFfUHugy6fGJuyyfiGY

Configuration of PostgreSQL database#

PostgreSQL is used to store all relational data of Kraken, mainly related to jobs planning, execution and reporting.

These parameters are used when PostgreSQL is run internally in Docker together with Kraken services from the same Docker Compose file. It is possible to set up PostgreSQL externally to Kraken services on another machine.

ParameterDescription / Default value
POSTGRES_USERUser name used to access PostgreSQL database
Default: kraken
POSTGRES_PASSWORDPassword used to access PostgreSQL database
Default: kk123
POSTGRES_DBName of the Kraken's PostgreSQL database
Default: kraken

Configuration of Kraken services#

ParameterDescription / Default value
KRAKEN_REDIS_ADDRLocation of Redis in address:port form
Default: redis
KRAKEN_DB_URLURL of the Kraken's PostgreSQL database
Default: postgresql://kraken:[email protected]:5432/kraken
KRAKEN_CLICKHOUSE_PORTPort of ClickHouse Proxy for collection logs, should be the same as in KRAKEN_CLICKHOUSE_ADDR
Default: 9001
KRAKEN_CLICKHOUSE_ADDRLocation of ClickHouse Proxy
Default: clickhouse-proxy:9001
KRAKEN_CLICKHOUSE_URLURL to ClickHouse, it is used to query ClickHouse database
Default: http://clickhouse:8123/
KRAKEN_SERVER_PORTPort of Kraken API Server, should be the same as in KRAKEN_SERVER_ADDR
Default: 6000
KRAKEN_SERVER_ADDRLocation of Kraken API server in address:port form
Default: server:6000
KRAKEN_PLANNER_URLURL of Kraken Planner
Default: http://controller:7997/
KRAKEN_UI_PUBLIC_PORTPublic port of Kraken's web UI that is exposed to users.
Default: 8080
KRAKEN_MINIO_PORT Port of MinIO, should be the same as in KRAKEN_MINIO_ADDR.
Default: 9999
KRAKEN_MINIO_ADDRLocation of MinIO in address:port form
Default: minio:9999

Most of these variables do not have to be altered. By default all services are defined in one Docker Compose file and they communicate with each other internally. Still, it is possible to divide these services into a few groups and host them on separate machines. This allows for handling bigger load by Kraken. The most common approach for dividing services is putting PostgreSQL database, ClickHouse database and MinIO on separate machines. Going further it is possible to setup Kraken API Server on a separate machine and even put several instances of them to handle and load-balance huge load of API requests.

Kraken Start#

After downloading Docker Compose and .env files and tweaking them if needed, Kraken services can be started by:

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

where:

  • -f indicates Docker Compose file
  • up spins up all Kraken services
  • -d runs Docker Compose in detached mode i.e. in background

Check if all started correctly:

docker-compose -f kraken-docker-compose-X.Y.yaml ps

If all is ok then now it is possible to check Kraken web page: http://localhost:8080

There are two built-in users: demo/demo and admin/admin.

Kraken Stop#

Kraken services can be stopped with a command:

docker-compose -f kraken-docker-compose-X.Y.yaml down

In case the services can't be gracefully stopped or need to be shut down immediately, they can be killed with a command:

docker-compose -f kraken-docker-compose-X.Y.yaml kill

Next Steps#

Now there are s everal steps that can be done: