0

Situation:

I hit a throttling limitation of free tier IoT Hub where deployments are limited to 10. This limitation is described here enter image description here

Failed deployments manifests itself

Problem(s):

The error is pretty clear, but what I'm struggling to understand is whether the limit of 10 gets reset at some point or is that it - no more automatic deployments for this Edge device, ever? The documentation seems to suggest that paid for IoT Hubs have 100 deployment limit, what do developers do after that?

I have created a deployment manifest and attempted to deploy it manually through VS Code. This has worked, but then within very short period of time (~5min) the Hub reverts to previous configuration. Is that because of this limit or its a property of the Hub to e.g. revert to previous configuration if newly deployed modules fail for one reason or another?

nlv
  • 791
  • 7
  • 28

1 Answers1

0

You should not create a deployment for every device. Rather target deployments to a set of devices: https://learn.microsoft.com/en-us/azure/iot-edge/how-to-deploy-at-scale?view=iotedge-2020-11

To modify a single device, follow the steps outlined here: https://learn.microsoft.com/en-us/azure/iot-edge/how-to-deploy-modules-portal?view=iotedge-2020-11 This allows you to change every one of your max 1 million devices per IoT Hub individually. But is this really needed?

Best practice: Use layered deployments (https://learn.microsoft.com/en-us/azure/iot-edge/module-deployment-monitoring?view=iotedge-2020-11) and change settings via Module Twin, if needed.

René
  • 151
  • 7
  • Thanks, @René. Not sure how the first link contributes to an answer. I have no issue targeting devices. The Second link - I've tried and it doesn't work because of the limitation I described. The answer in [this](https://stackoverflow.com/questions/61817920/iotedge-module-twin-update-gets-reverted) question seems to suggest Layered deployments as your last link. But this doesn't answer why/how can I do manual deployment using VS Code or whether that's not possible now because of the throttling – nlv Jul 26 '22 at 17:06
  • The difference is between deployments (where limits apply) and configuration changes (where limits to not apply). https://learn.microsoft.com/en-us/cli/azure/iot/edge/deployment?view=azure-cli-latest for deployments and https://learn.microsoft.com/en-us/cli/azure/iot/edge?view=azure-cli-latest#az-iot-edge-set-modules for configuration (aka. set modules). – René Jul 27 '22 at 06:22
  • Thanks, @René. Just so I understood you correctly, what youre saying is since I hit the limit I wont be able to use automatic deployment (scale or layered) but I can still update the modules through *az iot edge set-modules* command? – nlv Jul 27 '22 at 12:48
  • Ive used *az iot edge set-modules* command. It set modules on the device and it reverted back a minute later to what it was in the last automatic deployment. – nlv Jul 27 '22 at 13:21
  • Automated deployments will overwrite manually set configurations. See https://learn.microsoft.com/en-us/azure/iot-edge/module-deployment-monitoring?view=iotedge-2020-11#target-condition for conditions. – René Jul 28 '22 at 09:35