Dear Balena Developers,
We are developing a ROS based drone and are using balena to provide OTA updates and recently, I started wondering in what way balena / docker is suited to run ROS as microservices (With sets of nodes, or even single nodes, being containerized as microservices).
The problem that we currently have is that we now deploy a single monolith image of our whole software stack, which limits our interation/development speed and we are looking into modularization and, as we do OTA updates over 4G, updates to clients get expensive quickly.
So my question is this. If we want to run ROS as microservices, what would be the OTA update file sizes, and what is your recommended way?
Currently I am thinking of restructuring our code similar to the following example:
- Take an official ROS docker image (200 MB)
branch into 3 different images (A/B/C) for 3 different nodes:
2)install ros node (A/B/C) specific libraries on this image (50/60/70 MB) - install the ros node itself (10/20/30 MB)
Are my assumptions correct in this sense? :
- Initial deployment will cost 200 + 50 + 60 + 70 + 10 + 20 + 30 = 440 MB? (Or 3x200 + … = 840 MB?)
- Updates on node A’s library will, at most, cost 50 + 10 = 60MB?
- Updates on A’s library, but not it’s code, will still cost 60 MB?
- Updates on node A’s code will, at most, cost 10 MB?
- Updates on the base image will cost a full 440 MB again?
Regarding the deployment, will balena deploy
recognize that B, and C, are not changed and thus not modify/update their images? Are there specific commands / settings that I need to be aware of to make sure balena deploy doesn’t update B and C?
All of the questions are regarding minimizing image size / update size / modular design, is there anything that I might have missed? Is this the recommended design pattern for a ROS+Balena software stack?
Greetings and thank you for your time.
Deniz