Scalehub is a comprehensive infrastructure automation and experimentation platform that uses Ansible playbooks to manage the deployment and lifecycle of distributed systems infrastructure. The system is designed to provision, deploy, and manage complex multi-tier applications with monitoring, load generation, and data processing capabilities.
The playbook system is organized into three main tiers that follow a hierarchical deployment pattern:
Purpose: Provisions and configures the foundational infrastructure layer
- Main Playbook:
setup.yaml - Execution Order: First (executed during provision or infrastructure setup)
- Responsibilities:
- Cloud platform provisioning
- Base system configuration
- Network setup
- Security configuration
- Storage provisioning
Purpose: Sets up container orchestration and cluster management
- Main Playbook:
setup.yaml - Execution Order: Second (after infrastructure)
- Responsibilities:
- Kubernetes cluster deployment
- Container runtime configuration
- Cluster networking
- Service mesh setup
- Load balancer configuration
Purpose: Deploys application components and services
- Main Playbook:
setup.yaml - Execution Order: Third (after orchestration)
- Individual Application Playbooks:
base.yaml- Base application serviceskafka.yaml- Apache Kafka message brokerflink.yaml- Apache Flink stream processingmonitoring.yaml- Monitoring stack (Prometheus, Grafana, etc.)storage.yaml- Persistent storage solutionsnetwork.yaml- Network policies and configurationsload_generators.yaml- Load generator testing tools for Kafka and Flinkdata-stream-apps.yaml- Data streaming applicationsysb.yaml- Yahoo Streaming Benchmarktransscale.yaml- Transscale applicationchaos.yaml- Chaos engineering toolsgoldpinger.yaml- Network connectivity testinggitlab.yaml- GitLab CI/CD platform
- Infrastructure Setup └── playbooks/infrastructure/setup (tag: create)
- Lazy Setup (if enabled) ├── Orchestration Setup │ └── playbooks/orchestration/setup (tag: create) └── Application Setup └── playbooks/application/setup (tag: create)
- Deploy:
shub deploy <playbook>(tag: create) - Delete:
shub delete <playbook>(tag: delete) - Reload:
shub reload <playbook>(delete + create)
- Platform destruction (reverse order)
- Cleanup of runtime configurations
- Resource deallocation
- infrastructure/setup: Foundation layer provisioning
- orchestration/setup: Container orchestration setup
- application/base: Essential application services
- application/storage: Persistent storage solutions
- application/network: Network configuration and policies
- application/monitoring: Observability stack
- application/kafka: Message streaming platform
- application/flink: Stream processing engine
- application/data-stream-apps: Custom streaming applications
- application/ysb: Yahoo Streaming Benchmark
- application/load_generators: Load testing infrastructure. Inject load into kafka for flink to process
- application/chaos: Chaos engineering tools
- application/goldpinger: Network connectivity validation
- application/gitlab: Source control and CI/CD platform
- application/transscale: Application scaling experiments
- create: Deploy/install components
- delete: Remove/cleanup components
- reload: Delete and recreate components
- load_generators: Has special handling via
role_load_generators()method - lazy_setup: Enables sequential deployment of all tiers during provisioning
- Layered Architecture: Infrastructure → Orchestration → Applications
- Idempotent Operations: All playbooks support create/delete/reload operations
- Modular Design: Each service has its own dedicated playbook
- Configuration-driven: All deployments controlled via YAML configuration
- Experiment-ready: Built-in support for load testing and benchmarking
- Observable: Comprehensive monitoring and logging integration
- Infrastructure must be provisioned before orchestration
- Orchestration must be ready before application deployment
- Base applications should be deployed before specialized services
- Monitoring should be deployed early for observability
- Storage must be available before stateful applications
This architecture enables scalable, reproducible deployments of complex distributed systems with comprehensive testing and monitoring capabilities.