Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Docker Setup

Alexander Dubrawski edited this page Aug 20, 2020 · 37 revisions

Install Docker

Ubuntu

Please refer to https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-18-04

On Ubuntu you also need to install docker compose separately: apt install docker-compose

Mac

Please refer to https://docs.docker.com/docker-for-mac/install/

Windows

Please refer to https://docs.docker.com/docker-for-windows/install/

Basic Usage

To get a better understanding of how docker is working I recommend the following training: https://training.play-with-docker.com/dev-stage1/

Inside the docker setup we have five Images:

  • backend
  • frontend
  • influxdb
  • hyrise_1
  • hyrise_2

The hyrise images are based on the same base image.

Running Setup on the local machine

If you are running the cockpit and your browser all on the local machine you can run:

docker-compose up

to build and start all images. If you just want to run the cockpit components in docker you can use:

docker-compose up backend frontend influxdb

If you want to run the containers in the background use the -d flag:

docker-compose up -d

The frontend will be reachable over 127.0.0.1:5000

Running Setup on server or VM

If you run the setup on a remote server or VM you need to build the frontend explicitly. The reason is that you need to set the address off the machine in build time. So if your server has the address 123.123.123.123 you need to set the VUE_APP_BACKEND_HOST environment variable by running:

docker-compose build --no-cache --build-arg VUE_APP_BACKEND_HOST=123.123.123.123 frontend

After that you can run:

docker-compose up

to start the components

The frontend will be reachable over 123.123.123.123:5000

Build hyrise image

If you use docker-compose up, docker will lock if an hyrise image exists. If not it will pull it from docker hub. This image is optimized to run on most architectures. If you want to use an optimized hyrise for your architecture you can build the image manually. For that run:

docker image build --no-cache --tag hyrise/bp1920:hyrise ./hyrise

After that you can run:

docker-compose up

to start the components.

Add a hyrise in the frontend

If the hyrise is not running in docker you can add it in the frontend UI the normal way (click on database, click on add database, enter host and port). For example, your hyrise is running at the machine with the IP 123.123.123.123 on port 1234 you can enter: host: 123.123.123.123 port: 1234

Please remember: if you are using a not dockerized hyrise you need to have the cached tables in the location /usr/local/hyrise you can download the files via https://www.dropbox.com/s/sseekrbu1i6o96n/cached_tables.tar.xz?dl=0

If you use the hyrise in the docker containers you can add them in the fronted UI (click on database, click on add database, enter host and port) with:

host: hyrise_1 port: 5432

and

host: hyrise_2 port: 5432

You need to use the container names because docker containers can just communicate over their names.

Quick fixes

If docker throws an error with the hyrise containers, try to build it manually with:

docker image build --no-cache --tag hyrise/bp1920:hyrise ./hyrise

Clone this wiki locally