Azure IoT Hub
Example for the Azure IoT hub application on Synps
In this tutorial, we will deploy a simple open-source application that collects metrics and send them to AWS IoT Core for further processing. All code for this blog post can be found at:
https://github.com/synpse-hq/metrics-nats-example-app - Sample metrics application https://github.com/synpse-hq/azure-iot-hub-example - Azure IoT Hub example
Technologies used
Synpse - manage devices and deploy applications to them
NATs - a lightweight message broker that can run on-prem
Azure IoT Hub - message broker between all devices and Azure
Steps:
Create Azure IoT hub
Configure rules to forward results into Azure blob storage
Create Azure "Thing"/IoT device for Synpse
Demo Synpse application from 3 microservices - Metrics demo, NATs messaging, Azure IoT python forwarder containers
Azure IoT Hub
Create Azure IoT hub:
Create certificate based on Azure documentation.
Upload the certificates for Azure device by creating "device-identity"
For this example we gonna create message route to the storage account blob.
Create storage account:
Create container/bucket for results:
Create IoT hub endpoint for message routing:
Use routing in question with our HUB (endpoint name is same as --endpoint-name)
Deploy an application
Deploy an application. Modify application YAML with your thing endpoint.
Create certificate secrets
Deploy the application. You will need to modify other values inside YAML file.
where synpse-azure-example.yaml
is
You should see messages coming into the Azure IoT Hub
Once running, you should see application running and data coming into Azure storage account blob.
Last updated