Skip to content

Commit 3f6c495

Browse files
committed
minor testing updates
Signed-off-by: Ryan Winter <[email protected]>
1 parent 3dfec3b commit 3f6c495

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

articles/iot-operations/create-edge-apps/tutorial-event-driven-with-dapr.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ To start, create a yaml file that uses the following definitions:
6161
name: mq-event-driven-dapr
6262
namespace: azure-iot-operations
6363
spec:
64-
replicas: 1
6564
selector:
6665
matchLabels:
6766
app: mq-event-driven-dapr
@@ -122,6 +121,12 @@ To start, create a yaml file that uses the following definitions:
122121

123122
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.
124123

124+
1. Patch BrokerListener to allow unauthenticated connection, to simplify injection of simulated data:
125+
126+
```bash
127+
kubectl patch BrokerListener listener -n azure-iot-operations --type=json -p='[{ "op": "add", "path": "/spec/ports/1", "value": {"port":1883} }]'
128+
```
129+
125130
1. Deploy the simulator from the Explore IoT Operations repository:
126131

127132
```bash
@@ -158,6 +163,12 @@ To verify the MQTT bridge is working, deploy an MQTT client to the cluster.
158163

159164
```yaml
160165
apiVersion: v1
166+
kind: ServiceAccount
167+
metadata:
168+
name: mqtt-client
169+
namespace: azure-iot-operations
170+
---
171+
apiVersion: v1
161172
kind: Pod
162173
metadata:
163174
name: mqtt-client
@@ -187,7 +198,7 @@ To verify the MQTT bridge is working, deploy an MQTT client to the cluster.
187198
name: aio-ca-trust-bundle-test-only
188199
```
189200

190-
1. Apply the deployment file with kubectl.
201+
1. Apply the deployment file with kubectl:
191202

192203
```bash
193204
kubectl apply -f client.yaml
@@ -210,7 +221,7 @@ To verify the MQTT bridge is working, deploy an MQTT client to the cluster.
210221
1. Subscribe to the `sensor/window_data` topic to observe the published output from the Dapr application:
211222

212223
```bash
213-
mosquitto_sub -L mqtts://aio-mq-dmqtt-frontend/sensor/window_data -u 'K8S-SAT' -P $(cat /var/run/secrets/tokens/mqtt-client-token) --cafile /var/run/certs/aio-mq-ca-cert/ca.crt
224+
mosquitto_sub -L mqtt://aio-mq-dmqtt-frontend/sensor/window_data
214225
```
215226

216227
1. Verify the application is outputting a sliding windows calculation for the various sensors every 10 seconds:

0 commit comments

Comments
 (0)