Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do Software deployment for IoT devices (Linux based)? [closed]

A client that I’m working for has a fleet of BeagleBones/Raspberry PI’s operating at customer locations. These devices are installed on local networks and behind firewalls. For SSH connectivity there are several options but we’re still struggling with Software deployments on these devices. We’re not relying on container technology for the moment, so Docker Cloud or Resin.io are not an option, but resin.io looks very promising. We’re using AWS IoT for data collection.

Some requirements regarding the deployment:

  • push software server -> device
  • staged rollouts, rollout to a percentage of device which increases over time
  • rollback software
  • device provisioning
  • no container technology

What are some good approaches to achieve this?

like image 540
lukin Avatar asked Jul 08 '16 09:07

lukin


People also ask

How is Linux used in IoT?

Linux provides a secure platform for IoT applications in a number of ways. First, Linux is an open-source operating system, which means defects that could lead to exploits are discovered and fixed quickly (as compared to closed-source operating systems that have fewer eyes scrutinizing them).

Which IoT hardware are Linux based?

Raspberry Pi products are a bit different than your typical IoT hardware development kits and boards. A Raspberry Pi is a single-board-based computer that runs on Linux and is designed for prototyping small computing applications.


2 Answers

(Disclaimer: developer evangelist at resin.io here).

The good thing is, that software that does not rely on containers, can still packaged up (while it does not work the other way around). Containers in resin.io are used as a means to deliver software onto the device, and implement interesting, useful, and safe update strategies, which otherwise would not be possible or would be harder to do. For example:

  • your application code has a bug (happens!) and crashes. Does that take down the entire device including networking? (on resin.io containers help to limit damage, your app crashed but the device is online and can be updated)
  • do you have to update the entire machine image when you have an application update? (using containers like this, what's changed in your application code is updated, which results in very little data traffic most of the time, and very quick changes when needed)
  • using containers like this lets you have practically zero downtime upgrades (starting the new application, and the old running version hands over resources to the new one).

This is not to convince you about container tech, just highlighting that whether or not your own application is containerized (most likely it's not and will stay like that!), do not select against services that use that tech as part of their stack. Every service tries to deliver the functionality you need in any ways necessary.

As for your checklist with regards to resin.io:

  • push software server -> device: check, git push resin master and your code is getting deployed
  • staged rollouts, rollout to a percentage of device which increases over time: not part of the general feature set, but it's easy to implement using the resin supervisor API: for example lock updates for all devices, and you can select which devices would get unlocked and updated. Since it's all through an API, it's customizable to fit your preferred deployment strategy
  • rollback software: not part of the general feature set (yet), but with git it's easy to re-push previous versions. Some care needs to be taken to pin versions of the libraries in your setup to result in a reproducible setup, but doable in practice.
  • device provisioning: automatic device setup, or provisioning through an API/SDK/CLI is available
  • no container technology: as mentioned above, in practice you should not need to care too much what way the service delivers your software, as it does not affect how your application behaves, in most cases.

Also, you mentioned AWS IoT, there's some documentation on integrating resin.io with AWS, including an example project doing automatic device provisioning of resin.io devices with AWS IoT (plug in a device, and it automatically gets credentials for AWS IoT). It might be something that interests you.

like image 129
Gergely Avatar answered Nov 08 '22 21:11

Gergely


How about Kura project? The project has Beaglebone and RPi Gateway software.

http://www.eclipse.org/kura/

http://eclipse.github.io/kura/doc/deploying-bundles.html#install-deployment-package-to-target-device

like image 38
tasasaki Avatar answered Nov 08 '22 19:11

tasasaki