Call Them, Ishmael – MistyWest was able to Conquer the Digital Whale, Docker

by | Jul 27, 2020

In 2017, MistyWest was awarded a project to use Azure IoT Edge to deploy Docker modules to a hardware device. Their firmware engineer at the time, Sean Edmond, led the pursuit of “The Whale’s” many benefits.

There are multiple options of protocols, solutions, data storage, and the combination of each as there are as many fish in the sea; however, there are advantages when it comes to deploying “edge devices” such as what Docker allows:
  • The bandwidth required to transmit video/audio is less expensive and has lower requirements than using what the cloud offers.
  • Private data is not exposed to the internet versus other deployment strategies.
  • And many more.

As a refresher, Docker was one of the Y Combinator’s Summer 2010 incubator groups to launch in France as a PaaS company. They became public in 2013 and became an open-source for app containerization. Jumping back to 2018, Edmond gives in-depth coverage of how Docker was implemented and the lessons learned in 2 phases.

The First Phase: Electrical and Firmware Development

One of the key issues that partners have expressed to me when a company approaches them is that they have developed their hardware and first version of their software with a different engineering house, and then decided to have their new firmware designed by the partner. The problem is that though it’s not impossible, the partner may have to approach the legacy code in creative ways or maybe just refactor the entire module from scratch.

In MistyWest’s case, they luckily designed the device from the ground-up. In their device, they were incorporating multiple hardware components including:
The MistyWest team had created a breakout board for the sensor that attached to the IMX6Q development board
In regards to the firmware development, the MistyWest team used Yocto to build their own Linux distribution. They were able to validate their board and assemble the devices to have a few sample applications to access the sensors.

The Second Phase: Installing Azure IoT Edge Modules

For the know-it-all firmware engineers reading this article, you may have paused and thought, “Wait - Azure IoT Edge modules didn’t support C in kernel interfaces.” This was the main challenge for the MistyWest team, therefore they had to provision a C binary for the ARM target to interface with the kernel drivers. For the architecture they had to deploy, I would recommend reading the specifics in the article.

A brief architecture diagram that MistyWest used to explain the provision between the device’s kernel and program
Docker was able to accomplish several solutions for the team:
  • Applications could be developed in any language as the message or the websocket interface was language agnostic.
  • Dependent libraries and packages were installed in each Docker image.
  • The Azure IoT edge provided all of the functionality to manage and monitor the connection to each device.
  • and Docker images could be created for any target, so Windows developers could test the modules on their own machines.

Lessons Learned from Chasing the Whale

MistyWest learned a key lesson when implementing Docker into their project. The team was stuck with using the .VFS file system format since they were on kernel 3.14 meaning that a more optimal version was to use the overlay2 filesystem format in kernel version 4.0. Their containers took up a huge amount of space (they used a total of 3 containers that consumed about 8 GB). In sum, Edmond admitted that they should have placed all of the sensors into one docker container instead of 3 to save disk space and reduce deployment time.

MistyWest is not the first, nor certainly not the last, to conquer the whale of multiple software application packages. In fact, if their tale of triumph and woe has you considering to set sail, you can contact the team.
Continue to original Article >
https://www.mistywest.com/posts/docker-more-than-a-cute-whale/

Ioterra – Where you go for IoT Development

Find the right solutions and services for your needs from the most comprehensive marketplace for IoT projects.