Docker Container Deployment

How to install Databand on-premise by using Docker Compose.

This page describes how to run your Databand environment using Docker-compose.

This docker-compose spins up a fully-charged Databand installation with ready-to-use databases and a monitoring stack. Makefile is used to simplify the deployment with the relevant Docker-compose instruments (run make to see the full list of options).

Preparing for the Installation

Before installing Databand, prepare your server for the installation. Review the described system requirements and then install the required software. You will also need to obtain the required keys from the Databand team (use your dedicated Slack channel or email ([email protected])

System Requirements

  • Operating system: any Debian-based Linux OS. Ubuntu 20.4 is recommended.
  • CPU: minimum 4 CPU
  • Memory: minimum 16GB
  • Disk: 80 GB+
  • DB: Postgres 12.0+

Software and Tools Requirements

Deploy Databand Deployment Files

  1. Log in to the Databand's Docker registry.
  2. Clone the databand-deploy repository to the /opt/databand_deploy folder or use the existing one:
    • Run git clone https://gitlab.com/databand/databand-deploy.git.
    • When prompted, enter your GitLab username and password.
    • Check out the latest version at release branch release/v0.XX (change XX to the latest version)
docker login -u <GitLab Username> -p <GitLab Access Token> registry.gitlab.com 

git clone https://gitlab.com/databand/databand-deploy.git
git checkout release/v0.XX

Configuration

This installation is configured using the custom.env file. These are overrides for the .env file we have in the deployment directory.

This file will be loaded automatically if you run make or you can manually load it into your shell via set -a; source custom.env; set +a

Databand Service

You can control databand service via direct docker-compose commands or via make commands.

Your working directory is /opt/databand_deploy/databand. Make sure you change the directory every time you run any deployment-related command.

Start Databand Service

Run make up to start Databand.

make up

Upgrade Databand Service

|Docker-compose deployment upgrades lead to downtime. Perform it with caution.

  1. On the Databand server machine, go to the Databand deployment directory.
  2. Follow "Get/Update Databand Deployment Scripts" instructions from the section above.
docker login -u <GitLab Username> -p <GitLab Access Token> registry.gitlab.com 

git pull
git checkout release/v0.XX

You can stash and unstash your local changes if required.

  1. Run make upgrade. The following commands will be performed under the hood:
    3.1. make pull to fetch new docker images to local machine.
    3.2. make up-migrate to perform DB migration.
    3.3. make down to stop all containers.
    3.4. make up, to get Databand running again.

Congratulations! Databand is now successfully updated to the latest version.

Custom Version

Docker images are defined in the .env file:

To stop Databand, run docker-compose down.

To Access Databand Services

When Databand is successfully installed, you can access its services from your browser by using the following URL:
HTTP://<server_where_databand_is_installed>:
.

By default it's http://localhost:8080

  • Login: databand
  • Password: databand

SMTP configuration

To configure SMTP server for e-mail alerts, specify values for environment variables in .env file under # SMTP section:

DBND__ALERT__SMTP_EMAIL_FROM=<e-mail_address_from>
DBND__ALERT__SMTP_HOSTNAME=<smtp_server_hostname>
DBND__ALERT__SMTP_APIKEY_OR_USERNAME=<smtp_server_username>
DBND__ALERT__SMTP_TOKEN_OR_PASSWORD=<smtp_password_or_token>

[Optional] Configure a service user.

To configure a system user for Databand service:

  • Create the dbnd group (dbnd is used for system commands and environment configurations in Databand)
  • Create the dbnd user
  • Add dbnd user to the docker group
sudo groupadd -g 2010 dbnd
sudo useradd -m -d /home/dbnd -s /bin/bash -g dbnd -u 2010 dbnd
sudo usermod -G docker dbnd
sudo su - dbnd

Make sure that umask of your user is at least 022


What’s Next

After installing Databand, perform all post-installation configuration tasks.

Did this page help you?