Skip to content

Commit 51a838d

Browse files
Merge pull request #267669 from dominicbetts/aio-secrets-update
AIO: Clarify adding secrets
2 parents 044748a + f313c08 commit 51a838d

File tree

5 files changed

+24
-15
lines changed

5 files changed

+24
-15
lines changed

articles/iot-operations/deploy-iot-ops/howto-manage-secrets.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ For more information, see [Deploy Azure IoT Operations extensions](./howto-deplo
2727

2828
## Configure service principal and Azure Key Vault upfront
2929

30-
If the Azure account executing the `az iot ops init` command does not have permissions to query the Microsoft Graph and create service principals, you can prepare these upfront and use extra arguments when running the CLI command as described in [Deploy Azure IoT Operations extensions](./howto-deploy-iot-operations.md?tabs=cli).
30+
If the Azure account executing the `az iot ops init` command doesn't have permissions to query the Microsoft Graph and create service principals, you can prepare these upfront and use extra arguments when running the CLI command as described in [Deploy Azure IoT Operations extensions](./howto-deploy-iot-operations.md?tabs=cli).
3131

3232
### Configure service principal for interacting with Azure Key Vault via Microsoft Entra ID
3333

3434
Follow these steps to create a new Application Registration that will be used by the AIO application to authenticate to Key Vault.
3535

36-
First, register an application with Microsoft Entra ID.
36+
First, register an application with Microsoft Entra ID:
3737

3838
1. In the Azure portal search bar, search for and select **Microsoft Entra ID**.
3939

@@ -51,11 +51,11 @@ First, register an application with Microsoft Entra ID.
5151

5252
1. Select **Register**.
5353

54-
When your application is created, you are directed to its resource page.
54+
When your application is created, you're directed to its resource page.
5555

5656
1. Copy the **Application (client) ID** from the app registration overview page. You'll use this value as an argument when running Azure IoT Operations deployment with the `az iot ops init` command.
5757

58-
Next, give your application permissions for key vault.
58+
Next, give your application permissions for key vault:
5959

6060
1. On the resource page for your app, select **API permissions** from the **Manage** section of the app menu.
6161

@@ -69,7 +69,7 @@ Next, give your application permissions for key vault.
6969

7070
1. Select **Add permissions**.
7171

72-
Create a client secret that will be added to your Kubernetes cluster to authenticate to your key vault.
72+
Create a client secret that will be added to your Kubernetes cluster to authenticate to your key vault:
7373

7474
1. On the resource page for your app, select **Certificates & secrets** from the **Manage** section of the app menu.
7575

@@ -79,9 +79,9 @@ Create a client secret that will be added to your Kubernetes cluster to authenti
7979

8080
1. Copy the **Value** from your new secret. You'll use this value later when you run `az iot ops init`.
8181

82-
Retrieve the service principal Object Id
82+
Retrieve the service principal Object ID:
8383

84-
1. On the **Overview** page for your app, under the section **Essentials**, click on the **Application name** link under **Managed application in local directory**. This opens the Enterprise Application properties. Copy the Object Id to use when you run `az iot ops init`.
84+
1. On the **Overview** page for your app, under the section **Essentials**, click on the **Application name** link under **Managed application in local directory**. This opens the Enterprise Application properties. Copy the Object ID to use when you run `az iot ops init`.
8585

8686
### Create an Azure Key Vault
8787

@@ -95,13 +95,13 @@ If you have an existing key vault, you can change the permission model by execut
9595
```bash
9696
az keyvault update --name "<your unique key vault name>" --resource-group "<the name of the resource group>" --enable-rbac-authorization false
9797
```
98-
You will need the Key Vault resource ID when you run `az iot ops init`. To retrieve the resource ID, run:
98+
You'll need the Key Vault resource ID when you run `az iot ops init`. To retrieve the resource ID, run:
9999

100100
```bash
101101
az keyvault show --name "<your unique key vault name>" --resource-group "<the name of the resource group>" --query id -o tsv
102102
```
103103

104-
### Set service principal access policy in Azue Key Vault
104+
### Set service principal access policy in Azure Key Vault
105105

106106
The newly created service principal needs **Secret** `list` and `get` access policy for the Azure IoT Operations to work with the secret store.
107107

@@ -113,7 +113,7 @@ az keyvault set-policy --name "<your unique key vault name>" --resource-group "<
113113

114114
### Pass service principal and Key Vault arguments to Azure IoT Operations deployment
115115

116-
When following the guide [Deploy Azure IoT Operations extensions](./howto-deploy-iot-operations.md?tabs=cli), you will need to pass in additional flags to the `az iot ops init` command in order to use the pre-configured service principal and key vault.
116+
When following the guide [Deploy Azure IoT Operations extensions](./howto-deploy-iot-operations.md?tabs=cli), you'll need to pass in additional flags to the `az iot ops init` command in order to use the pre-configured service principal and key vault.
117117

118118
The following example shows how to prepare the cluster for Azure IoT Operations without fully deploying it by using `--no-deploy` flag. You can also run the command without this argument for a default Azure IoT Operations deployment.
119119

@@ -156,7 +156,12 @@ Once you have the secret store set up on your cluster, you can create and add Az
156156
157157
1. Save your changes and apply them to your cluster. If you use k9s, your changes are automatically applied.
158158
159-
The CSI driver updates secrets according to a polling interval, so a new secret won't be updated on the pods until the next polling interval. If you want the secrets to be updated immediately, update the pods for that component. For example, for the Azure IoT Data Processor component, update the `aio-dp-reader-worker-0` and `aio-dp-runner-worker-0` pods.
159+
The CSI driver updates secrets by using a polling interval, therefore the new secret isn't available to the pod until the next polling interval. To update a component immediately, restart the pods for the component. For example, to restart the Data Processor component, run the following commands:
160+
161+
```console
162+
kubectl delete pod aio-dp-reader-worker-0 -n azure-iot-operations
163+
kubectl delete pod aio-dp-runner-worker-0 -n azure-iot-operations
164+
```
160165

161166
## Azure IoT MQ secrets
162167

articles/iot-operations/get-started/quickstart-process-telemetry.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ Before you send data to the cloud for storage and analysis, you might want to pr
5050

5151
## Add a secret to your cluster
5252

53+
To access the lakehouse from a Data Processor pipeline, you need to enable your cluster to access the service principal details you created earlier. You need to configure your Azure Key Vault with the service principal details so that the cluster can retrieve them.
54+
5355
[!INCLUDE [add-cluster-secret](../includes/add-cluster-secret.md)]
5456

5557
## Create a basic pipeline

articles/iot-operations/includes/add-cluster-secret.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@ title: include file
33
description: include file
44
author: dominicbetts
55
ms.topic: include
6-
ms.date: 12/18/2023
6+
ms.date: 02/29/2024
77
ms.author: dobett
88
---
99

10-
To access the lakehouse from a Data Processor pipeline, you need to enable your cluster to access the service principal details you created earlier. You need to configure your Azure Key Vault with the service principal details so that the cluster can retrieve them.
11-
1210
Use the following command to add a secret to your Azure Key Vault that contains the client secret you made a note of when you created the service principal. You created the Azure Key Vault in the [Deploy Azure IoT Operations to an Arc-enabled Kubernetes cluster](../get-started/quickstart-deploy.md) quickstart:
1311

1412
```azurecli
@@ -59,7 +57,7 @@ To add the secret reference to your Kubernetes cluster, edit the **aio-default-s
5957

6058
1. Save the changes and exit from the editor.
6159

62-
The CSI driver updates secrets by using a polling interval, therefore the new secret isn't available to the pod until the polling interval is reached. To update the pod immediately, restart the pods for the component. To restart Data Processor, run the following commands:
60+
The CSI driver updates secrets by using a polling interval, therefore the new secret isn't available to the pod until the next polling interval. To update a component immediately, restart the pods for the component. For example, to restart the Data Processor component, run the following commands:
6361

6462
```console
6563
kubectl delete pod aio-dp-reader-worker-0 -n azure-iot-operations

articles/iot-operations/view-analyze-data/tutorial-anomaly-detection.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ To add a table to the `bakery_ops` database to store the anomaly data, navigate
7979

8080
### Add a secret to your cluster
8181

82+
To access the Azure Data Explorer database from a Data Processor pipeline, you need to enable your cluster to access the service principal details you created earlier. You need to configure your Azure Key Vault with the service principal details so that the cluster can retrieve them.
83+
8284
[!INCLUDE [add-cluster-secret](../includes/add-cluster-secret.md)]
8385

8486
## Assets and measurements

articles/iot-operations/view-analyze-data/tutorial-overall-equipment-effectiveness.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ Make a note of your workspace ID and lakehouse ID, you need them later. You can
5858

5959
### Add a secret to your cluster
6060

61+
To access the lakehouse from a Data Processor pipeline, you need to enable your cluster to access the service principal details you created earlier. You need to configure your Azure Key Vault with the service principal details so that the cluster can retrieve them.
62+
6163
[!INCLUDE [add-cluster-secret](../includes/add-cluster-secret.md)]
6264

6365
## Understand the scenario and data

0 commit comments

Comments
 (0)