Skip to content

Latest commit

 

History

History
45 lines (36 loc) · 1.33 KB

README.md

File metadata and controls

45 lines (36 loc) · 1.33 KB

iotconfserver

The IoTConfserver manages and deploys the configuration to the custom IoT nodes. It is written in Node.js, uses InfluxDB for data collection and Grafana for visualizing it.

The latest version of Node.js can be installed by running

curl -sL https://deb.nodesource.com/setup_15.x | bash -
apt install nodejs

The confserver itself is available from GitHub:

git clone https://github.com/jougs/iotconfserver /srv/iotconfserver
useradd -r -d /srv/iotconfserver iotconfserver
chown -R iotconfserver:iotconfserver /srv/iotconfserver
su -s /bin/bash -c 'cd /srv/iotconfserver && npm install' iotconfserver

To ease starting, stopping and log management for the confserver, a systemd service file is provided in the repository. It can be installed using the following command:

cp /srv/iotconfserver/iotconfserver.service /lib/systemd/system/
systemctl daemon-reload
systemctl enable iotconfserver.service
systemctl start iotconfserver.service

The logs of the confserver can be accessed using

journalctl -u iotconfserver.service

Updating

su -s /bin/bash -c 'cd /srv/iotconfserver && git pull && npm update' iotconfserver
cp /srv/iotconfserver/iotconfserver.service /lib/systemd/system/
systemctl daemon-reload
systemctl restart iotconfserver.service