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
Copy file name to clipboardExpand all lines: articles/iot-operations/create-edge-apps/howto-deploy-dapr.md
+40-59Lines changed: 40 additions & 59 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,12 +15,12 @@ ms.date: 07/02/2024
15
15
16
16
The Distributed Application Runtime (Dapr) is a portable, serverless, event-driven runtime that simplifies the process of building distributed applications. Dapr lets you build stateful or stateless apps without worrying about how the building blocks function. Dapr provides several [building blocks](https://docs.dapr.io/developing-applications/building-blocks/): pub/sub, state management, service invocation, actors, and more.
17
17
18
-
MQTT broker supports two of these building blocks, powered by [MQTT broker](../manage-mqtt-broker/overview-iot-mq.md):
18
+
Azure IoT Operations supports two of these building blocks, powered by [MQTT broker](../manage-mqtt-broker/overview-iot-mq.md):
19
19
20
20
- Publish and subscribe
21
21
- State management
22
22
23
-
To use the MQTT broker Dapr pluggable components, define the component spec for each of the APIs and then [register this to the cluster](https://docs.dapr.io/operations/components/pluggable-components-registration/). The Dapr components listen to a Unix domain socket placed on the shared volume. The Dapr runtime connects with each socket and discovers all services from a given building block API that the component implements.
23
+
To use the Dapr pluggable components, define the component spec for each of the APIs and then [register this to the cluster](https://docs.dapr.io/operations/components/pluggable-components-registration/). The Dapr components listen to a Unix domain socket placed on the shared volume. The Dapr runtime connects with each socket and discovers all services from a given building block API that the component implements.
To register MQTT broker's pluggable pub/sub and state management components, create the component manifest yaml, and apply it to your cluster.
40
+
To register the pub/sub and state management pluggable components, create the component manifest yaml, and apply it to your cluster.
41
41
42
42
To create the yaml file, use the following component definitions:
43
43
44
44
> [!div class="mx-tdBreakAll"]
45
45
> | Component | Description |
46
46
> |-|-|
47
47
> |`metadata.name`| The component name is important and is how a Dapr application references the component. |
48
-
> | `metadata.annotations` | Component annotations used by the Dapr sidecar injector
49
-
> |`spec.type`|[The type of the component](https://docs.dapr.io/operations/components/pluggable-components-registration/#define-the-component), which must be declared exactly as shown. It tells Dapr what kind of component (`pubsub` or `state`) it is and which Unix socket to use. |
50
-
> |`spec.metadata.url`| The URL tells the component where the local MQTT broker endpoint is. Defaults to `8883` is MQTT broker's default MQTT port with TLS enabled. |
51
-
> |`spec.metadata.satTokenPath`| The Service Account Token is used to authenticate the Dapr components with the MQTT broker |
52
-
> |`spec.metadata.tlsEnabled`| Define if TLS is used by the MQTT broker. Defaults to `true`|
53
-
> |`spec.metadata.caCertPath`| The certificate chain path for validating the broker, required if `tlsEnabled` is `true`|
54
-
> |`spec.metadata.logLevel`| The logging level of the component. 'Debug', 'Info', 'Warn' and 'Error' |
48
+
> | `metadata.annotations` | Component annotations used by Dapr sidecar injector, defining the image location and required volume mounts
49
+
> |`spec.type`|[The type of the component](https://docs.dapr.io/operations/components/pluggable-components-registration/#define-the-component), which needs to be declared exactly as shown |
50
+
> |`spec.metadata.keyPrefix`| Defines the key prefix used when communicating to the statestore backend. See the [Dapr documentation](https://docs.dapr.io/developing-applications/building-blocks/state-management/howto-share-state) for more information |
51
+
> |`spec.metadata.hostname`| The MQTT broker hostname. Defaults to `aio-mq-dmqtt-frontend`|
52
+
> |`spec.metadata.tcpPort`| The MQTT broker port number. Default is `8883`|
53
+
> |`spec.metadata.useTls`| Define if TLS is used by the MQTT broker. Defaults to `true`|
54
+
> |`spec.metadata.caFile`| The certificate chain path for validating the MQTT broker. Required if `useTls` is `true`. This file must be mounted in the pod with the specified volume name |
55
+
> |`spec.metadata.satAuthFile `| The Service Account Token (SAT) file is used to authenticate the Dapr components with the MQTT broker. This file must be mounted in the pod with the specified volume name |
55
56
56
-
1. Save the following yaml, which contains the component definitions, to a file named `components.yaml`:
57
+
1. Save the following yaml, which contains the Azure IoT Operations component definitions, to a file named `components.yaml`:
Copy file name to clipboardExpand all lines: articles/iot-operations/create-edge-apps/tutorial-event-driven-with-dapr.md
+14-4Lines changed: 14 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,6 @@ To start, create a yaml file that uses the following definitions:
61
61
name: mq-event-driven-dapr
62
62
namespace: azure-iot-operations
63
63
spec:
64
-
replicas: 1
65
64
selector:
66
65
matchLabels:
67
66
app: mq-event-driven-dapr
@@ -118,11 +117,16 @@ To start, create a yaml file that uses the following definitions:
118
117
mq-event-driven-dapr 3/3 Running 0 30s
119
118
```
120
119
121
-
122
120
## Deploy the simulator
123
121
124
122
Simulate test data by deploying a Kubernetes workload. It simulates a sensor by sending sample temperature, vibration, and pressure readings periodically to the MQTT broker using an MQTT client on the `sensor/data` topic.
125
123
124
+
1. Patch BrokerListener to allow unauthenticated connection, to simplify injection of simulated data:
0 commit comments