Skip to content

Commit d094140

Browse files
author
Jill Grant
authored
Merge pull request #269217 from kgremban/mar15-aioqs
Review aio get-started to improve new user experience
2 parents 5fbfb21 + e73af49 commit d094140

File tree

4 files changed

+71
-50
lines changed

4 files changed

+71
-50
lines changed
69 KB
Loading

articles/iot-operations/get-started/quickstart-deploy.md

Lines changed: 38 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.author: kgremban
66
ms.subservice: orchestrator
77
ms.topic: quickstart
88
ms.custom: ignite-2023, devx-track-azurecli
9-
ms.date: 01/31/2024
9+
ms.date: 03/15/2024
1010

1111
#CustomerIntent: As a < type of user >, I want < what? > so that < why? >.
1212
---
@@ -15,7 +15,7 @@ ms.date: 01/31/2024
1515

1616
[!INCLUDE [public-preview-note](../includes/public-preview-note.md)]
1717

18-
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.
1919

2020
The services deployed in this quickstart include:
2121

@@ -30,26 +30,36 @@ The services deployed in this quickstart include:
3030

3131
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).
3232

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+
3341
## Prerequisites
3442

3543
Review the prerequisites based on the environment you use to host the Kubernetes cluster.
3644

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.
3846

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.
4048

4149
# [Virtual](#tab/codespaces)
4250

4351
* 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.
4452

4553
* A [GitHub](https://github.com) account.
4654

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).
4856

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)
5058

5159
* 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.
5260

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+
5363
* Azure CLI installed on your development machine. For more information, see [How to install the Azure CLI](/cli/azure/install-azure-cli).
5464

5565
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
212222

213223
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.
214224

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.
216226

217227
### Create a key vault
218228

@@ -221,20 +231,22 @@ You can use an existing key vault for your secrets, but verify that the **Permis
221231
To create a new key vault, use the following command:
222232

223233
```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>"
225235
```
226236

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.
228240

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**.
230242

231243
1. Select **Azure IoT Operations (preview)** from the **Application Services** section of the Azure Arc menu.
232244

233245
:::image type="content" source="./media/quickstart-deploy/arc-iot-operations.png" alt-text="Screenshot of selecting Azure IoT Operations from Azure Arc.":::
234246

235247
1. Select **Create**.
236248

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:
238250

239251
| Field | Value |
240252
| ----- | ----- |
@@ -250,7 +262,7 @@ az keyvault create --enable-rbac-authorization false --name "<your unique key va
250262

251263
| Field | Value |
252264
| ----- | ----- |
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. |
254266
| **Mode** | Set the MQ configuration mode to **Auto**. |
255267

256268
:::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
264276
| **Subscription** | Select the subscription that contains your Arc-enabled Kubernetes cluster. |
265277
| **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. |
266278

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.
268280

269281
:::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.":::
270282

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-
283283
1. Run the copied `az iot ops init` command on your development machine or in your codespace terminal.
284284

285285
>[!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.
287287
288288
1. These quickstarts use the **OPC PLC simulator** to generate sample data. To configure the simulator for the quickstart scenario, run the following command:
289289

@@ -312,7 +312,9 @@ To view your cluster on the Azure portal, use the following steps:
312312

313313
1. From the **Overview** of the resource group, select the name of your cluster.
314314

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.":::
316318

317319
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.
318320

@@ -326,7 +328,15 @@ In this quickstart, you configured your Arc-enabled Kubernetes cluster so that i
326328

327329
If you're continuing on to the next quickstart, keep all of your resources.
328330

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**.
330340

331341
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.
332342

articles/iot-operations/includes/connect-cluster.md

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,34 @@
33
description: include file
44
author: kgremban
55
ms.topic: include
6-
ms.date: 11/03/2023
6+
ms.date: 03/15/2024
77
ms.author: kgremban
88
ms.custom: include file, ignite-2023, devx-track-azurecli
99
---
1010

1111

1212
To connect your cluster to Azure Arc:
1313

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:
1515

1616
```azurecli
1717
az login
1818
```
1919

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.
2134

2235
```bash
2336
# 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:
2740
```bash
2841
# Azure region where the created resource group will be located
2942
# Currently supported regions: "eastus", "eastus2", "westus", "westus2", "westus3", "westeurope", or "northeurope"
30-
export LOCATION="WestUS3"
43+
export LOCATION=<REGION>
3144
```
3245

3346
```bash
3447
# Name of a new resource group to create which will hold the Arc-enabled cluster and Azure IoT Operations resources
3548
export RESOURCE_GROUP=<NEW_RESOURCE_GROUP_NAME>
3649
```
3750

38-
```bash
39-
# Name of the Arc-enabled cluster to create in your resource group
40-
export CLUSTER_NAME=<NEW_CLUSTER_NAME>
41-
```
42-
4351
1. Set the Azure subscription context for all commands:
4452

4553
```azurecli
@@ -64,23 +72,20 @@ To connect your cluster to Azure Arc:
6472
az group create --location $LOCATION --resource-group $RESOURCE_GROUP --subscription $SUBSCRIPTION_ID
6573
```
6674

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:
6876

6977
```azurecli
7078
az connectedk8s connect -n $CLUSTER_NAME -l $LOCATION -g $RESOURCE_GROUP --subscription $SUBSCRIPTION_ID
7179
```
7280

73-
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.
7482

7583
```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)
7785
```
7886

79-
Make a note of the `objectId` that's returned. You use it in the next step.
80-
8187
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:
8288

8389
```azurecli
84-
export OBJECT_ID=<objectID from the previous step>
8590
az connectedk8s enable-features -n $CLUSTER_NAME -g $RESOURCE_GROUP --custom-locations-oid $OBJECT_ID --features cluster-connect custom-locations
8691
```

0 commit comments

Comments
 (0)