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 and administer your database.

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”

Advertenties

Administer your SQL Server in Docker

As with many things, you have to do it, to believe it.

The same goes for the Azure IoT Edge solution.

With the new IoT Edge solution, Microsoft provides a platform, both powerful and scalable. It’s based on Docker and logic is put in Docker containers.

And in many presentations, this (correct) picture is used to show the capabilities:

I am already working with the IoT Edge preview quite some time and there is a ‘weak’ spot in the image.

I already marked it in red so it’s not that hard to find.

On several occasions, non-technical people explained the local storage as being a database to persist data from internal logic.

I understand the confusion, but this is just a ‘database’ used by the IoT Edge internals (I assume mostly the Edge Hub module) and it is not accessible by users. I know for sure it’s used for the store-and-forward pattern used to send ‘upstream’ messages to the cloud.

Once a message is routed to be sent to the cloud, it’s first stored by the EdgeHub. If the connection to the Azure IoT Hub cannot be established, the message is stored with a certain retention time ( see its configuration “storeAndForwardConfiguration”: { “timeToLiveSecs”: 7200} ).

So, how can we add local storage to our IoT Edge if we want to do something with custom code and databases, etc.

Well, Microsoft already has written a great piece of documentation here.

There, you can see how you create an SQL Server database both on Linux and Windows containers and you learn how to create a database and a table inside it. Finally, you access it using some Azure function.

Let’s dig a bit deeper into this.

We will look on other  (simpler) ways to work with the database.

Continue reading “Administer your SQL Server in Docker”

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”

Deploying a NodeJS server with SocketIO to Docker using Azure IoT Edge

The current Azure IoT Edge public preview uses Docker to deploy logic from the cloud into local gateways. It’s currently featuring:

  • C# modules written in .Net standard
  • Python modules
  • Azure Function built on your machine
  • Azure Stream Analytics jobs built and deployed in the cloud
  • Azure Machine Learning

We can expect Microsoft will support other types of modules soon as they have proven with other recent projects. An Azure Cognitive Services module is a good example, it’s put in every IoT Edge presentation.

The IoT Edge portal makes it possible to deploy modules which are available in private or public image repositories.

Could it be possible to build and deploy images to the gateway which are not specifically designed for IoT Edge?

It turns out, it is possible.

Let’s deploy a NodeJS server which serves SocketIO.

Continue reading “Deploying a NodeJS server with SocketIO to Docker using Azure IoT Edge”

Migrating existing IoT Edge modules to the 0.2.0 template scaffolding

Just today I found out a new version of the Azure IoT Edge extension for VSCode is available. Amongst other changes like new commands, Microsoft also introduced a new folder structure and new files.

Microsoft also introduced a migration wizard for old modules.

This was a bit of a confusion. My first thoughts were that Microsoft offered migration from the old 1.1 modules (based on classes) to the new (Docker-based) modules.

But this migration is offered for previous built C# modules and IoT Edge Azure functions. Microsoft offers some documentation but let’s look at this migration in detail.

I have built and blogged about a C# Heartbeat module. Let’s migrate it.

Continue reading “Migrating existing IoT Edge modules to the 0.2.0 template scaffolding”

GABC – Atos Amstelveen zaterdag 21 april 2018

“Intelligent Cloud, Intelligent Edge”

logo-2018-500x444

Voor het derde jaar op rij organiseert Atos de gratis Global Azure Bootcamp op haar hoofdkantoor te Amstelveen.

Aanmelden doe je hier!

Traditioneel ligt bij ons de focus op IoT en dus passeren alle mogelijkheden die Microsoft Azure op dit vlak biedt. Er worden naast presentaties ook verschillende workshops gegeven. En natuurlijk is er voldoende tijd om ook met onze Azure IoT platform experts van gedachten te wisselen. Of je nu vragen hebt over Domotica, Lora, Windows 10 IoT Core of industriële IoT, we gaan samen op zoek naar het antwoord.

De agenda voor de dag ziet er als volgt uit:

9.30 Inloop + ontvangst

10.00 Opening

12.00 Lunch

15.30 Tombola + Afsluiting met een hapje en drankje

Tussendoor zijn er meerdere labs, workshops en natuurlijk presentaties over IoT.

Nieuw is de door ons ontwikkelde workshop waarbij jouw laptop in een Edge gateway verandert. Hierbij krijgt je de opdracht om op eenvoudige wijze data uit een industrieel Modbus protocol naar de Cloud te brengen.

En we hebben wederom de workshop rond Lora en Azure op het programma staan.

Neem je laptop dus zeker mee. Voor de labs en workshops is een installatie van Visual Studio 2017 of Visual Code nodig en een Azure Account. Wie nog geen Azure account heeft krijgt zonder verdere verplichtingen de beschikking over een trial licentie.

Ons adres is:

Atos Nederland

Burgemeester Rijnderslaan 30

1185 MC Amstelveen

https://atos.net/nl/nederland

Route

(Gasten dienen zich op ons hoofdkantoor te kunnen legitimeren. Neem dus een geldig legitimatiebewijs mee.)

Writing commands to IoT Edge Modbus Modules

Microsoft provides several out-of-the-box modules for their Azure IoT Edge platform. If we do a quick search at the Public Docker repository, we see modules like

  • microsoft/iot-edge-opc-publisher
  • microsoft/iot-edge-opc-proxy
  • microsoft/azureiotedge-modbus-tcp
  • etc,

I already have described in a previous blog, how to consume and read data from that Modbus module. After checking out the documentation and some testing, I found out how to write commands back to the device too.

Let’s check out how we can use this in a Custom C# module. After that, we use it in an Azure Functions Module. So let’s do a deeper dive into Azure Functions on the IoT Edge as well.

Continue reading “Writing commands to IoT Edge Modbus Modules”