Raspberry Pi Remote Software Update "Over the Air"

We use the built-in Raspberry Pi computer to connect IP cameras on the client network to our cloud-based recording service. We use Raspbian, and about 50% use Wheezy and 50% use Jessie.

The task we have is to remotely update software running on these IFUs.

Our current method involves using SSH and Ansible. We have a complex Ansible script that makes all the changes to the Raspberry Pi, and we have automated it to the extent that we can update a lot of Raspberry Pi at a time.

However, the problem is that this is a non-atomic update. Raspberries Pi do not always have the same version of packages on them, depending on when they were updated. It is also possible to upgrade to failure halfway, etc.

I know that there are several ways to do atomic updates by downloading a new “software image” and switching to using it instead using the bootloader. I think OpenWRT can do this as well as swupdate: https://github.com/sbabic/swupdate

Has anyone ever done something like this on a Raspberry Pi before?

thanks

+6
source share
3 answers

As a small update to this question, I found several ways to do this.

First of all, keep in mind that you do not need to stick to the default RPI bootloader, as @ user3145836 pointed out. Uboot allows you to flip the boot partition.

At the moment, the best option is https://mender.io , and this is the option we went with.

If you can connect to your application, https://resin.io/ is a good hosting.

+10
source

Mender recently introduced official support for Raspbian, so it should be much simpler: https://hub.mender.io/t/raspberry-pi-3-model-bb-raspbian

0
source

We used swupdate in our company’s projects and switched to https://upswift.io about a year ago.

Since updating the entire image is not required in 99% of cases, requires considerable effort and requires a reboot, we looked for an easy but reliable solution for updating the software (not like SSH / Ansible).

0
source

Source: https://habr.com/ru/post/1259826/


All Articles