Skip to content

Commit bf618a0

Browse files
Merge pull request #221045 from PatAltimore/patricka-merge-dev-tutorials
Merge IoT Edge dev tutorials
2 parents 6d39868 + 3ed4f55 commit bf618a0

19 files changed

+1099
-1732
lines changed

articles/iot-edge/.openpublishing.redirection.iot-edge.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,31 @@
314314
"source_path_from_root": "/articles/iot-edge/reference-windows-scripts.md",
315315
"redirect_url": "/previous-versions/azure/iot-edge/reference-windows-scripts",
316316
"redirect_document_id": false
317+
},
318+
{
319+
"source_path_from_root": "/articles/iot-edge/tutorial-c-module.md",
320+
"redirect_url": "/azure/iot-edge/tutorial-develop-for-linux",
321+
"redirect_document_id": false
322+
},
323+
{
324+
"source_path_from_root": "/articles/iot-edge/tutorial-csharp-module.md",
325+
"redirect_url": "/azure/iot-edge/tutorial-develop-for-linux",
326+
"redirect_document_id": false
327+
},
328+
{
329+
"source_path_from_root": "/articles/iot-edge/tutorial-java-module.md",
330+
"redirect_url": "/azure/iot-edge/tutorial-develop-for-linux",
331+
"redirect_document_id": false
332+
},
333+
{
334+
"source_path_from_root": "/articles/iot-edge/tutorial-node-module.md",
335+
"redirect_url": "/azure/iot-edge/tutorial-develop-for-linux",
336+
"redirect_document_id": false
337+
},
338+
{
339+
"source_path_from_root": "/articles/iot-edge/tutorial-python-module.md",
340+
"redirect_url": "/azure/iot-edge/tutorial-develop-for-linux",
341+
"redirect_document_id": false
317342
}
318343
]
319344
}

articles/iot-edge/TOC.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,10 @@
2020
items:
2121
- name: Develop with Linux containers
2222
href: tutorial-develop-for-linux.md
23-
- name: Develop with Visual Studio Code
23+
- name: Develop and debug with VS Code
2424
href: how-to-vs-code-develop-module.md
25-
- name: Develop with Visual Studio 2022
25+
- name: Develop and debug with Visual Studio
2626
href: how-to-visual-studio-develop-module.md
27-
- name: C
28-
href: tutorial-c-module.md
29-
- name: C#
30-
href: tutorial-csharp-module.md
31-
- name: Java
32-
href: tutorial-java-module.md
33-
- name: Node.js
34-
href: tutorial-node-module.md
35-
- name: Python
36-
href: tutorial-python-module.md
3727
- name: Deploy Azure services as modules
3828
items:
3929
- name: Filter data with Azure Functions

articles/iot-edge/how-to-vs-code-develop-module.md

Lines changed: 50 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ zone_pivot_groups: iotedge-dev
1717

1818
This article shows you how to use Visual Studio Code to develop and debug IoT Edge modules in multiple languages and multiple architectures. On your development computer, you can use Visual Studio Code to attach and debug your module in a local or remote module container.
1919

20-
You can choose either the **Azure IoT Edge Dev Tool** CLI or the **Azure IoT Edge tools for Visual Studio Code** extension as your IoT Edge development tool. Use the tool selector button at the beginning to choose your tool option for this article.
20+
You can choose either the **Azure IoT Edge Dev Tool** command-line tool (CLI) or the **Azure IoT Edge tools for Visual Studio Code** extension as your IoT Edge development tool. Use the tool selector button at the beginning to choose your tool option for this article.
2121

2222
Visual Studio Code supports writing IoT Edge modules in the following programming languages:
2323

@@ -29,8 +29,8 @@ Visual Studio Code supports writing IoT Edge modules in the following programmin
2929

3030
Azure IoT Edge supports the following device architectures:
3131

32-
* X64
33-
* ARM32
32+
* AMD64
33+
* ARM32v7
3434
* ARM64
3535

