Composite Docker Application with 2 Node-RED instances deployed by Balena that is monitoring itself


#1

Hi,

I have created a composite docker application with “8” containers (2x Node-RED, 2x MQTT broker, Telegraf, InfluxDb, Grafana, Nginx) for a raspberry pi. This application is deployed through Balena (a month ago it was called resin.io!).

It demonstrates the following features (for more details see its README.md)

  1. The ability to run many containers on a Raspberry Pi 3 Model B+
  2. The Built and Deployment of this multi container application using the BalenaCloud services
  3. Monitoring the system resources of the raspberry pi using the TIG stack.
  4. That Grafana is very nice and powerful tool to create dashboards and that it is easy to create or update those dashboards.
  5. It is possible to run multiple Node-RED instances on the same device.
  6. It is possible to run multiple MQTT brokers on the same device.
  7. A USB memory stick connected to the pi can be used for storing specific data.
  8. It is possible to access the Grafana user interface and the 2 Node-RED editors via the internet .

Here below a screenshot of the system metrics dashboard reporting the system resources of the raspberry pi running this composite docker application. So it is monitoring its own resources.



#2

Hi
Great work, I have forked the repository and installed on Balena Cloud but cannot log in to Node Red. I have added USERNAME and PASSWORD to Device Environment Variables. Does the PASSWORD variable need to be a password hash?
Any advice appreciated


#3

Yes, the environment variable PASSWORD must hold the hashed password. See also section "5. Node-RED" of the Readme.

Also note that the composite docker application assumes that a USB memory stick with label influxdb in ext4 format is connected to the raspberry pi (see section "7. Setup of the usb memory stick for influxdb" of the readme).


#4

I have just made following changes :

  1. the data of the influxdb is no longer stored under folder /mnt/usbdrive/influxdb but under folder /mnt/influxdb.
  2. If no USB memory stick is connected to the raspberry pi with label influxdb then it will store the influxdb data in the named volume influxdb-data (see docker compose yaml file). ... so this means that it will also work without a USB memory stick, in that case the influxdb data will be stored in a named volume on the SD card and will not be lost when redeploying the container.