HeliosDB CI/CD Pipeline Quick Start Guide
HeliosDB CI/CD Pipeline Quick Start Guide
Quick reference for developers and DevOps engineers
Table of Contents
- Local Development
- Running CI Pipeline Locally
- Creating a Release
- Deploying to Production
- Monitoring Deployments
- Troubleshooting
1. Local Development
Build and Run with Docker
# Build the Docker imagedocker build -t heliosdb:local -f Dockerfile.cicd .
# Run locallydocker run -p 5432:5432 -p 3306:3306 -p 8443:8443 heliosdb:localBuild and Run with Docker Compose
# Start HeliosDB with monitoring stackdocker-compose -f docker-compose.cicd.yml --profile monitoring up -d
# Start with replicationdocker-compose -f docker-compose.cicd.yml --profile replication --profile monitoring up -d
# View logsdocker-compose -f docker-compose.cicd.yml logs -f heliosdb
# Stop and removedocker-compose -f docker-compose.cicd.yml down -vLocal Testing
# Run unit testscargo test --workspace --all-features
# Run with coveragecargo install cargo-llvm-covcargo llvm-cov --workspace --all-features --htmlopen target/llvm-cov/html/index.html
# Run benchmarkscargo bench --workspace
# Security auditcargo install cargo-auditcargo audit
# Check formattingcargo fmt --all -- --check
# Run clippycargo clippy --workspace --all-features --all-targets -- -D warnings2. Running CI Pipeline Locally
Using Act (GitHub Actions locally)
# Install actbrew install act # macOS# orcurl https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash
# Run the CI pipelineact push
# Run specific jobact -j build-and-test
# Run with specific eventact pull_requestManual Smoke Tests
# Make scripts executable (if not already)chmod +x scripts/ci/*.sh
# Run smoke tests./scripts/ci/smoke-tests.sh localhost:8443
# Run comprehensive tests./scripts/ci/comprehensive-smoke-tests.sh staging
# Verify connectivity./scripts/ci/verify-connectivity.sh localhost3. Creating a Release
Automatic Release (Recommended)
# 1. Update version in Cargo.tomlsed -i 's/version = "4.0.0"/version = "4.0.1"/' Cargo.toml
# 2. Commit changesgit add Cargo.tomlgit commit -m "chore: bump version to 4.0.1"git push origin main
# 3. Create and push taggit tag v4.0.1git push origin v4.0.1
# This triggers the release-automated.yml workflowManual Release via GitHub UI
- Go to Actions → Automated Release Pipeline
- Click Run workflow
- Select:
- Version:
v4.0.1 - Release type:
patch(orminor/major)
- Version:
- Click Run workflow
Verify Release
# Check GitHub release pageopen https://github.com/heliosdb/heliosdb/releases
# Pull Docker imagedocker pull heliosdb/heliosdb:4.0.1
# Verify imagedocker run --rm heliosdb/heliosdb:4.0.1 /opt/heliosdb/bin/heliosdb-server --version4. Deploying to Production
Blue-Green Deployment
- Go to Actions → Deploy to Production
- Click Run workflow
- Select:
- Deployment strategy:
blue-green - Environment:
production - Version:
v4.0.1orlatest
- Deployment strategy:
- Click Run workflow
- Monitor deployment in Actions tab
Canary Deployment
- Go to Actions → Deploy to Production
- Click Run workflow
- Select:
- Deployment strategy:
canary - Environment:
production - Version:
v4.0.1
- Deployment strategy:
- Click Run workflow
Canary Phases:
- 10% traffic → 10 minutes monitoring
- 50% traffic → 10 minutes monitoring
- 100% traffic → Final validation
Rollback
If deployment fails, rollback is automatic. Manual rollback:
# Using GitHub CLIgh workflow run deploy-production.yml \ -f deployment_strategy=blue-green \ -f environment=production \ -f version=v4.0.0 # Previous stable version5. Monitoring Deployments
GitHub Actions UI
- Go to Actions tab
- Select running workflow
- View real-time logs
- Check job summaries
Prometheus Metrics
# Access Prometheus UI (if using docker-compose)open http://localhost:9091
# Query metricshttp_requests_totalheliosdb_query_duration_secondsprocess_cpu_seconds_totalGrafana Dashboards
# Access Grafana UIopen http://localhost:3000
# Default credentialsUsername: adminPassword: adminCloudWatch (AWS Deployments)
# View ECS service logsaws logs tail /ecs/heliosdb-production --follow
# Check service healthaws ecs describe-services \ --cluster heliosdb-production \ --services heliosdb-service6. Troubleshooting
Build Failures
Problem: Build fails with “out of memory”
Solution:
# Increase Docker memory limitdocker system prune -a# Update Docker Desktop settings: Memory → 8GB+
# Or build with reduced parallelismCARGO_BUILD_JOBS=2 cargo build --releaseProblem: Dependency conflicts
Solution:
# Update Cargo.lockcargo update
# Or clean and rebuildcargo cleancargo build --workspace --all-featuresTest Failures
Problem: Flaky integration tests
Solution:
# Run with increased timeoutRUST_TEST_TIMEOUT=300 cargo test --workspace
# Run specific test with outputcargo test --package heliosdb-storage test_name -- --nocaptureProblem: Coverage below 95%
Solution:
# Identify uncovered codecargo llvm-cov --workspace --all-features --htmlopen target/llvm-cov/html/index.html
# Add tests for uncovered functionsDeployment Failures
Problem: Health check fails
Solution:
# Check endpoint manuallycurl http://your-endpoint:8443/health
# Check logsdocker logs heliosdb-primary
# Or AWS ECSaws logs tail /ecs/heliosdb-production --followProblem: Database migration fails
Solution:
# Connect to databasepsql -h your-endpoint -p 5432 -U postgres
# Check migration statusSELECT * FROM schema_migrations;
# Rollback and retrySecurity Scan Failures
Problem: Vulnerability detected
Solution:
# Check advisory detailscargo audit
# Update dependenciescargo update
# Or ignore advisory (with justification)echo "[advisories]" >> deny.tomlecho "ignore = [\"RUSTSEC-2024-XXXX\"]" >> deny.tomlDocker Image Issues
Problem: Image too large
Solution:
# Analyze layersdocker history heliosdb:latest
# Use multi-stage build (already implemented in Dockerfile.cicd)# Ensure build cache is workingdocker build --cache-from heliosdb:latest -t heliosdb:latest -f Dockerfile.cicd .Quick Commands Cheat Sheet
# Developmentdocker-compose up -d # Start locallycargo test --workspace # Run testscargo llvm-cov --workspace --html # Coverage report
# CI/CDgit tag v4.0.1 && git push origin v4.0.1 # Trigger releaseact push # Test CI locally./scripts/ci/smoke-tests.sh localhost:8443 # Smoke test
# Deploymentgh workflow run deploy-production.yml # Deploy via CLIdocker pull heliosdb/heliosdb:latest # Pull latest imagedocker-compose -f docker-compose.cicd.yml up # Local deployment
# Monitoringopen http://localhost:9091 # Prometheusopen http://localhost:3000 # Grafanadocker-compose logs -f heliosdb # View logs
# Troubleshootingcargo clean && cargo build # Clean rebuilddocker system prune -a # Clean Dockercargo audit # Security checkEnvironment Variables Reference
Docker
HELIOSDB_POSTGRES_PORT=5432HELIOSDB_MYSQL_PORT=3306HELIOSDB_HTTP_PORT=8443HELIOSDB_ORACLE_PORT=1521HELIOSDB_METRICS_PORT=9090HELIOSDB_BIND_ADDR=0.0.0.0HELIOSDB_DATA_DIR=/var/lib/heliosdb/dataRUST_LOG=infoCI/CD
CARGO_TERM_COLOR=alwaysRUST_BACKTRACE=1CARGO_INCREMENTAL=0CARGO_NET_RETRY=10RUSTUP_MAX_RETRIES=10Useful Links
- Documentation: Full Implementation Report
- GitHub Actions: Workflows Directory
- Docker Files: Dockerfile.cicd, docker-compose.cicd.yml
- Scripts: scripts/ci/
- Configuration: cliff.toml, prometheus.yml
Last Updated: November 24, 2025
Version: 1.0
Maintainer: HeliosDB DevOps Team