jontsnz / influx-test-env

Docker compose that creates an Influx 2 test environment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

InfluxDB Test Project

Setup a test environment running InfluxDB so that we can ingest some dummy water data and try out dashobard widgets and alerts.

Getting Started

For this project we are using InfluxDB 2.2

Prerequisites

You will need docker and docker-compose installed.

Installing

Use docker-compose to start the database running:

docker-compose up -d

For Windows, try:

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

Initial setup

There are two steps to get the initial database setup. First run a shell in the docker container:

docker-compose exec influxdb bash

Then run the setup script, which can be done interactively or in a single line:

# interactive
influx setup

# single line
influx setup --username admin --password admin --org TestOrg --bucket water-quality --retention 0 --force

You can test that you have set things up correctly by viewing the API tokens and listing the orgamisations:

# view API tokens
influx auth list

# list organisations
influx org list

Login and use system

Login to the InfluxDB portal at https://localhost:8086

About

Docker compose that creates an Influx 2 test environment