Add rolling logging to your Moby containers

Recently we were testing Azure IoT Edge on VMs which were limited in size. All went well, everything worked as expected until the whole solution stopped working.

After some research, we found out the VM disk was full of data.
This came to us as a surprise. What was eating up the hard disk?

After some more research, we checked out the Azure IoT Edge modules logging location: /var/lib/docker/containers/

Here you find folders, one for each container on your system. These are named after a unique GUID which is related to a specific container.

Note: you might need elevated rights to actually access these folders.

You can compare the folder GUID with the container ID in:

docker ps

If you open one of these folders you will find the logging of the related container.

We can, of course, remove the old logging by removing the files and everything seems to be working again. But that only delays the inevitable.

Let’s see if there is a more permanent solution.

Doorgaan met het lezen van “Add rolling logging to your Moby containers”

Adding offline capabilities to your IoT Edge device

Azure IoT Edge makes it possible to send messages to your IoT Hub using the extremely flexible IoT Edge runtime and modules.

The runtime also supports temporary offline capabilities in case the IoT Hub is unreachable.

Starting with runtime 1.0.5, it is possible to set a custom location (folder) in which messages are stored before they are sent to the IoTHub.

Let’s see how this turns out.

Doorgaan met het lezen van “Adding offline capabilities to your IoT Edge device”

Visualize Azure IoT Edge device routes as a flowchart in Asp.Net MVC

If you look at the routes page in Azure IoT Edge configuration wizard, what do you prefer?

The current notation:

Or do you prefer a flow chart like this:

The routes in Azure IoT edge are a clever solution to describe how messages from one module are sent to another. But the JSON notation can become less readable once you add more (up to twenty) modules. That could end up eg. nineteen routes or more!

Just as an experiment I was thinking about how the ease the experience using a graphical interface.

I prefer the second solution, probably just like you.

So let’s look at how you can create the same¬†experience with your routes of your IoT Edge device.

Doorgaan met het lezen van “Visualize Azure IoT Edge device routes as a flowchart in Asp.Net MVC”

Integrating SQLite in Azure IoT Edge for local storage

This article is updated on 29-04-2020 with configuration information for Windows containers on Windows 10 1809 LTS (Moby runtime).

Microsoft has opened the Azure Marketplace for IoT Edge modules. This makes it easy to find and install IoT Edge modules into your own IoT Edge devices.

At this moment a dozen or more modules are available:

We see a few well-known modules from Microsoft which support SQL Server, Modbus, OPC-UA or the Temperature sensor simulation.

One of these modules is supporting SQLite.

What is SQLite?

According to the homepage, SQLite is an in-process library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. The code for SQLite is in the public domain and is thus free for use for any purpose, commercial or private. SQLite is the most widely deployed database in the world with more applications than we can count, including several high-profile projects.

What does the module do?

This IoT Edge module is capable of accessing SQLite databases locally.

Microsoft says:

“Using this module, developers can build Azure IoT Edge solutions with the capability to access SQLite databases. The SQLite module is an Azure IoT Edge module, capable of executing SQL queries sent from other modules, and return the result to the senders or to the Azure IoT Hub via the Edge framework. Developers can modify the module tailoring to any scenario.”

The module is open source and both documentation and source code are put on GitHub.

Why should we use this module?

In the past, I checked out the SQL Server IoT module to persist IoT messages locally.

This SQLite module has a few advantages which you will like:

  • It’s lightweight
  • It’s based on a public domain framework
  • It’s integrated with the routing of IoT Edge

For me, that last item, we can integrate the module directly in the routing is interested.

So let’s check out how we can use it.

Doorgaan met het lezen van “Integrating SQLite in Azure IoT Edge for local storage”