Skip to content

Kraken Docker Linux Installation

Prerequisites

Docker

Kraken runs on Docker. Please install at least Docker CE version 18.09.6. Instructions for Ubuntu (and other Linux distributions) can be found on Docker's Linux installation manual page.

Docker-compose

Please install at least docker-compose version 1.23.1. Instructions can be found on Docker's docker-compose installation manual page.

Warning

Kraken's script runs docker-compose as a non root user. So please follow the post installation instructions to manage Docker as a non-root user.

Download Instructions

Kraken is packaged as a zip archive that contains:

  • A kraken.sh start script,
  • An uninstall.sh script,
  • Configuration files for docker-compose and its various docker components.

Please download and extract the latest version of Kraken by OctoPerf.

Warning

Kraken's host data folder is passed as an environment variable to the application.

Do not install Kraken in a path that contains special characters.

Installation Instructions

In the extracted archive folder, execute the kraken.sh script as a non-root user.

This scripts:

  • Upates your /etc/hosts file to make the host kraken-local point to your public local IP,
  • Initializes some environment variables,
  • Then runs docker-compose up using the included docker-compose.yml file.

Once every Docker container has started, you can:

Post Installation Instructions

When Kraken is running, a folder named data should be created in the installation directory.

This data folder contains all default Gatling scripts and configuration files. You can synchronize it on Git or any other version-control system to keep track of your work.

Note

The content of the data folder is only initialized if it is empty.

Execute the command docker-compose down to remove Kraken's Docker containers. Next time you run ./kraken.sh, the data folder content will be kept.

Info

If you wish to completely remove Kraken from your system, simply run the uninstall.sh script. It will stop and remove all Docker containers and clear the data folder.

Customize Kraken Installation

This section describes the configuration files included in the Kraken .zip archive. It provides a guide in case you need to customize your installation.

Shell Script

The kraken.sh exports several environment variables:

  • KRAKEN_VERSION: The kraken version, checkout the download page to list all available version,
  • KRAKEN_HOST_UID and KRAKEN_HOST_UNAME: The host user id and name, used to run Docker containers using the same user that started Kraken,
  • KRAKEN_HOST_GID and KRAKEN_HOST_GNAME: The host group id and name, used to run Docker containers using the same group that started Kraken,
  • KRAKEN_HOST_DATA and KRAKEN_DATA: Used to map the data folder inside the started Docker containers to the host machine data folder.

These variables are used when starting the Kraken stack using docker-compose.

Docker Compose File

The docker-compose.yml configuration file defines the whole Docker stack for Kraken:

It contains a network named kraken, used for cross-container communication, and defines several containers:

The following diagram explains the whole stack:

Kraken Architecture

Note

Communication between Docker containers is often done using their names. For example, the kraken-backend calls the Grafana API using the http://kraken-granfa:3000 hostname.

The frontend applications always use HAProxy to make API calls.

Grafana Configuration

The grafana folder contains the Grafana Docker container configuration:

Note

The default admin password for Grafana is kraken. You can change it in the env.grafana file, key GF_SECURITY_ADMIN_PASSWORD.

InfluxDB Configuration

The influxdb folder contains the InfluxDB Docker container configuration:

Note

The default admin and user credentials are defined in the env.influxdb file:

  • INFLUXDB_ADMIN_USER=admin
  • INFLUXDB_ADMIN_PASSWORD=kraken

HAProxy Configuration

The haproxy.cfg defines the configuration for HAProxy, used to serve the Kraken stack on port 80.

It redirects the following /api path to the backend server kraken-backend:8080.

It also redirects these paths for the frontend applications:

  • /administration to kraken-administration-ui:80,
  • /gatling to kraken-gatling-ui:80,
  • /grafana to kraken-grafana:3000,
  • /doc to kraken-documentation:80,
  • /auth to kraken-keycloak:80.

KeyCloak Configuration

The keycloak folder contains the KeyCloak Docker container configuration:

  • imports/kraken-realm.json: Kraken realm import.

Warning

The Kraken realm configuration is static (client ids and secrets, default admin login and passwords, etc.).

So the installation of the Docker version of Kraken is unsecured and suitable only for local testing.

To deploy Kraken on a public URL please consider using a Kubernetes cluster.