An installation script and configuration for ThingsBoard PE to run on an Ubuntu virtual machine.
See the notes on ITS Wiki ufiot2
See: ThingsBoard Microservices architecture
This process and shell script installs the ThingsBoard service, a RabbitMQ message broker, a PostgreSQL database, and a HAProxy reverse web proxy, as per ThingsBoard PE Ubuntu installation instructions.
-
Update operating system packages:
apt updateapt upgrade
-
Clone this repository
-
Go into that directory:
cd ./thingsboard-vm -
Run the script as an administrator:
sudo sh install.sh(this script should be idempotent and safe to run for initial installation, changes, and upgrades.) -
Create service users for each subsystem
- PostgreSQL superuser
sudo -u postgres psql -c "\password" - PostgreSQL service user
createuser -h localhost --username postgres --pwprompt thingsboard
- PostgreSQL superuser
-
Set up RabbitMQ logins
- Delete guest user:
rabbitmqctl delete_user guest - Create service user
rabbitmqctl add_user thingsboard <password>rabbitmqctl set_permissions -p / thingsboard ".*" ".*" ".*"
- Delete guest user:
-
Check for any configuration changes:
diff ./thingsboard.conf /etc/thingsboard/conf/thingsboard.conf -
Configure the license key and secrets:
sudo vi /etc/thingsboard/conf/thingsboard.conf -
Go to your home directory
cd ~ -
Run the ThingsBoard installation script:
sudo /usr/share/thingsboard/bin/install/install.sh -
Start the services
Run the commands below to check everything's set up properly. Also see the notes on ITS Wiki ufiot2.
Check we have OpenJDK version 11
java -versionCheck the service is running:
sudo systemctl status thingsboard.serviceCheck HAProxy is installed
haproxy -vView logs:
sudo journalctl -u thingsboard.service --since "24 hours ago"Check the documentation for each of the subsystems.