Skip to content

Commit e819b9d

Browse files
committed
Cleaned up the rest of the article
1 parent 2ad58f2 commit e819b9d

File tree

4 files changed

+22
-18
lines changed

4 files changed

+22
-18
lines changed
88.2 KB
Loading
Binary file not shown.
57.9 KB
Loading

articles/iot-edge/tutorial-deploy-stream-analytics.md

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.custom: mvc
1313

1414
[!INCLUDE [iot-edge-version-all-supported](includes/iot-edge-version-all-supported.md)]
1515

16-
In this tutorial, you create an Azure Stream Analytics job in the Azure portal and then deploy it as an IoT Edge module with no additional code.
16+
In this tutorial, you create an Azure Stream Analytics job in the Azure portal and then deploy it as an IoT Edge module with no extra code.
1717

1818
You learn how to:
1919
> [!div class="checklist"]
@@ -44,7 +44,7 @@ Azure Stream Analytics provides a richly structured query syntax for data analys
4444

4545
## Create an Azure Stream Analytics job
4646

47-
In this section, you create an Azure Stream Analytics job that will do the following steps:
47+
In this section, you create an Azure Stream Analytics job that does the following steps:
4848

4949
* Receive data from your IoT Edge device.
5050
* Query the telemetry data for values outside a set range.
@@ -85,9 +85,9 @@ When you create an Azure Stream Analytics job to run on an IoT Edge device, it n
8585
| ----- | ----- |
8686
| Name | Provide a name for your job. For example, **IoTEdgeJob** |
8787
| Subscription | Choose the same subscription as your IoT hub. |
88-
| Resource group | We recommend to use the same resource group for all test resources you create during the IoT Edge quickstarts and tutorials. For example, a resource named **IoTEdgeResources**. |
88+
| Resource group | We recommend using the same resource group for all test resources you create during the IoT Edge quickstarts and tutorials. For example, a resource named **IoTEdgeResources**. |
8989
| Region | Choose a location close to you. |
90-
| Hosting environment | Select **Edge**. This option means deployment will go to an IoT Edge device instead of being hosted in the cloud. |
90+
| Hosting environment | Select **Edge**. This option means deployment goes to an IoT Edge device instead of being hosted in the cloud. |
9191

9292
1. Select **Review + create**.
9393

