How to install influxdb and grafana stack with VM and dockers - adbashir/NM_EPSCOR_TimeSeries_Supermarket_NTSS GitHub Wiki

IG Stack

Please follow these steps to setup IG stack. We will be running two separate containers, one for influxdb and other for grafana. We will be using Host IP and ports (In this case public IP and ports of VM ). We assume that you already have docker installed in your VM. The VM which we have been using is Ubuntu 18.04 LTS.

YML for docker compose

docker-compose comes with docker installation. It basically lets you define multiple docker containers configuration in one file and you can run it by using this command:

docker-compose -f docker-compose.yml up -d

Following is the content of docker-compose.yml:

grafana:
    image: matisq/grafana:latest
    ports:
        - 3000:3000
    links:
        - influxdb:influxdb
    environment:
        GF_SECURITY_ADMIN_USER: admin
        GF_SECURITY_ADMIN_PASSWORD: admin
        GF_SECURITY_SECRET_KEY: epscor
        GF_USERS_ALLOW_SIGN_UP: "true"
        GF_USERS_ALLOW_ORG_CREATE: "true"
        GF_AUTH_ANONYMOUS_ENABLED: "true"
        GF_AUTH_ANONYMOUS_ORG_NAME: epscor
        GF_DASHBOARDS_JSON_ENABLED: "true"
        GF_DASHBOARDS_JSON_PATH: /opt/grafana
    volumes_from:
        - grafana-data
    restart: always

influxdb:
    image: matisq/influxdb:latest
    ports:
        - 8083:8083
        - 8086:8086
    environment:
        INFLUX_DATABASE: "pyranometer"
        INLFUX_ADMIN_USER: "pyro"
        INFLUX_ADMIN_PASS: "pyro"
    volumes_from:
        - influxdb-data                                                                                                                                                                                 ```