Introduction

This article presents a comprehensive walkthrough for establishing Azure IoT Edge on the Windows platform, enabling it to run Linux-based containers. Additionally, it delves into the setup of a standalone OPC UA Publisher module, designed to subscribe to tags on a demonstration Kepware OPC UA server. This guide covers the latest version 2.9.6, of the OPC Publisher module.

To streamline your experience and eliminate on-premises requirements, we’ll leverage virtual machines on the Azure platform. While our demonstration simplifies the process, in actual factory settings, this VM-based setup could also be implemented at the factory level in real-world scenarios.

Note - In the below diagram, you can see two separate virtual machines: one for the Kepware OPC UA Server and another for the edge VM (EFLOW) running the OPC Publisher. However, in practice, we streamline our setup by using just one Azure VM. This single VM hosts both Kepware and the IoT Edge gateway (EFLOW) with the OPC Publisher. This consolidation makes things more efficient and easier to manage, simplifying our system architecture.

High level design

Pre-requisites

Industrial connectivity software

In this example, we’re using KepwareEX for our industrial connectivity needs. But keep in mind that there are plenty of other options out there that support OPC UA as well.

Create virtual machine

Install KepwareEX

Configure KepServerEx

Configure firewall

IoT Edge gateway

In this example, we’re utilizing Azure IoT Edge for Linux on Windows (EFLOW). This platform allows the execution of containerized Linux workloads alongside Windows applications. This approach is beneficial for manufacturing environments accustomed to managing Windows infrastructure. It empowers customers to seamlessly run production Linux-based cloud-native workloads on Windows. You can find more information about Azure IoT Edge for Linux on Windows here.

Create Edge device

We’ll set up just one IoT Hub and a single edge device using Symmetric Key attestation.

Deploy EFLOW onto the Windows-based VM

To Deploy EFLOW, First enable Hyper-V if it's not enabled. You can follow below the steps.

Once Hyper-V is enabled then to deploy EFLOW, it’s essential to check the requirements outlined here: EFLOW Deployment Requirements and follow the steps to deploy EFLOW. Remember, for Azure VMs, you’ll require nested virtualization support.

Enable the Hyper-V role through Settings

When the installation has completed you are prompted to restart your computer.

Configure OPCPublisher module

OPC Publisher is an open-source module from Microsoft that runs on Azure IoT Edge and bridges the gap between industrial assets and the Microsoft Azure cloud. It connects to OPC UA server systems and publishes telemetry data to Azure IoT Hub in various formats, including IEC62541 OPC UA PubSub standard format.

Deploy OPCPublisher module in Edge device

Validate deployment in Edge virtual machine, using PowerShell

Validate OPC publisher in Edge Virtual machine, using PowerShell

Disclaimer

Some content in this post draws inspiration and adaptation from the resources available at the Microsoft GitHub repository Azure-Samples/industrial-iot-patterns. Gratitude to the contributors for their valuable insights and resources.