forked from whispem/minikv
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
142 lines (114 loc) · 3.57 KB
/
Copy pathMakefile
File metadata and controls
142 lines (114 loc) · 3.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
.PHONY: help build test bench clean run-coord run-volume proto fmt clippy docs release-preflight release-preflight-full
help:
@echo "minikv - Makefile targets:"
@echo ""
@echo "Build & Test:"
@echo " make build - Build release binaries (release mode)"
@echo " make test - Run all unit and integration tests"
@echo " make integration - Run integration tests for cluster features"
@echo " make bench - Run Criterion benchmarks for performance"
@echo " make benchmark - Run k6 HTTP benchmarks for API"
@echo ""
@echo "Development:"
@echo " make proto - Generate protobuf code for gRPC APIs"
@echo " make fmt - Format Rust codebase"
@echo " make clippy - Run Rust lints"
@echo " make docs - Generate Rust documentation"
@echo " make pre-commit - Run all checks before commit"
@echo " make release-preflight - Run fast GA preflight checks"
@echo " make release-preflight-full - Run full GA preflight checks"
@echo ""
@echo "Run:"
@echo " make serve - Start local cluster (3 coordinators + 3 volumes)"
@echo " make run-coord - Start a single coordinator node"
@echo " make run-volume - Start a single volume node"
@echo " make smoke - Run smoke tests for basic health"
@echo " make verify - Verify cluster integrity using CLI"
@echo ""
@echo "Docker:"
@echo " make docker-build - Build all Docker images for cluster"
@echo " make docker-up - Start full Docker cluster"
@echo " make docker-down - Stop Docker cluster"
@echo " make docker-logs - View logs from all Docker containers"
@echo ""
@echo "Observability:"
@echo " make otel-up - Start Jaeger, Prometheus, and Grafana stack"
@echo " make otel-down - Stop observability stack"
@echo ""
@echo "Benchmarks:"
@echo " make bench-all - Run all k6 benchmark scenarios"
@echo " make bench-write - Run write-heavy benchmark scenario"
@echo " make bench-read - Run read-heavy benchmark scenario"
@echo ""
@echo "Cleanup:"
@echo " make clean - Clean build artifacts"
@echo ""
build:
cargo build --release
test:
cargo test --all --release
bench:
cargo bench
proto:
cargo build
fmt:
cargo fmt --all
clippy:
cargo clippy --all-targets --all-features -- -D warnings
clean:
cargo clean
rm -rf coord-data/ vol*-data/ vol*-wal/
run-coord:
cargo run --release --bin minikv-coord -- serve \
--id coord-1 \
--bind 0.0.0.0:5000 \
--grpc 0.0.0.0:5001 \
--db ./coord-data
run-volume:
cargo run --release --bin minikv-volume -- serve \
--id vol-1 \
--bind 0.0.0.0:6000 \
--grpc 0.0.0.0:6001 \
--data ./vol1-data \
--wal ./vol1-wal \
--coordinators http://localhost:5000
benchmark:
./scripts/benchmark.sh
docker-build:
docker build -f Dockerfile.coordinator -t minikv-coord:latest .
docker build -f Dockerfile.volume -t minikv-volume:latest .
docker-up:
docker-compose up -d
docker-down:
docker-compose down -v
docker-logs:
docker-compose logs -f
integration:
cargo test --test integration
pre-commit: fmt clippy test
@echo "✓ Pre-commit checks passed!"
# Serve
serve:
./scripts/serve.sh 3 3
smoke:
./scripts/smoke_test.sh
verify:
./scripts/verify.sh
# Observability
otel-up:
cd opentelemetry && docker-compose up -d
otel-down:
cd opentelemetry && docker-compose down -v
# Benchmark scenarios
bench-all:
./bench/run_all.sh
bench-write:
k6 run bench/scenarios/write-heavy.js
bench-read:
k6 run bench/scenarios/read-heavy.js
docs:
cargo doc --no-deps --open
release-preflight:
bash ./scripts/release_ga.sh --fast
release-preflight-full:
bash ./scripts/release_ga.sh