You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this quickstart, you will 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 Preview is a digital operations suite of services that includes Azure IoT Orchestrator Preview. 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's generating sample data to use in the following quickstarts.
18
+
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 that includes Azure IoT Orchestrator Preview. 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.
19
19
20
20
The services deployed in this quickstart include:
21
21
@@ -30,26 +30,36 @@ The services deployed in this quickstart include:
30
30
31
31
The following quickstarts in this series build on this one to define sample assets, data processing pipelines, and visualizations. If you want to deploy Azure IoT Operations to run your own workloads, see [Prepare your Azure Arc-enabled Kubernetes cluster](../deploy-iot-ops/howto-prepare-cluster.md) and [Deploy Azure IoT Operations Preview extensions to a Kubernetes cluster](../deploy-iot-ops/howto-deploy-iot-operations.md).
32
32
33
+
## Before you begin
34
+
35
+
This series of quickstarts is intended to give you an opportunity to evaluate an end-to-end scenario with Azure IoT Operations. In a true development or production environment, these tasks would be performed by multiple teams working together and some tasks might require elevated permissions.
36
+
37
+
For the best new user experience, we recommend using an [Azure free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) so that you have owner permissions over the resources in these quickstarts. We also recommend using GitHub Codespaces as a virtual environment in which you can quickly begin deploying resources and running commands without installing new tools on your own machines. For more information about these options, continue to the prerequisites.
38
+
39
+
Once you're ready to learn more about the individual roles and tasks, the how-to guides provide more specific implementation and permissions details.
40
+
33
41
## Prerequisites
34
42
35
43
Review the prerequisites based on the environment you use to host the Kubernetes cluster.
36
44
37
-
For this quickstart, we recommend GitHub Codespaces as a quick way to get started in a virtual environment without installing new tools. Or, use Azure Kubernetes Service (AKS) Edge Essentials to create a cluster on Windows devices or K3s on Ubuntu Linux devices.
45
+
For this quickstart, we recommend using a virtual environment (GitHub Codespaces) as a quick way to get started without installing new tools.
38
46
39
-
As part of this quickstart, you create a cluster in either Codespaces, AKS Edge Essentials, or Linux. If you want to reuse a cluster that you've deployed Azure IoT Operations to before, refer to the steps in [Clean up resources](#clean-up-resources) to uninstall Azure IoT Operations before continuing.
47
+
As part of this quickstart, you create a cluster in either GitHub Codespaces, AKS Edge Essentials, or K3s on Ubuntu Linux. If you want to rerun this quickstart with a cluster that already has Azure IoT Operations deployed to it, refer to the steps in [Clean up resources](#clean-up-resources) to uninstall Azure IoT Operations before continuing.
40
48
41
49
# [Virtual](#tab/codespaces)
42
50
43
51
* 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.
44
52
45
53
* A [GitHub](https://github.com) account.
46
54
47
-
# [Windows](#tab/windows)
55
+
* Visual Studio Code installed on your development machine. For more information, see [Download Visual Studio Code](https://code.visualstudio.com/download).
48
56
49
-
* You'll use the `AksEdgeQuickStartForAio.ps1` script to set up an AKS Edge Essentials single-machine K3S Linux-only cluster. Ensure that your machine has a minimum of 10 GB RAM, 4 vCPUs, and 40 GB free disk space. To learn more, see the [AKS Edge Essentials system requirements](/azure/aks/hybrid/aks-edge-system-requirements).
57
+
# [Windows](#tab/windows)
50
58
51
59
* 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.
52
60
61
+
* Ensure that your machine has a minimum of 10-GB RAM, 4 vCPUs, and 40-GB free disk space. To learn more, see the [AKS Edge Essentials system requirements](/azure/aks/hybrid/aks-edge-system-requirements).
62
+
53
63
* Azure CLI installed on your development machine. For more information, see [How to install the Azure CLI](/cli/azure/install-azure-cli).
54
64
55
65
This quickstart requires Azure CLI version 2.46.0 or higher. Use `az --version` to check your version and `az upgrade` to update if necessary.
@@ -212,7 +222,7 @@ This helper command checks connectivity to Azure Resource Manager and Microsoft
212
222
213
223
Part of the deployment process is to configure your cluster so that it can communicate securely with your Azure IoT Operations components and key vault. The Azure CLI command `az iot ops init` does this for you. Once your cluster is configured, then you can deploy Azure IoT Operations.
214
224
215
-
Use the Azure CLI to create a key vault, build the `az iot ops init` command based on your resources, and then deploy Azure IoT Operations components to your Arc-enabled Kubernetes cluster.
225
+
In this section, you use the Azure CLI to create a key vault, build the `az iot ops init` command based on your resources, and then deploy Azure IoT Operations components to your Arc-enabled Kubernetes cluster.
216
226
217
227
### Create a key vault
218
228
@@ -221,20 +231,22 @@ You can use an existing key vault for your secrets, but verify that the **Permis
221
231
To create a new key vault, use the following command:
222
232
223
233
```azurecli
224
-
az keyvault create --enable-rbac-authorization false --name "<your unique key vault name>" --resource-group "<the name of the resource group that contains your Kubernetes cluster>"
234
+
az keyvault create --enable-rbac-authorization false --name "<KEYVAULT_NAME>" --resource-group "<RESOURCE_GROUP_NAME>"
225
235
```
226
236
227
-
### Deploy Azure IoT Operations Preview
237
+
### Deploy Azure IoT Operations
238
+
239
+
In this section, you use the Azure CLI to deploy Azure IoT Operations, but the Azure portal has a helper wizard to build the correct CLI command based on your cluster, cloud resources, and configuration choices.
228
240
229
-
1. In the Azure portal search bar, search for and select **Azure Arc**.
241
+
1. In a web browser, open the [Azure portal](https://portal.azure.com). In the Azure portal search bar, search for and select **Azure Arc**.
230
242
231
243
1. Select **Azure IoT Operations (preview)** from the **Application Services** section of the Azure Arc menu.
232
244
233
245
:::image type="content" source="./media/quickstart-deploy/arc-iot-operations.png" alt-text="Screenshot of selecting Azure IoT Operations from Azure Arc.":::
234
246
235
247
1. Select **Create**.
236
248
237
-
1. On the **Basic** tab of the **Install Azure IoT Operations Arc Extension** page, provide the following information:
249
+
1. On the **Basics** tab of the **Install Azure IoT Operations Arc Extension** page, provide the following information:
238
250
239
251
| Field | Value |
240
252
| ----- | ----- |
@@ -250,7 +262,7 @@ az keyvault create --enable-rbac-authorization false --name "<your unique key va
250
262
251
263
| Field | Value |
252
264
| ----- | ----- |
253
-
|**Deploy a simulated PLC**| Switch this toggle to **Yes**. The simulated PLC creates demo telemetry data that you use in the following quickstarts. |
265
+
|**Deploy a simulated PLC**| Switch this toggle to **Yes**. The simulated PLC creates demo data that you use in the following quickstarts. |
254
266
|**Mode**| Set the MQ configuration mode to **Auto**. |
255
267
256
268
:::image type="content" source="./media/quickstart-deploy/install-extension-configuration.png" alt-text="Screenshot of the configuration tab for installing the Azure IoT Operations Arc extension in the Azure portal.":::
@@ -264,26 +276,14 @@ az keyvault create --enable-rbac-authorization false --name "<your unique key va
264
276
|**Subscription**| Select the subscription that contains your Arc-enabled Kubernetes cluster. |
265
277
|**Azure Key Vault**| Use the **Select a key vault** drop-down menu to choose the key vault that you set up in the previous section. |
266
278
267
-
1. Once you select a key vault, the **Automation** tab uses all the information you've selected so far to populate an Azure CLI command that configures your cluster and deploys Azure IoT Operations. Copy the CLI command.
279
+
1. Once you select a key vault, the **Automation** tab uses all the information you selected in the previous tabs to populate an Azure CLI command that configures your cluster and deploys Azure IoT Operations. Copy the CLI command.
268
280
269
281
:::image type="content" source="./media/quickstart-deploy/install-extension-automation.png" alt-text="Screenshot of copying the CLI command from the automation tab for installing the Azure IoT Operations Arc extension in the Azure portal.":::
270
282
271
-
1. Sign in to Azure CLI on your development machine or in your codespace terminal. To prevent potential permission issues later, sign in interactively with a browser here even if you've already logged in before.
272
-
273
-
```azurecli
274
-
az login
275
-
```
276
-
277
-
> [!NOTE]
278
-
> When using a GitHub codespace in a browser, `az login` returns a localhost error in the browser window after logging in. To fix, either:
279
-
>
280
-
> * Open the codespace in VS Code desktop, and then run `az login` again in the browser terminal.
281
-
> * 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!."
282
-
283
283
1. Run the copied `az iot ops init` command on your development machine or in your codespace terminal.
284
284
285
285
>[!TIP]
286
-
>If you get an error that says *Your device is required to be managed to access your resource*, go back to the previous step and make sure that you signed in interactively.
286
+
>If 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.
287
287
288
288
1. These quickstarts use the **OPC PLC simulator** to generate sample data. To configure the simulator for the quickstart scenario, run the following command:
289
289
@@ -312,7 +312,9 @@ To view your cluster on the Azure portal, use the following steps:
312
312
313
313
1. From the **Overview** of the resource group, select the name of your cluster.
314
314
315
-
1. On your cluster, select **Extensions** from the menu.
315
+
1. On your cluster, select **Extensions** from the **Settings** section of the menu.
316
+
317
+
:::image type="content" source="./media/quickstart-deploy/view-extensions.png" alt-text="Screenshot that shows the deployed extensions on your Arc-enabled cluster.":::
316
318
317
319
You can see that your cluster is running extensions of the type **microsoft.iotoperations.x**, which is the group name for all of the Azure IoT Operations components and the orchestration service.
318
320
@@ -326,7 +328,15 @@ In this quickstart, you configured your Arc-enabled Kubernetes cluster so that i
326
328
327
329
If you're continuing on to the next quickstart, keep all of your resources.
328
330
329
-
If you want to delete the Azure IoT Operations deployment but plan on reinstalling it on your cluster, be sure to keep the secrets provider on your cluster. In your cluster on the Azure portal, select the extensions of the type **microsoft.iotoperations.x** and **microsoft.deviceregistry.assets**, then select **Uninstall**.
331
+
If you want to delete the Azure IoT Operations deployment but plan on reinstalling it on your cluster, be sure to keep the secrets provider on your cluster.
332
+
333
+
1. In your resource group in the Azure portal, select your cluster.
334
+
1. On your cluster resource page, select **Extensions**.
335
+
1. Select all of the extensions of type **microsoft.iotoperations.x** and **microsoft.deviceregistry.assets**, then select **Uninstall**.
336
+
337
+
Keep the secrets provider extension on your cluster.
338
+
339
+
1. Return to your resource group and select the custom location resource, then select **Delete**.
330
340
331
341
If you want to delete all of the resources you created for this quickstart, delete the Kubernetes cluster that you deployed Azure IoT Operations to and remove the Azure resource group that contained the cluster.
Copy file name to clipboardExpand all lines: articles/iot-operations/includes/connect-cluster.md
+20-15Lines changed: 20 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,21 +3,34 @@
3
3
description: include file
4
4
author: kgremban
5
5
ms.topic: include
6
-
ms.date: 11/03/2023
6
+
ms.date: 03/15/2024
7
7
ms.author: kgremban
8
8
ms.custom: include file, ignite-2023, devx-track-azurecli
9
9
---
10
10
11
11
12
12
To connect your cluster to Azure Arc:
13
13
14
-
1. On the machine where you deployed the Kubernetes cluster, sign in with Azure CLI:
14
+
1. On the machine where you deployed the Kubernetes cluster or your codespace terminal, sign in with Azure CLI:
15
15
16
16
```azurecli
17
17
az login
18
18
```
19
19
20
-
1. Set environment variables for the rest of the setup. Replace values in `<>` with valid values or names of your choice. A new cluster and resource group are created in your Azure subscription based on the names you provide:
20
+
> [!TIP]
21
+
> If you're using a GitHub codespace in a browser, `az login` returns a localhost error in the browser window after logging in. To fix, either:
22
+
>
23
+
> * Open the codespace in VS Code desktop, and then return to the browser terminal and rerun `az login`.
24
+
> * 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!."
25
+
26
+
1. Set an environment variable for the cluster name as it will show up in your resource group.
27
+
28
+
```bash
29
+
# Name of the Arc-enabled cluster to create in your resource group
30
+
export CLUSTER_NAME=<NEW_CLUSTER_NAME>
31
+
```
32
+
33
+
1. Set environment variables for your Azure subscription, location, and a new resource group. If you're using GitHub Codespaces and set these secrets when creating your codespace, you can skip this step.
21
34
22
35
```bash
23
36
# Id of the subscription where your resource group and Arc-enabled cluster will be created
@@ -27,19 +40,14 @@ To connect your cluster to Azure Arc:
27
40
```bash
28
41
# Azure region where the created resource group will be located
29
42
# Currently supported regions: "eastus", "eastus2", "westus", "westus2", "westus3", "westeurope", or "northeurope"
30
-
export LOCATION="WestUS3"
43
+
export LOCATION=<REGION>
31
44
```
32
45
33
46
```bash
34
47
# Name of a new resource group to create which will hold the Arc-enabled cluster and Azure IoT Operations resources
35
48
export RESOURCE_GROUP=<NEW_RESOURCE_GROUP_NAME>
36
49
```
37
50
38
-
```bash
39
-
# Name of the Arc-enabled cluster to create in your resource group
40
-
export CLUSTER_NAME=<NEW_CLUSTER_NAME>
41
-
```
42
-
43
51
1. Set the Azure subscription context for all commands:
44
52
45
53
```azurecli
@@ -64,23 +72,20 @@ To connect your cluster to Azure Arc:
64
72
az group create --location $LOCATION --resource-group $RESOURCE_GROUP --subscription $SUBSCRIPTION_ID
65
73
```
66
74
67
-
1. Use the [az connectedk8s connect](/cli/azure/connectedk8s#az-connectedk8s-connect) command to Arc-enable your Kubernetes cluster and manage it in the resource group you created in the previous step:
75
+
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:
1. Get the `objectId` of the Microsoft Entra ID application that the Azure Arc service uses. Run this command in the [Azure Cloud Shell](https://portal.azure.com/#cloudshell) or on your local machine:
81
+
1. Get the `objectId` of the Microsoft Entra ID application that the Azure Arc service uses and save it as an environment variable.
74
82
75
83
```azurecli
76
-
az ad sp show --id bc313c14-388c-4e7d-a58e-70017303ee3b --query id -o tsv
84
+
export OBJECT_ID=$(az ad sp show --id bc313c14-388c-4e7d-a58e-70017303ee3b --query id -o tsv)
77
85
```
78
86
79
-
Make a note of the `objectId` that's returned. You use it in the next step.
80
-
81
87
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:
82
88
83
89
```azurecli
84
-
export OBJECT_ID=<objectID from the previous step>
0 commit comments