• Upswift

Raspberry Pi OTA update in 2020 method

There are plenty of Raspberry Pi based projects, running thousands of products all over the world. In most of the time, those products connected to the internet for 2 main uses: having the ability to deploy OTA updates (over the air software updates), remotely manage the Raspberry Pis and, not less important, send application data and statistics which are necessary.


Having the functionality to deploy OTA updates to Raspberry Pis remotely may help us to keep our devices stable and secure, running with the last version of our application. OTA updates bring back the confidence in deploying a Raspberry Pi based product to production extremely fast.


What important things did we need to know when deploying an OTA update to Raspberry Pi?

Today's OTA updates have to be small, lightweight, and fast. The idea is to keep the Raspberry Pi with zero downtime (it is possible!), without a reboot or any other interference.

For example, in the case of thousands of devices, running with python code as a systems service. All we would like to do is stop the app service, replace the app files with a few new files, and start the app service again. In some cases, we would even just like to run a bash command which doesn't relate to our app and there is no reason to even stop it.


How can we deploy OTA updates to a fleet of Raspberry Pis?

Here at Upswift.io, we provide a lightweight, fast, and easy to use OTA update functionality that can help to deploy a software update to Raspberry Pi (or even thousands of Raspberry Pis) at once. After connecting your device to Upswift platform, you will be able to see your Raspberry Pis under the 'Devices' category, now, all we need to do is to deploy a new update!


Here is how

To deploy an update, we can use the micro update tool. This tool is based on a small recipe to which we need to fill in with the things we would like to do in the deployment. What can we deploy? files, directories, packages and even run BASH commands, all in one over the air update.



How can we ensure the update worked?

After deploying the update on our Raspberry Pi, Upswift automatically deploys the update and returning the result of the update - success or failure. In case of failure, and as part of the recipe, a rollback option will run automatically to make sure things not get damaged.



Easy there any right way to deploy an OTA update to thousands of Raspberry Pis?

Absolutely yes. The best way to deploy a software update to a fleet of Raspberry Pi is to split your devices into 2 groups (in Upswift IoT platform). Test group - includes one or a few test, lab devices. Production group - includes the whole fleet of our raspberry Pis that runs out there in the filed. When the moment is coming, and you would like to deploy a new update, the best practice is to deploy the micro update on the test group, then making sure all worked and our Linux devices doing the job as expected after the deployment.


The next stage is pretty simple, all we need to do is to deploy the same OTA update on the production group. This can be done by going to the 'Recent micro updates' and click on 'deploy on others', this will let us deploy the same updated we did on other devices or groups at once.


Industries

Platform

Company

imgFlasher

Upswift©2020

Let's Talk.

  • Upswift Twitter
  • Facebook