Skip to content

Commit b2da596

Browse files
committed
howto-deploy portal steps
1 parent 2b62214 commit b2da596

File tree

11 files changed

+247
-155
lines changed

11 files changed

+247
-155
lines changed

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

Lines changed: 74 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ Learn how to deploy Azure IoT Operations Preview to a Kubernetes cluster and the
2121
* Arc extensions
2222
* Custom locations
2323
* Resource sync rules
24-
* Resources that you can configure in your Azure IoT Operations solution, like assets, MQTT broker, and dataflows.
24+
* Resources that you can configure in your Azure IoT Operations solution, like assets and asset endpoints.
2525

26-
* An Azure IoT Operations *instance* is one part of a deployment. It's the parent resource that bundles the suite of services that are defined in [What is Azure IoT Operations Preview?](../overview-iot-operations.md), like MQ and OPC UA connector.
26+
* An Azure IoT Operations *instance* is one part of a deployment. It's the parent resource that bundles the suite of services that are defined in [What is Azure IoT Operations Preview?](../overview-iot-operations.md) like MQTT broker, dataflows, and OPC UA connector.
2727

2828
In this article, when we talk about deploying Azure IoT Operations we mean the full set of components that make up a *deployment*. Once the deployment exists, you can view, manage, and update the *instance*.
2929

@@ -33,21 +33,31 @@ Cloud resources:
3333

3434
* An Azure subscription.
3535

