This page provides a quick start guide to get cursus running on your system.
It covers the basic prerequisites, installation methods, and initial verification steps to ensure the broker is operational. For detailed configuration options, see Configuration.
Before running cursus, ensure you have the following installed:
| Requirement | Version | Purpose |
|---|---|---|
| Go | 1.21+ | Required for building from source |
| Docker | 20.10+ | Required for containerized deployment |
| Make | 3.81+ | For using Makefile commands (Optional) |
The fastest way to get cursus running is using Docker Compose:
git clone https://github.com/downfa11-org/cursus
cd cursus
This starts a container with:
docker-compose -f manifests/docker-compose.yml up -d
The container uses the configuration at
manifests/config.yaml and mounts a volume for persistent storage at ./logs.
To build and run cursus from source:
make build
./bin/cursus
// Or run in development mode:
// make run
The make build target invokes three sub-targets:
build-api → builds ./bin/cursusbuild-cli → builds ./bin/cursus-clibuild-bench → builds ./bin/cursus-benchAll builds use CGO_ENABLED=0 and target Linux with static linking via -ldflags="-s -w”.
After starting cursus, verify it’s running correctly:
Health Check
curl http://localhost:9080/health
Expected response: OK with HTTP 200 status.
Metrics Endpoint
curl http://localhost:9100/metrics
Expected response: Prometheus-formatted metrics including:
broker_messages_published_totalbroker_messages_consumed_totalbroker_active_consumersTCP Connection Test
Connect to the broker using netcat:
nc localhost 9000
Then send a command like LIST to verify command processing.
cursus can run in two modes:
This is the standard mode that starts the TCP server:
./bin/cursus
// Or using make:
// make run
The broker process:
cfg.BrokerPortcfg.ExporterPortThis mode provides an interactive command-line interface:
./bin/cursus-cli
// Or using make:
// make cli
The CLI process:
stdin commandsSupports commands: CREATE, DELETE, LIST, SUBSCRIBE, PUBLISH, CONSUME, EXIT
The repository includes a comprehensive Makefile for development tasks:
| Command | Description |
|———|————-|
| make build | Build all binaries (broker, CLI, benchmark) |
| make run | Run broker in development mode |
| make cli | Run CLI in development mode |
| make test | Run unit tests with race detection |
| make bench | Run performance benchmarks |
| make lint | Run golangci-lint |
| make docker | Build Docker image |
| make compose-up | Start docker-compose stack |
| make compose-down | Stop docker-compose stack |
| make clean | Remove build artifacts and test data |
| make coverage | Generate test coverage report |
Now that you have cursus running, you can:
For production deployments, refer to Deployment for best practices and operational considerations