3636
For more information about supported operating systems, languages, and architectures, see [Language and architecture support](module-development.md#language-and-architecture-support).
@@ -72,7 +72,7 @@ To build and deploy your module image, you need Docker to build the module image
7272

7373
::: zone pivot="iotedge-dev-cli"
7474

75-
- Install the Python-based [Azure IoT Edge Dev Tool](https://pypi.org/project/iotedgedev/) with the following command to enable you to debug, run, and test your IoT Edge solution. [Python (3.6/3.7)](https://www.python.org/downloads/) and [Pip3](https://pip.pypa.io/en/stable/installation/) are required.
75+
- Install the Python-based [Azure IoT Edge Dev Tool](https://pypi.org/project/iotedgedev/) with the following command to enable you to debug, run, and test your IoT Edge solution. [Python (3.6 or 3.7)](https://www.python.org/downloads/) and [Pip3](https://pip.pypa.io/en/stable/installation/) are required.
7676

7777
```bash
7878
pip3 install iotedgedev
@@ -260,6 +260,30 @@ For example:
260260
261261
::: zone-end
262262
263+
::: zone pivot="iotedge-dev-cli"
264+
265+
### Set IoT Edge runtime version
266+
267+
The latest stable IoT Edge system module version is 1.4. Set your system modules to version 1.4.
268+
269+
1. In Visual Studio Code, open *deployment.debug.template.json* deployment manifest file. The [deployment manifest](module-deployment-monitoring.md#deployment-manifest) is a JSON document that describes the modules to be configured on the targeted IoT Edge device.
270+
1. Change the runtime version for the system runtime module images *edgeAgent* and *edgeHub*. For example, if you want to use the IoT Edge runtime version 1.4, change the following lines in the deployment manifest file:
271+
272+
```json
273+
...
274+
"systemModules": {
275+
"edgeAgent": {
276+
...
277+
"image": "mcr.microsoft.com/azureiotedge-agent:1.4",
278+
...
279+
"edgeHub": {
280+
...
281+
"image": "mcr.microsoft.com/azureiotedge-hub:1.4",
282+
...
283+
```
284+
285+
::: zone-end
286+
263287
## Add more modules
264288
265289
To add more modules to your solution, change to the *modules* directory and add them there.
@@ -593,6 +617,26 @@ You can check your container status from your device or virtual machine by runni
593617

594618
::: zone pivot="iotedge-dev-cli"
595619

620+
#### Sign in to Docker
621+
622+
Provide your container registry credentials to Docker so that it can push your container image to storage in the registry.
623+
624+
1. Sign in to Docker with the Azure Container Registry (ACR) credentials that you saved after creating the registry.
625+
626+
```bash
627+
docker login -u <ACR username> -p <ACR password> <ACR login server>
628+
```
629+
630+
You may receive a security warning recommending the use of `--password-stdin`. While that is a recommended best practice for production scenarios, it's outside the scope of this tutorial. For more information, see the [docker login](https://docs.docker.com/engine/reference/commandline/login/#provide-a-password-using-stdin) reference.
631+
632+
1. Sign in to the Azure Container Registry. You may need to [Install Azure CLI](/cli/azure/install-azure-cli) to use the `az` command. This command asks for your user name and password found in your container registry in **Settings** > **Access keys**.
633+
634+
```azurecli
635+
az acr login -n <ACR registry name>
636+
```
637+
>[!TIP]
638+
>If you get logged out at any point in this tutorial, repeat the Docker and Azure Container Registry sign in steps to continue.
639+
596640
#### Build module Docker image
597641
598642
Use the module's Dockerfile to [build](https://docs.docker.com/engine/reference/commandline/build/) the module Docker image.
@@ -633,14 +677,14 @@ docker push myacr.azurecr.io/filtermodule:0.0.1-amd64
633677

634678
#### Deploy the module to the IoT Edge device.
635679

636-
Use the [IoT Edge Azure CLI set-modules](/cli/azure/iot/edge#az-iot-edge-set-modules) command to deploy the modules to the Azure IoT Hub. For example, to deploy the modules defined in the *deployment.debug.amd64.json* file to IoT Hub *my-iot-hub* for the IoT Edge device *my-device*, use the following command:
680+
Use the [IoT Edge Azure CLI set-modules](/cli/azure/iot/edge#az-iot-edge-set-modules) command to deploy the modules to the Azure IoT Hub. For example, to deploy the modules defined in the *deployment.debug.template.json* file to IoT Hub *my-iot-hub* for the IoT Edge device *my-device*, use the following command:
637681

638682
```azurecli
639683
az iot edge set-modules --hub-name my-iot-hub --device-id my-device --content ./deployment.debug.template.json --login "HostName=my-iot-hub.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=<SharedAccessKey>"
640684
```
641685

642686
> [!TIP]
643-
> You can find your IoT Hub connection string in the Azure portal in your IoT Hub > **Security settings** > **Shared access policies** > **iothubowner**.
687+
> You can find your IoT Hub shared access key in the Azure portal in your IoT Hub > **Security settings** > **Shared access policies** > **iothubowner**.
644688
>
645689

646690
::: zone-end
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)