- Notes
- Cloud-Provider-Specific Setup
- After server is set up
- Create and edit the .env file
- Set up the Node-RED and InfluxDB API logins
- Set up the
MQTTs
User Credentials - Set up environment for Expo container
- Start the server
- Restart servers in the background
- Manual configuration for EXPO
- Initial testing
- Testing DNC setup
- Set up crontab for fetching docker-iot-dashboard version info
- Set up first data source
- Test Node-RED
- Creating an InfluxDB database
- Test Postfix Mail setup
- Test MQTT Channels
Throughout this document, we use dashboard.example.com
as the DNS name for the server. You will, of course, change this to something more suitable. When you do this, other things are to be named consistently:
-
/opt/docker/dashboard.example.com
is the directory (on the host system) containing the docker files. -
/var/opt/docker/dashboard.example.com
is the directory (on the host system) containing persistent data.
Node-RED familiarity is assumed.
As an initial step, a cloud provider is required and Docker and Docker-Compose must be installed. The procedure is provider dependent.
-
Log in to Digital Ocean
-
Create a new project (if needed) to hold the new droplet.
-
Discover > Marketplace, search for
Docker
-
This page will be redirected: https://cloud.digitalocean.com/marketplace/5ba19751fc53b8179c7a0071?i=ec3581
-
Press "Create"
-
Select the standard 8G GB Starter that is selected.
-
Choose a datacenter; New York is selected in the example created for this document.
-
Additional options: none.
-
Add the SSH keys.
-
Choose a host name, e.g.
passivehouse-ecovillage
. -
Select the project.
-
Press "Create"
-
Note the IP address from above.
-
ssh root@{ipaddress}
-
Remove the motd (message of the day).
-
Add user(s). Change
username
as needed.adduser username adduser username admin adduser username docker adduser username plugdev adduser username staff
-
Disable root login via SSH or via password
-
Optional: enable
username
to sudo without password.sudo VISUAL=vi visudo
Add the following line at the bottom:
username ALL=(ALL) NOPASSWD: ALL
-
Test that you can become
username
:# sudo su - username username@host-name:~$
-
Drop back to root, and then copy the authorized_keys file to
~username
:mkdir -m 700 ~username/.ssh cp -p .ssh/authorized_keys ~username/.ssh chown -R username.username ~username/.ssh
-
Confirm that the user can SSH in.
-
Optional: set up byobu by default. This allows a session to continue even if your connection drops.
byobu byobu-enable
-
Set the host name.
vi /etc/hosts
Change the line
127.0.1.1 name name
to127.0.0.1 dashboard.myfq.dn dashboard
. -
If needed, use
hostnamectl
to set the static hostname to matchdashboard
. -
Set up git. This makes sure you have the latest version.
sudo add-apt-repository ppa:git-core/ppa sudo apt update sudo apt install git
-
We'll put the docker files at
/opt/docker/dashboard.example.com
, setting up as follows:sudo mkdir /opt/docker cd /opt/docker sudo chgrp admin . sudo chmod g+w .
Remember, if the server is running on a cloud platform like Microsoft Azure or AWS, one needs to check the firewall and confirm that the below ports are open to the outside world.
- 80/tcp
- 443/tcp
- 8883/tcp
- 8083/tcp
- 1883/tcp (if needed; not secure)
The following instructions are essentially independent of the cloud provider and the underlying distribution. But this was only tested on Ubuntu and (in 2019) on CentOS.
-
Clone this repository.
git clone --recurse-submodules [email protected]:mcci-catena/docker-iot-dashboard.git /opt/docker/dashboard.example.com
-
Move to the directory populated in step 1.
cd /opt/docker/dashboard.example.com
-
Get a fully-qualified domain name (FQDN) for the server, for which the DNS can be controlled. Point it to the server. Make sure it works, using "
dig FQDN
" -- get back aA
record pointing to your server's IP address.
First, create a .env file. The following command sequence can be cut and paste to generate an empty template:
sed -ne '/^#+++/,/^#---/p' docker-compose.yml | sed -e '/^#[^ \t]/d' -e '/^# IOT/s/$/=/' > .env
Then, edit the .env file as follows:
-
IOT_DASHBOARD_NGINX_FQDN=dashboard.example.com
This sets the name of the resulting server. It tells Nginx what it's serving out. It must be a fully-qualified domain name (FQDN) that resolves to the IP address of the container host.
-
IOT_DASHBOARD_AWS_ACCESS_KEY_ID=xxxxxxxxxxxxxxx
This sets access key for
s3 bucket
for the data backup. -
IOT_DASHBOARD_AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxx
This sets secret access key for
s3 bucket
for the data backup. -
IOT_DASHBOARD_AWS_DEFAULT_REGION=regionname
This sets default region for the
s3 bucket
. -
IOT_DASHBOARD_AWS_S3_BUCKET=s3bucketname
This sets
s3bucketname
to be used for the whole data backup. -
IOT_DASHBOARD_AWS_S3_BUCKET_NGINX=s3bucketname/nginx
This creates
nginx
folder for nginx data backup. -
IOT_DASHBOARD_AWS_S3_BUCKET_NODERED=s3bucketname/nodered
This creates
nodered
folder for nodered data backup. -
IOT_DASHBOARD_AWS_S3_BUCKET_GRAFANA=s3bucketname/grafana
This creates
grafana
folder for grafana data backup. -
IOT_DASHBOARD_AWS_S3_BUCKET_MQTTS=s3bucketname/mqtts
This creates
mqtts
folder for mqtts data backup. -
IOT_DASHBOARD_AWS_S3_BUCKET_INFLUXDB=s3bucketname/influxdb
This creates
influxdb
folder for influxdb database backup. -
IOT_DASHBOARD_AWS_S3_BUCKET_MONGODB=s3bucketname/mongodb
This creates
mongodb
folder for mongodb database backup. -
IOT_DASHBOARD_AWS_HOST_BASE=s3.amazonaws.com
This sets S3 endpoint to configure 3rd party clients(s3cmd).
For Amazon: s3.amazonaws.com
For DigitalOcean:
nyc3
.digitaloceanspaces.comPlease change the region
nyc3
with your s3 bucket region for the DigitalOcean. -
IOT_DASHBOARD_AWS_HOST_BUCKET='%(${IOT_DASHBOARD_AWS_S3_BUCKET})s.s3.amazonaws.com'
This sets S3 endpoint to access host bucket.
For Amazon: '%(${IOT_DASHBOARD_AWS_S3_BUCKET})s.s3.amazonaws.com'
For DigitalOcean: '%(${IOT_DASHBOARD_AWS_S3_BUCKET}).
nyc3
.digitaloceanspaces.com'Please change the region
nyc3
with your s3 bucket region for the DigitalOcean. -
This sets the contact email for Let's Encrypt. The script automatically accepts the Let's Encrypt terms of service, and this indicates who is doing the accepting.
-
IOT_DASHBOARD_CERTBOT_FQDN=dashboard.example.com
This should be the same as
IOT_DASHBOARD_NGINX_FQDN
. -
IOT_DASHBOARD_DATA=/full/path/to/directory/
The trailing slash is required! This will put all the data files for this instance as subdirectories of the specified path. If this is undefined,
docker-compose
will print error messages and quit. -
IOT_DASHBOARD_GRAFANA_ADMIN_PASSWORD=SomethingVerySecretIndeed
This needs to be confidential. Indeed, this sets the initial password for the Grafana admin login. This should be changed via the Grafana UI after booting the server.
-
IOT_DASHBOARD_GRAFANA_SMTP_FROM_ADDRESS
This sets the Grafana originating mail address.
-
IOT_DASHBOARD_GRAFANA_INSTALL_PLUGINS=plugin plugin2
This sets a list of Grafana plugins to install.
-
IOT_DASHBOARD_INFLUXDB_INITIAL_DATABASE_NAME=demo
Change "demo" to the desired name of the initial database that will be created in InfluxDB.
-
IOT_DASHBOARD_MAIL_DOMAIN=example.com
This sets the domain name of your mail server. Used by Postfix.
-
IOT_DASHBOARD_MAIL_HOST_NAME=dashboard.example.com
This sets the name of your mail server. Used by Postfix.
-
IOT_DASHBOARD_MAIL_RELAY_IP=xx.xx.xx.xx:port
This sets SMTP server through which your Emails will be forwarded.
-
IOT_DASHBOARD_MAIL_SMTP_AUTH=<yes|no>
This enables/disables SMTP authentication to access the SMTP server.
-
IOT_DASHBOARD_MAIL_SMTP_LOGIN=xxxxx
This sets credential to access the above SMTP server
-
IOT_DASHBOARD_MAIL_SMTP_PASSWORD=xxxxxx
This sets credential to access the above SMTP server
-
IOT_DASHBOARD_NODERED_INSTALL_PLUGINS=node-red-node-module1 node-red-node-module2
This installs one or more Node-RED plug-ins.
-
IOT_DASHBOARD_TIMEZONE=Europe/Paris
If not defined, the default time zone will be GMT.
-
IOT_DASHBOARD_INFLUXDB_MAIL_HOST_NAME=dashboard.example.com
This sets the name of your mail server for backup mail. Used by Postfix.
-
[email protected] [email protected]
InfluxDB Backup mail will be sent to the mentioned MAIL IDs.
-
[email protected] [email protected]
Backup mail for
Grafana, Mongodb, Mqtts, Nginx, and Nodered
will be sent to the mentioned MAIL IDs. -
IOT_DASHBOARD_MONGO_INITDB_ROOT_USERNAME=xxxxxx
This sets username to be used for accessing Mongodb.
-
IOT_DASHBOARD_MONGO_INITDB_ROOT_PASSWORD=xxxxxxxxx
This sets password to be used for accessing Mongodb root user.
The resulting .env
file should look like this:
### env file for configuring dashboard.example.com
IOT_DASHBOARD_NGINX_FQDN=dashboard.example.com
# The fully-qualified domain name to be served by NGINX.
#
IOT_DASHBOARD_AWS_ACCESS_KEY_ID=xxxxxxxxxxxxxx
# The access key for AWS for backups.
#
IOT_DASHBOARD_AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxx
# The AWS API secret key for backing up influxdb data.
#
IOT_DASHBOARD_AWS_DEFAULT_REGION=us-east-1
# The AWS default region.
#
IOT_DASHBOARD_AWS_S3_BUCKET=dashboard.example.com
# The name of S3 host bucket.
#
IOT_DASHBOARD_AWS_S3_BUCKET_NGINX=dashboard.example.com/nginx
# The name of S3 bucket for Nginx backup
#
IOT_DASHBOARD_AWS_S3_BUCKET_NODERED=dashboard.example.com/nodered
# The name of S3 bucket for Node-red backup
#
IOT_DASHBOARD_AWS_S3_BUCKET_GRAFANA=dashboard.example.com/grafana
# The name of S3 bucket for Grafana backup
#
IOT_DASHBOARD_AWS_S3_BUCKET_MQTTS=dashboard.example.com/mqtts
# The name of S3 bucket for Mqtts backup
#
IOT_DASHBOARD_AWS_S3_BUCKET_INFLUXDB=dashboard.example.com/influxdb
# The S3 bucket to be used for uploading the influxdb backup data.
#
IOT_DASHBOARD_AWS_S3_BUCKET_MONGODB=dashboard.example.com/mongodb
# The S3 bucket to be used for uploading the mongodb backup data.
#
IOT_DASHBOARD_AWS_HOST_BASE=nyc3.digitaloceanspaces.com
# The S3 endpoint is used to configure 3rd party clients(s3cmd).
# For Amazon: s3.amazonaws.com , For DigitalOcean: nyc3.digitaloceanspaces.com
#
IOT_DASHBOARD_AWS_HOST_BUCKET='%(${IOT_DASHBOARD_AWS_S3_BUCKET}).nyc3.digitaloceanspaces.com'
# The S3 endpoint to access host bucket.
# For Amazon: '%(${IOT_DASHBOARD_AWS_S3_BUCKET})s.s3.amazonaws.com'
# For DigitalOcean: '%(${IOT_DASHBOARD_AWS_S3_BUCKET}).nyc3.digitaloceanspaces.com'
#
[email protected]
# The email address to be used for registering with Let's Encrypt.
#
IOT_DASHBOARD_CERTBOT_FQDN=dashboard.example.com
# The domain(s) to be used by cert bot when registering with Let's Encrypt.
#
IOT_DASHBOARD_DATA=/var/opt/docker/dashboard.example.com/
# The path to the data directory. This must end with a '/', and must either
# be absolute or must begin with './'. (If not, you'll get parse errors.)
#
IOT_DASHBOARD_GRAFANA_ADMIN_PASSWORD=xxxxxxxx
# The password to be used for the admin user on first login. This is ignored
# after the Grafana database has been built.
#
IOT_DASHBOARD_GRAFANA_PROJECT_NAME=Testing IoT Server
# The project name to be used for the emails from the administrator.
#
# IOT_DASHBOARD_GRAFANA_LOG_MODE=
# Set the grafana log mode.
#
# IOT_DASHBOARD_GRAFANA_LOG_LEVEL=
# Set the grafana log level (e.g. debug)
#
# IOT_DASHBOARD_GRAFANA_SMTP_ENABLED=
# Set to false to disable SMTP.
# Defaults to true
#
# IOT_DASHBOARD_GRAFANA_SMTP_SKIP_VERIFY=
# Set to false to enable SSL verification.
# Defaults to true.
#
IOT_DASHBOARD_GRAFANA_INSTALL_PLUGINS=plugin1, plugin2, plugin3
# A list of grafana plugins to install. Use (comma and space) ", " to delimit plugins.
#
IOT_DASHBOARD_GRAFANA_SMTP_FROM_ADDRESS=grafana-admin@dashboard.example.com
# The "from" address for Grafana emails.
#
# IOT_DASHBOARD_GRAFANA_USERS_ALLOW_SIGN_UP=
# Set to true to allow users to sign up.
#
IOT_DASHBOARD_INFLUXDB_ADMIN_PASSWORD=xxxxxxxx
# The password to be used for the admin user by influxdb. Again, this is
# ignored after the influxdb database has been built.
#
IOT_DASHBOARD_INFLUXDB_INITIAL_DATABASE_NAME=demo
# The initial database to be created on first launch of influxdb. Ignored
# after influxdb has been launched.
#
IOT_DASHBOARD_MAIL_DOMAIN=example.com
# The postfix mail domain.
#
IOT_DASHBOARD_MAIL_HOST_NAME=dashboard.example.com
# The external FQDN for the mail host.
#
IOT_DASHBOARD_MAIL_RELAY_IP=[smtp.example.com]:465
# The mail relay machine, assuming that the real mailer is upstream from us.
#
IOT_DASHBOARD_MAIL_SMTP_AUTH=yes
# To enable SMTP authentication, set to "yes".
# Defaults to "no"
#
[email protected]
# The mail relay login: [email protected] -- it will come from your upstream provider.
#
IOT_DASHBOARD_MAIL_SMTP_PASSWORD=xxxxxxxx
# The mail relay password
#
IOT_DASHBOARD_MAIL_TLS_SECURITY_LEVEL=encrypt
# To enable SSL/TLS support for postfix container. set to "encrypt" to enable SSL/TLS
# Defaults to "may"
#
IOT_DASHBOARD_MAIL_TLS_WRAPPERMODE=yes
# To enable SSL/TLS support for postfix container. set to "yes" to enable SSL/TLS
# Defaults to "no"
#
# IOT_DASHBOARD_PORT_HTTP=
# The port to listen to for HTTP. Primarily for test purposes. Defaults to 80.
#
# IOT_DASHBOARD_PORT_HTTPS=
# The port to listen to for HTTPS. Primarily for test purposes. Defaults to 443.
#
IOT_DASHBOARD_TIMEZONE=Etc/GMT
# The timezone to use. Defaults to GMT.
#
# IOT_DASHBOARD_NODE_RED_VERSION=
# To Install specific version of node-red version. Defaults to latest.
#
IOT_DASHBOARD_NODE_RED_INSTALL_MODULES=module1 module2 module3
# To Install the required node-red modules. use "space" to delimit the modules.
#
# IOT_DASHBOARD_PORT_MQTT_TCP=
# Accessing mqtt channel over TCP. Defaults to 1883.
#
# IOT_DASHBOARD_PORT_MQTT_SSL=
# Accessing mqtt channel over TLS/SSL. Defaults to 8883.
#
# IOT_DASHBOARD_PORT_MQTT_WSS=
# Accessing mqtt channel over WSS. Defaults to 8083.
#
IOT_DASHBOARD_INFLUXDB_MAIL_HOST_NAME=influxdb.example.com
# The external FQDN for the influxdb host
#
IOT_DASHBOARD_INFLUXDB_BACKUP_EMAIL=someone@dashboard.example.com
# To send backup mail in Influxdb container. Use "space" to delimit the MAIL IDs.
#
[email protected]
# To send backup mail in cron-backup container. Use "space" to delimit the MAIL IDs.
#
IOT_DASHBOARD_MONGO_INITDB_ROOT_USERNAME=xxxxxxx
# The Username to be used for accessing Mongodb.
#
IOT_DASHBOARD_MONGO_INITDB_ROOT_PASSWORD=xxxxxxx
# The Password to be used for accessing Mongodb root user.
#
Run the following commands.
docker-compose pull
docker-compose build
If there are any errors, they need to be fixed before going on.
If migrating from an older version of the dashboard that used Apache, you'll need to migrate the htpasswd
file.
-
Copy
htpasswd_migration.sh
into your local directory (on the host system) containing the docker files. -
Run the script as below.
chmod +x htpasswd_migration.sh ./htpasswd_migration.sh
-
This script creates one
htpasswd
for each of the controlled services, and then copies them(node-red_htpasswd
,query_htpasswd
) to appropriate files as below.-
For Node-red:
${IOT_DASHBOARD_DATA}docker-nginx/authdata/nodered/.htpasswd
-
For Influxdb Queries:
${IOT_DASHBOARD_DATA}docker-nginx/authdata/influxdb/.htpasswd
-
-
If you are migrating older
htpasswd
files, please skip steps[1-4]
tohtpasswd
below.
-
Log into the Nginx docker container.
$ docker-compose run nginx /bin/bash #
If this fails with the message,
ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?
, then probably the user ID is not in thedocker
group. To fix this,sudo adduser MYUSER docker
, where "MYUSER" is the login ID. Then (very important) log out and log back in. -
Create
.htpasswd
files for node-red and influxdb queries authentication.touch /etc/nginx/authdata/influxdb/.htpasswd touch /etc/nginx/authdata/nodered/.htpasswd chown www-data /etc/nginx/authdata/influxdb/.htpasswd chown www-data /etc/nginx/authdata/nodered/.htpasswd
-
Add user logins for node-red and influxdb queries. Make
USERS
be a list of login IDs.-
For Node-red authentication:
export USERS="tmm amy josh" for USER in $USERS; do \ echo "Set password for "$USER; \ htpasswd /etc/nginx/authdata/nodered/.htpasswd $USER; \ done
-
For Influxdb queries:
export USERS="tmm amy josh" for USER in $USERS; do \ echo "Set password for "$USER; \ htpasswd /etc/nginx/authdata/influxdb/.htpasswd $USER; \ done
-
-
Exit Nginx's container with Control+D.
To access mqtt channel, user needs credentials to access it.
-
Log into the mqtts docker container.
$ docker-compose run mqtts /bin/bash #
-
In the container, Create username and password using
mosquitto_passwd
command. (option-c
- Create a new password file. If the file already exists, it will be overwritten. So-c
should be used for the first user creation. Please avoid-c
for the second user creation onwards.)# mosquitto_passwd -c /etc/mosquitto/credentials/passwd <user> Password: Reenter password:
-
Close the connection to mqtts (Ctrl+D).
Linux uses the inotify
package to observe file system events, individual files or directories. Since React / Angular hot-reloads and recompile files on save, it needs to keep track of all project's files. Increasing the inotify
watch limit should hide the warning messages.
# insert the new value into the system config
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
-
Starting things up in "interactive mode" is recommended as a first step.
docker-compose up
This will show the log output from the various services. It will also be pretty clear if there are any issues.
One common error (for me, anyway) is entering an illegal initial InfluxDB database name. InfluxDB will spew a number of errors, but eventually it will start up anyway. But then the database needs to be created manually.
Once the servers are coming up interactively, use ^C to shut them down, and then restart in daemon mode.
docker-compose up -d
Status of the containers can be seen as below
$ docker-compose ps
Name Command State Ports
-----------------------------------------------------------------------------------------------------------------------------------------------
dashboard.example.com_apiserver_1 /sbin/my_init Up 0.0.0.0:6789->22/tcp,:::6789->22/tcp, 8891/tcp, 8892/tcp, 8893/tcp
dashboard.example.com_cron-backup_1 /sbin/my_init Up
dashboard.example.com_expo_1 /sbin/my_init Up 19006/tcp, 0.0.0.0:6791->22/tcp,:::6791->22/tcp
dashboard.example.com_grafana_1 /run.sh Up 3000/tcp
dashboard.example.com_influxdb_1 /sbin/my_init Up 8086/tcp
dashboard.example.com_mongodb_1 docker-entrypoint.sh mongod Up 27017/tcp
dashboard.example.com_mqtts_1 /sbin/my_init Up 0.0.0.0:8083->8083/tcp,:::8083->8083/tcp,0.0.0.0:8883->8883/tcp,:::8883->8883/tcp
dashboard.example.com_nginx_1 /sbin/my_init Up 0.0.0.0:27020->27020/tcp,:::27020->27020/tcp,0.0.0.0:443->443/tcp,::443->443/tcp, 0.0.0.0:80->80/tcp,:::80->80/tcp
dashboard.example.com_node-red_1 npm --no-update-notifier - ... Up (healthy) 1880/tcp
dashboard.example.com_postfix_1 /sbin/my_init Up 0.0.0.0:2525->25/tcp,:::2525->25/tcp
-
DNC UI
have some limitations that need to be corrected. Once theExpo
container became up, the below steps have to be completed.Follow the below steps:
docker-compose exec expo bash cd /expo/dncui bash -c 'echo "export const ViewPropTypes = { style: null };" >> node_modules/react-native-web/dist/index.js' sed -i "s/Text.displayName = 'Text';/Text.propTypes = ()=> {};/g" node_modules/react-native-web/dist/exports/Text/index.js sed -i '/^ BackAndroid,$/d' node_modules/react-native-awesome-alerts/src/AwesomeAlert.js
-
Open Grafana on https://dashboard.example.com, and log in as admin.
-
Change the admin password.
- To test DNS Server: In Browser, have a look at the version number using URL: https://dashboard.example.com/dncserver/version
- To test DNC Standard Plugin: In Browser, have a look at the version number using URL: https://dashboard.example.com/dncstdplugin/version
- To test DNC Grafana-Influx Plugin: In Browser, have a look at the version number using URL: https://dashboard.example.com/dncgiplugin/version
- To test DNC UI: In Browser, have a look at the version number using URL: https://dashboard.example.com/dncui
-
In the Host machine, a cronjob needs to be configured as below.
sudo printf '0\t*\t*\t*\t/bin/bash -l -c /opt/docker/dashboard.example.com/apiserver/version_check.sh\n' >> /etc/crontab
-
To test Version info: In Browser, have a look at the version number using URL: https://dashboard.example.com/version
Use the Grafana UI -- either click on "add first data source" or use "Configure >Add Data Source", and add an InfluxDB data source.
-
Set the URL (under HTTP Settings) to
<http://influxdb:8086>
. -
Select the database. If InfluxDB is properly initialized in a database, connect to it as a Grafana data source. If not, create an InfluxDB database.
-
Leave user and password blank.
-
Click "Save & Test".
Open Node-RED on https://dashboard.example.com/node-red/, and build a flow that stores data in InfluxDB. Be sure to add the trailing slash! Otherwise, a 404 error pops from Grafana. This will be fixed soon.
To create a database, log in to the host machine, and cd to /opt/docker/dashboard.example.com
. Use the following commands:
$ docker-compose exec influxdb /bin/bash
# influx
Connected to http://localhost:8086 version 1.7.6
InfluxDB shell version: 1.7.6
Enter an InfluxQL query
> show databases
name: databases
name
----
_internal
> create database "my-new-database"
> show databases
name: databases
name
----
_internal
my-new-database
> ^D
# ^D
$
-
Testing Mail setup on
Grafana
-
Click on "Bell icon" and click the "Contact points" option as shown below
-
Click "New contact point" to add New contacts as shown below
-
Input the required info as shown below. Be sure to select type as
Email
. ClickTest
button to send test mail and Click "Save contact point" to finally save the Contact.
-
-
Testing Mail setup on
Influxdb
andPostfix
Mail setup on
Influxdb
andPostfix
can be tested usingmail
command, by logging into their container.Influxdb
- Log into the
Influxdb
docker container
docker-compose exec influxdb bash root@influxdbbackup:/# mail -s "Testing mail from Influxdb" [email protected] Cc: Testing1
Postfix
- Log into the
Postfix
docker container
docker-compose exec postfix bash root@dashboard:/# mail -s "Testing mail from Postfix" [email protected] Cc: Testing1
- Log into the
-
Testing Mail setup on Node-red
Mail setup on Node-red can be tested by deploying a node-red flow on https://dashboard.example.com/node-red/ as shown below.
Inject node's configuration
Here,
msg.payload
will be acted asmail body
.msg.topic
will be acted assubject
.msg.from
will be acted asSender
Email node's configuration
-
To test the
MQTT over TCP
andMQTT over TLS/SSL
channels user can use mosquitto client tool.-
MQTT over TCP
Subscribing
mqtt channel on topictest
mosquitto_sub -h dashboard.example.com -t test -p 1883 -u user1 -P pwd123 hello
publishing
on mqtt channel with topictest
mosquitto_pub -h dashboard.example.com -m "hello" -t test -p 1883 -u user1 -P pwd123
-
MQTT over TLS/SSL
Subscribing
mqtt channel on topictest
mosquitto_sub -h dashboard.example.com -t test -p 8883 -u user1 -P pwd123 --capath /etc/ssl/certs/ hello
publishing
on mqtt channel with topictest
mosquitto_pub -h dashboard.example.com -m "hello" -t test -p 8883 -u user1 -P pwd123 --capath /etc/ssl/certs/
-
-
In order to test the "MQTT over Nginx proxy", the user can use the
mqtts web based client
portal1 or portal2.Using portal1
Connection Details
Subscribing
mqtt channel on topictest
publishing
on mqtt channel with topictest
Full window
-
To test the
MQTT over WebSockets with TLS/SSL
, the user can use themqtts web based client
Portal.Connection Details
Subscribing
mqtt channel on topictest
publishing
on mqtt channel with topictest
Full window