Skip to content

Commit 48dc155

Browse files
authored
Merge pull request #106217 from kgremban/mar02-109release
IoT Edge 1.0.9 release
2 parents 8f03ba1 + f61e175 commit 48dc155

14 files changed

+668
-88
lines changed

.openpublishing.redirection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3265,6 +3265,11 @@
32653265
"redirect_url": "/azure/iot-edge/how-to-register-device",
32663266
"redirect_document_id": false
32673267
},
3268+
{
3269+
"source_path": "articles/iot-edge/how-to-install-production-certificates.md",
3270+
"redirect_url": "/azure/iot-edge/how-to-manage-device-certificates",
3271+
"redirect_document_id": true
3272+
},
32683273
{
32693274
"source_path": "articles/cognitive-services/cognitive-services-recommendations-quick-start.md",
32703275
"redirect_url": "/azure/cognitive-services/recommendations/overview",

articles/iot-edge/TOC.yml

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@
125125
href: how-to-install-iot-edge-ubuntuvm.md
126126
- name: Kubernetes
127127
href: how-to-install-iot-edge-kubernetes.md
128-
- name: Install production certificates
129-
href: how-to-install-production-certificates.md
128+
- name: Manage device certificates
129+
href: how-to-manage-device-certificates.md
130130
- name: Create test certificates
131131
href: how-to-create-test-certificates.md
132132
- name: Update the runtime version
@@ -139,6 +139,8 @@
139139
href: how-to-auto-provision-simulated-device-linux.md
140140
- name: Windows
141141
href: how-to-auto-provision-simulated-device-windows.md
142+
- name: X.509 certificate attestation
143+
href: how-to-auto-provision-x509-certs.md
142144
- name: Symmetric key attestation
143145
href: how-to-auto-provision-symmetric-keys.md
144146
- name: Develop and debug custom modules
@@ -149,20 +151,26 @@
149151
href: how-to-vs-code-develop-module.md
150152
- name: Deploy modules
151153
items:
152-
- name: Azure portal
153-
href: how-to-deploy-modules-portal.md
154-
- name: Azure CLI
155-
href: how-to-deploy-modules-cli.md
156-
- name: Visual Studio Code
157-
href: how-to-deploy-modules-vscode.md
158-
- name: Deploy and monitor at scale
154+
- name: Deploy to individual devices
155+
items:
156+
- name: Azure portal
157+
href: how-to-deploy-modules-portal.md
158+
- name: Azure CLI
159+
href: how-to-deploy-modules-cli.md
160+
- name: Visual Studio Code
161+
href: how-to-deploy-modules-vscode.md
162+
- name: Deploy at scale
163+
items:
164+
- name: Azure portal
165+
href: how-to-deploy-monitor.md
166+
- name: Azure CLI
167+
href: how-to-deploy-monitor-cli.md
168+
- name: Visual Studio Code
169+
href: how-to-deploy-monitor-vscode.md
170+
- name: Monitor and diagnose deployments
159171
items:
160-
- name: Azure portal
161-
href: how-to-deploy-monitor.md
162-
- name: Azure CLI
163-
href: how-to-deploy-monitor-cli.md
164-
- name: Visual Studio Code
165-
href: how-to-deploy-monitor-vscode.md
172+
- name: EdgeAgent direct methods
173+
href: how-to-edgeagent-direct-method.md
166174
- name: Use IoT Edge devices as gateways
167175
items:
168176
- name: Configure a transparent gateway

articles/iot-edge/how-to-auto-provision-symmetric-keys.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,14 @@ The section in the configuration file for symmetric key provisioning looks like
170170
provisioning:
171171
source: "dps"
172172
global_endpoint: "https://global.azure-devices-provisioning.net"
173-
scope_id: "{scope_id}"
173+
scope_id: "<SCOPE_ID>"
174174
attestation:
175175
method: "symmetric_key"
176-
registration_id: "{registration_id}"
177-
symmetric_key: "{symmetric_key}"
176+
registration_id: "<REGISTRATION_ID>"
177+
symmetric_key: "<SYMMETRIC_KEY>"
178178
```
179179
180-
Replace the placeholder values for `{scope_id}`, `{registration_id}`, and `{symmetric_key}` with the data you collected earlier. Make sure the **provisioning:** line has no preceding whitespace and that nested items are indented by two spaces.
180+
Replace the placeholder values for `<SCOPE_ID>`, `<REGISTRATION_ID>`, and `<SYMMETRIC_KEY>` with the data you collected earlier. Make sure the **provisioning:** line has no preceding whitespace and that nested items are indented by two spaces.
181181

182182
### Windows device
183183

articles/iot-edge/how-to-auto-provision-x509-certs.md

Lines changed: 317 additions & 0 deletions
Large diffs are not rendered by default.

articles/iot-edge/how-to-create-test-certificates.md

Lines changed: 61 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Create test certificates and learn how to install them on an Azure
44
author: kgremban
55
manager: philmea
66
ms.author: kgremban
7-
ms.date: 12/07/2019
7+
ms.date: 02/26/2020
88
ms.topic: conceptual
99
ms.service: iot-edge
1010
services: iot-edge
@@ -22,6 +22,15 @@ You can create certificates on any machine, and then copy them over to your IoT
2222
It's easier to use your primary machine to create the certificates rather than generating them on your IoT Edge device itself.
2323
By using your primary machine, you can set up the scripts once and then repeat the process to create certificates for multiple devices.
2424

25+
Follow these steps to create demo certificates for testing your IoT Edge scenario:
26+
27+
1. [Set up scripts](#set-up-scripts) for certificate generation on your device.
28+
2. [Create the root CA certificate](#create-root-ca-certificate) that you use to sign all the other certificates for your scenario.
29+
3. Generate the certificates you need for the scenario you want to test:
30+
* [Create IoT Edge device identity certificates](#create-iot-edge-device-identity-certificates) to test automatic provisioning with the IoT Hub Device Provisioning Service.
31+
* [Create IoT Edge device CA certificates](#create-iot-edge-device-ca-certificates) to test production scenarios or gateway scenarios.
32+
* [Create downstream device certificates](#create-downstream-device-certificates) to test authenticating downstream devices to IoT Hub in a gateway scenario.
33+
2534
## Prerequisites
2635

2736
A development machine with Git installed.
@@ -49,7 +58,7 @@ There are several ways to install OpenSSL, including the following options:
4958

5059
1. Navigate to a directory where you want to install vcpkg. Follow the instructions to download and install [vcpkg](https://github.com/Microsoft/vcpkg).
5160

52-
2. Once vcpkg is installed, run the following command from a powershell prompt to install the OpenSSL package for Windows x64. The installation typically takes about 5 minutes to complete.
61+
2. Once vcpkg is installed, run the following command from a PowerShell prompt to install the OpenSSL package for Windows x64. The installation typically takes about 5 minutes to complete.
5362

5463
```powershell
5564
.\vcpkg install openssl:x64-windows
@@ -169,7 +178,11 @@ Before proceeding with the steps in this section, follow the steps in the [Set u
169178

170179
## Create IoT Edge device CA certificates
171180

172-
Every IoT Edge device going to production needs a device CA certificate that's referenced from the config.yaml file. The device CA certificate is responsible for creating certificates for modules running on the device. It's also how the IoT Edge device verifies its identity when connecting to downstream devices.
181+
Every IoT Edge device going to production needs a device CA certificate that's referenced from the config.yaml file.
182+
The device CA certificate is responsible for creating certificates for modules running on the device.
183+
It's also how the IoT Edge device verifies its identity when connecting to downstream devices.
184+
185+
Device CA certificates go in the **Certificate** section of the config.yaml file on the IoT Edge device.
173186

174187
Before proceeding with the steps in this section, follow the steps in the [Set up scripts](#set-up-scripts) and [Create root CA certificate](#create-root-ca-certificate) sections.
175188

@@ -188,7 +201,9 @@ Before proceeding with the steps in this section, follow the steps in the [Set u
188201
* `<WRKDIR>\certs\iot-edge-device-MyEdgeDeviceCA-full-chain.cert.pem`
189202
* `<WRKDIR>\private\iot-edge-device-MyEdgeDeviceCA.key.pem`
190203

191-
The gateway device name passed into those scripts should not be the same as the "hostname" parameter in config.yaml. The scripts help you avoid any issues by appending a ".ca" string to the gateway device name to prevent the name collision in case a user sets up IoT Edge using the same name in both places. However, it's good practice to avoid using the same name.
204+
The gateway device name passed into those scripts should not be the same as the "hostname" parameter in config.yaml, or the device's ID in IoT Hub.
205+
The scripts help you avoid any issues by appending a ".ca" string to the gateway device name to prevent the name collision in case a user sets up IoT Edge using the same name in both places.
206+
However, it's good practice to avoid using the same name.
192207

193208
### Linux
194209

@@ -205,9 +220,49 @@ The gateway device name passed into those scripts should not be the same as the
205220
* `<WRKDIR>/certs/iot-edge-device-MyEdgeDeviceCA-full-chain.cert.pem`
206221
* `<WRKDIR>/private/iot-edge-device-MyEdgeDeviceCA.key.pem`
207222

208-
The gateway device name passed into those scripts should not be the same as the "hostname" parameter in config.yaml. The scripts help you avoid any issues by appending a ".ca" string to the gateway device name to prevent the name collision in case a user sets up IoT Edge using the same name in both places. However, it's good practice to avoid using the same name.
223+
The gateway device name passed into those scripts should not be the same as the "hostname" parameter in config.yaml, or the device's ID in IoT Hub.
224+
The scripts help you avoid any issues by appending a ".ca" string to the gateway device name to prevent the name collision in case a user sets up IoT Edge using the same name in both places.
225+
However, it's good practice to avoid using the same name.
226+
227+
## Create IoT Edge device identity certificates
228+
229+
Device identity certificates are used to provision IoT Edge devices through the [Azure IoT Hub Device Provisioning Service (DPS)](../iot-dps/index.yml).
230+
231+
Device identity certificates go in the **Provisioning** section of the config.yaml file on the IoT Edge device.
232+
233+
Before proceeding with the steps in this section, follow the steps in the [Set up scripts](#set-up-scripts) and [Create root CA certificate](#create-root-ca-certificate) sections.
234+
235+
### Windows
236+
237+
Create the IoT Edge device identity certificate and private key with the following command:
238+
239+
```powershell
240+
New-CACertsEdgeDeviceIdentity "<name>"
241+
```
242+
243+
The name that you pass in to this command will be the device ID for the IoT Edge device in IoT Hub.
244+
245+
The new device identity command creates several certificate and key files, including two that you'll use when creating an individual enrollment in DPS and installing the IoT Edge runtime:
246+
247+
* `<WRKDIR>\certs\iot-edge-device-identity-<name>.cert.pem`
248+
* `<WRKDIR>\private\iot-edge-device-identity-<name>.key.pem`
249+
250+
### Linux
251+
252+
Create the IoT Edge device identity certificate and private key with the following command:
253+
254+
```bash
255+
./certGen.sh create_edge_device_identity_certificate "<name>"
256+
```
257+
258+
The name that you pass in to this command will be the device ID for the IoT Edge device in IoT Hub.
259+
260+
The script creates several certificate and key files, including two that you'll use when creating an individual enrollment in DPS and installing the IoT Edge runtime:
261+
262+
* `<WRKDIR>/certs/iot-edge-device-identity-<name>.cert.pem`
263+
* `<WRKDIR>/private/iot-edge-device-identity-<name>.key.pem`
209264

210-
## Create X.509 certs for downstream devices
265+
## Create downstream device certificates
211266

212267
If you're setting up a downstream IoT device for a gateway scenario, you can generate demo certificates for X.509 authentication.
213268
There are two ways to authenticate an IoT device using X.509 certificates: using self-signed certs or using certificate authority (CA) signed certs.

articles/iot-edge/how-to-create-transparent-gateway.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The following steps walk you through the process of creating the certificates an
4343

4444
## Prerequisites
4545

46-
An Azure IoT Edge device, configured with [production certificates](how-to-install-production-certificates.md).
46+
An Azure IoT Edge device, configured with [production certificates](how-to-manage-device-certificates.md).
4747

4848
## Deploy edgeHub to the gateway
4949

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
title: Built-in edgeAgent direct methods - Azure IoT Edge
3+
description: Monitor and manage an IoT Edge deployment using built-in direct methods in the IoT Edge agent runtime module
4+
author: kgremban
5+
manager: philmea
6+
ms.author: kgremban
7+
ms.date: 03/02/2020
8+
ms.topic: conceptual
9+
ms.reviewer: veyalla
10+
ms.service: iot-edge
11+
services: iot-edge
12+
---
13+
14+
# Communicate with edgeAgent using built-in direct methods
15+
16+
Monitor and manage IoT Edge deployments by using the direct methods included in the IoT Edge agent module. Direct methods are implemented on the device, and then can be invoked from the cloud. The IoT Edge agent includes direct methods that help you monitor and manage your IoT Edge devices remotely.
17+
18+
For more information about direct methods, how to use them, and how to implement them in your own modules, see [Understand and invoke direct methods from IoT Hub](../iot-hub/iot-hub-devguide-direct-methods.md).
19+
20+
## Ping
21+
22+
The **ping** method is useful for checking whether IoT Edge is running on a device, or whether the device has an open connection to ioT Hub. Use this direct method to ping the IoT Edge agent and get its status. A successful ping returns an empty payload and **"status": 200**.
23+
24+
For example:
25+
26+
```azurecli
27+
az iot hub invoke-module-method --method-name 'ping' -n <hub name> -d <device name> -m '$edgeAgent'
28+
```
29+
30+
In the Azure portal, invoke the method with the method name `ping` and an empty JSON payload `{}`.
31+
32+
![Invoke direct method 'ping' in Azure portal](./media/how-to-edgeagent-direct-method/ping-direct-method.png)
33+
34+
## Restart module
35+
36+
The **RestartModule** method allows for remote management of modules running on an IoT Edge device. If a module is reporting a failed state or other unhealthy behavior, you can trigger the IoT Edge agent to restart it. A successful restart command returns an empty payload and **"status": 200**.
37+
38+
The RestartModule method is available in IoT Edge version 1.0.9 and later.
39+
40+
You can use the RestartModule direct method on any module running on an IoT Edge device, including the edgeAgent module itself. However, if you use this direct method to shut down the edgeAgent, you won't receive a success result since the connection is disrupted while the module restarts.
41+
42+
For example:
43+
44+
```azurecli
45+
az iot hub invoke-module-method --method-name 'RestartModule' -n <hub name> -d <device name> -m '$edgeAgent' --method-payload \
46+
'
47+
{
48+
"schemaVersion": "1.0",
49+
"id": "<module name>"
50+
}
51+
'
52+
```
53+
54+
In the Azure portal, invoke the method with the method name `RestartModule` and the following JSON payload:
55+
56+
```json
57+
{
58+
"schemaVersion": "1.0",
59+
"id": "<module name>"
60+
}
61+
```
62+
63+
![Invoke direct method 'RestartModule' in Azure portal](./media/how-to-edgeagent-direct-method/restartmodule-direct-method.png)
64+
65+
## Experimental methods
66+
67+
New direct method options are available as experimental features to test, including:
68+
69+
* [UploadLogs](https://github.com/Azure/iotedge/blob/master/doc/built-in-logs-pull.md): Retrieve module logs and upload them to Azure Blob Storage.
70+
* [GetTaskStatus](https://github.com/Azure/iotedge/blob/master/doc/built-in-logs-pull.md#gettaskstatus): Check on the status of an upload logs request.
71+
72+
## Next steps
73+
74+
[Properties of the IoT Edge agent and IoT Edge hub module twins](module-edgeagent-edgehub.md)

0 commit comments

Comments
 (0)