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.

Continue reading “Add rolling logging to your Moby containers”

Advertenties

Create your own local Azure IoT Edge dashboard

Earlier this year, when Azure IoT Edge was still in Public Preview, I wrote a couple of blogs about Visualizing Azure IoT Edge using local dashboard.

Back then, I had to do some magic with both a C# IoT Edge module, a custom NodeJS docker container, and a Docker network to get it running.

Since then, a lot has changed. Microsoft already released a ton of new features. a And there is still more to come regarding the Azure IoT platform.

But that awkward local dashboard solution was nagging me. A few months ago, Microsoft introduced a NodeJS module as a first-class citizen for IoT Edge modules.

So it was time to pick up the gauntlet and use NodeJS for this awesome local IoT Edge dashboard:

#tldr;  If you like to dig into the code, zip it, clone it, extend it or even make a pull request, I made this project open source. If you only want to use it the easy-going way, pull it from docker eg. ‘svelde/localdashboard:1.0.1-amd64′.

At this moment, only Linux containers are supported. It is tested both on Windows and Ubuntu as host OS.

Interested in this module? Let’s see how you can use it.

Continue reading “Create your own local Azure IoT Edge dashboard”

Upgrading your Azure IoT Edge device remotely to the latest release

Last week, the Microsoft Ignite event was hosted in Orlando. As with every Microsoft Event, a lot of new stuff is released by the Microsoft product teams.

The same goes for the IoT Edge runtime, the portal and the logic running on IoT Edge.

The IoT Edge runtime bumped up to version 1.0.2 and there are lots of new features introduced like extended offline operation and proxy support.

And there a lot of bugfixes which is always good 🙂

But the documentation considering the update of your gateways is a bit limited.

If I follow the update procedure, I have to update it on the machine itself.

Let’s check out how we update our runtime remotely.

Update: Microsoft released this document with more details after I wrote this blog. Some parts could be out-dated by now.

Continue reading “Upgrading your Azure IoT Edge device remotely to the latest release”

Modbus RTU on Azure IoT Edge

Microsoft is serious about IoT Edge. Azure IoT Edge is now GA for a few months and just last week the version was bumped up to 1.0.1.

The same effort is put into Edge modules. Microsoft provides several modules for different protocols like OPC-UA and Modbus.

In the past I already wrote a couple of times about Modbus TCP in IoT Edge. It’s easy to use and reliable. The Microsoft Modbus module is already available in GA. And I even noticed a reference to “docker pull mcr.microsoft.com/azureiotedge/modbus:1.0”.

If you look deeper into the documentation, you can see that the module supports Modbus RTU too!

It’s always good to learn about other protocols so I arranged some hardware and started a journey.

Let’s see what we need to get started with Modbus RTU. Continue reading “Modbus RTU on Azure IoT Edge”

Add cloud logging to Azure IoT Edge

Azure IoT Edge is an interesting platform for Edge computing. It opens up a lot of new scenarios for local computing as an extension of the Azure cloud. And the combination is both secure and flexible due to the usage of open (security) standards.

But it’s still in Public Preview so once in a while things go sour. Either no messages arrive at in the cloud or local logic is not executed. So this means you have to log into your Edge device (remember to always have a backup plan) and check out the local logging.

But what if I could check out the logging right within Azure?

I came across this Github gem to make Azure IoT Edge local logs available in Azure! And it only takes 15 minutes or less.

“This repository provides an Azure IoT Edge module that can be used to send container logs from other modules on the edge device, including the edge runtime, securely to Azure Log Analytics in the cloud. “

Continue reading “Add cloud logging to Azure IoT Edge”

Your Docker container takes care of persisting your SQL Server database

Microsoft has a great solution for persisting your local data collected by the IoT Edge. It’s up to you to get the data in and out of your database. But you have a convenient way of storing your precious information into some kind of persistent storage.

As seen in my previous blog, it’s not that hard to deploy from the cloud and administer your SQL database locally.

But how persistent is your database actually? Can you trust Docker for taking care of your data?

In this blog, we try to answer this question.

Continue reading “Your Docker container takes care of persisting your SQL Server database”

Visualizing Azure IoT Edge using local dashboard

In my last series of blogs, we first looked at how to deploy a non-IoT Edge module using Azure IoT Edge.

For this example, I used a NodeJS website running SocketIO. It was possible to access this website with a default SocketIO chat application.

After that, we looked at how to add some charts in the HTML page offered by the NodeJS server.

Let’s see how we can combine this all into one solution. Let’s build a local for raw Azure IoT Edge telemetry.

Continue reading “Visualizing Azure IoT Edge using local dashboard”