You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The dataflow and dataflow endpoints for MQTT broker and Azure Event Grid can be deployed as standard Azure resources since they have Azure Resource Provider (RPs) implementations. This Bicep template file from [Bicep File for MQTT-bridge dataflow Tutorial](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/quickstarts/dataflow.bicep) deploys the necessary dataflow and dataflow endpoints.
153
-
154
-
Download the file to your local, and make sure to replace the values for `customLocationName`, `aioInstanceName`, `eventGridHostName` with yours.
150
+
By default, Azure IoT Operations deploys an MQTT broker as well as an MQTT broker dataflow endpoint. The MQTT broker dataflow endpoint is used to connect to the MQTT broker. The default configuration uses the built-in service account token for authentication. The endpoint is named `default` and is available in the same namespace as Azure IoT Operations. The endpoint is used as the source for the dataflows you create in the next steps.
155
151
156
-
Next, execute the following command in your terminal:
152
+
To learn more about the default MQTT broker dataflow endpoint, see [Azure IoT Operations local MQTT broker default endpoint](../connect-to-cloud/howto-configure-mqtt-endpoint.md#default-endpoint).
157
153
158
-
```azurecli
159
-
az stack group create --name MyDeploymentStack --resource-group $RESOURCE_GROUP --template-file /workspaces/explore-iot-operations/mqtt-bridge.bicep --action-on-unmanage 'deleteResources' --deny-settings-mode 'none' --yes
160
-
```
161
-
This endpoint is the source for the dataflow that sends messages to Azure Event Grid.
Create dataflow endpoint for the Azure IoT Operations built-in MQTT broker. This endpoint is the source for the dataflow that sends messages to Azure Event Grid.
Create dataflow endpoint for the Azure Event Grid. This endpoint is the destination for the dataflow that sends messages to Azure Event Grid. Replace `<EVENT_GRID_HOSTNAME>` with the MQTT hostname you got from the previous step. Include the port number `8883`.
207
157
208
-
---
158
+
# [Bicep](#tab/bicep)
209
159
210
-
This is the default configuration for the Azure IoT Operations MQTT broker endpoint. The authentication method is set to `ServiceAccountToken` to use the built-in service account token for authentication.
160
+
The dataflow and dataflow endpoints Azure Event Grid can be deployed as standard Azure resources since they have Azure Resource Provider (RPs) implementations. This Bicep template file from [Bicep File for MQTT-bridge dataflow Tutorial](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/quickstarts/dataflow.bicep) deploys the necessary dataflow and dataflow endpoints.
211
161
212
-
## Create an Azure Event Grid dataflow endpoint
162
+
Download the file to your local, and make sure to replace the values for `customLocationName`, `aioInstanceName`, `eventGridHostName` with yours.
Since you already deployed the resources in the previous section, there's no additional deployment needed. However, this endpoint is the destination for the dataflow that sends messages to Azure Event Grid. Replace `<EVENT-GRID-HOSTNAME>` with the hostname you got from the previous step. Include the port number `8883`.
Next, execute the following command in your terminal. Replace `<FILE>` with the name of the Bicep file you downloaded.
243
200
244
-
Create dataflow endpoint for the Azure Event Grid. This endpoint is the destination for the dataflow that sends messages to Azure Event Grid. Replace `<EVENT-GRID-HOSTNAME>` with the hostname you got from the previous step. Include the port number `8883`.
201
+
```azurecli
202
+
az stack group create --name DeployDataflowEndpoint --resource-group $RESOURCE_GROUP --template-file <FILE>.bicep --action-on-unmanage 'deleteResources' --deny-settings-mode 'none' --yes
@@ -268,11 +229,24 @@ Since the Event Grid MQTT broker requires TLS, the `tls` setting is enabled. No
268
229
269
230
## Create dataflows
270
231
271
-
# [Bicep](#tab/bicep)
232
+
Create two dataflows with the Azure IoT Operations MQTT broker endpoint as the source and the Azure Event Grid endpoint as the destination, and vice versa. No need to configure transformation.
272
233
273
-
In this example, there are two dataflows with the Azure IoT Operations MQTT broker endpoint as the source and the Azure Event Grid endpoint as the destination, and vice versa. No need to configure transformation.
Like the dataflow endpoint, execute the following command in your terminal:
310
+
311
+
```azurecli
312
+
az stack group create --name DeployDataflows --resource-group $RESOURCE_GROUP --template-file <FILE>.bicep --action-on-unmanage 'deleteResources' --deny-settings-mode 'none' --yes
313
+
```
314
+
335
315
# [Kubernetes](#tab/kubernetes)
336
316
337
-
Create two dataflows with the Azure IoT Operations MQTT broker endpoint as the source and the Azure Event Grid endpoint as the destination, and vice versa. No need to configure transformation.
@@ -383,10 +362,10 @@ Together, the two dataflows form an MQTT bridge, where you:
383
362
* Use TLS for both remote and local brokers
384
363
* Use system-assigned managed identity for authentication to the remote broker
385
364
* Use Kubernetes service account for authentication to the local broker
386
-
* Use the topic map to map the `tutorial/local` topic to the `telemetry/iot-mq` topic on the remote broker
365
+
* Use the topic map to map the `tutorial/local` topic to the `telemetry/aio` topic on the remote broker
387
366
* Use the topic map to map the `telemetry/#` topic on the remote broker to the `tutorial/cloud` topic on the local broker
388
367
389
-
When you publish to the `tutorial/local` topic on the local Azure IoT Operations MQTT broker, the message is bridged to the `telemetry/iot-mq` topic on the remote Event Grid MQTT broker. Then, the message is bridged back to the `tutorial/cloud` topic (because the `telemetry/#` wildcard topic captures it) on the local Azure IoT Operations MQTT broker. Similarly, when you publish to the `telemetry/iot-mq` topic on the remote Event Grid MQTT broker, the message is bridged to the `tutorial/cloud` topic on the local Azure IoT Operations MQTT broker.
368
+
When you publish to the `tutorial/local` topic on the local Azure IoT Operations MQTT broker, the message is bridged to the `telemetry/aio` topic on the remote Event Grid MQTT broker. Then, the message is bridged back to the `tutorial/cloud` topic (because the `telemetry/#` wildcard topic captures it) on the local Azure IoT Operations MQTT broker. Similarly, when you publish to the `telemetry/aio` topic on the remote Event Grid MQTT broker, the message is bridged to the `tutorial/cloud` topic on the local Azure IoT Operations MQTT broker.
Copy file name to clipboardExpand all lines: articles/iot-operations/manage-mqtt-broker/howto-test-connection.md
+9-3Lines changed: 9 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,14 +41,20 @@ The first option is to connect from within the cluster. This option uses the def
41
41
42
42
```yaml
43
43
apiVersion: v1
44
+
kind: ServiceAccount
45
+
metadata:
46
+
name: mqtt-client
47
+
namespace: azure-iot-operations
48
+
---
49
+
apiVersion: v1
44
50
kind: Pod
45
51
metadata:
46
52
name: mqtt-client
47
53
# Namespace must match MQTT broker BrokerListener's namespace
48
54
# Otherwise use the long hostname: aio-broker.azure-iot-operations.svc.cluster.local
49
55
namespace: azure-iot-operations
50
56
spec:
51
-
# Use the "mqtt-client" service account which comes with default deployment
57
+
# Use the "mqtt-client" service account created from above
52
58
# Otherwise create it with `kubectl create serviceaccount mqtt-client -n azure-iot-operations`
53
59
serviceAccountName: mqtt-client
54
60
containers:
@@ -128,10 +134,10 @@ The first option is to connect from within the cluster. This option uses the def
128
134
129
135
Since the broker uses TLS, the client must trust the broker's TLS certificate chain. You need to configure the client to trust the root CA certificate used by the broker.
130
136
131
-
To use the default root CA certificate, download it from the `aio-ca-trust-bundle-test-only` ConfigMap:
137
+
To use the default root CA certificate, download it from the `azure-iot-operations-aio-ca-trust-bundle` ConfigMap:
132
138
133
139
```bash
134
-
kubectl get configmap aio-ca-trust-bundle-test-only -n azure-iot-operations -o jsonpath='{.data.ca\.crt}' > ca.crt
140
+
kubectl get configmap azure-iot-operations-aio-ca-trust-bundle -n azure-iot-operations -o jsonpath='{.data.ca\.crt}' > ca.crt
135
141
```
136
142
137
143
Use the downloaded `ca.crt` file to configure your client to trust the broker's TLS certificate chain.
0 commit comments