Skip to content

Commit 45224d9

Browse files
committed
Fix restartPolicy values
1 parent ff5976c commit 45224d9

File tree

1 file changed

+20
-23
lines changed

1 file changed

+20
-23
lines changed

articles/iot-edge/iot-edge-runtime.md

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how the modules, security, communication, and reporting on yo
44
author: kgremban
55
manager: philmea
66
ms.author: kgremban
7-
ms.date: 03/13/2019
7+
ms.date: 06/06/2019
88
ms.topic: conceptual
99
ms.service: iot-edge
1010
services: iot-edge
@@ -13,7 +13,7 @@ ms.custom: seodec18
1313

1414
# Understand the Azure IoT Edge runtime and its architecture
1515

16-
The IoT Edge runtime is a collection of programs that need to be installed on a device for it to be considered an IoT Edge device. Collectively, the components of the IoT Edge runtime enable IoT Edge devices to receive code to run at the edge, and communicate the results.
16+
The IoT Edge runtime is a collection of programs that turn a device into an IoT Edge device. Collectively, the IoT Edge runtime components enable IoT Edge devices to receive code to run at the edge, and communicate the results.
1717

1818
The IoT Edge runtime performs the following functions on IoT Edge devices:
1919

@@ -27,7 +27,7 @@ The IoT Edge runtime performs the following functions on IoT Edge devices:
2727

2828
![Runtime communicates insights and module health to IoT Hub](./media/iot-edge-runtime/Pipeline.png)
2929

30-
The responsibilities of the IoT Edge runtime fall into two categories: communication and module management. These two roles are performed by two components that make up the IoT Edge runtime. The *IoT Edge hub* is responsible for communication, while the *IoT Edge agent* deploys and monitors the modules.
30+
The responsibilities of the IoT Edge runtime fall into two categories: communication and module management. These two roles are performed by two components that are part of the IoT Edge runtime. The *IoT Edge hub* is responsible for communication, while the *IoT Edge agent* deploys and monitors the modules.
3131

3232
Both the IoT Edge hub and the IoT Edge agent are modules, just like any other module running on an IoT Edge device.
3333

@@ -36,44 +36,39 @@ Both the IoT Edge hub and the IoT Edge agent are modules, just like any other mo
3636
The IoT Edge hub is one of two modules that make up the Azure IoT Edge runtime. It acts as a local proxy for IoT Hub by exposing the same protocol endpoints as IoT Hub. This consistency means that clients (whether devices or modules) can connect to the IoT Edge runtime just as they would to IoT Hub. 
3737

3838
>[!NOTE]
39-
> IoT Edge Hub supports clients that connect using MQTT or AMQP. It does not support clients that use HTTP.
39+
> IoT Edge hub supports clients that connect using MQTT or AMQP. It does not support clients that use HTTP.
4040
4141
The IoT Edge hub is not a full version of IoT Hub running locally. There are some things that the IoT Edge hub silently delegates to IoT Hub. For example, IoT Edge hub forwards authentication requests to IoT Hub when a device first tries to connect. After the first connection is established, security information is cached locally by IoT Edge hub. Subsequent connections from that device are allowed without having to authenticate to the cloud. 
4242

43-
>[!NOTE]
44-
>The runtime must be connected every time it tries to authenticate a device.
45-
4643
To reduce the bandwidth your IoT Edge solution uses, the IoT Edge hub optimizes how many actual connections are made to the cloud. IoT Edge hub takes logical connections from clients like modules or leaf devices and combines them for a single physical connection to the cloud. The details of this process are transparent to the rest of the solution. Clients think they have their own connection to the cloud even though they are all being sent over the same connection. 
4744

4845
![IoT Edge hub is a gateway between physical devices and IoT Hub](./media/iot-edge-runtime/Gateway.png)
4946

