Skip to content

Commit fa391eb

Browse files
committed
Update tutorials
1 parent a3f9ada commit fa391eb

File tree

2 files changed

+45
-10
lines changed

2 files changed

+45
-10
lines changed

articles/iot-operations/connect-to-cloud/tutorial-dataflow-asset-event-grid.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ms.date: 07/23/2024
1515
In this tutorial, you set up a dataflow from an asset to Azure Event Grid. You configure the source to read data from an asset, the destination to send data to Azure Event Grid, and apply a transformation to the data.
1616

1717
1. Create the asset.
18-
1. Create an MQTT broker endpoint.
18+
1. Create an MQTT broker endpoint by creating a file named `mqtt-endpoint.yaml` with the following content:
1919

2020
```yaml
2121
apiVersion: connectivity.iotoperations.azure.com/v1beta1
@@ -27,7 +27,13 @@ In this tutorial, you set up a dataflow from an asset to Azure Event Grid. You c
2727
mqttSettings: {}
2828
```
2929
30-
1. Create an Azure Event Grid endpoint.
30+
1. Apply the configuration to create the MQTT broker endpoint.
31+
32+
```bash
33+
kubectl apply -f mqtt-endpoint.yaml
34+
```
35+
36+
1. Create an Azure Event Grid endpoint by creating a file named `eventgrid-endpoint.yaml` with the following content:
3137

3238
```yaml
3339
apiVersion: connectivity.iotoperations.azure.com/v1beta1
@@ -45,7 +51,13 @@ In this tutorial, you set up a dataflow from an asset to Azure Event Grid. You c
4551
mode: enabled
4652
```
4753
48-
1. Create a dataflow with the asset as the source and Azure Event Grid as the destination.
54+
1. Apply the configuration to create the Azure Event Grid endpoint.
55+
56+
```bash
57+
kubectl apply -f eventgrid-endpoint.yaml
58+
```
59+
60+
1. Create a dataflow with the asset as the source and Azure Event Grid as the destination by creating a file named `dataflow.yaml` with the following content:
4961

5062
```yaml
5163
apiVersion: connectivity.iotoperations.azure.com/v1beta1
@@ -66,3 +78,8 @@ In this tutorial, you set up a dataflow from an asset to Azure Event Grid. You c
6678
endpointRef: eventgrid
6779
dataDestination: factory/$topic.2
6880
```
81+
82+
1. Send test data to the dataflow.
83+
1. View messages in Azure Event Grid.
84+
1. Send test data to Azure Event Grid.
85+
1. View messages in MQTT broker.

articles/iot-operations/connect-to-cloud/tutorial-dataflow-mqtt-event-grid.md

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ ms.date: 07/23/2024
1212

1313
# Tutorial: Create bi-directional MQTT bridge to Azure Event Grid using dataflows
1414

15-
In this tutorial, you will set up a bi-directional MQTT bridge between an MQTT broker and Azure Event Grid using dataflows. To expedite the process, you will use the default settings for the MQTT broker and Azure Event Grid endpoints, and no transformation will be applied.
15+
In this tutorial, you set up a bi-directional MQTT bridge between an MQTT broker and Azure Event Grid using dataflows. To expedite the process, default settings for the MQTT broker and Azure Event Grid endpoints are used. No transformation are applied.
1616

17-
1. Create an MQTT broker endpoint.
17+
1. Create an MQTT broker endpoint for the MQTT source by creating a file named `mqtt-endpoint.yaml` with the following content:
1818

1919
```yaml
2020
apiVersion: connectivity.iotoperations.azure.com/v1beta1
@@ -26,7 +26,13 @@ In this tutorial, you will set up a bi-directional MQTT bridge between an MQTT b
2626
mqttSettings: {}
2727
```
2828
29-
1. Create an Azure Event Grid endpoint.
29+
1. Apply the configuration to create the MQTT broker endpoint.
30+
31+
```bash
32+
kubectl apply -f mqtt-endpoint.yaml
33+
```
34+
35+
1. Create an Azure Event Grid endpoint for the destination by creating a file named `eventgrid-endpoint.yaml` with the following content:
3036

3137
```yaml
3238
apiVersion: connectivity.iotoperations.azure.com/v1beta1
@@ -44,7 +50,21 @@ In this tutorial, you will set up a bi-directional MQTT bridge between an MQTT b
4450
mode: enabled
4551
```
4652
47-
1. Give AIO permission to send messages to the Azure Event Grid endpoint.
53+
1. Apply the configuration to create the Azure Event Grid endpoint.
54+
55+
```bash
56+
kubectl apply -f eventgrid-endpoint.yaml
57+
```
58+
59+
1. Run the following command to get the Azure IoT Operations managed identity.
60+
61+
```bash
62+
az k8s-extension show
63+
```
64+
65+
1. Get the `identity` from the output.
66+
67+
1. Grant Azure IoT Operations permission to send messages to the Azure Event Grid endpoint.
4868

4969
```bash
5070
az role assignment create --role "EventGrid TopicSpaces Publisher" --assignee <AIO identity> --scope <Azure Event Grid endpoint resource ID>
@@ -54,9 +74,7 @@ In this tutorial, you will set up a bi-directional MQTT bridge between an MQTT b
5474
az role assignment create --role "EventGrid TopicSpaces Subscriber" --assignee <AIO identity> --scope <Azure Event Grid endpoint resource ID>
5575
```
5676

57-
You can find the AIO managed identity in the Azure IoT Operations portal or use `az k8s-extension show` , under `identity` .
58-
59-
1. Create two dataflows with the MQTT broker endpoint as the source and the Azure Event Grid endpoint as the destination, and vice versa. No need to configure transformation.
77+
1. Create two dataflows with the MQTT broker endpoint as the source and the Azure Event Grid endpoint as the destination, and vice versa. No need to configure transformation. Create a file named `dataflow.yaml` with the following content:
6078

6179
```yaml
6280
apiVersion: connectivity.iotoperations.azure.com/v1beta1

0 commit comments

Comments
 (0)