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/develop-edge-apps/quickstart-get-started-sdks.md
+38-57Lines changed: 38 additions & 57 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ Developing with the Azure IoT Operations SDKs requires a Kubernetes cluster with
29
29
30
30
<!-- TODO: Point to the new article Production Cluster when published -->
31
31
> [!IMPORTANT]
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).
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). For production deployments, choose [secure settings](../deploy-iot-ops/overview-deploy.md#secure-settings-deployment). <br> If you want to use secure settings, 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).
33
33
34
34
### [Codespaces](#tab/codespaces)
35
35
@@ -49,8 +49,6 @@ GitHub Codespaces provides the most streamlined experience and can get the devel
1. Clone the *Azure IoT Operations SDKs* repository:
55
53
56
54
```bash
@@ -71,16 +69,17 @@ GitHub Codespaces provides the most streamlined experience and can get the devel
71
69
72
70
This script does the following:
73
71
74
-
1. Installs prerequisites including:
75
-
1. Install k3d
76
-
1. Install Step CLI
77
-
1. Helm
78
-
1. AZ CLI
79
-
1. Step
80
-
1. **DELETE** the existing default k3d cluster
72
+
1. Install prerequisites including:
73
+
1. Docker if not already installed
74
+
1. k3d for managing Kubernetes clusters
75
+
1. Helm for Kubernetes package management
76
+
1. Step CLI for certificate management
77
+
1. Azure CLI and the Kubernetes CLI
78
+
1. k9s for Kubernetes cluster management
79
+
1. **DELETE** any existing k3d cluster
81
80
1. Deploy a new k3d cluster
82
81
1. Set up port forwarding for ports `1883`, `8883`, and `8884` to enable TLS
83
-
1. Create a local registry
82
+
1. Create a localcontainer registry
84
83
85
84
### [Visual Studio Code Dev Containers](#tab/vscode-dev-containers)
86
85
@@ -155,16 +154,17 @@ GitHub Codespaces provides the most streamlined experience and can get the devel
155
154
156
155
This script does the following:
157
156
158
-
1. Installs prerequisites including:
159
-
1. Install k3d
160
-
1. Install Step CLI
161
-
1. Helm
162
-
1. AZ CLI
163
-
1. Step
164
-
1. **DELETE** the existing default k3d cluster
157
+
1. Install prerequisites including:
158
+
1. k3d for managing Kubernetes clusters
159
+
1. Helm for Kubernetes package management
160
+
1. Step CLI for certificate management
161
+
1. Azure CLI and the Kubernetes CLI
162
+
1. k9s for Kubernetes cluster management
163
+
1. kubectl for Kubernetes management
164
+
1. **DELETE** any existing k3d cluster
165
165
1. Deploy a new k3d cluster
166
166
1. Set up port forwarding for ports `1883`, `8883`, and `8884` to enable TLS
167
-
1. Create a local registry
167
+
1. Create a localcontainer registry
168
168
169
169
---
170
170
@@ -174,46 +174,27 @@ You will arc-enable the development cluster created in the previous step and dep
174
174
175
175
Open a new bash terminal and do the following steps:
176
176
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 foryour storage account. Storage account names must be between 3 and 24 charactersin 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. |
> Replace the placeholders with your values. You will create the resource group, storage account and schema registry in the next steps.
199
-
183
+
1. Edit the `.env` file to set the values for your environment:
200
184
201
-
1. Sign in to Azure CLI:
202
-
203
-
```azurecli
204
-
az login
205
-
```
185
+
> [!NOTE]
186
+
> The `.env` file contains the environment variables used by the `install-aio-arc.sh` script, and the samples to connect to the MQTT Broker. You can use the default values provided in the file or set your own values.
206
187
207
-
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.
188
+
To edit the `.env` file, you can use any text editor of your choice. For example, using `nano`:
208
189
209
-
```azurecli
210
-
az group create --location $LOCATION --resource-group $RESOURCE_GROUP
211
-
```
190
+
```bash
191
+
nano .env
192
+
```
212
193
213
-
1. Navigate to the repository root directory:
194
+
1. Load the environment variables into your shell, run the following commandin your terminal:
214
195
215
196
```bash
216
-
cd<REPOSITORY ROOT>
197
+
source<REPOSITORY ROOT>/.env
217
198
```
218
199
219
200
1. Run the `install-aio-arc.sh` script to arc-enable your cluster and deploy Azure IoT Operations:
@@ -225,7 +206,7 @@ Open a new bash terminal and do the following steps:
225
206
This script does the following:
226
207
227
208
1. Log in to Azure CLI
228
-
1. Validate Required Environment Variables
209
+
1. Create a resource group
229
210
1. Register Required Azure Providers
230
211
1. Connect Kubernetes Cluster to Azure Arc
231
212
1. Enable Azure Arc Features
@@ -234,17 +215,17 @@ Open a new bash terminal and do the following steps:
234
215
1. Initialize Azure IoT Operations
235
216
1. Create Azure IoT Operations Instance
236
217
237
-
<!-- TODO: Confirm that this works well on a K3s cluster running AIO with Secure Settings -->
238
-
## Configure Azure IoT Operations for development
239
-
240
-
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 setfor your development environment:
241
-
242
218
1. After the deployment is complete, use [az iot ops check](/cli/azure/iot/ops#az-iot-ops-check) to evaluate Azure IoT Operations service deployment forhealth, configuration, and usability. The *check* command can help you find problemsin your deployment and configuration.
243
219
244
220
```azurecli
245
221
az iot ops check
246
222
```
247
223
224
+
<!-- TODO: Confirm that this works well on a K3s cluster running AIO with Secure Settings -->
225
+
## Configure Azure IoT Operations for development
226
+
227
+
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 setfor your development environment:
228
+
248
229
1. Navigate to the repository root directory:
249
230
250
231
```bash
@@ -264,15 +245,15 @@ After Azure IoT Operations is deployed, you need to configure it for development
264
245
1. Create the trust bundle ConfigMap for the Broker to authentication x509 clients
265
246
1. Configure a `BrokerListener` and `BrokerAuthentication` resources for SAT and x509 auth
266
247
267
-
## Shell configuration
248
+
<!-- ## Shell configuration
268
249
269
250
The samples within [Azure IoT Operations SDKs github repository](https://github.com/Azure/iot-operations-sdks) read configuration from environment variables. We have provided an `.env` file in the repository root that exports the variables used by the samples to connect to the MQTT Broker. Edit the `.env` file to set the values foryour environment, or use the default values providedin the file.
270
251
271
252
To load the environment variables into your shell, run the following commandin your terminal:
272
253
273
254
```bash
274
255
source<REPOSITORY ROOT>/.env
275
-
```
256
+
``` -->
276
257
277
258
<!-- TODO: Check why this only works with VSCode Dev Containers when I do: kubectl port-forward -n azure-iot-operations service/aio-broker-external 8883:8883 -->
0 commit comments