@@ -145,7 +145,7 @@ This section creates a job that receives temperature data from an IoT Edge devic
145145
HAVING Avg(machine.temperature) > 70
146146
```
147147

148-
In this query, the SQL code sends a reset command to the alert output if the average machine temperature in a 30-second window reaches 70 degrees. The reset command has been pre-programmed into the sensor as an action that can be taken.
148+
In this query, the SQL code sends a reset command to the alert output if the average machine temperature in a 30-second window reaches 70 degrees. The reset command has been preprogrammed into the sensor as an action that can be taken.
149149

150150
1. Select **Save query**.
151151

@@ -165,19 +165,19 @@ To prepare your Stream Analytics job to be deployed on an IoT Edge device, you n
165165
166166
## Deploy the job
167167
168-
You are now ready to deploy the Azure Stream Analytics job on your IoT Edge device.
168+
You're now ready to deploy the Azure Stream Analytics job on your IoT Edge device.
169169

170-
In this section, you use the **Set Modules** wizard in the Azure portal to create a *deployment manifest*. A deployment manifest is a JSON file that describes all the modules that will be deployed to a device, the container registries that store the module images, how the modules should be managed, and how the modules can communicate with each other. Your IoT Edge device retrieves its deployment manifest from IoT Hub, then uses the information in it to deploy and configure all of its assigned modules.
170+
In this section, you use the **Set Modules** wizard in the Azure portal to create a *deployment manifest*. A deployment manifest is a JSON file that describes all the modules that get deployed to a device. The manifest also shows the container registries that store the module images, how the modules should be managed, and how the modules can communicate with each other. Your IoT Edge device retrieves its deployment manifest from IoT Hub, then uses the information in it to deploy and configure all of its assigned modules.
171171

172-
For this tutorial, you deploy two modules. The first is **SimulatedTemperatureSensor**, which is a module that simulates a temperature and humidity sensor. The second is your Stream Analytics job. The sensor module provides the stream of data that your job query will analyze.
172+
For this tutorial, you deploy two modules. The first is **SimulatedTemperatureSensor**, which is a module that simulates a temperature and humidity sensor. The second is your Stream Analytics job. The sensor module provides the stream of data that your job query analyzes.
173173

174174
1. In the Azure portal, navigate to your IoT hub.
175175

176176
1. Select **Devices** under the **Device management** menu, and then select your IoT Edge device to open it.
177177

178178
1. Select **Set modules**.
179179

180-
1. If you previously deployed the SimulatedTemperatureSensor module on this device, it might autopopulate. If it does not, add the module with the following steps:
180+
1. If you previously deployed the SimulatedTemperatureSensor module on this device, it might autopopulate. If it doesn't, add the module with the following steps:
181181
182182
1. Select **+ Add** and choose **IoT Edge Module**.
183183
1. For the name, type **SimulatedTemperatureSensor**.
@@ -200,9 +200,9 @@ For this tutorial, you deploy two modules. The first is **SimulatedTemperatureSe
200200
201201
1. Select **Create**.
202202
203-
1. On your **Set modules** page of your device, after a few minutes, you should see the modules listed and running. Refresh the page if you don't see this, or wait a few more minutes then refresh it again.
203+
1. On your **Set modules** page of your device, after a few minutes, you should see the modules listed and running. Refresh the page if you don't see modules, or wait a few more minutes then refresh it again.
204204

205-
:::image type="content" source="media/tutorial-deploy-stream-analytics/module-confirmation.png" alt-text="Screenshot of .":::
205+
:::image type="content" source="media/tutorial-deploy-stream-analytics/module-confirmation.png" alt-text="Screenshot that shows your modules list of your device in the Azure portal.":::
206206

207207
### Understand the two new modules
208208

@@ -220,14 +220,18 @@ For this tutorial, you deploy two modules. The first is **SimulatedTemperatureSe
220220
221221
1. On the **Set modules on device:<your-device-name>** page, select **Next: Routes**.
222222
223-
1. On the **Routes** tab, you define how messages are passed between modules and the IoT Hub. Messages are constructed using name and value pairs. Add the route names and values with the pairs shown in following table. Replace instances of `{moduleName}` with the name of your Azure Stream Analytics module.
223+
1. On the **Routes** tab, you define how messages are passed between modules and the IoT Hub. Messages are constructed using name and value pairs.
224+
225+
Add the route names and values with the pairs shown in following table. Replace instances of `{moduleName}` with the name of your Azure Stream Analytics module. This module should be the same name you see in the modules list of your device on the **Set modules** page, as shown in the Azure portal.
226+
227+
:::image type="content" source="media/tutorial-deploy-stream-analytics/stream-analytics-module-name.png" alt-text="Screenshot showing the name of your Stream Analytics modules in your I o T Edge device in the Azure portal." lightbox="media/tutorial-deploy-stream-analytics/stream-analytics-module-name.png":::
224228
225229
| Name | Value |
226230
| --- | --- |
227-
| `telemetryToCloud` | `FROM /messages/modules/SimulatedTemperatureSensor/* INTO $upstream` |
228-
| `alertsToCloud` | `FROM /messages/modules/{moduleName}/* INTO $upstream` |
229-
| `alertsToReset` | `FROM /messages/modules/{moduleName}/* INTO BrokeredEndpoint("/modules/SimulatedTemperatureSensor/inputs/control")` |
230-
| `telemetryToAsa` | `FROM /messages/modules/SimulatedTemperatureSensor/* INTO BrokeredEndpoint("/modules/{moduleName}/inputs/temperature")`|
231+
| telemetryToCloud | FROM /messages/modules/SimulatedTemperatureSensor/* INTO $upstream |
232+
| alertsToCloud | FROM /messages/modules/{moduleName}/* INTO $upstream |
233+
| alertsToReset | FROM /messages/modules/{moduleName}/* INTO BrokeredEndpoint("/modules/SimulatedTemperatureSensor/inputs/control") |
234+
| telemetryToAsa | FROM /messages/modules/SimulatedTemperatureSensor/* INTO BrokeredEndpoint("/modules/{moduleName}/inputs/temperature")|
231235
232236
The routes you declare here define the flow of data through the IoT Edge device. The telemetry data from SimulatedTemperatureSensor are sent to IoT Hub and to the **temperature** input that was configured in the Stream Analytics job. The **alert** output messages are sent to IoT Hub and to the SimulatedTemperatureSensor module to trigger the reset command.
233237
@@ -264,7 +268,7 @@ Now you can go to your IoT Edge device to see the interaction between the Azure
264268
265269
You can watch the machine's temperature gradually rise until it reaches 70 degrees for 30 seconds. Then the Stream Analytics module triggers a reset, and the machine temperature drops back to 21.
266270

267-
![Reset command output into module logs](./media/tutorial-deploy-stream-analytics/docker_log.png)
271+
:::image type="content" source="./media/tutorial-deploy-stream-analytics/docker-log.png" alt-text="Screenshot that shows the reset command in your output from your module logs.":::
268272

269273
## Clean up resources
270274

@@ -276,7 +280,7 @@ Otherwise, you can delete the local configurations and the Azure resources that
276280

277281
## Next steps
278282

279-
In this tutorial, you configured an Azure Streaming Analytics job to analyze data from your IoT Edge device. You then loaded this Azure Stream Analytics module on your IoT Edge device to process and react to temperature increase locally, as well as sending the aggregated data stream to the cloud. To see how Azure IoT Edge can create more solutions for your business, continue on to the other tutorials.
283+
In this tutorial, you configured an Azure Streaming Analytics job to analyze data from your IoT Edge device. You then loaded this Azure Stream Analytics module on your IoT Edge device to process and react to temperature increase locally, and sending the aggregated data stream to the cloud. To see how Azure IoT Edge can create more solutions for your business, continue on to the other tutorials.
280284

281285
> [!div class="nextstepaction"]
282286
> [Deploy an Azure Machine Learning model as a module](tutorial-deploy-machine-learning.md)

0 commit comments

Comments
 (0)