Skip to content

Commit 54f38c0

Browse files
committed
Update simulator how to
1 parent d588179 commit 54f38c0

File tree

3 files changed

+30
-25
lines changed

3 files changed

+30
-25
lines changed

articles/iot-operations/manage-devices-assets/howto-autodetect-opcua-assets-using-akri.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ms.date: 05/15/2024
1414

1515
[!INCLUDE [public-preview-note](../includes/public-preview-note.md)]
1616

17-
In this article, you learn how to discover OPC UA data sources automatically. After you deploy Azure IoT Operations, you configure Azure IoT Akri Preview to discover OPC UA data sources at the edge. Azure IoT Akri creates custom resources in your Kubernetes cluster that represent the data sources it discovers. The ability to discover OPC UA data sources removes the need to [manually configure them by using the Azure IoT Operations (preview) portal](howto-manage-assets-remotely.md).
17+
In this article, you learn how to discover OPC UA data sources automatically. After you deploy Azure IoT Operations Preview, you configure Azure IoT Akri Preview to discover OPC UA data sources at the edge. Azure IoT Akri creates custom resources in your Kubernetes cluster that represent the data sources it discovers. The ability to discover OPC UA data sources removes the need to [manually configure them by using the Azure IoT Operations (preview) portal](howto-manage-assets-remotely.md).
1818

1919
> [!IMPORTANT]
2020
> Currently, you can't use Azure Device Registry to manage the assets that Azure IoT Akri discovers and creates.
@@ -23,7 +23,7 @@ Azure IoT Akri enables you to detect and create assets in the address space of a
2323

2424
## Prerequisites
2525

26-
- Install Azure IoT Operations Preview. To install Azure IoT Operations Preview for demonstration and exploration purposes, see [Quickstart: Deploy Azure IoT Operations Preview to an Arc-enabled Kubernetes cluster](../get-started/quickstart-deploy.md).
26+
- Install Azure IoT Operations Preview. To install Azure IoT Operations for demonstration and exploration purposes, see [Quickstart: Deploy Azure IoT Operations Preview to an Arc-enabled Kubernetes cluster](../get-started/quickstart-deploy.md).
2727
- Verify that the Azure IoT Akri pods are properly configured by running the following command:
2828

2929
```bash

articles/iot-operations/manage-devices-assets/howto-configure-opc-plc-simulator.md

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
---
22
title: Configure an OPC PLC simulator
3-
description: How to configure an OPC PLC simulator to work with Azure IoT OPC UA Broker.
3+
description: How to configure the OPC PLC simulator to work with Azure IoT OPC UA Broker. The simulator generates sample data for testing and development purposes.
44
author: dominicbetts
55
ms.author: dobett
66
ms.subservice: opcua-broker
77
ms.topic: how-to
8-
ms.date: 03/01/2024
8+
ms.date: 05/16/2024
99

1010
# CustomerIntent: As a developer, I want to configure an OPC PLC simulator in my industrial edge environment to test the process of managing OPC UA assets connected to the simulator.
1111
---
1212

13-
# Configure an OPC PLC simulator to work with Azure IoT OPC UA Broker Preview
13+
# Configure the OPC PLC simulator to work with Azure IoT OPC UA Broker Preview
1414

1515
[!INCLUDE [public-preview-note](../includes/public-preview-note.md)]
1616

17-
In this article, you learn how to configure and connect to an OPC UA server simulator with different nodes that generate random data, anomalies, and configuration of user defined nodes. For developers, an OPC UA simulator enables you to test the process of managing OPC UA assets that are connected to the simulator.
17+
In this article, you learn how to configure and connect the OPC PLC simulator. The simulator simulates an OPC UA server with multiple nodes that generate random data and anomalies. You can configure user defined nodes. The OPC UA simulator lets you test the process of managing OPC UA assets with the [Azure IoT Operations (preview) portal](howto-manage-assets-remotely.md) or [Azure IoT Akri Preview](overview-akri.md).
1818

1919
## Prerequisites
2020

21-
Azure IoT Operations installed. For more information, see [Quickstart: Deploy Azure IoT Operations Preview to an Arc-enabled Kubernetes cluster](../get-started/quickstart-deploy.md). If you deploy Azure IoT Operations as described, the process installs an OPC PLC simulator.
21+
A deployed instance of Azure IoT Operations Preview. To deploy Azure IoT Operations for demonstration and exploration purposes, see [Quickstart: Deploy Azure IoT Operations to an Arc-enabled Kubernetes cluster](../get-started/quickstart-deploy.md). If you deploy Azure IoT Operations as described, the installation includes the OPC PLC simulator.
2222

2323
## Deploy the OPC PLC simulator
2424

25-
This section shows how to deploy the OPC PLC simulator.
25+
This section shows how to deploy the OPC PLC simulator if you didn't include it when you first deployed Azure IoT Operations.
2626

2727
The following step lowers the security level for the OPC PLC so that it accepts connections from Azure Iot OPC UA Broker or any client without an explicit peer certificate trust operation.
2828

@@ -44,26 +44,32 @@ az k8s-extension update \
4444
--config opcPlcSimulation.autoAcceptUntrustedCertificates=true
4545
```
4646

