Embedded devices, such as those used for internet of things applications, aren't known for being easy to program. ResinOS 2.0, from industrial internet software company Resin.io, aims to change that by using a custom Linux distribution to run Docker containers on embedded devices.
The operating system was originally built for Resin.io's internal use, but the company has since decided to release it as open source to get it on the largest possible number of hardware devices. Common boards like the Raspberry Pi, Beaglebone, and Intel's Edison and Nuc are already supported by ResinOS out of the box.
ResinOS is in some ways a cousin to other minimal Linux-plus-containers projects, like CoreOS. It's built along roughly the same lines, with nothing on board except the Linux kernel, the systemd control service, Docker, and a few other networking and management services.
According to Resin.io, two big problems loomed when trying to create a container platform this minimal. "Existing cloud-focused container OS solutions did not fit our needs" because embedded devices are too diverse and heterogeneous, and "existing embedded operating systems and frameworks were not designed for constant updates or containers," the company said.
Rather than custom-build a new OS, Resin.io elected to use the Yocto Project, a system for producing Linux distributions for embedded hardware. Yocto's not so much a distribution as it is a framework for building other distributions and deploying them on hardware targets like embedded systems.
Yocto handles the heavy lifting for the actual device-specific build process, although anyone building ResinOS for a new hardware target will need to use Yocto's build tools to do it.
However, most of the process of developing on ResinOS doesn't involve dealing with Yocto directly, but rather with base images running in containers on the target hardware. Yocto is not known for being a friendly environment in which to run software; the base images provide a way to ameliorate the process.
One of Docker's claimed advantages is that it has a more efficient and flexible development workflow. While that applies to embedded devices, another boon also comes to mind: security. If a given device has a vulnerability -- there are plenty of examples lately -- a container workflow makes it easier to update the components in question. In addition, the software-auditing processes springing up around containers theoretically make it easier to prevent known-to-be-bad software from shipping as part of a device's system image.