Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update commands for new demo devices to prevent crashes #75

Merged
merged 1 commit into from
Sep 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion docs/tutorials/demo-try.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,8 @@ curl http://deviceshifu-robotarm.deviceshifu.svc.cluster.local/get_status; echo
First, create a digital twin of the OPC UA:

```bash
sudo kubectl apply -f run_dir/shifu/demo_device/edgedevice-opcua/mock-device
sudo kubectl wait --for=condition=Available deploy/mockdevice-opcua -n devices --timeout=150s
sudo kubectl apply -f run_dir/shifu/demo_device/edgedevice-opcua
```

Expand Down Expand Up @@ -374,6 +376,8 @@ curl http://deviceshifu-opcua.deviceshifu.svc.cluster.local/get_value; echo
First, create a digital twin of the Socket:

```bash
sudo kubectl apply -f run_dir/shifu/demo_device/edgedevice-socket/mock-device
sudo kubectl wait --for=condition=Available deploy/mockdevice-socket -n devices --timeout=150s
sudo kubectl apply -f run_dir/shifu/demo_device/edgedevice-socket
```

Expand Down Expand Up @@ -417,6 +421,8 @@ http://deviceshifu-socket.deviceshifu.svc.cluster.local/cmd; echo
First, create a digital twin of the MQTT:

```bash
sudo kubectl apply -f run_dir/shifu/demo_device/edgedevice-mqtt/mosquitto.yaml
sudo kubectl wait --for=condition=Available deploy/mosquitto -n devices --timeout=150s
sudo kubectl apply -f run_dir/shifu/demo_device/edgedevice-mqtt
```

Expand All @@ -441,7 +447,7 @@ sudo kubectl exec -it nginx -- curl http://deviceshifu-mqtt.deviceshifu.svc.clus
We can use mosquitto to publish a data to the MQTT server. (The data after -m is the information we posted)

```bash
sudo kubectl exec -it mosquitto-667f47b94-qrkmz -n devices -- mosquitto_pub -h localhost -d -p 1883 -t /test/test -m "test2333"
sudo kubectl exec -it deploy/mosquitto -n devices -- mosquitto_pub -h localhost -d -p 1883 -t /test/test -m "test2333"
```

![deviceshifu-mqtt_output2.png](images/deviceshifu-mqtt_output2.png)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,8 @@ curl http://deviceshifu-robotarm.deviceshifu.svc.cluster.local/get_status; echo
首先,我们启动 OPC UA 的数字孪生:

```bash
sudo kubectl apply -f run_dir/shifu/demo_device/edgedevice-opcua/mock-device
sudo kubectl wait --for=condition=Available deploy/mockdevice-opcua -n devices --timeout=150s
sudo kubectl apply -f run_dir/shifu/demo_device/edgedevice-opcua
```

Expand Down Expand Up @@ -382,6 +384,8 @@ curl http://deviceshifu-opcua.deviceshifu.svc.cluster.local/get_value; echo
首先,我们启动 Socket 的数字孪生:

```bash
sudo kubectl apply -f run_dir/shifu/demo_device/edgedevice-socket/mock-device
sudo kubectl wait --for=condition=Available deploy/mockdevice-socket -n devices --timeout=150s
sudo kubectl apply -f run_dir/shifu/demo_device/edgedevice-socket
```

Expand Down Expand Up @@ -429,6 +433,8 @@ http://deviceshifu-socket.deviceshifu.svc.cluster.local/cmd; echo
首先,我们启动 MQTT 的数字孪生:

```bash
sudo kubectl apply -f run_dir/shifu/demo_device/edgedevice-mqtt/mosquitto.yaml
sudo kubectl wait --for=condition=Available deploy/mosquitto -n devices --timeout=150s
sudo kubectl apply -f run_dir/shifu/demo_device/edgedevice-mqtt
```

Expand All @@ -453,7 +459,7 @@ sudo kubectl exec -it nginx -- curl http://deviceshifu-mqtt.deviceshifu.svc.clus
我们可以使用 mosquitto 向MQTT服务器发布一个数据。(-m 后面的数据为我们发布的的信息)

```bash
sudo kubectl exec -it mosquitto-667f47b94-qrkmz -n devices -- mosquitto_pub -h localhost -d -p 1883 -t /test/test -m "test2333"
sudo kubectl exec -it deploy/mosquitto -n devices -- mosquitto_pub -h localhost -d -p 1883 -t /test/test -m "test2333"
```
![deviceshifu-mqtt_output2.png](images/deviceshifu-mqtt_output2.png)

Expand Down