-
Notifications
You must be signed in to change notification settings - Fork 3
Docker Setup
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
Please refer to https://docs.docker.com/docker-for-mac/install/
Please refer to https://docs.docker.com/docker-for-windows/install/
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.
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 via. 127.0.0.1:5000. The backend via. 127.0.0.1:8000.
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. The backend via. 123.123.123.123:8000.
To stop and remove the running containers execute the command:
docker-compose down
To stop and remove a specific container, for example, the frontend run:
docker-compose down frontend
If you use docker-compose up
, docker will look if a 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.
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. You can uncompress and unpack the file with tar -xf cached_tables.tar.xz
.
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.
- 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
- If you have problems building the hyrise image try to reduce the threads for make: for example, if the default four threads are too many and you want to change it to two adjust the line
&& make hyriseServer -j 4 \
in the docker file (inhyrise/Dockerfile
) to&& make hyriseServer -j 2 \
.