Announcing Eliot — Container platform for IoT devices

Eliot — Container platform for IoT devices

I’m super excited to tell about project that I have been doing in my free time past months. Eliot is Docker and Kubernetes inspired platform for managing containers in IoT devices and it’s available under MIT open source license.

I have over 10 years of software engineer experience and have been over five years really active in the DevOps community and have seen the change.
While I was working in drone company, and building drone-based automated inspection service, I was surprised that there’s no state-of-the-art solution for managing software in connected devices that is common nowadays in cloud environments.

Most solutions were clumsy and error-prone “manually-install-and-copy-image” solutions. OTA (over-the-air) solutions were mostly outdated or otherwise unusable for modern “continuous delivery” world, not to mention poor security. And all IoT platforms were basically just agents to push data to some cloud service for analysis.

Requirements:

  • No internet connection required
  • Good configuration management
  • Easy development and debugging in the device
  • Simple and fast application deployment and updates
  • Good security and software isolation
  • Built for connected devices from ground up

And that’s the day when Eliot born ❤️

Open Source from the heart

You probably have heard of containers. Containers have revolutionized in past years how we built, ship and run the software.
In Eliot, everything runs inside containers. It’s like CoreOS or Kubernetes in a sense that there’s pretty much only Linux kernel and small agent in the OS and everything else gets deployed to the device in containers. This makes managing and updating software on the device really easy and attack surface for hackers is minimal.

Eliot is built on top of open source components that are already in use by millions of users

Eliot uses containerd to run containers. containerd is container runtime from the core of Docker and open sourced lately by Docker Inc. That’s used everywhere were Docker is used. And that’s almost everywhere 😃
It uses linuxkit, another open source project from Docker Inc., to build really minimal Operating System to run containers. EliotOS is less than 70Mb which is small compared to for example to Raspbian 1.5Gb 😮!

To make the life of developers and operators easy as possible, Eliot provides nice “Kubernetes like” interface on top of these open source components, while keeping the setup small and secure.

You don’t need to switch your chosen IoT tool or platform to collect and process data in the cloud, Eliot is just helping you to manage the device configuration and software more easily. I.e. you can use Eliot to deploy your IoT platform to the device. It probably makes your life even easier, because the community can share common building blocks as images in Docker Hub.


Getting started

Connecting to Eliot enabled device is super easy. You don’t need to figure out what IP address the device got or hard code static IP, just ask Eliot to list devices and it will take care of it on your behalf.

[ernoaapa:~]$ eli get devices
✓ Discovered 1 devices from network
HOSTNAME ENDPOINT
raspberrypi-e2ccbe63f23d.local. 192.168.64.79:5000

Eliot discovers devices in the same network automatically with a technique called Zeroconf. When your PC “magically” find printers from the network or when you start playing the Youtube video in your Chromecast, you actually use the same technology.

✨ It’s the same magic that Apple, Google, Microsoft uses to make your life easier

Run container

To run the container on your device, you can use the same command that you’re used to already when you run container locally with Docker,
just change docker command to eli.

[ernoaapa:~]$ eli run -i -t ernoaapa/hello-world
✓ Discovered 1 device(s) from network
Hello world!
Hello world!
Hello world!
^C
SIGINT received! I will stop the process now...
  ✓ Deleted pod [eliot]

Running container in the device is usually one-time ad-hoc testing and that’s why by default Eliot delete the container when you exit from the process. To deploy container permanently, you need to create a Pod.

Deploying containers

If you like Kubernetes, you❤️ Eliot

The core concept in Eliot is Pod, that might be familiar already if you have used Kubernetes. A Pod is the basic building block of Eliot and is the main model object that you deploy and manage. A Pod groups one or more containers together that are meant to get started, deployed and deleted together.

[ernoaapa:~]$ eli create pod --image ernoaapa/hello-world testing
✓ Discovered 1 device(s) from network
✓ Connected to raspberrypi-e2ccbe63f23d (192.168.64.94:5000)
✓ Completed docker.io/ernoaapa/hello-world:latest
Name: testing
Namespace: eliot
Device: raspberrypi-e2ccbe63f23d
State: running(1)
Restart Policy: always
Host Network: false
Host PID: false
Containers:
ernoaapa-hello-world:
Image: docker.io/ernoaapa/hello-world:latest
ContainerID: b9hh2hcsr6dg5c1ofhog
State: running
Restart Count: 0
Working Dir: /
Args:
- /print-hello-world.sh

You can list all running Pods with eli get pods

[ernoaapa:~]$ eli get pods
✓ Discovered 1 device(s) from network
✓ Connected to raspberrypi-e2ccbe63f23d (192.168.64.94:5000)
NAMESPACE   NAME      CONTAINERS   STATUS
eliot testing 1 running(1)

And get more detailed information with eli describe pod <name>
…just like in Kubernetes 😉

[ernoaapa:~]$ eli describe pod testing
✓ Discovered 1 device(s) from network
✓ Connected to raspberrypi-e2ccbe63f23d (192.168.64.94:5000)
Name: testing
Namespace: eliot
Device: raspberrypi-e2ccbe63f23d
State: running(1)
Restart Policy: always
Host Network: false
Host PID: false
Containers:
ernoaapa-hello-world:
Image: docker.io/ernoaapa/hello-world:latest
ContainerID: b9hh2hcsr6dg5c1ofhog
State: running
Restart Count: 0
Working Dir: /
Args:
- /print-hello-world.sh

Accessing the container

There are many features and I’m not gonna list all of them here, but I’ll show one more thing. Often there‘s need to get access to the device and the container to run debug or run some command.
With Eliot you don’t need to start setting up SSH or some other terminal access, all that you need to do is ask Eliot to execute a shell in the container and connect your local terminal session with it.

[ernoaapa:~]$ eli exec -i -t testing -- /bin/sh
/ #
/ # # I'm in the container running in my raspberryPI! :O
/ #
/ # date
Sat Jan 20 10:17:44 UTC 2018
/ # exit

Now that’s cool, right?! 😀

And at the end, clean up the device by removing all Pods and it’s fresh like at beginning of a day!

[ernoaapa:~]$ eli delete pod testing
✓ Discovered 1 device(s) from network
✓ Connected to raspberrypi-e2ccbe63f23d (192.168.64.95:5000)
✓ Fetched pods
✓ Deleted pod testing

Like it while it’s hot!

I would really appreciate if you drop me a ⭐️ at GitHub so I’ll get my dopamine boost and keep pushing new features out! 🙂

Eliot is in an early phase but is already implements most important functionalities to manage containers.
And getting started with RaspberryPI3 is easy with EliotOS.

Check out the documentation at http://docs.eliot.run
and source code at https://github.com/ernoaapa/eliot