Architecture
On these pages, Edgelet is the engine. An Edgelet node is the same binary after it joins a cluster.
Overview
Edgelet is the edge engine for Eclipse ioFog. On linux, production ships a two-layer binary:
| Layer | Path | Role |
|---|---|---|
| Thin | /usr/local/bin/edgelet | Download/OTA binary (CGO=0): go:embed zstd bundle, extract orchestration, all operator CLI (EdgeletAPI client), version / help |
| Fat | /var/lib/edgelet/data/current/bin/edgelet | Runtime ELF (CGO=1): supervisor, field agent, process manager, EdgeletAPI server, in-process containerd; --edgelet-containerd-child |
edgelet daemon (including systemd) starts at the thin entry. When containerEngine: edgelet, the thin process lazy-extracts the embedded bundle, then execs the fat binary with the same arguments. Operator commands (edgelet ms …, edgelet deploy …, etc.) run in the thin process and do not require extract.
On darwin and windows, Edgelet is a single monolithic ELF: CLI + daemon, no embed, no two-layer split. Only docker or podman engines are supported on desktop.
The supervisor maintains bidirectional sync with the Controller, reconciles desired microservice state against a pluggable container engine, and exposes the on-device EdgeletAPI for local administration.
All container operations go through a ContainerEngine interface (edgelet, docker, or podman). On linux, all three engines are linked into one binary; selection is runtime via containerEngine in config. On desktop, only docker/podman are allowed.
Linux: thin vs fat dispatch
Lazy extract: On first edgelet daemon with containerEngine: edgelet after the thin binary is replaced (upgrade), the new embed hash unpacks to /var/lib/edgelet/data/<hash>/, verifies bin/edgelet (fat) and auxiliaries, then rotates data/current and data/previous symlinks. After a successful extract, hash directories other than current, previous, and the running fat binary’s tree are removed.
External engines: When containerEngine is docker or podman, the thin daemon does not extract the bundle; it connects to the host engine socket with boot-time retries.
Break-glass: Operators may invoke the fat runtime directly, e.g. /var/lib/edgelet/data/current/bin/edgelet daemon, bypassing thin dispatch (useful for debugging; normal production path remains thin).
Directory layout
.
├── cmd/edgelet/ # Thin entry (linux): CLI + embed + daemon dispatch
│ # Monolithic entry (darwin/windows): CLI + daemon
├── cmd/edgelet-server/ # Fat entry (linux only): daemon + containerd child - not in PATH
├── internal/
│ ├── auth/ # JWT, TLS, EdgeletAPI PKI and token lifecycle
│ ├── buildmeta/ # Platform capability (HasEmbeddedEngine, AllowedEngines)
│ ├── config/ # YAML config load/save, SIGHUP reload