Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Hierarchical Azure IoT Edge - Layer 5 Modules (OSS Registry + API Proxy)
{
"modulesContent": {
"$edgeAgent": {
"properties.desired": {
"modules": {
"registry": {
"settings": {
"image": "registry:latest",
"createOptions": "{\"HostConfig\":{\"PortBindings\":{\"5000/tcp\":[{\"HostPort\":\"5000\"}]}}}"
},
"type": "docker",
"version": "1.0",
"env": {
"REGISTRY_PROXY_REMOTEURL": {
"value": "https://mcr.microsoft.com"
}
},
"status": "running",
"restartPolicy": "always"
},
"iotEdgeApiProxy": {
"settings": {
"image": "mcr.microsoft.com/azureiotedge-api-proxy:1.0",
"createOptions": "{\"HostConfig\": {\"PortBindings\": {\"443/tcp\": [{\"HostPort\": \"443\"}]}}}"
},
"type": "docker",
"version": "1.0",
"env": {
"NGINX_DEFAULT_PORT": {
"value": "443"
},
"DOCKER_REQUEST_ROUTE_ADDRESS": {
"value": "dockerContainerRegistry:5000"
}
},
"status": "running",
"restartPolicy": "always",
"startupOrder": 3
}
},
"runtime": {
"settings": {
"minDockerVersion": "v1.25",
"registryCredentials": {
"iotedgeforiiotACR": {
"address": "<replace_with_your_ACR_login_server>",
"password": "<replace_with_your_ACR_login_password>",
"username": "<replace_with_your_ACR_login_name>"
}
}
},
"type": "docker"
},
"schemaVersion": "1.1",
"systemModules": {
"edgeAgent": {
"settings": {
"image": "mcr.microsoft.com/azureiotedge-agent:1.2",
"createOptions": "{}"
},
"type": "docker"
},
"edgeHub": {
"settings": {
"image": "mcr.microsoft.com/azureiotedge-hub:1.2",
"createOptions": "{\"HostConfig\": {\"PortBindings\": {\"5671/tcp\": [{\"HostPort\": \"5671\"}],\"8883/tcp\": [{\"HostPort\": \"8883\"}]}}}"
},
"type": "docker",
"env": {
"experimentalFeatures:enabled": {
"value": "true"
},
"experimentalFeatures:nestedEdgeEnabled": {
"value": "true"
},
"https_proxy": {
"value": "http://10.16.8.4:3128"
}
},
"status": "running",
"restartPolicy": "always"
}
}
}
},
"$edgeHub": {
"properties.desired": {
"routes": {
"ToUpstream": "FROM /messages/* INTO $upstream"
},
"schemaVersion": "1.1",
"storeAndForwardConfiguration": {
"timeToLiveSecs": 7200
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment