Git Product home page Git Product logo

stack's Introduction

Tedd DCS stack

Stack configuration:

  • docker-compose.yml : production stack with the core services:
    • mosquitto : mqtt broker
    • web_server : for labview data ingestion
    • influxdb : time-series database
    • telegraf : ingests data from the mqtt broker into the database
    • dashboard : Grafana monitoring dashboard
    • low_voltage : Control of the Rhode and Schwartz low-voltage power supply
    • dummy modules for testing:
      • a dummy high-voltage power supply,
      • a dummy low-voltage power supply,
      • a dummy environmental sensor.

Prerequisites

Initial setup

Start the InfluxDB service:

docker compose up -d influxdb

Extract the generated token to later connect to influxdb from telegraf and from grafana:

docker exec stack-influxdb-1 influx auth list --user dbuser 

Create a file named my.env with this content (make sure to use your own token):

TRACKER_DCS_INFLUXDB_TOKEN=<influxdb_token>

WARNING: do not commit this file to git, for security reasons.

Start the stack together with the dummy services

docker compose up -d 

To check the running services:

docker compose ps 
NAME                  COMMAND                  SERVICE             STATUS              PORTS
stack-grafana-1       "/run.sh"                grafana             running             0.0.0.0:3001->3000/tcp
stack-hv-1            "python dummy/hv.py …"   hv                  running             
stack-influxdb-1      "/entrypoint.sh infl…"   influxdb            running             0.0.0.0:8087->8086/tcp
stack-low_voltage-1   "python3 hmp.py lw_v…"   low_voltage         exited (1)          
stack-lv-1            "python dummy/hv.py …"   lv                  running             
stack-mosquitto-1     "/docker-entrypoint.…"   mosquitto           running             0.0.0.0:1884->1883/tcp
stack-sensor_1-1      "python dummy/sensor…"   sensor_1            running             
stack-telegraf-1      "/entrypoint.sh tele…"   telegraf            running             8125/udp
stack-web_server-1    "uvicorn tracker_dcs…"   web_server          running             0.0.0.0:8001->8000/tcp

In the case above, I'm running the stack on my mac, which has no access to the low voltage power supply. As a consequence, the low voltage container exits with an error. This is perfectly fine.

On the DAQ PC however, the container must be running.

Using the services

  • SSH tunnel: Establish an SSH tunnel to access services from outside the lab
  • Mosquitto: The stack message broker
  • Grafana: The dashboard system
  • Nodered: To be written...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.