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
Copy file name to clipboardExpand all lines: articles/iot-operations/get-started-end-to-end-sample/quickstart-deploy.md
+64-40Lines changed: 64 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,23 +12,17 @@ ms.date: 10/22/2024
12
12
13
13
# Quickstart: Run Azure IoT Operations in GitHub Codespaces with K3s
14
14
15
-
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.
16
-
17
-
The rest of the quickstarts in this end-to-end series build on this one to define sample assets, data processing pipelines, and visualizations.
18
-
19
-
If you want to deploy Azure IoT Operations to a local cluster such as Azure Kubernetes Service Edge Essentials or K3s on Ubuntu, see [Deployment details](../deploy-iot-ops/overview-deploy.md).
15
+
In this quickstart, you deploy Azure IoT Operations to an Azure Arc-enabled Kubernetes cluster so that you can remotely manage your devices and workloads. At the end of the quickstart, you have a cluster that you can manage from the cloud. The rest of the quickstarts in this end-to-end series build on this one to define sample assets, data processing pipelines, and visualizations.
20
16
21
17
## Before you begin
22
18
23
19
This series of quickstarts is intended to help you get started with Azure IoT Operations as quickly as possible so that you can evaluate an end-to-end scenario. In a true development or production environment, multiple teams working together perform these tasks and some tasks might require elevated permissions.
24
20
25
-
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 provide steps to use 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.
26
-
27
-
## Prerequisites
21
+
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.
28
22
29
-
For this quickstart, you create a Kubernetes cluster to receive the Azure IoT Operations deployment.
23
+
We also use GitHub Codespaces as a virtual environment for this quickstart so that you can test the scenario without installing new tools on your own machines. However, if you want to deploy Azure IoT Operations to a local cluster on Ubuntu or Azure Kubernetes Service (AKS), see [Prepare your Azure Arc-enabled Kubernetes cluster](../deploy-iot-ops/howto-prepare-cluster.md).
30
24
31
-
If you want to reuse 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.
25
+
## Prerequisites
32
26
33
27
Before you begin, prepare the following prerequisites:
34
28
@@ -44,19 +38,61 @@ Before you begin, prepare the following prerequisites:
44
38
45
39
Azure IoT Operations is a suite of data services that run on Kubernetes clusters. You want these clusters to be managed remotely from the cloud, and able to securely communicate with cloud resources and endpoints. We address these concerns with the following tasks in this quickstart:
46
40
47
-
1. Create a Kubernetes cluster and connect it to Azure Arc for remote management.
41
+
1. Create a Kubernetes cluster in GitHub Codespaces.
42
+
1. Connect the cluster to Azure Arc for remote management.
48
43
1. Create a schema registry.
49
44
1. Deploy Azure IoT Operations to your cluster.
50
45
51
-
## Connect a Kubernetes cluster to Azure Arc
46
+
## Create cluster
47
+
48
+
Azure IoT Operations can be deployed to K3s on Ubuntu, Azure Kubernetes Service (AKS) Edge Essentials, and AKS on Azure Local. However, for speed and convenience, this quickstart uses GitHub Codespaces to host your cluster. To learn how to deploy Azure IoT Operations to a cluster on Windows or Ubuntu instead, see [Prepare your Azure Arc-enabled Kubernetes cluster](../deploy-iot-ops/howto-prepare-cluster.md).
49
+
50
+
>[!NOTE]
51
+
>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.
52
+
>
53
+
>The Codespaces environment is sufficient to complete the quickstart steps, but doesn't support advanced configurations.
54
+
55
+
In this section, you create a new cluster. If you want to reuse a cluster that you deployed Azure IoT Operations to previously, refer to the steps in [Clean up resources](#clean-up-resources) to uninstall Azure IoT Operations before continuing.
52
56
53
-
Azure IoT Operations supports Azure Kubernetes Service (AKS) Edge Essentials and K3s on Ubuntu clusters. However, for speed and convenience, this quickstart uses GitHub Codespaces to host your cluster.
57
+
The **Azure-Samples/explore-iot-operations** codespace is preconfigured with:
54
58
55
-
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. To learn how to deploy Azure IoT Operations to a cluster on Windows or Ubuntu, see [Prepare your Azure Arc-enabled Kubernetes cluster](../deploy-iot-ops/howto-prepare-cluster.md).
59
+
-[K3s](https://k3s.io/) running in [K3d](https://k3d.io/) for a lightweight Kubernetes cluster
60
+
-[Azure CLI](/cli/azure/install-azure-cli)
61
+
-[Kubectl](https://kubernetes.io/docs/tasks/tools/) for managing Kubernetes resources
62
+
- Other useful tools like [Helm](https://helm.sh/) and [k9s](https://k9scli.io/)
56
63
57
-
In this section, you create a new cluster and connect it to Azure Arc. If you want to reuse a cluster that you deployed Azure IoT Operations to previously, refer to the steps in [Clean up resources](#clean-up-resources) to uninstall Azure IoT Operations before continuing.
64
+
To create your codespace and cluster, use the following steps:
65
+
66
+
1. Create a codespace in GitHub Codespaces.
67
+
68
+
[](https://codespaces.new/Azure-Samples/explore-iot-operations?quickstart=1)
69
+
70
+
1. Provide the following recommended secrets for your codespace:
71
+
72
+
| Parameter | Value |
73
+
| --------- | ----- |
74
+
| SUBSCRIPTION_ID | Your Azure subscription ID. |
75
+
| RESOURCE_GROUP | A name for a new Azure resource group where your cluster will be created. |
76
+
| LOCATION | An Azure region close to you. For the list of currently supported regions, see [Supported regions](../overview-iot-operations.md#supported-regions). |
77
+
78
+
>[!TIP]
79
+
>The values you provide as secrets in this step get saved on your GitHub account to be used in this and future codespaces. They're added as environment variables in the codespace terminal, and you can use those environment variables in the CLI commands in the next section.
80
+
>
81
+
>Additionally, this codespace creates a `CLUSTER_NAME` environment variable which is set with the codespace name.
1. Once the codespace is ready, select the menu button at the top left, then select **Open in VS Code Desktop**.
86
+
87
+
:::image type="content" source="media/quickstart-deploy/open-in-vs-code-desktop.png" alt-text="Screenshot that shows opening the codespace in VS Code Desktop.":::
88
+
89
+
1. If prompted, install the **GitHub Codespaces** extension for Visual Studio Code and sign in to GitHub.
90
+
91
+
1. In Visual Studio Code, select **View** > **Terminal**.
92
+
93
+
Use this terminal to run all of the CLI commands for managing your cluster.
94
+
95
+
## Connect cluster to Azure Arc
60
96
61
97
To connect your cluster to Azure Arc:
62
98
@@ -103,23 +139,11 @@ To connect your cluster to Azure Arc:
103
139
>[!TIP]
104
140
>The value of `$CLUSTER_NAME` is automatically set to the name of your codespace. Replace the environment variable if you want to use a different name.
105
141
106
-
1. Get the `objectId` of the Microsoft Entra ID application that the Azure Arc service in your tenant uses and save it as an environment variable. Run the following command exactly as written, without changing the GUID value.
107
-
108
-
```azurecli
109
-
export OBJECT_ID=$(az ad sp show --id bc313c14-388c-4e7d-a58e-70017303ee3b --query id -o tsv)
110
-
```
111
-
112
-
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.
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.
144
+
Schema registry is a synchronized repository that stores message definitions both in the cloud and at the edge. Azure IoT Operations requires a schema registry on your cluster. Schema registry requires an Azure storage account for the schema information stored in the cloud.
121
145
122
-
The command to create a schema registry in this section requires **Microsoft.Authorization/roleAssignments/write**permissions at the resource group level.
146
+
The command to create a schema registry in this section requires **Microsoft.Authorization/roleAssignments/write**permission at the resource group level. This permission is used to give the schema registry a contributor role so that it can write to the storage account.
123
147
124
148
Run the following CLI commands in your Codespaces terminal.
125
149
@@ -143,7 +167,7 @@ Run the following CLI commands in your Codespaces terminal.
1. Create a schema registry that connects to your storage account. This command also creates a blob container called **schemas** in the storage account if one doesn't exist already.
170
+
1. Create a schema registry that connects to your storage account. This command also creates a blob container called **schemas** in the storage account.
@@ -158,15 +182,15 @@ Run the following CLI commands in your Codespaces terminal.
158
182
1. Initialize your cluster for Azure IoT Operations.
159
183
160
184
>[!TIP]
161
-
>The `init` command only needs to be run once per cluster. If you're reusing a cluster that already had Azure IoT Operations version 0.8.0 deployed on it, you can skip this step.
185
+
>The `init` command only needs to be run once per cluster. If you're reusing a cluster that already had the latest Azure IoT Operations version deployed on it, you can skip this step.
162
186
163
187
```azurecli
164
188
az iot ops init --cluster $CLUSTER_NAME --resource-group $RESOURCE_GROUP
165
189
```
166
190
167
191
This command might take several minutes to complete. You can watch the progress in the deployment progress display in the terminal.
168
192
169
-
1. Deploy Azure IoT Operations. This command takes several minutes to complete:
@@ -176,9 +200,9 @@ Run the following CLI commands in your Codespaces terminal.
176
200
177
201
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.
178
202
179
-
## View resources in your cluster
203
+
## View resources in cluster
180
204
181
-
While the deployment is in progress, the CLI progress interface shows you the deployment stage that you're in. Once the deployment is complete, you can use kubectl commands to observe changes on the cluster or, since the cluster is Arc-enabled, you can use the Azure portal.
205
+
Once the deployment is complete, you can use kubectl commands to observe changes on the cluster or, since the cluster is Arc-enabled, you can use the Azure portal.
182
206
183
207
To view the pods on your cluster, run the following command:
184
208
@@ -188,17 +212,17 @@ kubectl get pods -n azure-iot-operations
188
212
189
213
To view your resources on the Azure portal, use the following steps:
190
214
191
-
1. In the [Azure portal](https://portal.azure.com), go to the resource group that contains your Azure IoT Operations instance, or search for and select **Azure IoT Operations**.
215
+
1. In the [Azure portal](https://portal.azure.com), go to the resource group that contains your Azure IoT Operations instance or search for and select **Azure IoT Operations**.
192
216
193
217
1. Select the name of your Azure IoT Operations instance.
194
218
195
-
1. On the **Overview** page of your instance, the **Arc extensions** tab displays the resources that were deployed to your cluster.
219
+
1. On the **Overview** page of your instance, select the **Resource summary** tab to view the provisioning state of the resources that were deployed to your cluster.
196
220
197
221
:::image type="content" source="../get-started-end-to-end-sample/media/quickstart-deploy/view-instance.png" alt-text="Screenshot that shows the Azure IoT Operations instance on your Arc-enabled cluster." lightbox="../get-started-end-to-end-sample/media/quickstart-deploy/view-instance.png":::
198
222
199
223
## How did we solve the problem?
200
224
201
-
In this quickstart, you configured your Arc-enabled Kubernetes cluster so that it could communicate securely with your Azure IoT Operations components. Then, you deployed those components to your cluster. For this test scenario, you have a single Kubernetes cluster that's probably running locally on your machine. In a production scenario, however, you can use the same steps to deploy workloads to many clusters across many sites.
225
+
In this quickstart, you configured your Arc-enabled Kubernetes cluster so that it could communicate securely with your Azure IoT Operations components. Then, you deployed those components to your cluster. For this test scenario, you have a single Kubernetes cluster that's running in Codespaces. In a production scenario, however, you can use the same steps to deploy workloads to many clusters across many sites.
202
226
203
227
## Clean up resources
204
228
@@ -209,4 +233,4 @@ If you're continuing on to the next quickstart, keep all of your resources.
209
233
## Next step
210
234
211
235
> [!div class="nextstepaction"]
212
-
> [Quickstart: Add OPC UA assets to your Azure IoT Operations cluster](quickstart-configure.md)
236
+
> [Quickstart: Configure your cluster](quickstart-configure.md)
Copy file name to clipboardExpand all lines: articles/iot-operations/troubleshoot/troubleshoot.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ The troubleshooting guidance in this section is specific to Azure IoT Operations
58
58
59
59
If the Layered Network Management operator install fails or you can't apply the custom resource for a Layered Network Management instance:
60
60
61
-
1. Verify the regions are supported for public preview. Public preview supports eight regions. For more information, see [Quickstart: Run Azure IoT Operations in GitHub Codespaces with K3s](../get-started-end-to-end-sample/quickstart-deploy.md#connect-a-kubernetes-cluster-to-azure-arc).
61
+
1. Verify the regions are supported. For more information, see [Supported regions](../overview-iot-operations.md#supported-regions).
62
62
1. If there are any other errors in installing Layered Network Management Arc extensions, follow the guidance included with the error. Try uninstalling and installing the extension.
63
63
1. Verify the Layered Network Management operator is in the *Running and Ready* state.
64
64
1. If applying the custom resource `kubectl apply -f cr.yaml` fails, the output of this command lists the reason for error. For example, CRD version mismatch or wrong entry in CRD.
0 commit comments