ThingsBoard cleanup project
What: ThingsBoard cleanup project
Why: ThingsBoard system in my K8S has a lot of problems.
How: Here is the preliminary goal list:
- Initial install of the server doesn't work. There's a permissions error in the tb-server for /data. This is closed github issue 11615. Deploy, it'll fail because of permissions at the initdb step. Then it'll try to connect to PostgreSQL 300 times and fail. shell into the pod and run "chown -R 799:799 /data". restart the pod. It'll fail this time because of "pg_ctl directory /data/db is not a database cluster directory. shell into the pod and this time run "initdb -D /data/db". Then restart the pod AGAIN. This time it seems to work. Optionally it seems possible to fix the perms issue and the failure to init pgsql issue at the same time and restart just one time, most of the time. It would be really nice if installs worked.
- Sometimes the postgres db dies and the system refuses to start. Annoying. Need to do a total wipe and reinstall. It might have something to do with DB schema versions or corruption following power loss, I don't know the exact cause.
- Related to above it would be nice to have Ansible configure the initial users and connect the edge servers to the main server.
- Also related to above I need a way to backup (and restore) the DB data in thingsboard if its going to self destruct itself occasionally as its a lot of work to set up.
- It would be nice to automatically (in Ansible) integrate Thingsboard with everything else. So HomeAssistant can use it as a MQTT source, the three node-red servers can connect to it, etc.
- At the very least whatever can't be automated needs to be documented WRT recovery after crash.
- Edge got stuck in a reconnect loop and had to be shut down to stop wasting CPU.
- I used to split prod and dev at the edge and gw level and I don't see a reason for that, so -dev has been removed for edge and gw in Ansible and in active directory and the system should be rebuilt with proper hostnames (like tb-gw instead of tb-gw-prod and tb-edge instead of tb-edge-prod)
Measure of Success: It works. Everything is properly documented.
Edited by Vince Mulhollon