This file provides guidance to Qoder (qoder.com) when working with code in this repository.
Accelerated Container Image is an implementation of DADI (Data Accelerator for Disaggregated Infrastructure) for container acceleration. It provides overlaybd, a block-device-based remote image format that enables on-demand image fetching without downloading entire images.
The project consists of:
- overlaybd-snapshotter: A containerd snapshotter plugin for overlaybd images (compatible with OCI images)
- convertor: Standalone userspace tool to convert OCI images to overlaybd format
- ctr: Modified containerd CLI tool with overlaybd support
- dadi-snapshotter: Legacy snapshotter implementation (separate subdirectory with own go.mod)
Build all binaries:
makeBuild specific binaries (generates to bin/ directory):
make binariesInstall binaries to system:
make install
# Installs to /opt/overlaybd/snapshotter
# Config to /etc/overlaybd-snapshotterClean build artifacts:
make cleanRun tests (requires root):
go test ${GO_TESTFLAGS} ${GO_PACKAGES} -test.rootOr via Makefile:
make testLint with golangci-lint (configuration in .golangci.yml):
golangci-lint runEnabled linters: misspell, unconvert, staticcheck (with custom checks), gofmt, goimports
The snapshotter handles multiple storage types (pkg/snapshot/overlay.go):
- storageTypeNormal: Standard OCI tar.gz layers (overlayfs lowerdir)
- storageTypeLocalBlock: Overlaybd format layers
- storageTypeRemoteBlock: Remote layers with on-demand pulling
- storageTypeLocalLayer: Tar file layers requiring overlaybd-turboOCI meta generation
pkg/snapshot/: Core snapshotter implementation
- overlay.go: Main snapshotter logic with storage type handling
- storage.go: Snapshot storage management
pkg/convertor/: Image conversion logic
pkg/label/: Label handling for image metadata
pkg/types/: Common type definitions
cmd/overlaybd-snapshotter/: Snapshotter service entry point
- Default config: /etc/overlaybd-snapshotter/config.json
- Exposes gRPC API via unix socket
cmd/convertor/: Standalone converter CLI
- Uses cobra for CLI parsing
- Supports MySQL database backend for layer deduplication
- Multiple output formats: overlaybd, turboOCI, fastoci
cmd/ctr/: Modified containerd ctr CLI with overlaybd support
Overlaybd outputs virtual block devices that can be formatted with multiple filesystems (ext4, xfs, etc.). The device is exposed through TCMU (TCM userspace).
- OCI layers (tar.gz) → Overlaybd blocks + index (Zfile format)
- Virtual block device exposed via TCMU → Filesystem mount
- On-demand read: index lookup → remote blob fetch
Location: /etc/overlaybd-snapshotter/config.json
root: Overlaybd data directory (default: /var/lib/overlaybd/)address: Unix socket pathrwMode: Read-write mode settingautoRemoveDev: Auto-remove deviceswritableLayerType: Type for writable layersasyncRemove: Async snapshot removal
Add to /etc/containerd/config.toml:
[proxy_plugins.overlaybd]
type = "snapshot"
address = "/run/overlaybd-snapshotter/overlaybd.sock"- Go >= 1.26.x
- containerd >= 2.0.x
- runc >= 1.0
- overlaybd backstore (https://github.com/containerd/overlaybd)
Start snapshotter:
sudo bin/overlaybd-snapshotterRestart containerd after config changes:
sudo systemctl restart containerdUsing convertor tool:
docker run overlaybd-convertor -r registry.hub.docker.com/library/redis -i 6.2.1 -o 6.2.1_obd_newOr use the ctr rpull command for remote pull with conversion.
Images have annotation containerd.io/snapshot/overlaybd/version:
0.1.0: All overlaybd versions0.1.0-turbo.ociv1: overlaybd >= v0.6.10
Follow the seven rules:
- Separate subject from body with blank line
- Limit subject line to 50 characters
- Capitalize subject line
- No period at end of subject
- Use imperative mood in subject
- Wrap body at 72 characters
- Explain what and why vs. how
Sign commits with:
git commit -s