Utility scripts for development, testing, and deployment.
Run tests for the workspace with various options.
./scripts/run-tests.sh # Run all workspace tests
./scripts/run-tests.sh server # Run orbit-server tests only
./scripts/run-tests.sh time-series # Run time series tests
./scripts/run-tests.sh ignored # Run slow/ignored tests
./scripts/run-tests.sh help # Show all optionsRun before committing to ensure code quality.
./scripts/pre-commit.shThis runs:
cargo fmt --all- Format codecargo clippy --all-targets -- -D warnings- Lint checkscargo test --workspace --verbose- Run testscargo build --workspace- Build project
Start the full multi-protocol database server (PostgreSQL + Redis + REST + gRPC).
./scripts/start-multiprotocol-server.sh # Development mode
./scripts/start-multiprotocol-server.sh --prod # Production mode
./scripts/start-multiprotocol-server.sh --config path/to/config.tomlPorts:
- PostgreSQL: 5432
- Redis: 6379
- REST API: 8080
- gRPC: 50051
Quick start for Redis-compatible server only.
./scripts/start-orbit-redis.shStarts orbit-server with development mode, focusing on Redis (port 6379).
Start a multi-node local cluster for integration and BDD testing.
./scripts/start-cluster.sh # Start 3-node cluster (default)
./scripts/start-cluster.sh 5 # Start 5-node cluster
./scripts/start-cluster.sh --stop # Stop running cluster
./scripts/start-cluster.sh --status # Show cluster status
./scripts/start-cluster.sh --logs 1 # Tail logs for node 1
./scripts/start-cluster.sh --clean # Stop and clean all data
./scripts/start-cluster.sh --help # Show all optionsPort Allocation (per node):
| Node | Redis | PostgreSQL | MySQL | CQL | HTTP | gRPC | Metrics |
|---|---|---|---|---|---|---|---|
| 1 | 6379 | 5432 | 3306 | 9042 | 8080 | 50051 | 9090 |
| 2 | 6380 | 5433 | 3307 | 9043 | 8081 | 50052 | 9091 |
| 3 | 6381 | 5434 | 3308 | 9044 | 8082 | 50053 | 9092 |
| N | +N-1 | +N-1 | +N-1 | +N-1 | +N-1 | +N-1 | +N-1 |
Cluster Data:
- Data directory:
./cluster-data/ - Logs:
./cluster-data/logs/ - PIDs:
./cluster-data/pids/
Usage with Integration Tests:
# 1. Start the cluster
./scripts/start-cluster.sh
# 2. Run integration tests against the cluster
python3 tests/run_integration_tests.py --host localhost --resp-port 6379
# 3. Run BDD tests
cd tests && behave
# 4. Stop the cluster when done
./scripts/start-cluster.sh --stopLightweight load balancer for cluster testing using the built-in orbit-lb Rust binary.
No external dependencies required!
./scripts/start-cluster-lb.sh # Start LB for 3-node cluster
./scripts/start-cluster-lb.sh 5 # Start LB for 5-node cluster
./scripts/start-cluster-lb.sh --stop # Stop load balancer
./scripts/start-cluster-lb.sh --status # Show LB status
./scripts/start-cluster-lb.sh --logs # Tail LB logsThe load balancer is built from orbit/server/src/bin/orbit-lb.rs - a simple ~200 line
round-robin TCP proxy. It's automatically built when you run the script.
Usage with Load Balancer:
# 1. Start cluster with LB-compatible ports
./scripts/start-cluster.sh --with-lb
# 2. Start load balancer
./scripts/start-cluster-lb.sh
# 3. Connect using default ports (LB handles routing)
redis-cli -p 6379 # Connects via LB
psql -h 127.0.0.1 -p 5432 -U orbit # Connects via LB
# 4. HAProxy stats available at http://127.0.0.1:9999
# 5. Stop everything
./scripts/start-cluster-lb.sh --stop
./scripts/start-cluster.sh --stopArchitecture:
Client (redis-cli :6379) --> Load Balancer --> Node 1 (:16379)
--> Node 2 (:16380)
--> Node 3 (:16381)
Launcher for the manual CI/CD pipeline.
./scripts/run-ci.shFull manual CI/CD operations.
./scripts/manual-ci-cd.shPrepare Kubernetes secrets for GitHub Actions CI/CD.
./scripts/prepare-secrets.sh staging # For staging environment
./scripts/prepare-secrets.sh production # For production environmentValidate Kubernetes deployment configurations.
./scripts/validate-k8s-deployments.shCheck codebase file organization.
./scripts/check-file-organization.shAdd Jekyll frontmatter to documentation files.
./scripts/add-jekyll-frontmatter.shWhen adding new scripts:
- Make executable:
chmod +x scripts/your-script.sh - Add shebang: Start with
#!/bin/bash - Add error handling: Use
set -efor bash scripts - Document: Add entry to this README
- Test: Verify script works from project root
- Use descriptive names:
verb-noun.shformat - Check for correct directory at start
- Provide helpful error messages
- Use colors for output clarity (but gracefully degrade)
- Test on both macOS and Linux when possible