Best practices for deploying in a test bench and real world

rfuentess 45 Reputation points
2025-07-28T11:04:43.7466667+00:00

Hi!

I'm still a rookie to Microsoft's Azure IoT Edge, and I'm trying to understand the best approach for what I think is a typical scenario:

We want to deploy 3 machines: IoT-A, IoT-B, and IoT-C. Since these machines aren't easily accessible, I want to first deploy to a controlled test bench where I have 3 replicas: Shadow-A, Shadow-B, and Shadow-C.

My question is about handling manifest deployment across these machines. Should I:

  1. Create 6 IoT Edge devices and use regular expressions to select the deviceId? (e.g., IoT-* for final release, Shadow-* for local testing)
  2. Or should I use tags instead?

Also, is it possible to have 2 machines with the same deviceID running simultaneously?

Azure IoT Edge
Azure IoT Edge
An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
{count} votes

Accepted answer
  1. Jose Benjamin Solis Nolasco 4,986 Reputation points
    2025-07-28T15:18:12.54+00:00

    Well, some advice about how you could archive

    Device Identity: NEVER Reuse deviceIds Simultaneously

    • You cannot have two devices (test and prod) with the same deviceId registered and connected at the same time.
    • Azure IoT Hub enforces unique deviceIds, and if two devices connect with the same ID, the second will disconnect the first.
    • Use separate deviceIds for test (e.g. Shadow-A) and prod (IoT-A).

    Create Separate IoT Edge Devices for Test and Prod

    • Yes — create 6 separate IoT Edge devices:
    • Test bench: Shadow-A, Shadow-B, Shadow-C
    • Real world: IoT-A, IoT-B, IoT-C

    Use Deployment Manifests per Environment

    Create separate IoT Edge deployment manifests:

    test-bench-deployment.json

    production-deployment.json

    These can be mostly the same, but you can customize:

    Module versions (e.g. latest vs stable)

    Environment variables

    • Logging or debug modules

    😊 If my answer helped you resolve your issue, please consider marking it as the correct answer. This helps others in the community find solutions more easily. Thanks!


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.