Local

This section describes how to deploy and host a Hydra Dashboard server using Docker. The Dashboard can be deployed either locally or on a shared server.

Installation via sbt

If you're using sbt the local Dashboard instance should be running at localhost:3000. You can also create a default docker-compose file with hydraConfigureLocalDashboard or run the dashboard with hydraStartLocalDashboard:

sbt:root> hydraStartLocalDashboard
[info] Running:
[info] STORAGE=/Users/dragos/.triplequote/metrics/dashboard/hydra-metrics-db docker-compose up -d
[info] (in directory /Users/dragos/.triplequote/metrics/dashboard)
dashboard_influxdb_1 is up-to-date
dashboard_server_1 is up-to-date
dashboard_grafana_1 is up-to-date
[info]
[info] Hydra Dashboard started successfully. Open http://localhost:3000 to start using it.
sbt:unused>

Note

hydraStartLocalDashboard will create a docker-compose.yml file if none exists, but won't override an existing one.

Local deployment

First, you'll need a directory where your data will be stored. For instance, .triplequote/dashboard/hydra-metrics-db

$ mkdir -p ~/.triplequote/dashboard/hydra-metrics-db

Next, create a docker-compose.yml file with the following contents:

version: "2"

services:
    influxdb:
        image: influxdb:1.7.6
        ports: ["8086:8086"]
        volumes: ["${STORAGE}:/var/lib/influxdb/"]
        networks: ["sandbox"]

    grafana:
        image: triplequote/dashboard_grafana:1.1.2
        ports: ["3000:3000"]
        networks: ["sandbox"]
        depends_on: ["influxdb"]

    server:
        image: triplequote/dashboard_server:1.1.2
        ports: ["3333:3333"]
        networks: ["sandbox"]
        depends_on: ["influxdb"]
        command: "-Dtriplequote.dashboard.server.datastore.influxDB.url=http://influxdb:8086"

networks:

  sandbox:
    driver: bridge

Now open a terminal and cd to the folder containing the docker-compose.yml file. Then, run docker-compose as follows:

$ STORAGE=./hydra-metrics-db docker-compose up -d
Creating docker_influxdb_1 ... done
Creating docker_grafana_1  ... done
Creating docker_server_1   ... done

Congratulations! You have successfully installed the Hydra Dashboard on your computer. Open http://0.0.0.0:3000/ in your preferred browser and you should see the Trends dashboard:

InfluxDB on Windows

When using Windows influxdb might fail to properly start with Docker because it can't mount external volumes. This is a known problem (here is the related ticket). The good news is that a fix for this problem was recently merged and it will be included in the upcoming influxdb 1.6.0 release. Until then, download and install influxdb v1.5 on your Windows host and remove the influxdb service from the docker-compose.yml file before running it.

Dashboard Trends empty

Continue by jumping to the Metrics service section to learn more about how metrics are collected and pushed to the Dashboard.

In case something went wrong, make sure the ports mentioned in the docker-compose file are free (3000, 3333 and 8086) and check the Troubleshooting section.