Skip to content

Commit 2e734fe

Browse files
authored
Merge pull request #50577 from kgremban/aug30-angellfeedback
First changes from Tony's feedback
2 parents cff8616 + 3d149b8 commit 2e734fe

File tree

10 files changed

+37
-30
lines changed

10 files changed

+37
-30
lines changed

articles/iot-edge/TOC.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,14 @@
9393
href: how-to-auto-provision-simulated-device-windows.md
9494
- name: Develop and debug modules
9595
items:
96+
- name: Azure Functions
97+
href: how-to-develop-csharp-function.md
9698
- name: C#
9799
href: how-to-develop-csharp-module.md
98100
- name: Node.js
99101
href: how-to-develop-node-module.md
100102
- name: C
101103
href: how-to-develop-c-module.md
102-
- name: Azure Functions
103-
href: how-to-develop-csharp-function.md
104104
- name: Develop multiple modules
105105
href: how-to-develop-multiple-modules-vscode.md
106106
- name: Debug multiple modules

articles/iot-edge/how-to-develop-c-module.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ Because this article uses Visual Studio Code as the main development tool, insta
3232
To create a module, you need Docker to build the module image, and a container registry to hold the module image:
3333
* [Docker Community Edition](https://docs.docker.com/install/) on your development machine.
3434
* [Azure Container Registry](https://docs.microsoft.com/azure/container-registry/) or [Docker Hub](https://docs.docker.com/docker-hub/repos/#viewing-repository-tags)
35-
36-
> [!TIP]
37-
> You can use a local Docker registry for prototype and testing purposes instead of a cloud registry.
35+
* You can use a local Docker registry for prototype and testing purposes instead of a cloud registry.
3836

3937
To test your module on a device, you need an active IoT hub with at least one IoT Edge device. To use your computer as an IoT Edge device, follow the steps in the quickstart for [Windows](quickstart.md) or [Linux](quickstart-linux.md).
4038

@@ -43,16 +41,24 @@ To test your module on a device, you need an active IoT hub with at least one Io
4341
Take these steps to create an IoT Edge module based on Azure IoT C SDK using Visual Studio Code and the Azure IoT Edge extension. First you create a solution, and then you generate the first module in that solution. Each solution can contain more than one module.
4442

4543
1. In Visual Studio Code, select **View** > **Integrated Terminal**.
46-
3. Select **View** > **Command Palette**.
47-
4. In the command palette, enter and run the command **Azure IoT Edge: New IoT Edge Solution**.
44+
45+
2. Select **View** > **Command Palette**.
46+
47+
3. In the command palette, enter and run the command **Azure IoT Edge: New IoT Edge Solution**.
4848

4949
![Run New IoT Edge Solution](./media/how-to-develop-csharp-module/new-solution.png)
5050

51-
5. Browse to the folder where you want to create the new solution. Choose **Select folder**.
52-
6. Enter a name for your solution.
53-
7. Select **C Module** as the template for the first module in the solution.
54-
8. Enter a name for your module. Choose a name that's unique within your container registry.
55-
9. Provide the name of the module's image repository. VS Code autopopulates the module name with **localhost:5000**. Replace it with your own registry information. If you use a local Docker registry for testing, then **localhost** is fine. If you use Azure Container Registry, then use the login server from your registry's settings. The login server looks like **\<registry name\>.azurecr.io**.
51+
4. Browse to the folder where you want to create the new solution. Choose **Select folder**.
52+
53+
5. Enter a name for your solution.
54+
55+
6. Select **C Module** as the template for the first module in the solution.
56+
57+
7. Enter a name for your module. Choose a name that's unique within your container registry.
58+
59+
8. Provide the name of the module's image repository. VS Code autopopulates the module name with **localhost:5000**. Replace it with your own registry information. If you use a local Docker registry for testing, then **localhost** is fine. If you use Azure Container Registry, then use the login server from your registry's settings. The login server looks like **\<registry name\>.azurecr.io**. Only replace the localhost part of the string, don't delete your module name.
60+
61+
![Provide Docker image repository](./media/how-to-develop-c-module/repository.png)
5662

5763
VS Code takes the information you provided, creates an IoT Edge solution, and then loads it in a new window.
5864

@@ -70,7 +76,7 @@ There are four items within the solution:
7076

7177
## Develop your module
7278

73-
The default C module code that comes with the solution is located at **modules** > **\<your module name\>** > **main.c**. The module and the deployment.template.json file are set up so that you can build the solution, push it to your container registry, and deploy it to a device to start testing without touching any code. The module is built to simply take input from a source (in this case, the tempSensor module that simulates data) and pipe it to IoT Hub.
79+
The default C module code that comes with the solution is located at **modules** > [your module name] > **main.c**. The module and the deployment.template.json file are set up so that you can build the solution, push it to your container registry, and deploy it to a device to start testing without touching any code. The module is built to simply take input from a source (in this case, the tempSensor module that simulates data) and pipe it to IoT Hub.
7480

7581
When you're ready to customize the C template with your own code, use the [Azure IoT Hub SDKs](../iot-hub/iot-hub-devguide-sdks.md) to build modules that address the key needs for IoT solutions such as security, device management, and reliability.
7682

articles/iot-edge/how-to-develop-csharp-function.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,11 @@ This article uses Visual Studio Code as the main development tool. Install VS Co
2828
* [Docker extension](https://marketplace.visualstudio.com/items?itemName=PeterJausovec.vscode-docker)
2929

3030
To create a module, you need .NET to build the project folder, Docker to build the module image, and a container registry to hold the module image:
31+
3132
* [.NET Core 2.1 SDK](https://www.microsoft.com/net/download)
3233
* [Docker Community Edition](https://docs.docker.com/install/) on your development machine
3334
* [Azure Container Registry](https://docs.microsoft.com/azure/container-registry/) or [Docker Hub](https://docs.docker.com/docker-hub/repos/#viewing-repository-tags)
34-
35-
> [!TIP]
36-
> You can use a local Docker registry for prototype and testing purposes instead of a cloud registry.
35+
* You can use a local Docker registry for prototype and testing purposes instead of a cloud registry.
3736

3837
To test your module on a device, you need an active IoT hub with at least one IoT Edge device. To use your computer as an IoT Edge device, follow the steps in the quickstart for [Windows](quickstart.md) or [Linux](quickstart-linux.md).
3938

@@ -51,7 +50,9 @@ Take these steps to create an IoT Edge solution that has one C# function module.
5150
6. Enter a name for your solution.
5251
7. Choose **Azure Functions - C#** as the template for the first module in the solution.
5352
8. Enter a name for your module. Choose a name that's unique within your container registry.
54-
9. Provide the image repository for the module. VS Code autopopulates the module name with **localhost:5000**. Replace it with your own registry information. If you use a local Docker registry for testing, then **localhost** is fine. If you use Azure Container Registry, then use the login server from your registry's settings. The login server looks like **\<registry name\>.azurecr.io**.
53+
9. Provide the image repository for the module. VS Code autopopulates the module name with **localhost:5000**. Replace it with your own registry information. If you use a local Docker registry for testing, then **localhost** is fine. If you use Azure Container Registry, then use the login server from your registry's settings. The login server looks like **\<registry name\>.azurecr.io**. Only replace the localhost part of the string, don't delete your module name.
54+
55+
![Provide Docker image repository](./media/how-to-develop-csharp-function/repository.png)
5556

5657
VS Code takes the information you provided, creates an IoT Edge solution with an Azure Functions project, and then loads it in a new window.
5758

@@ -68,7 +69,7 @@ There are four items within the solution:
6869

6970
## Develop your module
7071

71-
The default Azure Function code that comes with the solution is located at **modules** > **\<your module name\>** > **EdgeHubTrigger-Csharp** > **run.csx**. The module and the deployment.template.json file are set up so that you can build the solution, push it to your container registry, and deploy it to a device to start testing without touching any code. The module is built to simply take input from a source (in this case, the tempSensor module that simulates data) and pipe it to IoT Hub.
72+
The default Azure Function code that comes with the solution is located at **modules** > [your module name] > **EdgeHubTrigger-Csharp** > **run.csx**. The module and the deployment.template.json file are set up so that you can build the solution, push it to your container registry, and deploy it to a device to start testing without touching any code. The module is built to simply take input from a source (in this case, the tempSensor module that simulates data) and pipe it to IoT Hub.
7273

7374
When you're ready to customize the Azure Function template with your own code, use the [Azure IoT Hub SDKs](../iot-hub/iot-hub-devguide-sdks.md) to build modules that address the key needs for IoT solutions such as security, device management, and reliability.
7475

@@ -80,7 +81,7 @@ When you're ready to customize the Azure Function template with your own code, u
8081
2. Rebuild your solution. In the VS Code command palette, enter and run the command **Azure IoT Edge: Build IoT Edge solution**.
8182
3. In Azure IoT Hub Devices explorer, right-click an IoT Edge device ID, and then select **Create deployment for Edge device**. Select the `deployment.json` file in the `config` folder. You'll see the deployment successfully created with a deployment ID in a VS Code-integrated terminal.
8283

83-
Check your container status in VS Code Docker explorer or by running the `docker images` command in the terminal.
84+
Check your container status in VS Code Docker explorer or by running the `docker ps` command in the terminal.
8485

8586
## Start debugging C# functions in VS Code
8687
1. VS Code keeps debugging configuration information in a `launch.json` file located in a `.vscode` folder in your workspace. This `launch.json` file was generated when you created a new IoT Edge solution. It updates each time you add a new module that supports debugging. Navigate to the debug view. Select the corresponding debug configuration file. The debug option name should be similar to **ModuleName Remote Debug (.NET Core)**.

articles/iot-edge/how-to-develop-csharp-module.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ To create a module, you need .NET to build the project folder, Docker to build t
3333
* [.NET Core 2.1 SDK](https://www.microsoft.com/net/download).
3434
* [Docker Community Edition](https://docs.docker.com/install/) on your development machine.
3535
* [Azure Container Registry](https://docs.microsoft.com/azure/container-registry/) or [Docker Hub](https://docs.docker.com/docker-hub/repos/#viewing-repository-tags)
36-
37-
> [!TIP]
38-
> You can use a local Docker registry for prototype and testing purposes instead of a cloud registry.
36+
* You can use a local Docker registry for prototype and testing purposes instead of a cloud registry.
3937

4038
To test your module on a device, you need an active IoT hub with at least one IoT Edge device. To use your computer as an IoT Edge device, follow the steps in the quickstart for [Windows](quickstart.md) or [Linux](quickstart-linux.md).
4139

@@ -53,7 +51,9 @@ Take these steps to create an IoT Edge module based on .NET Core 2.0 using Visua
5351
6. Enter a name for your solution.
5452
7. Select **C# Module** as the template for the first module in the solution.
5553
8. Enter a name for your module. Choose a name that's unique within your container registry.
56-
9. Provide the name of the module's image repository. VS Code autopopulates the module name with **localhost:5000**. Replace it with your own registry information. If you use a local Docker registry for testing, then **localhost** is fine. If you use Azure Container Registry, then use the login server from your registry's settings. The login server looks like **\<registry name\>.azurecr.io**.
54+
9. Provide the name of the module's image repository. VS Code autopopulates the module name with **localhost:5000**. Replace it with your own registry information. If you use a local Docker registry for testing, then **localhost** is fine. If you use Azure Container Registry, then use the login server from your registry's settings. The login server looks like **\<registry name\>.azurecr.io**. Only replace the localhost part of the string, don't delete your module name.
55+
56+
![Provide Docker image repository](./media/how-to-develop-csharp-module/repository.png)
5757

5858
VS Code takes the information you provided, creates an IoT Edge solution, and then loads it in a new window.
5959

@@ -71,7 +71,7 @@ There are four items within the solution:
7171

7272
## Develop your module
7373

74-
The default Azure Function code that comes with the solution is located at **modules** > **\<your module name\>** > **Program.cs**. The module and the deployment.template.json file are set up so that you can build the solution, push it to your container registry, and deploy it to a device to start testing without touching any code. The module is built to simply take input from a source (in this case, the tempSensor module that simulates data) and pipe it to IoT Hub.
74+
The default Azure Function code that comes with the solution is located at **modules** > [your module name] > **Program.cs**. The module and the deployment.template.json file are set up so that you can build the solution, push it to your container registry, and deploy it to a device to start testing without touching any code. The module is built to simply take input from a source (in this case, the tempSensor module that simulates data) and pipe it to IoT Hub.
7575

7676
When you're ready to customize the C# template with your own code, use the [Azure IoT Hub SDKs](../iot-hub/iot-hub-devguide-sdks.md) to build modules that address the key needs for IoT solutions such as security, device management, and reliability.
7777

articles/iot-edge/how-to-develop-node-module.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ To create a module, you need Node.js which includes npm to build the project fol
3333
* [Node.js](https://nodejs.org)
3434
* [Docker](https://docs.docker.com/engine/installation/)
3535
* [Azure Container Registry](https://docs.microsoft.com/azure/container-registry/) or [Docker Hub](https://docs.docker.com/docker-hub/repos/#viewing-repository-tags)
36-
37-
>[!TIP]
38-
>You can use a local Docker registry for prototype and testing purposes, instead of a cloud registry.
36+
* You can use a local Docker registry for prototype and testing purposes, instead of a cloud registry.
3937

4038
To test your module on a device, you need an active IoT hub with at least one IoT Edge device. If you want to use your computer as an IoT Edge device, you can do so by following the steps in the tutorials for [Windows](quickstart.md) or [Linux](quickstart-linux.md).
4139

@@ -58,7 +56,9 @@ The following steps show you how to create an IoT Edge module based on Node.js u
5856
6. Provide a name for your solution.
5957
7. Choose **Node.js Module** as the template for the first module in the solution.
6058
8. Provide a name for your module. Choose a name that's unique within your container registry.
61-
9. Provide the image repository for the module. VS Code autopopulates the module name, so you just have to replace **localhost:5000** with your own registry information. If you use a local Docker registry for testing, then localhost is fine. If you use Azure Container Registry, then use the login server from your registry's settings. The login server looks like **\<registry name\>.azurecr.io**.
59+
9. Provide the image repository for the module. VS Code autopopulates the module name, so you just have to replace **localhost:5000** with your own registry information. If you use a local Docker registry for testing, then localhost is fine. If you use Azure Container Registry, then use the login server from your registry's settings. The login server looks like **\<registry name\>.azurecr.io**. Only replace the localhost part of the string, don't delete your module name.
60+
61+
![Provide Docker image repository](./media/how-to-develop-node-module/repository.png)
6262

6363
VS Code takes the information you provided, creates an IoT Edge solution, then loads it in a new window.
6464

@@ -74,7 +74,7 @@ Within the solution you have three items:
7474

7575
## Develop your module
7676

77-
The default Node.js code that comes with the solution is located at **modules** > **\<your module name\>** > **app.js**. The module and the deployment.template.json file are set up so that you can build the solution, push it to your container registry, and deploy it to a device to start testing without touching any code. The module is built to simply take input from a source (in this case, the tempSensor module that simulates data) and pipe it to IoT Hub.
77+
The default Node.js code that comes with the solution is located at **modules** > [your module name] > **app.js**. The module and the deployment.template.json file are set up so that you can build the solution, push it to your container registry, and deploy it to a device to start testing without touching any code. The module is built to simply take input from a source (in this case, the tempSensor module that simulates data) and pipe it to IoT Hub.
7878

7979
When you're ready to customize the Node.js template with your own code, use the [Azure IoT Hub SDKs](../iot-hub/iot-hub-devguide-sdks.md) to build modules that address the key needs for IoT solutions such as security, device management, and reliability.
8080

14 KB
Loading
14 KB
Loading
14 KB
Loading
14 KB
Loading

articles/iot-edge/module-composition.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ For examples about how to create queries for message properties, see [Device-to-
148148
An example that is specific to IoT Edge is when you want to filter for messages that arrived at a gateway device from a leaf device. Messages that come from modules contain a system property called **connectionModuleId**. So if you want to route messages from leaf devices directly to IoT Hub, use the following route to exclude module messages:
149149

150150
```sql
151-
FROM /messages/* WHERE NOT IS_DEFINED($connectionModuleId) INTO $upstream
151+
FROM /messages/\* WHERE NOT IS_DEFINED($connectionModuleId) INTO $upstream
152152
```
153153

154154
### Sink

0 commit comments

Comments
 (0)