In this IT Pro Challenge, learners will understand the basics of how an Azure Internet of Things (IoT) Hub works, how to use Azure portal to create and provision an Azure IoT Hub, add several devices, navigate Azure portal to locate multiple connection strings, and then use a device emulator to simulate communication between the Hub and the devices to test the connection strings. Learners will also verify that data from the newly created devices were ingested by the Azure IoT Hub. The skills acquired in this lab are useful for roles as a network or system administrator.
In this lab, the scenario is that you are a system administrator, and your company is rolling out an Internet of Things (IoT) data solution. Your job is to set up an Azure IoT Hub to ingest sensor readings at scale. You need to create an Azure IoT Hub resource and verify the connectivity between the device and the hub.
An IoT is a collection of interrelated devices; some examples of IoT devices are typically what we think of as “smart” devices - smart homes, smart parking systems, voice-controlled systems in elder care facilities, and even medical and military applications are all IoTs.
An Azure IoT Hub is a cloud service that provides connectivity between an Azure IoT application and its related devices.
Provision an Azure IoT Hub
To begin the lab, you will sign in to the Azure portal, provision an Azure IoT Hub in an existing resource group, set the Pricing and Scale tier (S1: Standard), and set the number of units. A single IoT Hub is equal to one unit; the number of units depends on the number of messages that your application requires. An S1 unit can process 40,000 units.
Configure the Azure IoT Hub
Next, in the Azure portal, you will navigate to the provided resource group blade and then Shared access policies. You need to copy the Connection string - primary key for the iotowner policy. Then you need to navigate to the Endpoints page of the same blade and copy the Event hub - compatible endpoint for the Events endpoint. Lastly, you need to navigate to the IoT devices page and add three devices (Building01, Vehicle02, and Equipment03) to the Azure IoT Hub.
You will use the connection strings that you copied when you test the endpoints in a later step of the lab.
Test the Azure IoT Hub
Now, you’re going to use a web app used in the lab to check the connection strings you copied in the previous step. The web app uses the same IoT code that a real IoT device would use when it emulates the devices. If you were successful, the webpage displays a success message. Then you need to verify the data capture from each of the three devices (Building01, Vehicle02, and Equipment03) that you added to the Azure IoT Hub and ensure that the test webpage displays simulated sensor readings.
By taking this lab, you will learn how to use the Azure portal to provision an Azure IoT Hub, create multiple IoT device registrations, and use a test website to confirm the successful ingestion of simulated sensor readings.