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
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Azure IoT Operations supports two of these building blocks, powered by [MQTT bro
20
20
- Publish and subscribe
21
21
- State management
22
22
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.
23
+
To use the Dapr pluggable components, define the component spec for each of the APIs and then [register with 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.
24
24
25
25
## Install Dapr runtime
26
26
@@ -47,7 +47,7 @@ To create the yaml file, use the following component definitions:
47
47
> |`metadata:name`| The component name is important and is how a Dapr application references the component. |
48
48
> |`metadata:annotations:dapr.io/component-container`| Component annotations used by Dapr sidecar injector, defining the image location, volume mounts and logging configuration |
49
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 |
50
+
> |`spec:metadata:keyPrefix`| Defines the key prefix used when communicating to the statestore backend. See more information, see[Dapr documentation](https://docs.dapr.io/developing-applications/building-blocks/state-management/howto-share-state) for more information |
51
51
> |`spec:metadata:hostname`| The MQTT broker hostname. Default is `aio-mq-dmqtt-frontend`|
52
52
> |`spec:metadata:tcpPort`| The MQTT broker port number. Default is `8883`|
53
53
> |`spec:metadata:useTls`| Define if TLS is used by the MQTT broker. Default is `true`|
@@ -167,4 +167,4 @@ To configure authorization policies to MQTT broker, first you create a [BrokerAu
167
167
168
168
## Next steps
169
169
170
-
Now that you have deployed the Dapr components, you can [Use Dapr to develop distributed applications](howto-develop-dapr-apps.md).
170
+
Now that the Dapr components are deployed to the cluster, you can [Use Dapr to develop distributed applications](howto-develop-dapr-apps.md).
Copy file name to clipboardExpand all lines: articles/iot-operations/create-edge-apps/howto-develop-dapr-apps.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ The first step is to write an application that uses a Dapr SDK to publish/subscr
36
36
37
37
After you finish writing the Dapr application, build the container:
38
38
39
-
1.To package the application into a container, run the following command:
39
+
1.Package the application into a container with the following command:
40
40
41
41
```bash
42
42
docker build . -t my-dapr-app
@@ -50,9 +50,9 @@ After you finish writing the Dapr application, build the container:
50
50
51
51
## Deploy a Dapr application
52
52
53
-
The following [Deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/) definition contains volumes for SAT authentication and TLS certificate chain, as well as utilizing Dapr sidecar injection to automatically add the pluggable components to the Pod.
53
+
The following [Deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/) definition contains volumes for SAT authentication and TLS certificate chain, and utilizes Dapr sidecar injection to automatically add the pluggable components to the Pod.
54
54
55
-
The following definition components will typically require customization to your specific application:
55
+
The following definition components might require customization to your specific application:
56
56
57
57
>| Component | Description |
58
58
>|-|-|
@@ -126,7 +126,7 @@ The following definition components will typically require customization to your
126
126
kubectl get pods -w
127
127
```
128
128
129
-
The pod should report 3 containers running after a short interval, as shown in the following example output:
129
+
The pod should report three containers running after a short interval, as shown in the following example output:
130
130
131
131
```output
132
132
NAME READY STATUS RESTARTS AGE
@@ -136,7 +136,7 @@ The following definition components will typically require customization to your
136
136
137
137
## Troubleshooting
138
138
139
-
If the application doesn't start or you see the containers in `CrashLoopBackoff`, the logs for the `daprd` container often contains useful information.
139
+
If the application doesn't start or you see the containers in `CrashLoopBackoff` state, the log for the `daprd` container often contains useful information.
140
140
141
141
Run the following command to view the logs for the daprd component:
[MQTTnet](https://dotnet.github.io/MQTTnet/) is an open-source, high performance .NET library for MQTT based communication. This article uses a Kubernetes service account token and MQTTnet to connect to MQTT broker. You should use service account tokens to connect to in-cluster clients.
19
+
[MQTTnet](https://dotnet.github.io/MQTTnet/) is an open-source, high performance .NET library for MQTT based communication. This article uses a Kubernetes service account token and MQTTnet to connect to MQTT broker. You should use service account tokens to connect in-cluster applications.
20
20
21
21
## Sample code
22
22
23
23
The [sample code](https://github.com/Azure-Samples/explore-iot-operations/tree/main/samples/mqtt-client-dotnet/Program.cs) performs the following steps:
24
24
25
-
1. Creates an MQTT client using the `MQTTFactory` class:
25
+
1. Creates an MQTT client using the `MqttFactory` class:
1. AlloptionsfortheMQTTclientarebundledintheclassnamed`MqttClientOptions`. It's possible to fill options manually in code via the properties but you should use the `MqttClientOptionsBuilder` as advised in the [client](https://github.com/dotnet/MQTTnet/wiki/Client) documentation. The following code shows how to use the builder with the following options:
43
+
1. TheMQTTclientoptionsareconfiguredusingthe `MqttClientOptions`class. Usingthe `MqttClientOptionsBuilder` asadvisedinthe [client](https://github.com/dotnet/MQTTnet/wiki/Client) documentation is the advised way of setting the options:
47
44
48
45
```csharp
49
-
# Create TCP based options using the builder amd connect to broker
46
+
// Create TCP based options using the builder amd connect to broker
Copy file name to clipboardExpand all lines: articles/iot-operations/create-edge-apps/tutorial-event-driven-with-dapr.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,10 +19,10 @@ In this walkthrough, you deploy a Dapr application to the cluster. The Dapr appl
19
19
The Dapr application performs the following steps:
20
20
21
21
1. Subscribes to the `sensor/data` topic for sensor data.
22
-
1. When data is receiving on the topic, it's forwarded to the MQTT broker state store.
23
-
1. Every **10 seconds**, it fetches the data from the state store and calculates the *min*, *max*, *mean*, *median*, and *75th percentile* values on any sensor data timestamped in the last **30 seconds**.
24
-
1. Data older than **30 seconds** is expired from the state store.
25
-
1. The result is published to the `sensor/window_data` topic in JSON format.
22
+
1. When data is receiving on the topic, it's published to the MQTT broker state store.
23
+
2. Every **10 seconds**, it fetches the data from the state store and calculates the *min*, *max*, *mean*, *median*, and *75th percentile* values on any sensor data timestamped in the last **30 seconds**.
24
+
3. Data older than **30 seconds** is expired from the state store.
25
+
4. The result is published to the `sensor/window_data` topic in JSON format.
26
26
27
27
> [!NOTE]
28
28
> This tutorial [disables Dapr CloudEvents](https://docs.dapr.io/developing-applications/building-blocks/pubsub/pubsub-raw/) which enables it to publish and subscribe using raw MQTT.
@@ -120,7 +120,7 @@ To start, create a yaml file that uses the following definitions:
120
120
121
121
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.
122
122
123
-
1. Deploy the simulator from the Explore IoT Operations repository:
123
+
1. Deploy the simulator from the *Explore IoT Operations* repository:
@@ -205,7 +205,7 @@ To verify the MQTT bridge is working, deploy an MQTT client to the cluster.
205
205
206
206
## Verify the Dapr application output
207
207
208
-
1. Open a shell to the mosquitto client pod:
208
+
1. Open a shell to the Mosquitto client pod:
209
209
210
210
```bash
211
211
kubectl exec --stdin --tty mqtt-client -n azure-iot-operations -- sh
@@ -252,7 +252,7 @@ To verify the MQTT bridge is working, deploy an MQTT client to the cluster.
252
252
253
253
## Optional - Create the Dapr application
254
254
255
-
The above tutorial uses a prebuilt container of the Dapr application. If you would like to modify and build the code yourself, follow these steps:
255
+
ThIs tutorial uses a prebuilt container of the Dapr application. If you would like to modify and build the code yourself, follow these steps:
256
256
257
257
### Prerequisites
258
258
@@ -290,7 +290,7 @@ The above tutorial uses a prebuilt container of the Dapr application. If you wou
290
290
291
291
## Troubleshooting
292
292
293
-
If the application doesn't start or you see the containers in `CrashLoopBackoff`, the logs for the `daprd` container often contains useful information.
293
+
If the application doesn't start or you see the containers in `CrashLoopBackoff`, the `daprd` container log often contains useful information.
294
294
295
295
Run the following command to view the logs for the daprd component:
0 commit comments