In this video, I'm going to show you how
to deploy Azure IoT Edge runtime onto a Linux device, and in this demo I'll be using a
Raspberry Pi running raspbian. But first, I'll illustrate to you what edge
computing is all about. In order to understand what edge computing is all
about, we need to first understand the role played by cloud computing in
industry. In a typical plant today you've machines that are generating data and
sending it to the cloud via a gateway that routes the data straight to a
storage service or to an analytic software. The job of the analytic
software would be to convert the data into something digestible by a real-time
dashboard or a machine learning algorithm. In the case of machine
learning, the algorithm is trained using the data and out of that comes a model,
a model that describes all things that the machine has experienced in the past.
So, this is useful in the sense that you can then use the model in real time
such that when the machine encounters an undesired condition you can take action
before it causes damage by sending a control signal to the machine at the
factory floor. So the idea of edge computing is that, instead of sending all
the data upstream and have all this activity happening at the cloud, why not
push all of these components to the edge closer to the factory equipment so that
we can have these decisions made right at the source of the data, in order to
reduce the cost of transferring data, benefit from unlimited bandwidth, and be
able to employ these technologies in mission-critical applications.
So to begin, I'll go to my Azure Portal and create an IoT hub that will be used
for bi-directional communication between the cloud and my edge device, so this
communication channel will be used to download edge modules and perform some
basic configurations. Ok, and then when the deployment of my IoT hub is complete,
I'll go to the IoT Hub to create an Edge Device, an IoT edge device. Which is
essentially a reflection of the actual device, otherwise known as the device
twin. Such that when we need to update our edge device we update
this cloud version instead, and changes will be automatically synced. So we copy
its connection string to be used for configuring our raspberry pi. Okay, so
I've got my raspberry pi connected to this monitor here, but I'll be using SSH
to remotely access its terminal on my PC Now, since our Azure IoT Edge runtime and modules are run as Docker containers we need to have Docker installed on our edge
device. So we'll begin by installing a docker engine, called Moby, which is officially
supported with our Azure IoT Edge. When the installation of the docker engine is
complete, we move on to the installation of Azure IoT Edge runtime using the following
commands. And then when that is complete, we move on to manually provision the
device. We do that by opening the Azure IoT Edge config file, and updating the device
connection string with the one that we copied earlier in our Azure Portal. And
then we save and the file. And then after provisioning the device we
restart the Azure IoT Edge daemon. And then we can check the status of the runtime, and here
we can see that our Azure IoT Edge runtime is active and running. Okay, so the next
thing that I want to show you is how you can deploy a module onto your as your
Azure IoT Edge runtime. And to do that I'm going to use a prebuilt module that simulates
temperature and pressure. So, navigate to your IoT hub, goto IoT edge. Go to the
device. Select Set Modules, and then click add an IoT Edge Module. Enter the name and then we
need to provide the image URI for the module container. So if you build your
images into a Docker container you then supposed to provide the URI of that image
here. Next. So this is our default route that sends
all messages to IoT Hub. And then here you can see our
tempSensor module is now listed as part of the modules on our IoT Edge
runtime. And then back here on our Raspberry PI terminal, we can list the modules that
are currently running there and then you see we've got our temperature sensor
also running. And then finally, we can view the messages that are being
generated and sent from our temperature sensor module. And then if we go back to
our IoT hub overview, we should see the messages being sent from the device to
the cloud. Thanks for watching, if you've got any thought at all on this video, I'd
love to hear about it in the comments section below.
And if you found the video useful, please share it with your connections and don't
forget to subscribe to the channel to get more videos like this