Skip to content

Instantly share code, notes, and snippets.

@ralfr
Created March 11, 2019 11:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ralfr/1cffab840efa1b56c07c624472ca6b9c to your computer and use it in GitHub Desktop.
Save ralfr/1cffab840efa1b56c07c624472ca6b9c to your computer and use it in GitHub Desktop.
Azure IoT Edge Deployment Manifest
{
"$schema-template": "1.0.0",
"modulesContent": {
"$edgeAgent": {
"properties.desired": {
"schemaVersion": "1.0",
"runtime": {
"type": "docker",
"settings": {
"minDockerVersion": "v1.25",
"loggingOptions": "",
"registryCredentials": {
"ralfscontainers": {
"username": "$CONTAINER_REGISTRY_USERNAME_ralfscontainers",
"password": "$CONTAINER_REGISTRY_PASSWORD_ralfscontainers",
"address": "ralfscontainers.azurecr.io"
}
}
}
},
"systemModules": {
"edgeAgent": {
"type": "docker",
"settings": {
"image": "mcr.microsoft.com/azureiotedge-agent:1.0",
"createOptions": {}
}
},
"edgeHub": {
"type": "docker",
"status": "running",
"restartPolicy": "always",
"settings": {
"image": "mcr.microsoft.com/azureiotedge-hub:1.0",
"createOptions": {
"HostConfig": {
"PortBindings": {
"5671/tcp": [
{
"HostPort": "5671"
}
],
"8883/tcp": [
{
"HostPort": "8883"
}
],
"443/tcp": [
{
"HostPort": "443"
}
]
}
}
},
"env": {
"OptimizeForPerformance": {
"value": "false"
}
}
}
}
},
"modules": {
"tempSensor": {
"version": "1.0",
"type": "docker",
"status": "running",
"restartPolicy": "always",
"settings": {
"image": "mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:1.0",
"createOptions": "{\"Env\":[\"MessageDelay=00:01:00\"]}"
}
},
"CSharpFunction": {
"version": "1.0",
"type": "docker",
"status": "running",
"restartPolicy": "always",
"settings": {
"image": "${MODULES.CSharpFunction}",
"createOptions": {}
}
}
}
}
},
"$edgeHub": {
"properties.desired": {
"schemaVersion": "1.0",
"routes": {
"CSharpFunctionToIoTHub": "FROM /messages/modules/CSharpFunction/outputs/* INTO $upstream",
"sensorToCSharpFunction": "FROM /messages/modules/tempSensor/outputs/temperatureOutput INTO BrokeredEndpoint(\"/modules/CSharpFunction/inputs/input1\")"
},
"storeAndForwardConfiguration": {
"timeToLiveSecs": 7200
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment