Open main menu

DAVE Developer's Wiki β

Changes

SBCX-TN-002: Running Microsoft Azure IoT Edge runtime

534 bytes added, 11:35, 5 January 2021
no edit summary
{{InfoBoxTop}}
{{AppliesToSBCX}}
{{AppliesToAxel}}
{{AppliesToAxelEsatta}}
{{AppliesToAxelLite}}
{{AppliesToAxelEsattaAppliesToAXEL Lite TN}}{{AppliesToSMARX TN}}{{AppliesToSBCX}}{{AppliesToSBC Axel TN}}{{AppliesToIoT}}{{AppliesTo IoT TN}}
{{InfoBoxBottom}}
{{WarningMessage|text=This technical note was validated against specific versions of hardware and software. It may not work with other versions.}}
|August 2019
|First public release
|-
|1.1.0
|August 2019
|Added gateway ''patterns''
|}
As stated in [[MISC-TN-005:_Running_AWS_Greengrass_Core_on_SBCSPG|this Technical Note]], nowadays several cloud platforms are available to implement advanced (Industrial) IoT systems.
This Technical Note illustrates how to use the [[:Category:SBC-AXEL|SBC Axel]] (SBCX for short) to implement a [https://docs.microsoft.com/it-it/azure/iot-edge/about-iot-edge Microsoft AzureIoT Edge]-enabled edge device. Thanks to its flexibility and to its rich set of I/O interfaces, the SBCX single-board computer can be leveraged to implement an IoT gateway with good processing power. This combination makes this board particularly suited for the applications where significant computations have to be [[MISC-TN-005:_Running_AWS_Greengrass_Core_on_SBCSPG#Introduction|deployed on the edge]]. [[File:Edge-as-gateway.png|thumb|center|600px|Gateway ''patterns'' as defined by Microsoft Azure (image source: [https://docs.microsoft.com/en-us/azure/iot-edge/iot-edge-as-gateway ''How an IoT Edge device can be used as a gateway''])]] 
It is worth to remember that this Technical Note is not a step-by-step guide to set up the edge device and the cloud platform to implement an Azure-based system. Azure documentation is rich and detailed in this regard. Rather, this document aims to underline some specific SBCX-related steps required to run the Azure IoT Edge runtime on this device successfully. Nevertheless, in the following sections, several relevant links to the Azure documentation will be provided.
==Testbed configuration==
Regarding the hardware, the testbed used to TBD for this Technical Note (TN) consists of an SBCX single-board computer equipped with a quad-core i.MX6Q system-on-chip (SoC).
For what concerns software, the following configuration was used:
**The root file system is the same used for this [[MISC-TN-004:_Running_Debian_(armbian)_on_SBCSPG|TN]].
==Install the Azure IoT Edge runtime==
In essence, to install Azure IoT Edge runtime to the SBCX, the procedure described in the [https://docs.microsoft.com/en-us/azure/iot-edge/how-to-install-iot-edge-linux ''Install the Azure IoT Edge runtime on Debian-based Linux systems''] guide was followed.
The Azure IoT Edge runtime is released as a [https://www.docker.com/resources/what-container Moby/Docker container]. As such, the Linux kernel must be configured appropriately in order to provide all the functionalities required to support containerization.
Starting from the default configuration file (<code>imx_v7_axel_defconfig</code>), a new kernel configuration was set up providing all the required options. This configuration is available for download [TBD http://mirror.dave.eu/axel/SBCX-TN-002/imx_v7_axel_iotedge_defconfig here].
To verify what options are missing, [https://raw.githubusercontent.com/moby/moby/master/contrib/check-config.sh this script] is very useful. Some of the checked functionalities are relevant for x86 architectures, however.
The system is now ready to install the runtime as described in the guide mentioned previously. The last step should procude an output like this:
<pre class="board-terminal">
armbian@sbcspgsbcx:~/devel/azure-iot-edge$ sudo apt-get update
Get:1 http://security.debian.org stretch/updates InRelease [94.3 kB]
Hit:6 https://deb.nodesource.com/node_10.x stretch InRelease
Fetched 277 kB in 5s (50.2 kB/s)
Reading package lists... Done
armbian@sbcspgsbcx:~/devel/azure-iot-edge$ sudo apt-get install iotedge
Reading package lists... Done
Building dependency tree
</pre>
  After the Azure IoT Edge runtime is started, the IoT hub dashboard on cloud side should lool look like this:
[[File:SBCX-Azure-IoT-hub.png|thumb|center|600px|Azure IoT hub dashboard]]
dave_user, Administrators
5,188
edits