Skip to content

Commit 7f51019

Browse files
committed
simplifying AIO sdk setup
1 parent 5fce779 commit 7f51019

File tree

2 files changed

+68
-70
lines changed

2 files changed

+68
-70
lines changed

articles/iot-operations/develop-edge-apps/quickstart-get-started-sdks.md

Lines changed: 68 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,24 @@ Before you begin, prepare the following prerequisites:
2121

2222
* A [GitHub](https://github.com) account.
2323

24-
* **Microsoft.Authorization/roleAssignments/write** permissions at the resource group level.
24+
* Azure access permissions. For more information, see [Deployment details > Required permissions](../deploy-iot-ops/overview-deploy.md#required-permissions).
2525

2626
## Setting up
2727

28-
Developing with the Azure IoT Operations SDKs requires a Kubernetes cluster with Azure IoT Operations deployed. Additional configuration will allow MQTT broker to be accessed directly from the developer environment. The following development environment setup options use [K3s](https://k3s.io/) running in [K3d](https://k3d.io/) for a lightweight Kubernetes cluster. GitHub Codespaces provides the most streamlined experience and can get the development environment up and running in a couple of minutes.
28+
Developing with the Azure IoT Operations SDKs requires a Kubernetes cluster with Azure IoT Operations deployed. Additional configuration will allow the MQTT broker to be accessed directly from the developer environment.
2929

30+
<!-- TODO: Point to the new article Production Cluster when published -->
3031
> [!IMPORTANT]
31-
> The following development environment setup options, use [K3s](https://k3s.io/) running in [K3d](https://k3d.io/) for a lightweight Kubernetes cluster, and deploys Azure IoT Operations with [test settings](../deploy-iot-ops/overview-deploy.md#test-settings-deployment). If you want to use [secure settings](../deploy-iot-ops/overview-deploy.md#secure-settings-deployment), we recommend you follow the instructions in [Prepare your Azure Arc-enabled Kubernetes cluster](../deploy-iot-ops/howto-prepare-cluster.md) to create a K3s cluster on Ubuntu and [Deploy Azure IoT Operations to an Arc-enabled Kubernetes cluster](../deploy-iot-ops/howto-deploy-iot-operations.md) to deploy with secure settings. Then proceed to [configure Azure IoT Operations for deployment](#configure-azure-iot-operations-for-deployment).
32+
> The following development environment setup options, use [K3s](https://k3s.io/) running in [K3d](https://k3d.io/) for a lightweight Kubernetes cluster, and deploys Azure IoT Operations with [test settings](../deploy-iot-ops/overview-deploy.md#test-settings-deployment). If you want to use [secure settings](../deploy-iot-ops/overview-deploy.md#secure-settings-deployment), we recommend you follow the instructions in [Prepare your Azure Arc-enabled Kubernetes cluster](../deploy-iot-ops/howto-prepare-cluster.md) to create a K3s cluster on Ubuntu and [Deploy Azure IoT Operations to a production cluster](../deploy-iot-ops/howto-deploy-iot-operations.md) to deploy with secure settings. Then proceed to [configure Azure IoT Operations for deployment](#configure-azure-iot-operations-for-deployment).
3233
3334
### [Codespaces](#tab/codespaces)
3435

3536
> [!CAUTION]
3637
> We are currently experiencing container corruption with Azure IoT Operations deployed in a codespace, so we don't recommend this path until we have resolved the issue with the GitHub team.
3738
38-
1. Create a **codespace** from the *Azure IoT Operations SDKs* repository by clicking the following button:
39+
GitHub Codespaces provides the most streamlined experience and can get the development environment up and running in a couple of minutes.
40+
41+
1. Create a **codespace** in GitHub Codespaces from the *Azure IoT Operations SDKs* repository:
3942

4043
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/Azure/iot-operations-sdks?quickstart=1&editor=vscode)
4144

@@ -167,31 +170,79 @@ Developing with the Azure IoT Operations SDKs requires a Kubernetes cluster with
167170

168171
## Deploy Azure IoT Operations
169172

170-
Azure IoT Operations will be deployed on the development cluster that you created in the previous step.
173+
You will arc-enable the development cluster created in the previous step and deploy Azure IoT Operations with [test settings](../deploy-iot-ops/overview-deploy.md#test-settings-deployment).
171174

172-
### [Codespaces](#tab/codespaces)
175+
Open a new bash terminal and do the following steps:
173176

174-
Follow the instructions in [Quickstart: Run Azure IoT Operations in GitHub Codespaces with K3s](../get-started-end-to-end-sample/quickstart-deploy.md#connect-cluster-to-azure-arc) to connect your cluster to Azure Arc, create a storage account and schema registry, and deploy Azure IoT Operations.
177+
1. Run the following command to set the required environment variables:
178+
179+
| Parameter | Value |
180+
| --------- | ----- |
181+
| <LOCATION> | An Azure region close to you. For the list of currently supported regions, see [Supported regions](../overview-iot-operations.md#supported-regions). |
182+
| <CLUSTER_NAME> | A name for your Kubernetes cluster. |
183+
| <RESOURCE_GROUP> | A name for a new Azure resource group where your cluster will be created. |
184+
| <STORAGE_ACCOUNT_NAME> | A name for your storage account. Storage account names must be between 3 and 24 characters in length and only contain numbers and lowercase letters. |
185+
| <SCHEMA_REGISTRY_NAME> | A name for your schema registry. Schema registry names can only contain numbers, lowercase letters, and hyphens. |
186+
| <SCHEMA_REGISTRY_NAMESPACE> | A name for your schema registry namespace. The namespace uniquely identifies a schema registry within a tenant. Schema registry namespace names can only contain numbers, lowercase letters, and hyphens. |
175187

176-
> [!NOTE]
177-
> The Codespaces environment already has the cluster created, so you can skip the [create cluster](../get-started-end-to-end-sample/quickstart-deploy.md#create-cluster) step in the quickstart.
188+
```bash
189+
export LOCATION=<LOCATION>
190+
export RESOURCE_GROUP=<RESOURCE_GROUP>
191+
export CLUSTER_NAME=<CLUSTER_NAME>
192+
export STORAGE_ACCOUNT=<STORAGE_ACCOUNT_NAME>
193+
export SCHEMA_REGISTRY=<SCHEMA_REGISTRY_NAME>
194+
export SCHEMA_REGISTRY_NAMESPACE=<SCHEMA_REGISTRY_NAMESPACE>
195+
```
178196

179-
### [Ubuntu](#tab/ubuntu)
197+
> [!NOTE]
198+
> Replace the placeholders with your values. You will create the resource group, storage account and schema registry in the next steps.
180199

181-
[!INCLUDE [deploy-aio-sdks-linux](../includes/deploy-aio-sdks-linux.md)]
182200

183-
### [Visual Studio Code Dev Containers](#tab/vscode-dev-containers)
201+
1. Sign in to Azure CLI:
184202

185-
Open a new bash terminal in the VS Code Dev Container and do the following steps:
203+
```azurecli
204+
az login
205+
```
186206

187-
[!INCLUDE [deploy-aio-sdks-linux](../includes/deploy-aio-sdks-linux.md)]
207+
> [!TIP]
208+
> 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:
209+
>
210+
> * Open the codespace in VS Code desktop, and then return to the browser terminal and rerun `az login`.
211+
> * 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!."
188212
189-
### [Windows Subsystem for Linux (WSL)](#tab/wsl)
213+
1. After you sign in, Azure CLI displays all of your subscriptions and indicates your default subscription with an asterisk `*`. To continue with your default subscription, select `Enter`. Otherwise, type the number of the Azure subscription that you want to use.
190214
191-
[!INCLUDE [deploy-aio-sdks-linux](../includes/deploy-aio-sdks-linux.md)]
215+
1. Create an Azure resource group. Only one Azure IoT Operations instance is supported per resource group. To create a new resource group, use the [az group create](/cli/azure/group#az-group-create) command.
192216
193-
---
217+
```azurecli
218+
az group create --location $LOCATION --resource-group $RESOURCE_GROUP
219+
```
194220
221+
1. Navigate to the repository root directory:
222+
223+
```bash
224+
cd <REPOSITORY ROOT>
225+
```
226+
227+
1. Run the `install-aio-arc.sh` script to arc-enable your cluster and deploy Azure IoT Operations:
228+
229+
```bash
230+
./tools/deployment/install-aio-arc.sh
231+
```
232+
233+
This script does the following:
234+
235+
1. Log in to Azure CLI
236+
1. Validate Required Environment Variables
237+
1. Register Required Azure Providers
238+
1. Connect Kubernetes Cluster to Azure Arc
239+
1. Enable Azure Arc Features
240+
1. Create Azure Storage Account
241+
1. Create Azure IoT Operations Schema Registry
242+
1. Initialize Azure IoT Operations
243+
1. Create Azure IoT Operations Instance
244+
245+
<!-- TODO: Confirm that this works well on a K3s cluster running AIO with Secure Settings -->
195246
## Configure Azure IoT Operations for development
196247
197248
After Azure IoT Operations is deployed, you need to configure it for development. This includes setting up the MQTT broker and authentication methods, as well as ensuring that the necessary environment variables are set for your development environment:

articles/iot-operations/includes/deploy-aio-sdks-linux.md

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)