47-
The OPC PLC OPC UA server should run in the same deployment as a separate pod.
47+
The OPC PLC simulator runs as a separate pod in the `azure-iot-operations` namespace. The pod name looks like `opcplc-000000-7b6447f99c-mqwdq`.
4848

49-
## Configure OPC UA mutual trust between Azure Iot OPC UA Broker Preview and the OPC PLC
49+
## Configure mutual trust between Azure Iot OPC UA Broker and the OPC PLC
5050

51-
The application instance certificate of the OPC PLC is a self-signed certificate managed by cert-manager and stored in the `secret aio-opc-ua-opcplc-default-application-cert-000000` kubernetes secret.
51+
To learn more about mutual trust in OPC UA, see [OPC UA certificates infrastructure for Azure IoT OPC UA Broker](overview-opcua-broker-certificates-management.md).
5252

53-
1. Get the certificate, run the following commands on your cluster, and push it to Azure Key Vault.
53+
The application instance certificate of the OPC PLC simulator is a self-signed certificate managed by [cert-manager](https://cert-manager.io/) and stored in the `aio-opc-ua-opcplc-default-application-cert-000000` Kubernetes secret.
54+
55+
To configure mutual trust between Azure Iot OPC UA Broker and the OPC PLC simulator:
56+
57+
1. Get the certificate and push it to Azure Key Vault:
5458

5559
```bash
5660
kubectl -n azure-iot-operations get secret aio-opc-ua-opcplc-default-application-cert-000000 -o jsonpath='{.data.tls\.crt}' | \
5761
base64 -d | \
5862
xargs -0 -I {} \
5963
az keyvault secret set \
6064
--name "opcplc-crt" \
61-
--vault-name <azure-key-vault-name> \
65+
--vault-name <your-azure-key-vault-name> \
6266
--value {} \
6367
--content-type application/x-pem-file
6468
```
6569

66-
2. Configure the secret provider class (SPC) `aio-opc-ua-broker-trust-list` custom resource (CR) in the connected cluster. Use a K8s client such as kubectl to configure the secret `opcplc.crt` in the SPC object array in the connected cluster.
70+
1. Add the certificate to the `aio-opc-ua-broker-trust-list` custom resource in the cluster. Use a Kubernetes client such as `kubectl` to configure the `opcplc.crt` secret in the `SecretProviderClass` object array in the cluster.
71+
72+
The following example shows a complete `SecretProviderClass` custom resource that contains the simulator certificate in a PEM encoded file with the .crt extension:
6773

6874
```yml
6975
apiVersion: secrets-store.csi.x-k8s.io/v1
@@ -75,8 +81,8 @@ The application instance certificate of the OPC PLC is a self-signed certificate
7581
provider: azure
7682
parameters:
7783
usePodIdentity: 'false'
78-
keyvaultName: <azure-key-vault-name>
79-
tenantId: <azure-tenant-id>
84+
keyvaultName: <your-azure-key-vault-name>
85+
tenantId: <your-azure-tenant-id>
8086
objects: |
8187
array:
8288
- |
@@ -85,18 +91,19 @@ The application instance certificate of the OPC PLC is a self-signed certificate
8591
objectAlias: opcplc.crt
8692
```
8793

88-
The projection of the Azure Key Vault secrets and certificates into the cluster takes some time depending on the configured polling interval.
94+
> [!NOTE]
95+
> The time it takes to project Azure Key Vault certificates into the cluster depends on the configured polling interval.
8996

90-
Now, the Azure IoT OPC UA Broker the trust relationship with OPC PLC should be established and you can proceed to create an `AssetEndpointProfile` to connect to your OPC PLC simulation server.
97+
The Azure IoT OPC UA Broker trust relationship with OPC PLC simulator is now established and you can create an `AssetEndpointProfile` to connect to your OPC PLC simulator.
9198

9299
## Optionally configure your `AssetEndpointProfile` without mutual trust established
93100

94-
You can optionally configure an asset endpoint profile for the OPC PLC to run without mutual trust established. If you understand the risks, you can turn off authentication for testing purposes.
101+
Optionally, you can configure an asset endpoint profile without establishing mutual trust between OPC UA Broker and the OPC PLC simulator. If you understand the risks, you can turn off authentication for testing purposes.
95102

96103
> [!CAUTION]
97-
> Don't configure for no authentication in production or pre-production. Exposing your cluster to the internet without authentication can lead to unauthorized access and even DDOS attacks.
104+
> Don't configure for no authentication in production or pre-production environments. Exposing your cluster to the internet without authentication can lead to unauthorized access and even DDOS attacks.
98105
99-
To allow your asset endpoint profile to connect to any OPC PLC server without establishing mutual trust, use the `additionalConfiguration` setting to change the `AssetEndpointProfile` for OPC UA.
106+
To allow your asset endpoint profile to connect to an OPC PLC server without establishing mutual trust, use the `additionalConfiguration` setting to modify the `AssetEndpointProfile` configuration.
100107
101108
Patch the asset endpoint with `autoAcceptUntrustedServerCertificates=true`:
102109
@@ -108,9 +115,7 @@ kubectl patch AssetEndpointProfile $ENDPOINT_NAME \
108115
-p '{"spec":{"additionalConfiguration":"{\"applicationName\":\"'"$ENDPOINT_NAME"'\",\"security\":{\"autoAcceptUntrustedServerCertificates\":true}}"}}'
109116
```
110117
111-
> [!WARNING]
112-
> Don't use untrusted certificates in production environments.
113-
114118
## Related content
115119
120+
- [OPC UA certificates infrastructure for Azure IoT OPC UA Broker Preview](overview-opcua-broker-certificates-management.md)
116121
- [Autodetect assets using Azure IoT Akri Preview](howto-autodetect-opcua-assets-using-akri.md)

articles/iot-operations/manage-devices-assets/howto-configure-opcua-certificates-infrastructure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ To learn more, see [OPC UA certificates infrastructure for Azure IoT OPC UA Brok
2323

2424
## Prerequisites
2525

26-
A deployed instance of Azure IoT Operations Preview. To deploy Azure IoT Operations Preview for demonstration and exploration purposes, see [Quickstart: Deploy Azure IoT Operations – to an Arc-enabled Kubernetes cluster](../get-started/quickstart-deploy.md).
26+
A deployed instance of Azure IoT Operations Preview. To deploy Azure IoT Operations for demonstration and exploration purposes, see [Quickstart: Deploy Azure IoT Operations – to an Arc-enabled Kubernetes cluster](../get-started/quickstart-deploy.md).
2727

2828
## Configure a self-signed application instance certificate
2929

0 commit comments

Comments
 (0)