Skip to content

About

Standalone Rust build service with BuildKit and external OCI registry integrations

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Apollo Buildd

Apollo Buildd is a standalone Rust service for admitting build requests, tracking durable build operations, and coordinating OCI image builds.

client
  │ versioned Unix-socket API
  ▼
Apollo Buildd ── upstream BuildKit worker
                       │
                       ├── RUN steps → external Apollo Sandboxd / Firecracker
                       ├── candidate artifacts → Apollo Artifactd
                       └── remote cache → external OCI Distribution registry

Buildd owns build-request admission and operation state. The upstream Go BuildKit adapter provides Dockerfile and OCI build machinery; it is not a second public service. Customer commands run through the external Sandboxd execution boundary. Artifactd remains responsible for artifact admission, integrity, and publication. Buildd does not embed a registry or depend on a registry implementation.

The registry connection uses the standard OCI Distribution API. Operators can run CNCF Distribution with any supported storage backend, including Cloudflare R2. BuildKit uses the configured registry for shared cache import and export. For deployable images, BuildKit sends the candidate to Artifactd, which validates and publishes it to the configured artifact repository. See external registry configuration.

Requirements

  • Linux for the daemon and BuildKit worker.
  • Rust 1.93 or newer and the Cargo toolchain.
  • Go toolchain matching buildkit-worker/go.mod to build the adapter.
  • External Apollo Sandboxd and Apollo Artifactd services for image builds.
  • util-linux unshare and setpriv, newuidmap and newgidmap, and administrator-provisioned subordinate UID/GID ranges for the rootless BuildKit metadata worker.

Build

Build the Rust workspace and the Go adapter separately:

cargo build --locked --release --bins
(cd buildkit-worker && go build -trimpath -buildvcs=false \
  -o ../target/release/buildkit-worker ./cmd/buildkit-worker)
(cd buildkit-worker && go build -trimpath -buildvcs=false \
  -o ../target/release/buildkit-solve ./cmd/buildkit-solve)

The release binaries are target/release/apollo-buildd and target/release/apollo-buildctl. Install executables and AppArmor policy through the packaging files under packaging/.

Run the administrative service

Create a private state directory owned by the service account, then start the daemon with the UID allowed to use its administrative socket:

install -d -m 0700 /var/lib/apollo-buildd/state
target/release/apollo-buildd \
  --state-directory /var/lib/apollo-buildd/state \
  --allow-uid 1000

The daemon supports CAPABILITIES, PREPARE, SUBMIT, INSPECT, CANCEL, and EVENTS requests. Requests are bounded JSON frames over a Unix stream; administrative payloads are sent on standard input rather than command-line arguments:

printf '%s' '{"version":1,"operation_id":"capabilities-1","action":{"action":"CAPABILITIES"}}' |
  target/release/apollo-buildctl request \
    --socket /var/lib/apollo-buildd/state/buildd.sock

Build submission requires the private BuildKit worker and driver plus runtime configuration for Sandboxd and Artifactd. The standard service command above starts the administrative API without enabling execution. See registry configuration and AppArmor setup when deploying the worker.

Configuration and credentials

Registry coordinates use generic fields: registry_url, cache_repository, and artifact_repository. Registry credentials are provided through a private inherited file descriptor; they are not stored in the registry configuration or emitted in logs. Never place credentials in command-line arguments or source control.

Project layout

  • src/ — Buildd service, build orchestration, and state management.
  • crates/ — versioned Buildd and Artifactd protocol clients.
  • buildkit-worker/ — small Go adapter around upstream BuildKit.
  • packaging/ — installable service and AppArmor policy files.
  • docs/REGISTRY.md — external OCI registry integration.

License

Apollo Buildd is licensed under the MIT License. See LICENSE.

About

Standalone Rust build service with BuildKit and external OCI registry integrations

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages