pkg/cmd/roachprod-centralized/examples/README.md
This directory contains practical configuration examples for different deployment scenarios.
📚 Related Documentation:
| File | Description | Use Case |
|---|---|---|
development-config.yaml | Configuration with production examples | Development and production deployment |
cloud_config.yaml.example | Cloud provider configuration | Multi-cloud setup |
docker-compose.yml | Docker Compose setup | Local testing with CockroachDB |
Using memory storage (fastest setup):
# development-config.yaml already uses memory storage by default
./dev run roachprod-centralized api --config examples/development-config.yaml
Using Docker Compose (with CockroachDB):
cd examples/
docker-compose up
# Copy and edit development-config.yaml with production settings (see comments in file)
cp examples/development-config.yaml /etc/roachprod/config.yaml
# Edit: enable authentication, configure CockroachDB, set workers, etc.
./dev run roachprod-centralized api --config /etc/roachprod/config.yaml
All configuration values can be overridden with environment variables:
# Override log level
export ROACHPROD_LOG_LEVEL=debug
# Override database configuration
export ROACHPROD_DATABASE_TYPE=cockroachdb
export ROACHPROD_DATABASE_URL="postgresql://user:pass@host:26257/db?sslmode=require"
# Override API settings
export ROACHPROD_API_PORT=9090
export ROACHPROD_API_AUTHENTICATION_METHOD=disabled
Copy the cloud config example:
cp cloud_config.yaml.example ~/.roachprod/cloud_config.yaml
Edit with your credentials:
Set environment variable:
export ROACHPROD_CLOUD_CONFIG=~/.roachprod/cloud_config.yaml
For production deployments, manage secrets securely:
# Create secrets directory
mkdir -p secrets/
echo "postgresql://..." > secrets/database-url
cp gcp-key.json secrets/
The service exposes Prometheus metrics on port 8081 (default):
curl http://localhost:8081/metrics
Available metric types:
authentication.disabled: false)sslmode=require)Port conflicts:
# Change API port
export ROACHPROD_API_PORT=9090
Database connection failures:
# Test with memory storage
export ROACHPROD_DATABASE_TYPE=memory
Authentication errors:
# Disable for development
export ROACHPROD_API_AUTHENTICATION_METHOD=disabled
Cloud provider configuration:
# Enable debug logging
export ROACHPROD_LOG_LEVEL=debug
# Check logs for detailed error messages
# API health
curl http://localhost:8080/health
# Metrics endpoint
curl http://localhost:8081/metrics
# Database connectivity (if using CockroachDB)
cockroach sql --url="postgresql://..." --execute="SELECT 1;"
For additional help: