Skip to content

Commit 49b0ac5

Browse files
authored
Merge pull request #302376 from SoniaLopezBravo/sonialopez-aio-2507
AIO 2507 - Restart SR pods after assigning identity
2 parents 1b02be7 + cf7eff7 commit 49b0ac5

File tree

8 files changed

+290
-139
lines changed

8 files changed

+290
-139
lines changed

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

Lines changed: 67 additions & 117 deletions
Large diffs are not rendered by default.
Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
---
2+
title: Deploy Azure IoT Operations to a Test Cluster
3+
description: Use the Azure portal to deploy Azure IoT Operations to test an Arc-enabled Kubernetes cluster.
4+
author: SoniaLopezBravo
5+
ms.author: sonialopez
6+
ms.topic: how-to
7+
ms.custom: devx-track-azurecli
8+
ms.date: 07/08/2025
9+
10+
#CustomerIntent: As an OT professional, I want to deploy Azure IoT Operations to a Kubernetes cluster for testing and evaluation scenarios, so that I can evaluate the solution before deploying it to production.
11+
---
12+
13+
# Deploy Azure IoT operations to a test cluster
14+
15+
Learn how to deploy Azure IoT Operations to a test cluster, which is an Arc-enabled Kubernetes cluster that you can use for testing and evaluation scenarios.
16+
17+
If you want to deploy Azure IoT Operations to a production cluster, see [Deploy Azure IoT Operations to a production cluster](./howto-deploy-iot-operations.md).
18+
19+
## Before you begin
20+
21+
This article discusses Azure IoT Operations *deployments* and *instances*, which are two different concepts:
22+
23+
* An Azure IoT Operations *deployment* describes all of the components and resources that enable the Azure IoT Operations scenario. These components and resources include:
24+
* An Azure IoT Operations instance
25+
* Arc extensions
26+
* Custom locations
27+
* Resources that you can configure in your Azure IoT Operations solution, like assets and asset endpoints.
28+
29+
* An Azure IoT Operations *instance* is the parent resource that bundles the suite of services that are defined in [What is Azure IoT Operations?](../overview-iot-operations.md) like MQTT broker, data flows, and connector for OPC UA.
30+
31+
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*.
32+
33+
## Prerequisites
34+
35+
Cloud resources:
36+
37+
* An Azure subscription.
38+
39+
* Azure access permissions. For more information, see [Deployment details > Required permissions](overview-deploy.md#required-permissions).
40+
41+
Development resources:
42+
43+
* Azure CLI installed on your development machine. This scenario requires Azure CLI version 2.53.0 or higher. Use `az --version` to check your version and `az upgrade` to update if necessary. For more information, see [How to install the Azure CLI](/cli/azure/install-azure-cli).
44+
45+
* The Azure IoT Operations extension for Azure CLI. Use the following command to add the extension or update it to the latest version:
46+
47+
```azurecli
48+
az extension add --upgrade --name azure-iot-ops
49+
```
50+
51+
A cluster host:
52+
53+
* Have 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).
54+
55+
If you deployed Azure IoT Operations to your cluster previously, uninstall those resources before continuing. For more information, see [Update Azure IoT Operations](./howto-manage-update-uninstall.md#uninstall).
56+
57+
* (Optional) Prepare your cluster for observability before deploying Azure IoT Operations: [Configure observability](../configure-observability-monitoring/howto-configure-observability.md).
58+
59+
## Deploy in Azure portal
60+
61+
The Azure portal deployment experience is a helper tool that generates a deployment command based on your resources and configuration. The final step is to run an Azure CLI command, so you still need the Azure CLI prerequisites described in the previous section.
62+
63+
1. Sign in to [Azure portal](https://portal.azure.com).
64+
1. In the search box, search for and select **Azure IoT Operations**.
65+
66+
1. Select **Create**.
67+
68+
1. On the **Basics** tab, provide the following information:
69+
70+
| Parameter | Value |
71+
| --------- | ----- |
72+
| **Subscription** | Select the subscription that contains your Arc-enabled cluster. |
73+
| **Resource group** | Select the resource group that contains your Arc-enabled cluster. |
74+
| **Cluster name** | Select the cluster that you want to deploy Azure IoT Operations to. |
75+
| **Custom location name** | *Optional*: Replace the default name for the custom location. |
76+
| **Connectors** | *Optional*: Select the ONVIF connector to deploy. The [ONVIF connector](../discover-manage-assets/overview-onvif-connector.md) is a preview feature that enables you to connect to ONVIF-compliant cameras.|
77+
78+
:::image type="content" source="./media/howto-deploy-iot-operations/deploy-basics.png" alt-text="A screenshot that shows the first tab for deploying Azure IoT Operations from the portal.":::
79+
80+
1. Select **Next: Configuration**.
81+
82+
1. On the **Configuration** tab, provide the following information:
83+
84+
| Parameter | Value |
85+
| --------- | ----- |
86+
| **Azure IoT Operations name** | *Optional*: Replace the default name for the Azure IoT Operations instance. |
87+
| **MQTT broker configuration** | *Optional*: Edit the default settings for the MQTT broker. In Azure portal it's possible to [configure cardinality and memory profile settings](../manage-mqtt-broker/howto-configure-availability-scale.md). To configure other settings including disk-backed message buffer and advanced MQTT client options, see [Azure CLI support for advanced MQTT broker configuration](https://aka.ms/aziotops-broker-config). |
88+
| **Data flow profile configuration** | *Optional*: Edit the default settings for data flows. For more information, see [Configure data flow profile](../connect-to-cloud/howto-configure-dataflow-profile.md). |
89+
90+
:::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.":::
91+
92+
1. Select **Next: Dependency management**.
93+
94+
1. On the **Dependency management** tab, select an existing schema registry or use these steps to create one:
95+
96+
1. Select **Create new**.
97+
98+
1. Provide a **Schema registry name** and **Schema registry namespace**.
99+
100+
1. Select **Select Azure Storage container**.
101+
102+
1. Choose a storage account from the list of hierarchical namespace-enabled accounts, or select **Create** to create one.
103+
104+
Schema registry requires an Azure Storage account with hierarchical namespace and public network access enabled. When creating a new storage account, choose a **General purpose v2** storage account type and set **Hierarchical namespace** to **Enabled**.
105+
106+
For more information on configuring your storage account, see [Production deployment guidelines](concept-production-guidelines.md#schema-registry-and-storage).
107+
108+
1. Select a container in your storage account or select **Container** to create one.
109+
110+
1. Select **Apply** to confirm the schema registry configurations.
111+
112+
1. On the **Dependency management** tab, select the **Test settings** deployment option. This option uses default settings that are recommended for testing purposes.
113+
114+
:::image type="content" source="./media/howto-deploy-iot-operations/deploy-dependency-management-test.png" alt-text="A screenshot that shows selecting test settings on the third tab for deploying Azure IoT Operations from the portal.":::
115+
116+
1. Select **Next: Automation**.
117+
118+
### Run Azure CLI commands
119+
120+
The final step in the Azure portal deployment experience is to run a set of Azure CLI commands to deploy Azure IoT Operations to your cluster. The commands are generated based on the information you provided in the previous steps.
121+
122+
One at a time, run each Azure CLI command on the **Automation** tab in a terminal:
123+
124+
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*.
125+
126+
```azurecli
127+
az login
128+
```
129+
130+
1. Install the latest Azure IoT Operations CLI extension if you haven't already.
131+
132+
```azurecli
133+
az extension add --upgrade --name azure-iot-ops
134+
```
135+
136+
1. Create a schema registry which will be used by Azure IoT Operations components. Copy and run the provided [az iot ops schema registry create](/cli/azure/iot/ops/schema/registry#az-iot-ops-schema-registry-create) command. If you chose to use an existing schema registry, this command isn't displayed on the **Automation** tab.
137+
138+
1. Prepare the cluster for Azure IoT Operations deployment. Copy and run the provided [az iot ops init](/cli/azure/iot/ops#az-iot-ops-init) command.
139+
140+
> [!TIP]
141+
> The `init` command only needs to be run once per cluster. If you followed the optional prerequisite to set up your own certificate authority issuer, follow the steps in [Bring your own issuer](../secure-iot-ops/howto-manage-certificates.md#bring-your-own-issuer).
142+
143+
This command might take several minutes to complete. You can watch the progress in the deployment progress display in the terminal.
144+
145+
1. To deploy Azure IoT Operations, copy and run the provided [az iot ops create](/cli/azure/iot/ops#az-iot-ops-create) command. This command might take several minutes to complete. You can watch the progress in the deployment progress display in the terminal.
146+
147+
* If you want to use the preview connector configuration, add the following parameter to the `create` command:
148+
149+
```bash
150+
--feature connectors.settings.preview=Enabled
151+
```
152+
153+
* If you followed the optional prerequisites to prepare your cluster for observability, add the following parameters to the `create` command:
154+
155+
| Parameter | Value | Description |
156+
| --------- | ----- | ----------- |
157+
| `--ops-config` | `observability.metrics.openTelemetryCollectorAddress=<FULLNAMEOVERRIDE>.azure-iot-operations.svc.cluster.local:<GRPC_ENDPOINT>` | Provide the OpenTelemetry (OTel) collector address you configured in the otel-collector-values.yaml file.<br><br>The sample values used in [Configure observability](../configure-observability-monitoring/howto-configure-observability.md) are **fullnameOverride=aio-otel-collector** and **grpc.endpoint=4317**. |
158+
| `--ops-config` | `observability.metrics.exportInternalSeconds=<CHECK_INTERVAL>` | Provide the **check_interval** value you configured in the otel-collector-values.yaml file.<br><br>The sample value used in [Configure observability](../configure-observability-monitoring/howto-configure-observability.md) is **check_interval=60**. |
159+
160+
161+
1. Once all of the Azure CLI commands complete successfully, you can close the **Install Azure IoT Operations** wizard.
162+
163+
Once the `create` command completes successfully, you have a working Azure IoT Operations instance running on your cluster. At this point, your instance is configured for most testing and evaluation scenarios.
164+
165+
## Verify deployment
166+
167+
After the deployment is complete, run [az iot ops check](/cli/azure/iot/ops#az-iot-ops-check) to evaluate IoT Operations service deployment for health, configuration, and usability. The `check` command can help you find problems in your deployment and configuration.
168+
169+
```azurecli
170+
az iot ops check
171+
```
172+
173+
The `check` command displays a warning about missing data flows, which is normal and expected until you create a data flow. For more information, see [Process and route data with data flows](../connect-to-cloud/overview-dataflow.md).
174+
175+
You can check the configurations of topic maps, QoS, and message routes by adding the `--detail-level 2` parameter to the `check` command for a verbose view.
176+
177+
## Next steps
178+
179+
The Azure IoT Operations instance you deployed is configured for testing scenarios. If you want to enable secure setting and prepare the instance for production scenarios, follow the steps in [Enable secure settings on an existing Azure IoT Operations instance](./howto-enable-secure-settings.md).
180+
181+

articles/iot-operations/deploy-iot-ops/howto-enable-secure-settings.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This article provides instructions for enabling secure settings if you didn't do
1717

1818
## Prerequisites
1919

20-
* An Azure IoT Operations instance deployed with test settings. For example, you chose **Test Settings** when following the instructions in [Deploy Azure IoT Operations to an Arc-enabled Kubernetes cluster](howto-deploy-iot-operations.md).
20+
* An Azure IoT Operations instance [deployed with test settings](howto-deploy-iot-test-operations.md).
2121

2222
* Azure CLI installed on your development machine. This scenario requires Azure CLI version 2.53.0 or higher. Use `az --version` to check your version and `az upgrade` to update if necessary. For more information, see [How to install the Azure CLI](/cli/azure/install-azure-cli).
2323

@@ -193,4 +193,11 @@ Some Azure IoT Operations components, like data flow endpoints, use a user-assig
193193
194194
---
195195
196+
197+
1. Restart the schema registry pods to apply the new identity.
198+
199+
```azurecli
200+
kubectl delete pods adr-schema-registry-0 adr-schema-registry-1 -n azure-iot-operations
201+
```
202+
196203
Now you can use this managed identity in data flow endpoints for cloud connections.

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ms.date: 10/23/2024
1414

1515
An Azure Arc-enabled Kubernetes cluster is a prerequisite for deploying Azure IoT Operations. This article describes how to prepare a cluster before you deploy Azure IoT Operations. This article includes guidance for Ubuntu, Windows, Azure Local, and Tanzu Kubernetes Grid (TKG).
1616

17-
The steps in this article prepare your cluster for a secure settings deployment, which is a longer but production-ready process. If you want to deploy Azure IoT Operations quickly and run a sample workload with only test settings, see the [Quickstart: Run Azure IoT Operations in GitHub Codespaces with K3s](../get-started-end-to-end-sample/quickstart-deploy.md) instead. For more information about test settings and secure settings, see [Deployment details > Choose your features](./overview-deploy.md#choose-your-features).
17+
If you want to deploy Azure IoT Operations quickly and run a sample workload in a test environment, see the [Quickstart: Run Azure IoT Operations in GitHub Codespaces with K3s](../get-started-end-to-end-sample/quickstart-deploy.md).
1818

1919
## Prerequisites
2020

@@ -340,7 +340,7 @@ Connect your cluster to Azure Arc so that it can be managed remotely.
340340
```
341341
---
342342

343-
## Advanced configuration
343+
## Advanced configuration
344344

345345
At this point, when you have an Azure Arc-enabled Kubernetes cluster but before you deploy Azure IoT Operations to it, you might want to configure your cluster for advanced scenarios.
346346

@@ -349,4 +349,7 @@ At this point, when you have an Azure Arc-enabled Kubernetes cluster but before
349349

350350
## Next steps
351351

352-
Now that you have an Azure Arc-enabled Kubernetes cluster, you can [deploy Azure IoT Operations](howto-deploy-iot-operations.md).
352+
Now that you have an Azure Arc-enabled Kubernetes cluster, you can choose to deploy Azure IoT Operation with test settings or with production settings.
353+
354+
- [Test deployment](howto-deploy-iot-test-operations.md): Recommended for quick evaluation and prototyping before deploying in production. Test deployment isn't suitable for production, it lacks observability and hardened security.
355+
- [Production deployment](howto-deploy-iot-operations.md): Recommended for production-ready workloads. Production deployment is suitable for real-world IoT deployments with compliance and security needs.
-12.8 KB
Loading
111 KB
Loading

0 commit comments

Comments
 (0)