Skip to content

Repository files navigation

Coppice

CI

Coppice is a distributed batch job scheduler for running containerized workloads across a fleet of compute nodes, written in Rust.

Users submit jobs as Docker images with resource requirements, placement constraints, priorities, and quotas. Coppice schedules those jobs onto nodes, supervises execution through per-node agents, tracks state, and stays available through a Raft-replicated control plane. It is built for throughput, fairness, correctness, and debuggability rather than millisecond-level latency — a batch system, not a serverless platform.

Status: early skeleton. The workspace compiles and the architecture is documented, but the crates are stubs — no scheduling, consensus, or execution is implemented yet.

Workspace layout

Coppice is a Cargo workspace of focused crates:

Crate Kind Responsibility
coppice-core lib Shared domain model: ids, resources, jobs, nodes, epochs.
coppice-proto lib Wire protocol: public API and agent–coordinator messages.
coppice-state lib Deterministic replicated state machine and its commands.
coppice-consensus lib Raft integration: replication, elections, snapshots.
coppice-scheduler lib Asynchronous scheduler engine and placement proposals.
coppice-api lib External API surface used by the UI and CLI.
coppice-coordinator bin Control-plane daemon binding consensus, scheduling, and API.
coppice-agent bin Node agent: container execution and reconciliation.
coppice-cli bin (coppice) Command-line client over the public API.

Building

cargo build      # build the whole workspace
cargo test       # run tests
cargo run -p coppice-coordinator
cargo run -p coppice-agent
cargo run -p coppice-cli

The toolchain is pinned by rust-toolchain.toml; rustup picks it up automatically, so local checks run the same compiler and lints as CI. (rust-version in the root Cargo.toml is the separate MSRV claim.) The schema corpus is compiled in-process by protox, so no system protoc is needed.

CI runs exactly these four checks — run them locally to match:

cargo fmt --all --check
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
cargo test --workspace --all-features --locked
scripts/sqlx-prepare.sh --check   # verifies the checked-in sqlx query cache is current

Documentation

Design and architecture documentation lives in docs/ and is meant to be iterated on over time. Good entry points:

License

Licensed under the Apache License, Version 2.0.

About

Batch job scheduler

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages