This is a tracking issue for our project to improve the PlanktoScope's software update process in order to reduce the barriers for users to update their PlanktoScope software deployments.
Motivation
Currently, safely updating the software on a PlanktoScope requires flashing a new SD card and swapping it out with the old SD card (as described in #88, the previous Git-based system was too finicky to be usable); in order to make it easy to downgrade the software, the old SD card (with the old OS image) must be kept around indefinitely instead of being reassigned for other purposes. Re-flashing SD cards requires internet bandwidth (to download the new SD card image), time (to flash the SD card), planning (to prevent loss of data), potentially spare SD cards (if the device owner wants to keep old SD cards for easy downgrades), and potentially reconfiguration (to change the software's hardware settings again to match the actual hardware configuration). It would be useful if most updates could be applied without re-flashing the SD card - in other words, if we could deliver updates over the air (or over a sneakernet) and apply them in-place.
This is particularly useful for people with v2.1 PlanktoScope hardware, in which the SD card is extremely difficult to access - it requires partial disassembly of the PlanktoScope.
A non-SD-card-based update method has been requested by Rodrigo Gonçalves on the #6-dev-software channel in the PlanktoScope Slack.
Goals
- Reduce the number of software updates requiring an SD card re-flash (i.e. an irreversible upgrade) to a frequency of once every (KPI) two years (i.e. the same frequency as Raspberry Pi OS major releases).
- Make in-place upgrades (i.e. not requiring a re-flash of the SD card) reversible
- For in-place upgrades:
- Reduce the total size of files which must be downloaded to less than (KPI) 1 GB on average for major software changes, and less than (KPI) 100 MB on average for minor software changes.
- Enable upgrading/downgrading the software to newer or older releases with (KPI) one button-press and a confirmation dialog.
- Enable automatic background downloading of software artifacts for software upgrades.
- Provide a mechanism to prevent loss of data and settings through a software update.
- Make upgrades atomic.
- Enable both OTA and local updates
- Avoid the need for us (or our users) to self-host (or pay for a SaaS which hosts) a centralized update server for OTA updates
Steps
(these steps will be converted into tracking issues for tasks)
Unresolved Questions
How can we achieve atomic & easy-to-rollback upgrades of the base OS (i.e. apt packages and stuff) on Raspberry Pi OS? e.g. can we achieve a container image-based approach like bootc? (Note: most of the comment replies I've added on this issue are related to this unresolved question which is out-of-scope for this particular issue)
This is a tracking issue for our project to improve the PlanktoScope's software update process in order to reduce the barriers for users to update their PlanktoScope software deployments.
Motivation
Currently, safely updating the software on a PlanktoScope requires flashing a new SD card and swapping it out with the old SD card (as described in #88, the previous Git-based system was too finicky to be usable); in order to make it easy to downgrade the software, the old SD card (with the old OS image) must be kept around indefinitely instead of being reassigned for other purposes. Re-flashing SD cards requires internet bandwidth (to download the new SD card image), time (to flash the SD card), planning (to prevent loss of data), potentially spare SD cards (if the device owner wants to keep old SD cards for easy downgrades), and potentially reconfiguration (to change the software's hardware settings again to match the actual hardware configuration). It would be useful if most updates could be applied without re-flashing the SD card - in other words, if we could deliver updates over the air (or over a sneakernet) and apply them in-place.
This is particularly useful for people with v2.1 PlanktoScope hardware, in which the SD card is extremely difficult to access - it requires partial disassembly of the PlanktoScope.
A non-SD-card-based update method has been requested by Rodrigo Gonçalves on the
#6-dev-softwarechannel in the PlanktoScope Slack.Goals
Steps
(these steps will be converted into tracking issues for tasks)
stable/calicorelease channel:/boot/config.txtusing Forklift:Unresolved Questions
How can we achieve atomic & easy-to-rollback upgrades of the base OS (i.e. apt packages and stuff) on Raspberry Pi OS? e.g. can we achieve a container image-based approach like bootc? (Note: most of the comment replies I've added on this issue are related to this unresolved question which is out-of-scope for this particular issue)