How pantos06/iotedge works
IoT Edge runs cloud-configured workloads on devices and provides the local hub that connects modules and synchronizes device state with IoT Hub. The principal deployment path is desired configuration through the Edge Agent’s planning and command layers into a container/runtime backend, followed by reported status. Edge Hub separately handles device protocols, routing, connectivity, and twin synchronization; the security daemon supplies device-side management and certificate capabilities. The tree supports these subsystem boundaries, while sampled source confirms selected twin, persistence, identity, and Kubernetes operations; links between unsampled components are limited to documented product roles.
Main entry points: commands Runtime Commands · DependencyManager.cs Hub Service · Agent.cs Agent Controller · TwinManager.cs Twin Synchronization
Components 25
Edge Agent
- Agent Service
edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Service/Program.cs - Agent Controller
edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/Agent.cs - Config Sources
edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/configsources - Deployment Planner
edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/planners - Plan Runner
edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/planrunners - Runtime Commands
edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/commands - Docker Backend
edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Docker - Kubernetes Backend
edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Kubernetes - Edgelet Backend
edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Edgelet - Module Identities
edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.IoTHub/ModuleIdentityLifecycleManager.cs - Status Reporting
edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.IoTHub/reporters/IoTHubReporter.cs
Edge Hub
- Hub Service
edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Service/DependencyManager.cs - Device Protocols
edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Amqp - Message Routing
edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core - Cloud Connectivity
edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.CloudProxy/DeviceConnectivityManager.cs - Twin Synchronization
edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/TwinManager.cs - MQTT Session State
edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Mqtt/SessionStateStoragePersistenceProvider.cs
Security Daemon
- Edgelet Daemon
edgelet - Certificate Manager
edgelet/edgelet-http/src/certificate_manager.rs - Module Management API
edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Edgelet/ModuleManagementHttpClient.cs
State Storage
- RocksDB Store
edge-util/src/Microsoft.Azure.Devices.Edge.Storage.RocksDb/ColumnFamilyStorageRocksDbWrapper.cs - Twin Store
edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/twin/StoringTwinManager.cs - Entity Store
edge-util/src/Microsoft.Azure.Devices.Edge.Storage.RocksDb/ColumnFamilyStorageRocksDbWrapper.cs
Other components
- IoT Hub
- Edge Device
Connections 26
- IoT Hub → Config Sources: provides desired config
- Config Sources → Agent Controller: supplies config
- Agent Service → Agent Controller: hosts
- Agent Controller → Deployment Planner: requests plan
- Deployment Planner → Plan Runner: produces plan
- Plan Runner → Runtime Commands: executes commands
- Runtime Commands → Docker Backend: dispatches runtime
- Runtime Commands → Kubernetes Backend: dispatches runtime
- Runtime Commands → Edgelet Backend: dispatches runtime
- Kubernetes Backend → Module Management API: manages modules
- Edgelet Backend → Module Management API: calls API
- Module Identities → IoT Hub: manages identities
- Agent Controller → Status Reporting: reports status
- Status Reporting → IoT Hub: sends status
- Edge Device → Device Protocols: connects using
- Device Protocols → Hub Service: enters hub
- Hub Service → Message Routing: dispatches messages
- Hub Service → Cloud Connectivity: uses connectivity
- Hub Service → Twin Synchronization: coordinates twin state
- Twin Synchronization → IoT Hub: syncs twin
- Twin Synchronization → Twin Store: reads and updates
- MQTT Session State → Entity Store: persists sessions
- Twin Store → RocksDB Store: stores records
- Entity Store → RocksDB Store: stores records
- Edgelet Daemon → Certificate Manager: manages certificates
- Edgelet Daemon → Module Management API: serves management