Skip to content

Commit 7176596

Browse files
Merge pull request #287459 from kgremban/m2-bbscrub
pre-bugbash docs review
2 parents d1c8c1e + c0f1411 commit 7176596

File tree

4 files changed

+27
-127
lines changed

4 files changed

+27
-127
lines changed

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

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: kgremban
55
ms.author: kgremban
66
ms.topic: how-to
77
ms.custom: ignite-2023, devx-track-azurecli
8-
ms.date: 09/23/2024
8+
ms.date: 09/26/2024
99

1010
#CustomerIntent: As an OT professional, I want to deploy Azure IoT Operations to a Kubernetes cluster.
1111
---
@@ -83,12 +83,6 @@ The Azure portal deployment experience is a helper tool that generates a deploym
8383

8484
If at any point you get an error that says *Your device is required to be managed to access your resource*, run `az login` again and make sure that you sign in interactively with a browser.
8585

86-
> [!NOTE]
87-
> If you're using GitHub Codespaces in a browser, `az login` returns a localhost error in the browser window after logging in. To fix, either:
88-
>
89-
> * Open the codespace in VS Code desktop, and then run `az login` in the terminal. This opens a browser window where you can log in to Azure.
90-
> * Or, after you get the localhost error on the browser, copy the URL from the browser and use `curl <URL>` in a new terminal tab. You should see a JSON response with the message "You have logged into Microsoft Azure!".
91-
9286
### Create a storage account and schema registry
9387

9488
Azure IoT Operations requires a schema registry on your cluster. Schema registry requires an Azure storage account so that it can synchronize schema information between cloud and edge.
@@ -105,11 +99,14 @@ Azure IoT Operations requires a schema registry on your cluster. Schema registry
10599
az iot ops schema registry create --name <NEW_SCHEMA_REGISTRY_NAME> --resource-group <RESOURCE_GROUP> --registry-namespace <NEW_SCHEMA_REGISTRY_NAMESPACE> --sa-resource-id $(az storage account show --name <STORAGE_ACCOUNT_NAME> --resource-group <RESOURCE_GROUP> -o tsv --query id)
106100
```
107101

102+
>[!NOTE]
103+
>This command requires that you have role assignment write permissions because it assigns a role to give schema registry access to the storage account. By default, the role is the built-in **Storage Blob Data Contributor** role, or you can create a custom role with restricted permissions to assign instead.
104+
108105
Use the optional parameters to customize your schema registry, including:
109106

110107
| Optional parameter | Value | Description |
111108
| --------- | ----- | ----------- |
112-
| `--custom-role-id` | Role definition, ID | The schema registry needs read/write access to the storage account. Provide a custom role ID to use instead of the default **Storage Blob Data Contributor**. Format: `/subscriptions/<SUBSCRIPTION_ID>/providers/Microsoft.Authorization/roleDefinitions/<ROLE_ID>`. |
109+
| `--custom-role-id` | Role definition ID | Provide a custom role ID to assign to the schema registry instead of the default **Storage Blob Data Contributor** role. Format: `/subscriptions/<SUBSCRIPTION_ID>/providers/Microsoft.Authorization/roleDefinitions/<ROLE_ID>`. |
113110
| `--sa-container` | string | Storage account container where schemas will be stored. If this container doesn't exist, it will be created. The default container name is **schemas**. |
114111

115112
### Deploy Azure IoT Operations
@@ -152,19 +149,14 @@ Secret management for Azure IoT Operations uses Azure Secret Store to sync the s
152149

153150
Azure secret requires a user-assigned managed identity with access to the Azure Key Vault where secrets are stored. Dataflows also requires a user-assigned managed identity to authenticate cloud connections.
154151

152+
155153
1. If you don't have an Azure Key Vault, create one by using the [az keyvault create](/cli/azure/keyvault#az-keyvault-create) command.
156154

157155
```azurecli
158156
az keyvault create --resource-group "<RESOURCE_GROUP>" --location "<LOCATION>" --name "<KEYVAULT_NAME>" --enable-rbac-authorization
159157
```
160158

161-
1. Give yourself **Secrets officer** permissions on the vault, so that you can create secrets:
162-
163-
```azurecli
164-
az role assignment create --role "Key Vault Secrets Officer" --assignee <CURRENT_USER> --scope /subscriptions/<SUBSCRIPTION>/resourcegroups/<RESOURCE_GROUP>/providers/Microsoft.KeyVault/vaults/<KEYVAULT_NAME>
165-
```
166-
167-
1. Create a user-assigned managed identity that has access to the Azure Key Vault.
159+
1. Create a user-assigned managed identity that will be assigned access to the Azure Key Vault.
168160

169161
```azurecli
170162
az identity create --name "<USER_ASSIGNED_IDENTITY_NAME>" --resource-group "<RESOURCE_GROUP>" --location "<LOCATION>" --subscription "<SUBSCRIPTION>"

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,17 @@ ms.date: 09/24/2024
1515

