Skip to content

Commit ab98502

Browse files
Merge pull request #272267 from dominicbetts/aio-simulator-updates
AIO: Update OPC PLC simulator configuration
2 parents 3523349 + 533eba0 commit ab98502

File tree

3 files changed

+27
-16
lines changed

3 files changed

+27
-16
lines changed

articles/iot-operations/get-started/quickstart-add-assets.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,18 @@ To add an asset endpoint:
7676
kubectl get assetendpointprofile -n azure-iot-operations
7777
```
7878

79-
1. To enable the quickstart scenario, configure your asset endpoint to connect without mutual trust established. Run the following command:
79+
These quickstarts use the **OPC PLC simulator** to generate sample data. To enable the quickstart scenario, you need to configure the OPC UA Broker to accept untrusted server certificates and your asset endpoint to connect without mutual trust established. This configuration is not recommended for production or pre-production environments. For more information, see [Deploy the OPC PLC simulator](../manage-devices-assets/howto-configure-opc-plc-simulator.md):
80+
81+
1. To configure the simulator for the quickstart scenario, run the following command:
82+
83+
```azurecli
84+
az k8s-extension update --version 0.3.0-preview --name opc-ua-broker --release-train preview --cluster-name <CLUSTER_NAME> --resource-group <RESOURCE_GROUP> --cluster-type connectedClusters --auto-upgrade-minor-version false --config opcPlcSimulation.deploy=true --config opcPlcSimulation.autoAcceptUntrustedCertificates=true
85+
```
86+
87+
> [!CAUTION]
88+
> Don't use this configuration in production or pre-production environments. The configuration lowers the security level for the OPC PLC so that it accepts connections from any client without an explicit peer certificate trust operation.
89+
90+
1. To configure the asset endpoint for the quickstart scenario, run the following command:
8091

8192
```console
8293
kubectl patch AssetEndpointProfile opc-ua-connector-0 -n azure-iot-operations --type=merge -p '{"spec":{"additionalConfiguration":"{\"applicationName\":\"opc-ua-connector-0\",\"security\":{\"autoAcceptUntrustedServerCertificates\":true}}"}}'
@@ -85,6 +96,8 @@ To add an asset endpoint:
8596
> [!CAUTION]
8697
> Don't use this configuration in production or pre-production environments. Exposing your cluster to the internet without proper authentication might lead to unauthorized access and even DDOS attacks.
8798

99+
To learn more, see [Deploy the OPC PLC simulator](../manage-devices-assets/howto-configure-opc-plc-simulator.md) section.
100+
88101
1. To enable the configuration changes to take effect immediately, first find the name of your `aio-opc-supervisor` pod by using the following command:
89102

90103
```console

articles/iot-operations/get-started/quickstart-deploy.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -253,15 +253,6 @@ In this section, you use the [az iot ops init](/cli/azure/iot/ops#az-iot-ops-ini
253253
>[!TIP]
254254
>If you've run `az iot ops init` before, it automatically created an app registration in Microsoft Entra ID for you. You can reuse that registration rather than creating a new one each time. To use an existing app registration, add the optional parameter `--sp-app-id <APPLICATION_CLIENT_ID>`.
255255
256-
1. These quickstarts use the **OPC PLC simulator** to generate sample data. To configure the simulator for the quickstart scenario, run the following command:
257-
258-
> [!IMPORTANT]
259-
> Don't use the following example in production, use it for simulation and test purposes only. The example lowers the security level for the OPC PLC so that it accepts connections from any client without an explicit peer certificate trust operation.
260-
261-
```azurecli
262-
az k8s-extension update --version 0.3.0-preview --name opc-ua-broker --release-train preview --cluster-name <CLUSTER_NAME> --resource-group <RESOURCE_GROUP> --cluster-type connectedClusters --auto-upgrade-minor-version false --config opcPlcSimulation.deploy=true --config opcPlcSimulation.autoAcceptUntrustedCertificates=true
263-
```
264-
265256
## View resources in your cluster
266257

267258
While the deployment is in progress, you can watch the resources being applied to your cluster. You can use kubectl commands to observe changes on the cluster or, since the cluster is Arc-enabled, you can use the Azure portal.

articles/iot-operations/troubleshoot/known-issues.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@ This article contains known issues for Azure IoT Operations Preview.
5959

6060
## OPC PLC simulator
6161

62-
If you create an asset endpoint for the OPC PLC simulator, but the OPC PLC simulator isn't sending data to the IoT MQ broker, try the following command:
63-
64-
- Patch the asset endpoint with `autoAcceptUntrustedServerCertificates=true`:
62+
If you create an asset endpoint for the OPC PLC simulator, but the OPC PLC simulator isn't sending data to the IoT MQ broker, run the following command to set `autoAcceptUntrustedServerCertificates=true` for the asset endpoint:
6563
6664
```bash
6765
ENDPOINT_NAME=<name-of-you-endpoint-here>
@@ -71,7 +69,10 @@ kubectl patch AssetEndpointProfile $ENDPOINT_NAME \
7169
-p '{"spec":{"additionalConfiguration":"{\"applicationName\":\"'"$ENDPOINT_NAME"'\",\"security\":{\"autoAcceptUntrustedServerCertificates\":true}}"}}'
7270
```
7371
74-
You can also patch all your asset endpoints with the following command:
72+
> [!CAUTION]
73+
> Don't use this configuration in production or pre-production environments. Exposing your cluster to the internet without proper authentication might lead to unauthorized access and even DDOS attacks.
74+
75+
You can patch all your asset endpoints with the following command:
7576

7677
```bash
7778
ENDPOINTS=$(kubectl get AssetEndpointProfile -n azure-iot-operations --no-headers -o custom-columns=":metadata.name")
@@ -83,8 +84,14 @@ kubectl patch AssetEndpointProfile $ENDPOINT_NAME \
8384
done
8485
```
8586

86-
> [!WARNING]
87-
> Don't use untrusted certificates in production environments.
87+
Update the OPC UA Broker cluster extension to accept untrusted server certificates with the following command:
88+
89+
```azurecli
90+
az k8s-extension update --version 0.3.0-preview --name opc-ua-broker --release-train preview --cluster-name <CLUSTER_NAME> --resource-group <RESOURCE_GROUP> --cluster-type connectedClusters --auto-upgrade-minor-version false --config opcPlcSimulation.deploy=true --config opcPlcSimulation.autoAcceptUntrustedCertificates=true
91+
```
92+
93+
> [!CAUTION]
94+
> Don't use this configuration in production or pre-production environments. The configuration lowers the security level for the OPC PLC so that it accepts connections from any client without an explicit peer certificate trust operation.
8895
8996
If the OPC PLC simulator isn't sending data to the IoT MQ broker after you create a new asset, restart the OPC PLC simulator pod. The pod name looks like `aio-opc-opc.tcp-1-f95d76c54-w9v9c`. To restart the pod, use the `k9s` tool to kill the pod, or run the following command:
9097

0 commit comments

Comments
 (0)