Prerequisites
Before you build, ensure the following are installed and accessible on yourPATH:
- Go 1.22 or later —
go versionshould reportgo1.22or higher - Docker — the Docker daemon must be running; the agent connects to
unix:///var/run/docker.sockby default - PostgreSQL 16 — required by
cara-server; you can run it locally with Docker - Make — used to invoke the build targets in the
Makefile
Build from source
Clone the repository, then runmake build from the project root:
make build compiles all three binaries and places them in bin/:
What each binary does
cara-server
The control-plane API server and controller manager. Accepts project manifests, runs the scheduler, and exposes a REST API at
/api/v1/. Requires PostgreSQL.cara-agent
The per-node reconciler. Registers with
cara-server, sends periodic heartbeats, and creates or removes Docker containers to match the desired state.caractrl
The command-line client. Sends requests to
cara-server. Supports apply, get, delete, port-forward, and version subcommands.Environment configuration
Each component is configured through environment variables (or aconfig.yaml / .env file in the working directory). Environment variables take precedence.
- cara-server
- cara-agent
- caractrl
| Variable | Default | Description |
|---|---|---|
DATABASE_URL | (required) | PostgreSQL DSN, e.g. postgresql://user:pass@host:5432/db?sslmode=disable |
HOST | 0.0.0.0 | Address the server listens on |
PORT | 8080 | Port the server listens on |
DEBUG | false | Enable verbose debug logging |
OTEL_COLLECTOR_URL | (optional) | OTLP gRPC endpoint for OpenTelemetry traces |