1616
Azure IoT Operations uses Azure Key Vault as the managed vault solution on the cloud, and uses [Azure Secret Store](#manage-secrets-for-your-azure-iot-operations-preview-deployment) to sync the secrets down from the cloud and store them on the edge as Kubernetes secrets.
1717

18+
>[!NOTE]
19+
>**Special instructions for AIO Internal Bugbash**:
20+
>
21+
>Refer to [Test secrets and user-assigned managed identity](https://msazure.visualstudio.com/One/_wiki/wikis/AIO.wiki/710296/Test-Secrets-and-User-Assigned-Managed-Identity) for instructions on how to test secrets with the PLC simulator.
22+
1823
## Prerequisites
1924

2025
* An Azure IoT Operations instance deployed with secure settings. If you deployed Azure IoT Operations with test settings and now want to use secrets, you need to first [enable secure settings](./howto-enable-secure-settings.md).
2126

27+
* Creating secrets in the key vault requires **Secrets officer** permissions at the resource level. For information about assigning roles to users, see [Steps to assign an Azure role](../../role-based-access-control/role-assignments-steps.md).
28+
2229
## Add and use secrets
2330

2431
Secrets management for Azure IoT Operations uses Azure Secret Store to sync the secrets from an Azure Key Vault and store them on the edge as Kubernetes secrets. When you enabled secure settings during deployment, you selected an Azure Key Vault for secret management. It is in this Key Vault where all secrets to be used within Azure IoT Operations are stored.
@@ -34,8 +41,6 @@ Secrets are used in asset endpoints and dataflow endpoints for authentication. I
3441

3542
- **Add from Azure Key Vault**: synchronizes an existing secret in key vault down to the edge if it wasn't synchronized before. Selecting this option shows you the list of secret references in the selected key vault. Use this option if you created the secret in the key vault beforehand.
3643

37-
- **Add synced secret**: uses an existing and synchronized to the edge secret for the component. Selecting this option shows you the list of already synchronized secrets. Use this option if you previously created and synchronized the secret but didn't use it in an Azure IoT Operations component.
38-
3944
## Manage Synced Secrets
4045

4146
You can use **Manage Secrets** for asset endpoints and dataflow endpoints to view or delete synced secrets.

articles/iot-operations/deploy-iot-ops/howto-prepare-cluster.md

Lines changed: 11 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: kgremban
55
ms.author: kgremban
66
ms.topic: how-to
77
ms.custom: ignite-2023, devx-track-azurecli
8-
ms.date: 08/26/2024
8+
ms.date: 09/26/2024
99

1010
#CustomerIntent: As an IT professional, I want prepare an Azure-Arc enabled Kubernetes cluster so that I can deploy Azure IoT Operations to it.
1111
---
@@ -43,8 +43,8 @@ To prepare your Azure Arc-enabled Kubernetes cluster, you need:
4343
> Official IoT Ops CLI releases are installed via extension index like so az extension add --upgrade --name azure-iot-ops mentioned below. However for bug bashes, we will distribute one-off release candidates intended to expose functionality to exercise internally. Use this for Bug Bash 2 on 9/27 and skip the az extension command below
4444
>
4545
>``` bash
46-
>az storage blob download --auth-mode login --blob-url https://azedgecli.blob.core.windows.net/drop/azure_iot_ops-0.7.0a10-py3-none-any.whl -f ./azure_iot_ops-0.7.0a10-py3-none-any.whl
47-
>az extension add --upgrade --source ./azure_iot_ops-0.7.0a10-py3-none-any.whl
46+
>az storage blob download --auth-mode login --blob-url https://azedgecli.blob.core.windows.net/drop/azure_iot_ops-0.7.0a11-py3-none-any.whl -f ./azure_iot_ops-0.7.0a11-py3-none-any.whl
47+
>az extension add --upgrade --source ./azure_iot_ops-0.7.0a11-py3-none-any.whl
4848
>```
4949
5050
```bash
@@ -69,8 +69,8 @@ To prepare your Azure Arc-enabled Kubernetes cluster, you need:
6969
>
7070
> Official IoT Ops CLI releases are installed via extension index like so az extension add --upgrade --name azure-iot-ops mentioned below. However for bug bashes, we will distribute one-off release candidates intended to expose functionality to exercise internally. Use this for Bug Bash 2 on 9/27 and skip the az extension command below
7171
> ``` bash
72-
> az storage blob download --auth-mode login --blob-url https://azedgecli.blob.core.windows.net/drop/azure_iot_ops-0.7.0a10-py3-none-any.whl -f ./azure_iot_ops-0.7.0a10-py3-none-any.whl
73-
> az extension add --upgrade --source ./azure_iot_ops-0.7.0a10-py3-none-any.whl
72+
> az storage blob download --auth-mode login --blob-url https://azedgecli.blob.core.windows.net/drop/azure_iot_ops-0.7.0a11-py3-none-any.whl -f ./azure_iot_ops-0.7.0a11-py3-none-any.whl
73+
> az extension add --upgrade --source ./azure_iot_ops-0.7.0a11-py3-none-any.whl
7474
> ```
7575
7676
* The latest version of the Azure IoT Operations extension for Azure CLI. Use the following command to add the extension or update it to the latest version:
@@ -84,19 +84,11 @@ To prepare your Azure Arc-enabled Kubernetes cluster, you need:
8484
* [Azure Arc-enabled Kubernetes system requirements](/azure/azure-arc/kubernetes/system-requirements).
8585
* [K3s requirements](https://docs.k3s.io/installation/requirements).
8686

87-
### [Codespaces](#tab/codespaces)
88-
89-
* An Azure subscription. If you don't have an Azure subscription, [create one for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
90-
91-
* A [GitHub](https://github.com) account.
92-
93-
* Visual Studio Code installed on your development machine. For more information, see [Download Visual Studio Code](https://code.visualstudio.com/download).
94-
9587
---
9688

9789
## Create a cluster
9890

99-
This section provides steps to create clusters in validated environments on Linux and Windows as well as GitHub Codespaces in the cloud.
91+
This section provides steps to create clusters in validated environments on Linux and Windows.
10092

10193
### [AKS Edge Essentials](#tab/aks-edge-essentials)
10294

@@ -164,38 +156,17 @@ By default, Azure Kubernetes Service Edge Essentials clusters support Azure Cont
164156

165157
### [Ubuntu](#tab/ubuntu)
166158

167-
Install dependencies on Ubuntu:
168-
169-
1. Run the helm installation script:
170-
171-
```bash
172-
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
173-
chmod 700 get_helm.sh
174-
./get_helm.sh
175-
helm version
176-
```
177-
178-
Install dependencies on Ubuntu:
179-
180-
1. Run the kubectl installation script:
181-
182-
```bash
183-
curl -LO “https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl”
184-
curl -LO “https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl.sha256”
185-
echo$(cat kubectl.sha256) kubectl” | sha256sum --check
186-
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
187-
kubectl version --client
188-
```
189-
190159
To prepare a K3s Kubernetes cluster on Ubuntu:
191160

192-
1. Run the K3s installation script:
161+
1. Install K3s following the instructions in the [K3s quick-start guide](https://docs.k3s.io/quick-start).
162+
163+
1. Check to see that kubectl was installed as part of K3s. If not, follow the instructions to [Install kubectl on Linux](https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/).
193164

194165
```bash
195-
curl -sfL https://get.k3s.io | sh -
166+
kubectl version --client
196167
```
197168

198-
For full installation information, see the [K3s quick-start guide](https://docs.k3s.io/quick-start).
169+
1. Follow the instructions to [Install Helm](https://helm.sh/docs/intro/install/).
199170

200171
1. Create a K3s configuration yaml file in `.kube/config`:
201172

@@ -231,36 +202,6 @@ To prepare a K3s Kubernetes cluster on Ubuntu:
231202

232203
On multi-node clusters with at least three nodes, you have the option of enabling fault tolerance for storage with [Azure Container Storage enabled by Azure Arc](/azure/azure-arc/container-storage/overview) when you deploy Azure IoT Operations. If you want to enable that option, prepare your multi-node cluster with the following steps:
233204

234-
1. Install the required NVME over TCP module for your kernel using the following command:
235-
236-
```bash
237-
sudo apt install linux-modules-extra-`uname -r`
238-
```
239-
240-
> [!NOTE]
241-
> The minimum supported Linux kernel version is 5.1. At this time, there are known issues with 6.4 and 6.2. For the latest information, refer to [Azure Container Storage release notes](/azure/azure-arc/edge-storage-accelerator/release-notes)
242-
243-
1. On each node in your cluster, set the number of **HugePages** to 512 using the following command:
244-
245-
```bash
246-
HUGEPAGES_NR=512
247-
echo $HUGEPAGES_NR | sudo tee /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
248-
echo "vm.nr_hugepages=$HUGEPAGES_NR" | sudo tee /etc/sysctl.d/99-hugepages.conf
249-
```
250-
251-
### [Codespaces](#tab/codespaces)
252-
253-
> [!IMPORTANT]
254-
> Codespaces are easy to set up quickly and tear down later, but they're not suitable for performance evaluation or scale testing. Use GitHub Codespaces for exploration only.
255-
256-
[!INCLUDE [prepare-codespaces](../includes/prepare-codespaces.md)]
257-
258-
### Configure multi-node clusters for Azure Container Storage
259-
260-
On multi-node clusters with at least three nodes, you have the option of enabling fault tolerance for storage with [Azure Container Storage (preview)](/azure/azure-arc/edge-storage-accelerator/overview) when you deploy Azure IoT Operations.
261-
262-
*This feature isn't recommended for Codespaces because Codespaces aren't persistent.* If you want to enable fault tolerance anyways, prepare your multi-node cluster with the following steps:
263-
264205
1. Install the required NVME over TCP module for your kernel using the following command:
265206

266207
```bash
@@ -320,37 +261,6 @@ To connect your cluster to Azure Arc:
320261
321262
[!INCLUDE [connect-cluster-k3s](../includes/connect-cluster-k3s.md)]
322263
323-
### [Codespaces](#tab/codespaces)
324-
325-
To connect your cluster to Azure Arc:
326-
327-
> [!NOTE]
328-
> **Special instructions for AIO Internal Bugbash**:
329-
>
330-
> Official IoT Ops CLI releases are installed via extension index like so az extension add --upgrade --name azure-iot-ops mentioned below.
331-
> However for bug bashes, we will distribute one-off release candidates intended to expose functionality to exercise internally. Use this for Bug Bash 2 on 9/27:
332-
>
333-
> ``` bash
334-
> az storage blob download --auth-mode login --blob-url https://azedgecli.blob.core.windows.net/drop/azure_iot_ops-0.7.0a10-py3-none-any.whl -f ./azure_iot_ops-0.7.0a10-py3-none-any.whl
335-
> az extension add --upgrade --source ./azure_iot_ops-0.7.0a10-py3-none-any.whl
336-
> ```
337-
338-
1. In your codespace terminal, sign in to Azure CLI:
339-
340-
```azurecli
341-
az login
342-
```
343-
344-
If at any point you get an error that says *Your device is required to be managed to access your resource*, run `az login` again and make sure that you sign in interactively with a browser.
345-
346-
> [!TIP]
347-
> If you're using the GitHub codespace environment in a browser rather than VS Code desktop, running `az login` returns a localhost error. To fix the error, either:
348-
>
349-
> * Open the codespace in VS Code desktop, and then return to the browser terminal and rerun `az login`.
350-
> * Or, after you get the localhost error on the browser, copy the URL from the browser and run `curl "<URL>"` in a new terminal tab. You should see a JSON response with the message "You have logged into Microsoft Azure!."
351-
352-
[!INCLUDE [connect-cluster-k3s](../includes/connect-cluster-k3s.md)]
353-
354264
---
355265
356266
## Verify your cluster

articles/iot-operations/get-started-end-to-end-sample/quickstart-deploy.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,6 @@ ms.date: 05/02/2024
1616

1717
In this quickstart, you deploy a suite of IoT services to an Azure Arc-enabled Kubernetes cluster so that you can remotely manage your devices and workloads. Azure IoT Operations is a digital operations suite of services. This quickstart guides you through using Orchestrator to deploy these services to a Kubernetes cluster. At the end of the quickstart, you have a cluster that you can manage from the cloud that generates sample data to use in the following quickstarts.
1818

19-
The services deployed in this quickstart include:
20-
21-
* [MQTT broker](../manage-mqtt-broker/overview-iot-mq.md)
22-
* [Connector for OPC UA](../discover-manage-assets/overview-opcua-broker.md)
23-
* [Azure Device Registry Preview](../discover-manage-assets/overview-manage-assets.md#store-assets-as-azure-resources-in-a-centralized-registry) including a schema registry
24-
* [Observability](../configure-observability-monitoring/howto-configure-observability.md)
25-
2619
The rest of the quickstarts in this end-to-end series build on this one to define sample assets, data processing pipelines, and visualizations. If you want to deploy Azure IoT Operations to a cluster such as AKS Edge Essentials in order to run your own workloads, see [Prepare your Azure Arc-enabled Kubernetes cluster](../deploy-iot-ops/howto-prepare-cluster.md?tabs=aks-edge-essentials) and [Deploy Azure IoT Operations Preview to an Arc-enabled Kubernetes cluster](../deploy-iot-ops/howto-deploy-iot-operations.md).
2720

2821
## Before you begin
@@ -88,8 +81,8 @@ To connect your cluster to Azure Arc:
8881
> However for bug bashes, we will distribute one-off release candidates intended to expose functionality to exercise internally. Use this for Bug Bash 2 on 9/27:
8982
>
9083
> ``` bash
91-
> az storage blob download --auth-mode login --blob-url https://azedgecli.blob.core.windows.net/drop/azure_iot_ops-0.7.0a10-py3-none-any.whl -f ./azure_iot_ops-0.7.0a10-py3-none-any.whl
92-
> az extension add --upgrade --source ./azure_iot_ops-0.7.0a10-py3-none-any.whl
84+
> az storage blob download --auth-mode login --blob-url https://azedgecli.blob.core.windows.net/drop/azure_iot_ops-0.7.0a11-py3-none-any.whl -f ./azure_iot_ops-0.7.0a11-py3-none-any.whl
85+
> az extension add --upgrade --source ./azure_iot_ops-0.7.0a11-py3-none-any.whl
9386
> ```
9487
9588
1. Register the required resource providers in your subscription:

0 commit comments

Comments
 (0)