PiSupply / iot-lora-image

RPi SD Card Image for IoT LoRa Range
11 stars 6 forks source link

Move a lot of configuration to a MySQL Database #40

Closed ryanteck closed 4 years ago

ryanteck commented 4 years ago

New Plan for configuration:

Move as much of it to a MySQL Database.

This will allow easier integration of the many new features of the system but also means that it would be harder for unauthorised modifications as instead of being able to take out the SD Card / CM3, plug it into a computer and modify all of the files the person must gain access to the MySQL Database which while still possible and wouldn't not be possible to prevent modifications this would make it more of a task to do so rather than just pop in and replace all configuration.

It should also make it easier for configurating the LoRa modules themselves.

ryanteck commented 4 years ago

MySQL Config considerations:

Firewall rule, Create account that only has access to the lora database Use Socket instead of port

ryanteck commented 4 years ago

Ok so: After evaluating the size an MySQL Store would take up around 300-400MB which was unacceptable to store small config.

Experimented with SQLite but still wasn't the best. Soooo.....

All of the configuraiton is now in a YAML file, this was chosen for multiple reasons including readability and ease for expanding in the future. Lots of data is never planned to be stored in the file so should be perfectly fine.