Skip to content

Commit fd5bf0e

Browse files
committed
Removed some monikers
1 parent dd9edef commit fd5bf0e

File tree

2 files changed

+0
-100
lines changed

2 files changed

+0
-100
lines changed

articles/iot-edge/how-to-access-host-storage-from-module.md

Lines changed: 0 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ services: iot-edge
1414

1515
[!INCLUDE [iot-edge-version-all-supported](includes/iot-edge-version-all-supported.md)]
1616

17-
::: moniker range=">=iotedge-1.4"
18-
1917
IoT Edge modules can use storage on the host IoT Edge device itself for improved reliability, especially when operating offline.
2018

2119
## 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
8078
> [!NOTE]
8179
> 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.
8280
83-
84-
8581
## Link module storage to device storage for custom modules
8682

8783
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
10197
}
10298
```
10399

104-
105100
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.
106101

107-
108-
109102
### Host system permissions
110103

111104
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
116109
sudo chown 1000 <HostStoragePath>
117110
sudo chmod 700 <HostStoragePath>
118111
```
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-
![Add create options and environment variables for local storage](./media/how-to-access-host-storage-from-module/offline-storage.png)
135-
136-
Or, you can configure the local storage directly in the deployment manifest. For example, for version 1.1:
137-
138-
```json
139-
"systemModules": {
140-
"edgeAgent": {
141-
"settings": {
142-
"image": "mcr.microsoft.com/azureiotedge-agent:1.1",
143-
"createOptions": {
144-
"HostConfig": {
145-
"Binds":["<HostStoragePath>:<ModuleStoragePath>"]
146-
}
147-
}
148-
},
149-
"type": "docker",
150-
"env": {
151-
"storageFolder": {
152-
"value": "<ModuleStoragePath>"
153-
}
154-
}
155-
},
156-
"edgeHub": {
157-
"settings": {
158-
"image": "mcr.microsoft.com/azureiotedge-hub:1.1",
159-
"createOptions": {
160-
"HostConfig": {
161-
"Binds":["<HostStoragePath>:<ModuleStoragePath>"],
162-
"PortBindings":{"5671/tcp":[{"HostPort":"5671"}],"8883/tcp":[{"HostPort":"8883"}],"443/tcp":[{"HostPort":"443"}]}}}
163-
},
164-
"type": "docker",
165-
"env": {
166-
"storageFolder": {
167-
"value": "<ModuleStoragePath>"
168-
}
169-
},
170-
"status": "running",
171-
"restartPolicy": "always"
172-
}
173-
}
174-
```
175-
176-
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:
192-
193-
```powershell
194-
$acl = get-acl <HostStoragePath>
195-
$ace = new-object system.security.AccessControl.FileSystemAccessRule('Authenticated Users','FullControl','Allow')
196-
$acl.AddAccessRule($ace)
197-
$acl | Set-Acl
198-
```
199-
::: moniker-end
200-
201-
## Encrypted data in module storage
202112

203113
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).
204114

articles/iot-edge/how-to-configure-proxy-support.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -280,11 +280,6 @@ This step takes place once on the IoT Edge device during initial device setup.
280280

281281
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.
282282

283-
:::moniker-end
284-
285-
<!-- 1.4 -->
286-
:::moniker range="=iotedge-2020-11"
287-
288283
3. Add the **https_proxy** parameter to the environment variables section, and set your proxy URL as its value.
289284

290285
```toml
@@ -345,11 +340,6 @@ This step takes place once on the IoT Edge device during initial device setup.
345340
"UpstreamProtocol" = "AmqpWs"
346341
"https_proxy" = "<proxy URL>"
347342
```
348-
349-
:::moniker-end
350-
351-
<!-- >= 1.4 -->
352-
:::moniker range=">=iotedge-2020-11"
353343

354344
5. Save the changes and close the editor. Apply your latest changes.
355345

0 commit comments

Comments
 (0)