When it comes to managing a fleet of remote devices, we know there are many points of friction. Our goal at resin.io is to eliminate as many of these as we can, and we've put a lot of work into making deployments across device types as similar as possible. By running your application code in a container, we're able to keep it mostly isolated from the nitty-gritty hardware detail. This means, with some exceptions, you can write your code once and build it for the device of your choice. And with Dockerfile templates, it's even easier to have one code base that works for multiple device types.
We recently released a feature that makes fleet management even easier. It's now possible to create applications that support multiple device types, as long as they share the same architecture. This means you can have one application with Raspberry Pi 3s and BeagleBone Blacks, or an application that supports both Intel NUCs and UP Boards. As your fleet continues to evolve, you can add new types of devices without worrying about managing them separately from your existing fleet.
Of course, there are a few things to keep in mind when mixing device types in your applications. Any code that relies on the underlying hardware of a device will need to be carefully tested on all device types in your fleet. It's no fun to push an update that doesn't work on half your fleet!
In addition, it's important to note that every application still has a default device type, which may be used by your current Dockerfile templates to pull in the correct base image. If you're mixing device types and the first line of your Dockerfile looks like this:
You'll want to replace it with this:
When you push your code to our build servers, it is built once for all devices in the application. Using
%%RESIN_ARCH%% ensures it is built with an architecture-specific base image, rather than a device-specific base image.
In the future we'll be expanding on these capabilities, allowing you to have, for example, one application that contains both Raspberry Pi Zero and Raspberry Pi 3 devices. You can keep track of this and other features on our public roadmap. And as always, if you have questions, let us know on the forums!