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
IoT Edge modules can use storage on the host IoT Edge device itself for improved reliability, especially when operating offline.
20
18
21
19
## Configure system modules to use persistent storage
@@ -80,8 +78,6 @@ On version 1.4 and newer, there's no need for manually setting ownership or perm
80
78
> [!NOTE]
81
79
> Automatic permission management of host bound storage only applies to system modules, IoT Edge agent and Edge hub. For custom modules, manual management of permissions and ownership of bound host storage is required if the custom module container is not running as `root` user.
82
80
83
-
84
-
85
81
## Link module storage to device storage for custom modules
86
82
87
83
If your custom module requires access to persistent storage on the host file system, use the module's create options to bind a storage folder in module container to a folder on the host machine. For example:
@@ -101,11 +97,8 @@ If your custom module requires access to persistent storage on the host file sys
101
97
}
102
98
```
103
99
104
-
105
100
Replace `<HostStoragePath>` and `<ModuleStoragePath>` with your host and module storage path; both values must be an absolute path. Refer to the [Docker Engine Mount specification](https://any-api.com/docker_com/engine/docs/Definitions/Mount) for option details.
106
101
107
-
108
-
109
102
### Host system permissions
110
103
111
104
Make sure that the user profile your module is using has the required read, write, and execute permissions to the host system directory. By default, containers run as `root` user that already has the required permissions. But your module's Dockerfile might specify use of a non-root user in which case host storage permissions must be manually configured.
@@ -116,89 +109,6 @@ There are several ways to manage directory permissions on Linux systems, includi
116
109
sudo chown 1000 <HostStoragePath>
117
110
sudo chmod 700 <HostStoragePath>
118
111
```
119
-
::: moniker-end
120
-
121
-
::: moniker range="<=iotedge-2020-11"
122
-
123
-
In addition to storing data using Azure storage services or in your device's container storage, you can also dedicate storage on the host IoT Edge device itself for improved reliability, especially when operating offline.
124
-
125
-
## Link module storage to device storage
126
-
127
-
To enable a link from module storage to the storage on the host system, create an environment variable for your module that points to a storage folder in the container. Then, use the create options to bind that storage folder to a folder on the host machine.
128
-
129
-
For example, if you wanted to enable the IoT Edge hub to store messages in your device's local storage and retrieve them later, you can configure the environment variables and the create options in the Azure portal in the **Runtime Settings** section.
130
-
131
-
1. For both IoT Edge hub and IoT Edge agent, add an environment variable called **storageFolder** that points to a directory in the module.
132
-
1. For both IoT Edge hub and IoT Edge agent, add binds to connect a local directory on the host machine to a directory in the module. For example, for version 1.1:
133
-
134
-

135
-
136
-
Or, you can configure the local storage directly in the deployment manifest. For example, for version 1.1:
Replace `<HostStoragePath>` and `<ModuleStoragePath>` with your host and module storage path; both values must be an absolute path. If using version 1.4, update each image version with `1.4`. For example, `mcr.microsoft.com/azureiotedge-agent:1.4`.
177
-
178
-
For example, on a Linux system, `"Binds":["/etc/iotedge/storage/:/iotedge/storage/"]` means the directory **/etc/iotedge/storage** on your host system is mapped to the directory **/iotedge/storage/** in the container. On a Windows system, as another example, `"Binds":["C:\\temp:C:\\contemp"]` means the directory **C:\\temp** on your host system is mapped to the directory **C:\\contemp** in the container.
179
-
180
-
You can find more details about create options from [docker docs](https://docs.docker.com/engine/api/v1.32/#operation/ContainerCreate).
181
-
182
-
## Host system permissions
183
-
184
-
On Linux devices, make sure that the user profile for your module has the required read, write, and execute permissions to the host system directory. Returning to the earlier example of enabling IoT Edge hub to store messages in your device's local storage, you need to grant permissions to its user profile, UID 1000. There are several ways to manage directory permissions on Linux systems, including using `chown` to change the directory owner and then `chmod` to change the permissions, such as:
185
-
186
-
```bash
187
-
sudo chown 1000 <HostStoragePath>
188
-
sudo chmod 700 <HostStoragePath>
189
-
```
190
-
191
-
On Windows devices, you will also need to configure permissions on the host system directory. You can use PowerShell to set permissions:
When modules invoke the IoT Edge daemon's workload API to encrypt data, the encryption key is derived using the module ID and module's generation ID. A generation ID is used to protect secrets if a module is removed from the deployment and then another module with the same module ID is later deployed to the same device. You can view a module's generation ID using the Azure CLI command [az iot hub module-identity show](/cli/azure/iot/hub/module-identity).
Copy file name to clipboardExpand all lines: articles/iot-edge/how-to-configure-proxy-support.md
-10Lines changed: 0 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -280,11 +280,6 @@ This step takes place once on the IoT Edge device during initial device setup.
280
280
281
281
2. In the config file, find the `[agent]` section, which contains all the configuration information for the edgeAgent module to use on startup. Check and make sure that the `[agent]`section is uncommented or add it if it is not included in the `config.toml`. The IoT Edge agent definition includes an `[agent.env]` subsection where you can add environment variables.
282
282
283
-
:::moniker-end
284
-
285
-
<!-- 1.4 -->
286
-
:::moniker range="=iotedge-2020-11"
287
-
288
283
3. Add the **https_proxy** parameter to the environment variables section, and set your proxy URL as its value.
289
284
290
285
```toml
@@ -345,11 +340,6 @@ This step takes place once on the IoT Edge device during initial device setup.
345
340
"UpstreamProtocol" = "AmqpWs"
346
341
"https_proxy" = "<proxy URL>"
347
342
```
348
-
349
-
:::moniker-end
350
-
351
-
<!-- >= 1.4 -->
352
-
:::moniker range=">=iotedge-2020-11"
353
343
354
344
5. Save the changes and close the editor. Apply your latest changes.
0 commit comments