50-
IoT Edge hub can determine whether it's connected to IoT Hub. If the connection is lost, IoT Edge hub saves messages or twin updates locally. Once a connection is reestablished, it syncs all the data. The location used for this temporary cache is determined by a property of the IoT Edge hub’s module twin. The size of the cache is not capped and will grow as long as the device has storage capacity. 
47+
IoT Edge hub can determine whether it's connected to IoT Hub. If the connection is lost, IoT Edge hub saves messages or twin updates locally. Once a connection is reestablished, it syncs all the data. The location used for this temporary cache is determined by a property of the IoT Edge hub’s module twin. The size of the cache is not capped and will grow as long as the device has storage capacity. For more information, see [Offline capabilities](offline-capabilities.md).
5148

5249
### Module communication
5350

54-
IoT Edge hub facilitates module to module communication. Using IoT Edge hub as a message broker keeps modules independent from each other. Modules only need to specify the inputs on which they accept messages and the outputs to which they write messages. A solution developer then stitches these inputs and outputs together so that the modules process data in the order specific to that solution. 
51+
IoT Edge hub facilitates module to module communication. Using IoT Edge hub as a message broker keeps modules independent from each other. Modules only need to specify the inputs on which they accept messages and the outputs to which they write messages. A solution developer can stitch these inputs and outputs together so that the modules process data in the order specific to that solution. 
5552

5653
![IoT Edge Hub facilitates module-to-module communication](./media/iot-edge-runtime/module-endpoints.png)
5754

58-
To send data to the IoT Edge hub, a module calls the SendEventAsync method. The first argument specifies on which output to send the message. The following pseudocode sends a message on output1:
55+
To send data to the IoT Edge hub, a module calls the SendEventAsync method. The first argument specifies on which output to send the message. The following pseudocode sends a message on **output1**:
5956

6057
```csharp
6158
ModuleClient client = new ModuleClient.CreateFromEnvironmentAsync(transportSettings); 
6259
await client.OpenAsync(); 
6360
await client.SendEventAsync(“output1”, message); 
6461
```
6562

66-
To receive a message, register a callback that processes messages coming in on a specific input. The following pseudocode registers the function messageProcessor to be used for processing all messages received on input1:
63+
To receive a message, register a callback that processes messages coming in on a specific input. The following pseudocode registers the function messageProcessor to be used for processing all messages received on **input1**:
6764

6865
```csharp
6966
await client.SetInputMessageHandlerAsync(“input1”, messageProcessor, userContext);
7067
```
7168

7269
For more information about the ModuleClient class and its communication methods, see the API reference for your preferred SDK language: [C#](https://docs.microsoft.com/dotnet/api/microsoft.azure.devices.client.moduleclient?view=azure-dotnet), [C and Python](https://docs.microsoft.com/azure/iot-hub/iot-c-sdk-ref/iothub-module-client-h), [Java](https://docs.microsoft.com/java/api/com.microsoft.azure.sdk.iot.device.moduleclient?view=azure-java-stable), or [Node.js](https://docs.microsoft.com/javascript/api/azure-iot-device/moduleclient?view=azure-node-latest).
7370

74-
The solution developer is responsible for specifying the rules that determine how IoT Edge hub passes messages between modules. Routing rules are defined in the cloud and pushed down to IoT Edge hub in its device twin. The same syntax for IoT Hub routes is used to define routes between modules in Azure IoT Edge.
75-
76-
<!--- For more info on how to declare routes between modules, see []. --->   
71+
The solution developer is responsible for specifying the rules that determine how IoT Edge hub passes messages between modules. Routing rules are defined in the cloud and pushed down to IoT Edge hub in its device twin. The same syntax for IoT Hub routes is used to define routes between modules in Azure IoT Edge. For more information, see [Learn how to deploy modules and establish routes in IoT Edge](module-composition.md).   
7772

7873
![Routes between modules go through IoT Edge hub](./media/iot-edge-runtime/module-endpoints-with-routes.png)
7974

@@ -86,33 +81,35 @@ The [IoT Edge security daemon](iot-edge-security-manager.md) starts the IoT Edge
8681
Each item in the deployment manifest contains specific information about a module and is used by the IoT Edge agent for controlling the module’s lifecycle. Some of the more interesting properties are: 
8782

8883
* **settings.image** – The container image that the IoT Edge agent uses to start the module. The IoT Edge agent must be configured with credentials for the container registry if the image is protected by a password. Credentials for the container registry can be configured remotely using the deployment manifest, or on the IoT Edge device itself by updating the `config.yaml` file in the IoT Edge program folder.
89-
* **settings.createOptions** – A string that is passed directly to the Docker daemon when starting a module’s container. Adding Docker options in this property allows for advanced options like port forwarding or mounting volumes into a module’s container.  
90-
* **status** – The state in which the IoT Edge agent places the module. This value is usually set to *running* as most people want the IoT Edge agent to immediately start all modules on the device. However, you could specify the initial state of a module to be stopped and wait for a future time to tell the IoT Edge agent to start a module. The IoT Edge agent reports the status of each module back to the cloud in the reported properties. A difference between the desired property and the reported property is an indicator of a misbehaving device. The supported statuses are:
84+
* **settings.createOptions** – A string that is passed directly to the Moby container daemon when starting a module’s container. Adding options in this property allows for advanced configurations like port forwarding or mounting volumes into a module’s container.  
85+
* **status** – The state in which the IoT Edge agent places the module. Usually, this value is set to *running* as most people want the IoT Edge agent to immediately start all modules on the device. However, you could specify the initial state of a module to be stopped and wait for a future time to tell the IoT Edge agent to start a module. The IoT Edge agent reports the status of each module back to the cloud in the reported properties. A difference between the desired property and the reported property is an indicator of a misbehaving device. The supported statuses are:
9186
* Downloading
9287
* Running
9388
* Unhealthy
9489
* Failed
9590
* Stopped
9691
* **restartPolicy** – How the IoT Edge agent restarts a module. Possible values include:
97-
* Never – The IoT Edge agent never restarts the module.
98-
* onFailure - If the module crashes, the IoT Edge agent restarts it. If the module shuts down cleanly, the IoT Edge agent does not restart it.
99-
* Unhealthy - If the module crashes or is deemed unhealthy, the IoT Edge agent restarts it.
100-
* Always - If the module crashes, is deemed unhealthy, or shuts down in any way, the IoT Edge agent restarts it.
92+
* `never` – The IoT Edge agent never restarts the module.
93+
* `on-failure` - If the module crashes, the IoT Edge agent restarts it. If the module shuts down cleanly, the IoT Edge agent does not restart it.
94+
* `on-unhealthy` - If the module crashes or is considered unhealthy, the IoT Edge agent restarts it.
95+
* `always` - If the module crashes, is considered unhealthy, or shuts down in any way, the IoT Edge agent restarts it.
10196

10297
The IoT Edge agent sends runtime response to IoT Hub. Here is a list of possible responses:
10398
* 200 - OK
10499
* 400 - The deployment configuration is malformed or invalid.
105-
* 417 - The device does not have a deployment configuration set.
100+
* 417 - The device doesn't have a deployment configuration set.
106101
* 412 - The schema version in the deployment configuration is invalid.
107102
* 406 - The IoT Edge device is offline or not sending status reports.
108103
* 500 - An error occurred in the IoT Edge runtime.
109104

105+
For more information, see [Learn how to deploy modules and establish routes in IoT Edge](module-composition.md).   
106+
110107
### Security
111108

112109
The IoT Edge agent plays a critical role in the security of an IoT Edge device. For example, it performs actions like verifying a module’s image before starting it.
113110

114-
For more information about the Azure IoT Edge security framework, read about the [IoT Edge security manager](iot-edge-security-manager.md)
111+
For more information about the Azure IoT Edge security framework, read about the [IoT Edge security manager](iot-edge-security-manager.md).
115112

116113
## Next steps
117114

118-
[Understand Azure IoT Edge Certificates](iot-edge-certs.md)
115+
[Understand Azure IoT Edge modules](iot-edge-modules.md)

0 commit comments

Comments
 (0)