36-
* Azure access permissions. At a minimum, have **Contributor** permissions in your Azure subscription. Depending on the deployment feature flag status you select, you might also need **Microsoft/Authorization/roleAssignments/write** permissions for the resource group that contains your Arc-enabled Kubernetes cluster. You can make a custom role in Azure role-based access control or assign a built-in role that grants this permission. For more information, see [Azure built-in roles for General](../../role-based-access-control/built-in-roles/general.md).
36+
* An Azure key vault. To create a new key vault, use the [az keyvault create](/cli/azure/keyvault#az-keyvault-create) command:
3737

38-
If you *don't* have role assignment write permissions, you can still deploy Azure IoT Operations by disabling some features. This approach is discussed in more detail in the [Deploy](#deploy) section of this article.
38+
```azurecli
39+
az keyvault create --enable-rbac-authorization --name "<KEYVAULT_NAME>" --resource-group "<RESOURCE_GROUP>"
40+
```
3941

40-
* In the Azure CLI, use the [az role assignment create](/cli/azure/role/assignment#az-role-assignment-create) command to give permissions. For example, `az role assignment create --assignee sp_name --role "Role Based Access Control Administrator" --scope subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup`
42+
* Azure access permissions:
4143

42-
* In the Azure portal, when you assign privileged admin roles to a user or principal, you can restrict access using conditions. For this scenario, select the **Allow user to assign all roles** condition in the **Add role assignment** page.
44+
* At a minimum, have **Contributor** permissions in your Azure subscription.
4345

44-
:::image type="content" source="./media/howto-deploy-iot-operations/add-role-assignment-conditions.png" alt-text="Screenshot that shows assigning users highly privileged role access in the Azure portal.":::
46+
* Creating secrets in Key Vault require s**Key Vault Secrets Officer** permissions.
4547

46-
* An Azure key vault that has the **Permission model** set to **Vault access policy**. You can check this setting in the **Access configuration** section of an existing key vault. To create a new key vault, use the [az keyvault create](/cli/azure/keyvault#az-keyvault-create) command:
48+
* The following tasks require **Microsoft/Authorization/roleAssignments/write** permissions. You can make a custom role in Azure role-based access control or assign a [built-in role](../../role-based-access-control/built-in-roles/general.md) that grants this permission.
4749

48-
```azurecli
49-
az keyvault create --enable-rbac-authorization false --name "<KEYVAULT_NAME>" --resource-group "<RESOURCE_GROUP>"
50-
```
50+
* Enabling resource sync rules on the Azure IoT Operations instance. If you don't have role assignment write permissions, you can disable this feature during deployment. This approach is discussed in more detail in the [Deploy](#deploy) section of this article.
51+
52+
* Creating a schema registry. If you don't have role assignment write permissions, you can request them or ask that someone with the correct permissions create a schema registry that you can refer to.
53+
54+
> [!TIP]
55+
>
56+
> * If you use the Azure CLI, use the [az role assignment create](/cli/azure/role/assignment#az-role-assignment-create) command to give permissions. For example, `az role assignment create --assignee sp_name --role "Role Based Access Control Administrator" --scope subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup`
57+
>
58+
> * If you use the Azure portal to assign privileged admin roles to a user or principal, you're prompted to restrict access using conditions. For this scenario, select the **Allow user to assign all roles** condition in the **Add role assignment** page.
59+
>
60+
> :::image type="content" source="./media/howto-deploy-iot-operations/add-role-assignment-conditions.png" alt-text="Screenshot that shows assigning users highly privileged role access in the Azure portal.":::
5161
5262
Development resources:
5363

@@ -61,7 +71,7 @@ Development resources:
6171

6272
A cluster host:
6373

64-
* An Azure Arc-enabled Kubernetes cluster. If you don't have one, follow the steps in [Prepare your Azure Arc-enabled Kubernetes cluster](./howto-prepare-cluster.md?tabs=wsl-ubuntu).
74+
* An Azure Arc-enabled Kubernetes cluster with the custom location and workload identity features enabled. If you don't have one, follow the steps in [Prepare your Azure Arc-enabled Kubernetes cluster](./howto-prepare-cluster.md?tabs=wsl-ubuntu).
6575

6676
If you deployed Azure IoT Operations to your cluster previously, uninstall those resources before continuing. For more information, see [Update Azure IoT Operations](#update-azure-iot-operations).
6777

@@ -142,33 +152,70 @@ The Azure portal deployment experience is a helper tool that generates a deploym
142152
| Parameter | Value |
143153
| --------- | ----- |
144154
| **Azure IoT Operations name** | *Optional*: Replace the default name for the Azure IoT Operations instance. |
145-
| **MQTT broker configuration** | *Optional*: Replace the default settings for the MQTT broker. For more information, see [Configure core MQTT broker settings](../manage-mqtt-broker/howto-configure-availability-scale.md). |
155+
| **MQTT broker configuration** | *Optional*: Edit the default settings for the MQTT broker. For more information, see [Configure core MQTT broker settings](../manage-mqtt-broker/howto-configure-availability-scale.md). |
156+
| **Dataflow profile configuration** | *Optional*: Edit the default settings for dataflows. For more information, see [Configure dataflow profile](../connect-to-cloud/howto-configure-dataflow-profile.md). |
146157

147-
1. Select **Next: Automation**.
158+
:::image type="content" source="./media/howto-deploy-iot-operations/deploy-configuration.png" alt-text="A screenshot that shows the second tab for deploying Azure IoT Operations from the portal.":::
159+
160+
1. Select **Next: Dependency management**.
161+
162+
1. On the **Dependency management** tab, select an existing schema registry or use these steps to create one:
163+
164+
1. Select **Create new**.
165+
166+
1. Provide a **Schema registry name** and **Schema registry namespace**.
167+
168+
1. Select **Select Azure Storage container**.
169+
170+
1. Schema registry requires an Azure Storage account with hierarchical namespace and public network access enabled. Choose a storage account from the list of hierarchical namespace-enabled accounts, or select **Create** to create one.
171+
172+
1. Select a container in your storage account or select **Container** to create one.
173+
174+
1. Select **Apply** to confirm the schema registry configurations.
175+
176+
1. On the **Dependency management** tab, select the **Secure settings** deployment option.
148177

149-
1. On the **Automation** tab, provide the following information:
178+
:::image type="content" source="./media/howto-deploy-iot-operations/deploy-dependency-management-1.png" alt-text="A screenshot that shows selecting secure settings on the third tab for deploying Azure IoT Operations from the portal.":::
179+
180+
1. In the **Deployment options** section, provide the following information:
150181

151182
| Parameter | Value |
152183
| --------- | ----- |
153184
| **Subscription** | Select the subscription that contains your Azure key vault. |
154-
| **Azure Key Vault** | Select your Azure key vault. Or, select **Create new**.<br><br>Ensure that your key vault has **Vault access policy** as its permission model. To check this setting, select **Manage selected vault** > **Settings** > **Access configuration**. |
185+
| **Azure Key Vault** | Select an Azure key vault select **Create new**.<br><br>Ensure that your key vault has **Vault access policy** as its permission model. To check this setting, select **Manage selected vault** > **Settings** > **Access configuration**. |
186+
| **User assigned managed identity for secrets** | Select an identity or select **Create new**. |
187+
| **User assigned managed identity for AIO components** | Select an identity or select **Create new**. Don't use the same managed identity as the one you selected for secrets. |
155188

156-
:::image type="content" source="./media/howto-deploy-iot-operations/deploy-automation.png" alt-text="A screenshot that shows the third tab for deploying Azure IoT Operations from the portal.":::
189+
:::image type="content" source="./media/howto-deploy-iot-operations/deploy-dependency-management-2.png" alt-text="A screenshot that shows configuring secure settings on the third tab for deploying Azure IoT Operations from the portal.":::
157190

158-
1. If you didn't prepare your Azure CLI environment as described in the prerequisites, do so now in a terminal of your choice:
191+
1. Select **Next: Automation**.
159192

160-
```azurecli
161-
az upgrade
162-
az extension add --upgrade --name azure-iot-ops
163-
```
193+
1. One at a time, run each Azure CLI command on the **Automation** tab in a terminal:
164194

165-
1. Sign in to Azure CLI interactively with a browser even if you already signed in before. If you don't sign in interactively, you might get an error that says *Your device is required to be managed to access your resource* when you continue to the next step to deploy Azure IoT Operations.
195+
1. Sign in to Azure CLI interactively with a browser even if you already signed in before. If you don't sign in interactively, you might get an error that says *Your device is required to be managed to access your resource* when you continue to the next step to deploy Azure IoT Operations.
166196

167-
```azurecli
168-
az login
169-
```
197+
```azurecli
198+
az login
199+
```
200+
201+
1. If you didn't prepare your Azure CLI environment as described in the prerequisites, do so now in a terminal of your choice:
202+
203+
```azurecli
204+
az upgrade
205+
az extension add --upgrade --name azure-iot-ops
206+
```
207+
208+
1. Copy and run the `az iot ops schema registry create` command.
209+
210+
1. Copy and run the `az iot ops init` command.
211+
212+
1. Copy and run the `az iot ops create` command.
213+
214+
1. Copy and run the `az iot ops secretsync enable` command.
215+
216+
1. Copy and run the `az iot ops identity assign` command.
170217
171-
1. Copy the [az iot ops init](/cli/azure/iot/ops#az-iot-ops-init) command from the **Automation** tab in the Azure portal and run it in your terminal.
218+
1. Once all of the Azure CLI commands have completed successfully, you can close the **Install Azure IoT Operations** wizard.
172219
173220
---
174221

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

Lines changed: 14 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ An Azure Arc-enabled Kubernetes cluster is a prerequisite for deploying Azure Io
2323
2424
## Prerequisites
2525

26-
Azure IoT Operations should work on any Arc-enabled Kubernetes cluster that meets the [Azure Arc-enabled Kubernetes system requirements](/azure/azure-arckubernetes/system-requirements). Currently Azure IoT Operations doesn't support ARM64 architectures.
26+
Azure IoT Operations should work on any Arc-enabled Kubernetes cluster that meets the [Azure Arc-enabled Kubernetes system requirements](/azure/azure-arc/kubernetes/system-requirements). Currently Azure IoT Operations doesn't support ARM64 architectures.
2727

2828
Microsoft supports AKS Edge Essentials for deployments on Windows and K3s for deployments on Ubuntu. For a list of specific hardware and software combinations that are tested and validated, see [Validated environments](../overview-iot-operations.md#validated-environments).
2929

3030
To prepare your Azure Arc-enabled Kubernetes cluster, you need:
3131

32-
* Hardware that meets the [system requirements](/azure/azure-arckubernetes/system-requirements).
32+
* Hardware that meets the [system requirements](/azure/azure-arc/kubernetes/system-requirements).
3333

3434
### [AKS Edge Essentials](#tab/aks-edge-essentials)
3535

@@ -254,65 +254,25 @@ To connect your cluster to Azure Arc:
254254
export CLUSTER_NAME=<NEW_CLUSTER_NAME>
255255
```
256256

257-
1. Set the Azure subscription context for all commands:
258-
259-
```azurecli
260-
az account set -s $SUBSCRIPTION_ID
261-
```
262-
263-
1. Register the required resource providers in your subscription:
264-
265-
>[!NOTE]
266-
>This step only needs to be run once per subscription. To register resource providers, you need permission to do the `/register/action` operation, which is included in subscription Contributor and Owner roles. For more information, see [Azure resource providers and types](../../azure-resource-manager/management/resource-providers-and-types.md).
267-
268-
```azurecli
269-
az provider register -n "Microsoft.ExtendedLocation"
270-
az provider register -n "Microsoft.Kubernetes"
271-
az provider register -n "Microsoft.KubernetesConfiguration"
272-
az provider register -n "Microsoft.IoTOperationsOrchestrator"
273-
az provider register -n "Microsoft.IoTOperations"
274-
az provider register -n "Microsoft.DeviceRegistry"
275-
```
276-
277-
1. Download and install a preview version of the `connectedk8s` extension for Azure CLI.
278-
279-
```azurecli
280-
az storage blob download --auth-mode login --blob-url https://github.com/AzureArcForKubernetes/azure-cli-extensions/blob/connectedk8s/public/cli-extensions/connectedk8s-1.10.0-py2.py3-none-any.whl -f ./connectedk8s-1.10.0-py2.py3-none-any.whl
281-
282-
az extension add --upgrade --source ./connectedk8s-1.10.0-py2.py3-none-any.whl
283-
```
284-
285-
1. Use the [az group create](/cli/azure/group#az-group-create) command to create a resource group in your Azure subscription to store all the resources:
286-
287-
```azurecli
288-
az group create --location $LOCATION --resource-group $RESOURCE_GROUP --subscription $SUBSCRIPTION_ID
289-
```
290-
291-
1. Use the [az connectedk8s connect](/cli/azure/connectedk8s#az-connectedk8s-connect) command to Arc-enable your Kubernetes cluster and manage it as part of your Azure resource group:
292-
293-
```azurecli
294-
az connectedk8s connect -n $CLUSTER_NAME -l $LOCATION -g $RESOURCE_GROUP --subscription $SUBSCRIPTION_ID --disable-auto-upgrade
295-
```
296-
297-
1. Upgrade the Azure Arc agent to use a preview build that supports the workload identity feature that Azure IoT Operations uses for user-assigned managed identities.
257+
[!INCLUDE [connect-cluster-k3s](../includes/connect-cluster-k3s.md)]
298258

259+
### [Codespaces](#tab/codespaces)
299260

261+
To connect your cluster to Azure Arc:
300262

301-
1. Get the `objectId` of the Microsoft Entra ID application that the Azure Arc service uses and save it as an environment variable.
263+
1. In your codespace terminal, sign in to Azure CLI:
302264

303265
```azurecli
304-
export OBJECT_ID=$(az ad sp show --id bc313c14-388c-4e7d-a58e-70017303ee3b --query id -o tsv)
266+
az login
305267
```
306268

307-
1. Use the [az connectedk8s enable-features](/cli/azure/connectedk8s#az-connectedk8s-enable-features) command to enable custom location support on your cluster. This command uses the `objectId` of the Microsoft Entra ID application that the Azure Arc service uses. Run this command on the machine where you deployed the Kubernetes cluster:
308-
309-
```azurecli
310-
az connectedk8s enable-features -n $CLUSTER_NAME -g $RESOURCE_GROUP --custom-locations-oid $OBJECT_ID --features cluster-connect custom-locations
311-
```
269+
> [!TIP]
270+
> 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:
271+
>
272+
> * Open the codespace in VS Code desktop, and then return to the browser terminal and rerun `az login`.
273+
> * 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!."
312274
313-
### [Codespaces](#tab/codespaces)
314-
315-
[!INCLUDE [connect-cluster-codespaces](../includes/connect-cluster-codespaces.md)]
275+
[!INCLUDE [connect-cluster-k3s](../includes/connect-cluster-k3s.md)]
316276
317277
---
318278
@@ -324,7 +284,7 @@ To verify that your cluster is ready for Azure IoT Operations deployment, you ca
324284
az iot ops verify-host
325285
```
326286
327-
To verify that your Kubernetes cluster is now Azure Arc-enabled, run the following command:
287+
To verify that your Kubernetes cluster is Azure Arc-enabled, run the following command:
328288
329289
```console
330290
kubectl get deployments,pods -n azure-arc
@@ -360,10 +320,6 @@ pod/resource-sync-agent-769bb66b79-z9n46 2/2 Running 0
360320
pod/metrics-agent-6588f97dc-455j8 2/2 Running 0 10m
361321
```
362322
363-
## Create sites
364-
365-
A _site_ is a collection of Azure IoT Operations instances. Sites typically group instances by physical location and make it easier for OT users to locate and manage assets. An IT administrator creates sites and assigns Azure IoT Operations instances to them. To learn more, see [What is Azure Arc site manager (preview)?](/azure/azure-arc/site-manager/overview).
366-
367323
## Next steps
368324
369325
Now that you have an Azure Arc-enabled Kubernetes cluster, you can [deploy Azure IoT Operations](howto-deploy-iot-operations.md).
63.2 KB
Loading
119 KB
Loading
124 KB
Loading
105 KB
Loading

0 commit comments

Comments
 (0)