Skip to content

Instantly share code, notes, and snippets.

@shoter
Created July 19, 2021 23:17
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 shoter/9cf44c43f161595f9d805610d149c3f2 to your computer and use it in GitHub Desktop.
Save shoter/9cf44c43f161595f9d805610d149c3f2 to your computer and use it in GitHub Desktop.
Deployment template for my first test project in IoT Edge
{
"$schema-template": "2.0.0",
"modulesContent": {
"$edgeAgent": {
"properties.desired": {
"schemaVersion": "1.0",
"runtime": {
"type": "docker",
"settings": {
"minDockerVersion": "v1.25",
"loggingOptions": "",
"registryCredentials": {}
}
},
"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"
}
]
}
}
}
}
}
},
"modules": {
"IotEdgeModule1": {
"version": "1.0.0",
"type": "docker",
"status": "running",
"restartPolicy": "always",
"settings": {
"image": "${MODULEDIR<../IotEdgeModule1>}",
"createOptions": {}
}
},
"SimulatedTemperatureSensor": {
"version": "1.0",
"type": "docker",
"status": "running",
"restartPolicy": "always",
"settings": {
"image": "mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:1.0",
"createOptions": {}
},
"env": {
"MessageCount": {
"value": "10000"
}
}
},
"AzureBlobStorageonIoTEdge": {
"version": "1.0",
"type": "docker",
"status": "running",
"restartPolicy": "always",
"settings": {
"image": "mcr.microsoft.com/azure-blob-storage:latest",
"createOptions": {
"HostConfig": {
"PortBindings": {
"11002/tcp": [
{
"HostPort": "11002"
}
]
}
}
}
},
"env": {
"LOCAL_STORAGE_ACCOUNT_NAME": {
"value": "iotblob"
}
}
},
"TestWebApp": {
"version": "1.0.0",
"type": "docker",
"status": "running",
"restartPolicy": "always",
"settings": {
"image": "${MODULEDIR<../TestWebApp>}",
"createOptions": {}
}
}
}
}
},
"$edgeHub": {
"properties.desired": {
"schemaVersion": "1.0",
"routes": {
"moduleToWebApp": "FROM /messages/modules/IotEdgeModule1/outputs/temp INTO BrokeredEndpoint(\"/modules/TestWebApp/inputs/mytemp\")",
"sensorToIotEdgeModule1": "FROM /messages/modules/SimulatedTemperatureSensor/outputs/temperatureOutput INTO BrokeredEndpoint(\"/modules/TestWebApp/inputs/mytemp\")"
},
"storeAndForwardConfiguration": {
"timeToLiveSecs": 7200
}
}
},
"AzureBlobStorageonIoTEdge": {
"properties.desired": {
"deviceToCloudUploadProperties": {
"uploadOn": true,
"uploadOrder": "OldestFirst",
"deleteAfterUpload": true,
"storageContainersForUpload": {
"abc": {
"target": "cba"
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment