Skip to main content
Version: v2.9.1

Warm Start/Stop Mechanism

The Warm Start/Stop feature is a game-changing capability that dramatically reduces cluster startup time from 6–7 minutes to under one minute. This feature optimizes resource management and enhances productivity for data teams working with frequent cluster operations.

Overview

Traditional cluster startup involves full bootstrapping processes including:

  • Infrastructure provisioning
  • Software installation and configuration
  • Service initialization
  • Network setup and security configuration

The Warm Start mechanism pre-stages these components, allowing clusters to resume operations almost instantaneously.

Technical Architecture

The Warm Start/Stop mechanism leverages several advanced technologies:

  • Container Orchestration: Pre-built container images with runtime environments
  • State Persistence: Cluster metadata and configuration snapshots
  • Network Virtualization: Pre-configured virtual networks and security groups
  • Resource Pooling: Dedicated resource pools for faster allocation
  • Cache Management: Intelligent caching of frequently used libraries and datasets

Supported Platforms

Cloud ProviderWarm Start SupportCold Start TimeWarm Start Time
AWSFull Support6-8 minutes30-60 seconds
Google CloudFull Support5-7 minutes25-45 seconds
AzureFull Support6-9 minutes35-55 seconds
On-PremisesLimited8-12 minutes2-3 minutes

Why Use Warm Start?

Performance Benefits

  • 85% Faster Startup: Clusters ready in under 1 minute vs. 6-7 minutes
  • Improved Productivity: Eliminate waiting time for data scientists and engineers
  • Better Resource Utilization: Quick scaling for dynamic workloads
  • Faster Iteration Cycles: Rapid development and testing workflows

Cost Optimization

  • Reduced Idle Costs: Pay only for active compute time
  • Efficient Resource Management: Start/stop clusters based on demand
  • Time Savings: Less billable time spent waiting for cluster readiness

Business Impact

For Data Teams

  • Increased Velocity: 3-5x faster experiment cycles
  • Better Resource Planning: Predictable startup times enable better scheduling
  • Enhanced Collaboration: Teams can quickly spin up shared environments
  • Reduced Frustration: Eliminates waiting time bottlenecks

For Organizations

  • Cost Control: 40-70% reduction in unnecessary compute spend
  • Operational Efficiency: Streamlined cluster lifecycle management
  • Scalability: Handle burst workloads more effectively
  • Compliance: Better audit trails with defined start/stop cycles

Use Cases

Development & Testing

  • Interactive Notebooks: Jupyter, Zeppelin for data exploration
  • Development Workflows: Testing and debugging data pipelines
  • A/B Testing: Quick environment provisioning for experiments
  • Prototyping: Rapid iteration on ML models and algorithms

Production Scenarios

  • Scheduled Jobs: Batch processing with time-sensitive requirements
  • On-Demand Analytics: Ad-hoc analysis and reporting
  • Event-Driven Processing: Respond to data ingestion triggers
  • Disaster Recovery: Quick failover to backup environments

Educational & Training

  • Classroom Environments: Instant lab setup for students
  • Training Sessions: Consistent environments for workshops
  • Certification Programs: Standardized testing environments

How Warm Start Works

Prerequisites

Before using Warm Start, ensure you have:

  • Active Yeedu account with cluster creation permissions
  • Configured cloud environment (AWS, GCP, or Azure)
  • Sufficient quota in your cloud provider account
  • Valid billing information and spending limits configured
  • Network connectivity and firewall rules properly set up

Initial Cluster Creation

  1. Access Cluster Dashboard

    • Navigate to Clusters in the main menu
    • Click + Create Cluster button
  2. Configure Cluster Settings

    Required Fields:
    • Cluster Name: Unique identifier (3-50 characters)
    • Cloud Environment: AWS | GCP | Azure
    • Runtime Version: Latest stable recommended
    • Compute Type: CPU | GPU | Memory-optimized
    • Instance Configuration: Select based on workload

    Advanced Options:
    • Node Pool Configuration: Min/Max nodes, auto-scaling
    • Storage: Persistent volumes, encryption settings
    • Networking: VPC, subnets, security groups
    • Access Control: RBAC, service accounts
    • Monitoring: Logging, metrics collection
  3. Advanced Configuration (Optional)

    Network Settings

    VPC Configuration:
    - Custom VPC or default
    - Subnet selection (public/private)
    - NAT Gateway configuration
    - Internet Gateway settings

    Security Groups:
    - Inbound rules (SSH, HTTP, HTTPS, custom ports)
    - Outbound rules (internet access, internal communication)
    - Source IP restrictions

    Storage Configuration

    Persistent Storage:
    - Volume type (SSD, HDD, NVMe)
    - Size and IOPS configuration
    - Encryption at rest
    - Backup and snapshot policies

    Ephemeral Storage:
    - Local SSD configuration
    - Temporary data handling
  4. Create and Bootstrap

    • Click Create Cluster
    • Initial bootstrapping: ~6-7 minutes
    • Status progression: "Initializing" → "Provisioning" → "Configuring" → "Running"

Starting a Warm Cluster

Once a cluster has been created and stopped, subsequent starts use the Warm Start mechanism:

  1. Navigate to Cluster

    • Go to Cluster Dashboard
    • Locate your stopped cluster (Status: "Stopped")
    • Review cluster information and last activity
  2. Pre-Start Validation

    • System automatically checks:
      • Cloud provider quotas
      • Network connectivity
      • Storage availability
      • Security group validity
  3. Initiate Warm Start

    • Click the Start button
    • Cluster status changes to "Starting"
    • Real-time progress indicators show:
      • Resource allocation (10-15 seconds)
      • Container startup (15-20 seconds)
      • Service initialization (10-15 seconds)
      • Health checks (5-10 seconds)
    • Ready in < 60 seconds

Stopping a Cluster

To preserve the warm state for future starts:

  1. Pre-Stop Preparation

    • System saves current state and configuration
    • Running processes are notified of impending shutdown
    • Data synchronization to persistent storage
  2. Graceful Stop

    • Click Stop button
    • Running jobs are terminated with configurable grace period
    • Resources are deallocated but state is preserved
    • Cleanup operations initiated
  3. Post-Stop Operations

    • Compute instances stopped
    • Storage snapshots created
    • Network configuration preserved
    • Billing meters stopped

Cluster States and Transitions

State Diagram

graph LR
A[Creating] --> B[Running]
B --> C[Stopping]
C --> D[Stopped]
D --> E[Starting]
E --> B
B --> F[Failed]
C --> F
E --> F
F --> G[Retry]
G --> B
D --> H[Delete]

Detailed State Descriptions

StateDescriptionDurationActions AvailableNext States
CreatingInitial cluster setup and bootstrapping6-7 minutesView Logs, CancelRunning, Failed
RunningActive and ready for workloadsIndefiniteStop, Monitor, Access, ScaleStopping, Failed
StoppingGraceful shutdown in progress30-60 secondsView Logs, Force StopStopped, Failed
StoppedInactive but warm-start readyIndefiniteStart, Delete, Configure, CloneStarting, Deleted
StartingWarm start in progress< 60 secondsView Logs, CancelRunning, Failed
FailedError state requiring attentionUntil resolvedRetry, Delete, View Logs, SupportRunning, Deleted
ScalingAuto-scaling operation in progress1-3 minutesMonitor, Stop ScalingRunning, Failed

Performance Comparison

Traditional vs. Warm Start

MetricCold StartWarm StartImprovement
Startup Time6-7 minutes< 1 minute85% faster
Resource AllocationFull bootstrapPre-stagedInstant
Cost EfficiencyHigh idle timePay-per-use60-80% savings
User ExperienceLong waitsNear-instantSignificant
Network Setup2-3 minutes5-10 seconds95% faster
Service Discovery1-2 minutes< 5 seconds90% faster

Performance Metrics by Workload Type

Data Science Workloads

Jupyter Notebooks:
- Cold Start: 7-8 minutes
- Warm Start: 35-45 seconds
- Libraries Loading: Cached (2x faster)

Apache Spark:
- Cold Start: 8-10 minutes
- Warm Start: 45-60 seconds
- Driver Startup: Pre-configured (5x faster)

MLflow Experiments:
- Cold Start: 6-7 minutes
- Warm Start: 30-40 seconds
- Model Registry Access: Instant

Best Practices

When to Use Warm Start/Stop

Recommended for:

  • Interactive development sessions
  • Batch jobs with specific time windows
  • Cost-sensitive environments
  • Frequent start/stop patterns
  • Development and testing workflows
  • Educational environments
  • Proof-of-concept projects

Not recommended for:

  • Long-running production workloads (>8 hours continuous)
  • Clusters with complex state dependencies
  • Critical always-on services
  • Real-time streaming applications
  • High-availability requirements

Optimization Tips

1. Cluster Sizing Strategy

Development Environments:
- Use smaller instances (t3.medium, t3.large)
- Enable auto-scaling (min: 1, max: 5)
- Set conservative resource limits

Production Workloads:
- Right-size based on historical usage
- Use memory-optimized instances for in-memory processing
- Configure predictive scaling based on patterns

Cost Optimization:
- Use Spot instances where appropriate
- Implement multi-tier storage strategy
- Monitor and alert on cost thresholds

2. Scheduling Best Practices

Peak Hours Awareness:
- Start clusters before peak demand
- Stop clusters after business hours
- Use multiple time zones for global teams

Workload Patterns:
- Daily batch jobs: Start 30 min before job time
- Interactive sessions: On-demand start/stop
- Development: Schedule based on team working hours

Resource Planning:
- Monitor cloud provider capacity
- Use multiple availability zones
- Plan for maintenance windows

3. Data Management Strategy

Persistent Data:
- Use external object storage (S3, GCS, Azure Blob)
- Implement proper backup and versioning
- Consider data locality for performance

Temporary Data:
- Use cluster local storage for processing
- Implement cleanup policies
- Monitor disk usage and alerts

Caching Strategy:
- Pre-load frequently used datasets
- Use distributed caching (Redis, Memcached)
- Implement intelligent cache invalidation

Security Considerations

Access Control

Authentication:
- Use IAM roles and service accounts
- Implement multi-factor authentication
- Regular credential rotation

Authorization:
- Role-based access control (RBAC)
- Principle of least privilege
- Resource-level permissions

Network Security:
- Private VPC deployment
- Security groups and NACLs
- VPN or bastion host access

Compliance Requirements

Data Privacy:
- Encryption in transit and at rest
- Data residency compliance
- Access logging and monitoring

Audit Requirements:
- Cluster lifecycle logging
- User activity tracking
- Change management records

Industry Standards:
- SOC 2 Type II compliance
- GDPR data protection
- HIPAA for healthcare data

Monitoring and Alerts

Key Metrics to Track

Performance Metrics

Startup Performance:
- warm_start_duration_seconds
- cold_start_duration_seconds
- start_success_rate_percentage
- resource_allocation_time_seconds

Operational Metrics:
- cluster_uptime_hours
- cpu_utilization_percentage
- memory_utilization_percentage
- disk_io_operations_per_second
- network_throughput_mbps

Cost Metrics:
- hourly_compute_cost_dollars
- storage_cost_per_gb_month
- data_transfer_cost_dollars
- total_cluster_cost_daily

Business Metrics

Productivity Impact:
- developer_wait_time_minutes
- job_completion_success_rate
- time_to_first_result_minutes
- experiments_per_day_count

Resource Efficiency:
- resource_utilization_score
- cost_per_computation_unit
- idle_time_percentage
- scaling_efficiency_ratio

Setting Up Alerts

Configure comprehensive monitoring and alerting:

Critical Alerts (Immediate Response):
- cluster_start_failure: > 2 failures in 10 minutes
- warm_start_slow: > 2 minutes startup time
- cost_spike: > 150% of daily budget
- security_breach: unauthorized access attempts

Warning Alerts (Business Hours):
- high_resource_usage: > 85% CPU/Memory for 15 minutes
- storage_full: > 90% disk usage
- scaling_issues: auto-scaling failures
- performance_degradation: > 20% slower than baseline

Informational Alerts:
- daily_cost_summary: end of day cost report
- weekly_usage_report: resource utilization trends
- maintenance_notifications: scheduled updates

Monitoring Dashboard Setup

Grafana Dashboard Example

Panels:
1. Cluster Status Overview
- Current state of all clusters
- Start/stop success rates
- Average startup times

2. Performance Metrics
- CPU/Memory utilization over time
- Network I/O trends
- Storage usage patterns

3. Cost Analysis
- Daily/weekly/monthly spending
- Cost per cluster breakdown
- Budget vs. actual spending

4. User Activity
- Active sessions count
- Most used cluster types
- Peak usage hours

Troubleshooting

Common Issues and Solutions

Startup Issues

Issue: Slow warm start (>2 minutes)

Root Causes & Solutions:

  • Cloud Provider Issues: Check service status pages, try different regions
  • Network Connectivity: Verify VPC configuration, security groups, DNS resolution
  • Resource Quotas: Check compute, storage, and network quotas in cloud console
  • Image Loading: Verify container registry access, check image sizes
  • Configuration Errors: Review cluster templates, validate all parameters

Issue: Cluster fails to start

Diagnostic Steps:

  • Check Logs: Review detailed error logs in dashboard
  • Verify Credentials: Ensure cloud provider credentials are valid and have required permissions
  • Resource Availability: Confirm sufficient quota and capacity in target region
  • Network Configuration: Test connectivity, security group rules, subnet configuration
  • Dependencies: Check external service dependencies (databases, APIs)

Issue: Partial cluster start (some nodes fail)

Resolution Process:

  • Node-level Diagnostics: Check individual node logs and status
  • Resource Constraints: Verify per-node resource requirements
  • Zone Availability: Try different availability zones
  • Instance Types: Consider alternative instance types
  • Auto-healing: Enable automatic node replacement

Runtime Issues

Issue: Data loss after stop/start cycle

Prevention & Recovery:

  • External Storage: Always use persistent storage for important data
  • Backup Verification: Test backup and restore procedures regularly
  • State Management: Implement proper application state persistence
  • Data Replication: Use multi-zone data replication for critical data
  • Recovery Procedures: Document and test data recovery processes

Issue: Performance degradation after warm start

Optimization Techniques:

  • Cache Warming: Pre-load application caches and datasets
  • Connection Pooling: Maintain persistent database connections
  • JIT Compilation: Allow time for Java/Scala JIT optimization
  • Memory Management: Tune garbage collection and memory settings
  • Load Balancing: Distribute traffic evenly across nodes

Cost and Billing Issues

Issue: Unexpected cost spikes

Investigation Process:

  • Usage Analysis: Review detailed billing reports and usage patterns
  • Resource Rightsizing: Check for oversized instances or over-provisioning
  • Auto-scaling Review: Verify auto-scaling policies and thresholds
  • Data Transfer Costs: Monitor inter-region and internet data transfer
  • Storage Costs: Review storage usage and retention policies

Advanced Troubleshooting

Log Analysis

System Logs Location

# Cluster startup logs
/var/log/yeedu/cluster-startup.log

# Application logs
/var/log/yeedu/applications/

# System metrics
/var/log/yeedu/metrics/

# Audit logs
/var/log/yeedu/audit/

Common Log Patterns

# Successful warm start
grep "WARM_START_COMPLETE" /var/log/yeedu/cluster-startup.log

# Resource allocation issues
grep "RESOURCE_ALLOCATION_ERROR" /var/log/yeedu/cluster-startup.log

# Network connectivity problems
grep "NETWORK_TIMEOUT" /var/log/yeedu/cluster-startup.log

Performance Profiling

CPU Profiling

# Check CPU usage during startup
top -p $(pgrep -f yeedu-cluster)

# Profile CPU-intensive processes
perf record -g -p $(pgrep -f yeedu-cluster)
perf report

Memory Analysis

# Monitor memory usage
watch -n 1 'free -h && echo "---" && ps aux --sort=-%mem | head -10'

# Check for memory leaks
valgrind --tool=memcheck --leak-check=full yeedu-process

Network Diagnostics

# Test network connectivity
ping -c 4 api.yeedu.io
traceroute api.yeedu.io

# Check port accessibility
nmap -p 22,80,443,8080 cluster-endpoint

# Monitor network traffic
netstat -tuln | grep LISTEN
ss -tuln

Getting Help

Self-Service Resources

Direct Support Channels

  • Email Support: <support@yeedu.io> (24-48 hour response)
  • Live Chat: Available in dashboard (business hours)
  • Phone Support: Enterprise customers only
  • Support Tickets: Create via dashboard for detailed tracking

Support Levels

Support TierResponse TimeChannelsCoverage
CommunityBest effortForum, docsCommunity-driven
Standard24-48 hoursEmail, chatBusiness hours
Premium4-8 hoursEmail, chat, phoneExtended hours
Enterprise1-2 hoursAll channels + dedicated24/7 coverage

Frequently Asked Questions

General Questions

Q: What happens to my data during a warm start/stop cycle?

A: Data handling depends on storage type:

  • Persistent Volumes: Data is preserved across stop/start cycles
  • Local Storage: Data is lost when cluster stops (use for temporary/cache data only)
  • External Storage: Data in S3, GCS, etc. remains accessible
  • Databases: External databases maintain connectivity after restart

Q: Are there any limitations on cluster types that support warm start?

A: Warm start compatibility:

  • Fully Supported: Standard compute clusters, data science environments, Spark clusters
  • Limited Support: Clusters with custom images, complex networking, GPU clusters
  • Not Supported: Bare metal clusters, legacy configurations, some specialized workloads

Q: How much can I realistically save with warm start/stop?

A: Savings depend on usage patterns:

  • Development Teams: 60-80% cost reduction typical
  • Data Science Projects: 40-70% savings common
  • Batch Processing: 50-85% reduction possible
  • Mixed Workloads: 45-65% average savings

Example calculation:

Traditional: 24/7 running = 720 hours/month
With Warm Start: 8 hours/day × 22 days = 176 hours/month
Savings: (720 - 176) / 720 = 75.5% cost reduction

Technical Questions

Q: Can I automate start/stop operations?

A: Yes, multiple automation options:

API Integration

# Using curl
curl -X POST https://api.yeedu.io/v1/clusters/my-cluster/start \
-H "Authorization: Bearer $TOKEN"

# Using CLI
yeedu cluster start my-cluster --wait

# Using Python SDK
from yeedu import Client
client = Client(token="your-token")
client.clusters.get("my-cluster").start()

Scheduling Options

  • Cron Jobs: Schedule via system cron or Kubernetes CronJobs
  • Cloud Functions: Trigger via AWS Lambda, Google Cloud Functions
  • CI/CD Pipelines: Integrate with GitLab, GitHub Actions, Jenkins
  • Infrastructure as Code: Terraform, CloudFormation, Pulumi

Q: What about disaster recovery and backup strategies?

A: Comprehensive DR planning:

Backup Strategy

Daily Backups:
- Configuration snapshots
- Persistent volume backups
- Database dumps
- User data exports

Cross-Region Replication:
- Primary: us-west-2
- Secondary: us-east-1
- Tertiary: eu-west-1

Recovery Procedures:
- RTO (Recovery Time Objective): < 30 minutes
- RPO (Recovery Point Objective): < 4 hours
- Automated failover available

Q: How does warm start work with auto-scaling?

A: Auto-scaling integration:

Startup Behavior

  • Initial nodes start using warm start mechanism
  • Additional nodes scale using fast provisioning
  • Scaling policies remain active during start/stop

Best Practices

Auto-scaling Configuration:
min_nodes: 1 # Always have base capacity
max_nodes: 10 # Prevent cost runaway
scale_up_threshold: 70% # CPU utilization trigger
scale_down_threshold: 30% # Conservative scale down
cooldown_period: 300s # Prevent flapping

Billing and Cost Questions

Q: Do I pay for stopped clusters?

A: Billing breakdown:

  • Compute: No charge while stopped
  • Storage: Persistent volumes continue to incur charges
  • Network: No data transfer charges while stopped
  • Snapshots: Minimal cost for state preservation
  • Reserved Resources: Some cloud providers may charge for reserved capacity

Q: How can I monitor and control costs?

A: Cost management tools:

Built-in Monitoring

Cost Controls:
- Daily spending alerts
- Monthly budget limits
- Automatic stop on threshold
- Cost allocation by team/project

Reporting Features:
- Real-time cost dashboard
- Weekly/monthly cost reports
- Usage trend analysis
- Cost optimization recommendations

Third-party Integration

  • CloudHealth, Cloudability for advanced cost management
  • Native cloud billing APIs (AWS Cost Explorer, GCP Billing)
  • Custom dashboards with Grafana, DataDog

Security and Compliance Questions

Q: Is warm start secure? What about data residency?

A: Security measures:

Data Protection

Encryption:
- Data encrypted at rest (AES-256)
- Data encrypted in transit (TLS 1.3)
- Key management via cloud KMS

Access Control:
- Multi-factor authentication required
- Role-based access control (RBAC)
- API key rotation policies
- Audit logging enabled

Data Residency:
- Cluster and data stay in selected region
- No cross-border data movement
- Compliance with local regulations

Compliance Certifications

  • SOC 2 Type II
  • ISO 27001
  • GDPR compliant
  • HIPAA eligible configurations

Q: How do you handle secrets and sensitive data during start/stop?

A: Secrets management:

During Operation

Secret Storage:
- Integration with cloud secret managers
- Encrypted environment variables
- Temporary credential rotation
- No secrets in logs or snapshots

Start/Stop Process:
- Secrets retrieved fresh on each start
- No persistent secret storage in cluster
- Automatic cleanup on stop
- Audit trail for all secret access

Performance Benchmarks

Real-World Performance Data

Startup Time Benchmarks

Small Clusters (1-3 nodes):
Cold Start: 4.2 ± 0.8 minutes
Warm Start: 28 ± 8 seconds
Improvement: 89%

Medium Clusters (4-10 nodes):
Cold Start: 6.7 ± 1.2 minutes
Warm Start: 45 ± 12 seconds
Improvement: 88%

Large Clusters (11-50 nodes):
Cold Start: 8.9 ± 2.1 minutes
Warm Start: 72 ± 18 seconds
Improvement: 86%

Enterprise Clusters (50+ nodes):
Cold Start: 12.5 ± 3.4 minutes
Warm Start: 95 ± 25 seconds
Improvement: 87%

Performance by Cloud Provider

AWS Performance:
Region: us-west-2
Average Warm Start: 34 seconds
95th Percentile: 52 seconds
99th Percentile: 78 seconds

Google Cloud Performance:
Region: us-central1
Average Warm Start: 29 seconds
95th Percentile: 45 seconds
99th Percentile: 68 seconds

Azure Performance:
Region: West US 2
Average Warm Start: 38 seconds
95th Percentile: 58 seconds
99th Percentile: 85 seconds

Workload-Specific Benchmarks

Data Science Workloads

Jupyter Lab Environment:
Libraries: pandas, numpy, matplotlib, scikit-learn
Cold Start: 7.2 minutes (including library installation)
Warm Start: 31 seconds (pre-cached libraries)

Performance Impact:
- First cell execution: 2.1 seconds (vs 45 seconds cold)
- Large dataset loading: 15% faster (cached data paths)
- Plot rendering: 40% faster (pre-loaded backends)

Apache Spark Cluster:
Configuration: 5 worker nodes, Spark 3.4.0
Cold Start: 8.7 minutes
Warm Start: 52 seconds

Job Performance:
- Spark context creation: < 5 seconds (vs 90 seconds)
- First job execution: 25% faster
- Shuffle operations: 15% improvement (optimized configs)

Big Data Processing

Apache Kafka Cluster:
Configuration: 3 brokers, 6 partitions per topic
Cold Start: 5.8 minutes
Warm Start: 34 seconds

Throughput Impact:
- Message ingestion: Ready immediately (vs 2-3 min ramp-up)
- Consumer lag: Minimal during restart
- Replication: Faster catch-up due to cached metadata

Elasticsearch Cluster:
Configuration: 3 master nodes, 6 data nodes
Cold Start: 9.1 minutes
Warm Start: 67 seconds

Performance Benefits:
- Index warming: Pre-warmed caches
- Query performance: 30% faster initial queries
- Shard allocation: Optimized based on historical patterns

Integration Examples

CI/CD Pipeline Integration

GitHub Actions Workflow

# .github/workflows/data-pipeline.yml
name: Data Pipeline Test
on:
push:
branches: [main, develop]

jobs:
test-pipeline:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Start Test Cluster
run: |
curl -X POST \
-H "Authorization: Bearer ${{ secrets.YEEDU_TOKEN }}" \
-H "Content-Type: application/json" \
https://api.yeedu.io/v1/clusters/test-cluster/start

# Wait for cluster ready
./scripts/wait-for-cluster.sh test-cluster 300

- name: Run Tests
run: |
./scripts/run-data-pipeline-tests.sh

- name: Stop Test Cluster
if: always()
run: |
curl -X POST \
-H "Authorization: Bearer ${{ secrets.YEEDU_TOKEN }}" \
https://api.yeedu.io/v1/clusters/test-cluster/stop

Jenkins Pipeline

// Jenkinsfile
pipeline {
agent any

environment {
YEEDU_TOKEN = credentials('yeedu-api-token')
CLUSTER_NAME = "jenkins-test-${BUILD_NUMBER}"
}

stages {
stage('Setup Cluster') {
steps {
script {
sh """
# Create ephemeral cluster
yeedu cluster create ${CLUSTER_NAME} \
--template data-science-medium \
--auto-stop 2h

# Wait for ready
yeedu cluster wait ${CLUSTER_NAME} --timeout 300
"""
}
}
}

stage('Run Pipeline') {
steps {
sh """
# Execute data pipeline
yeedu job submit ${CLUSTER_NAME} \
--script pipeline/main.py \
--wait
"""
}
}

stage('Validation') {
steps {
sh """
# Run validation tests
yeedu job submit ${CLUSTER_NAME} \
--script tests/validate_output.py \
--wait
"""
}
}
}

post {
always {
sh "yeedu cluster delete ${CLUSTER_NAME} --force"
}
}
}

Infrastructure as Code

Terraform Example

# main.tf
terraform {
required_providers {
yeedu = {
source = "yeedu-io/yeedu"
version = "~> 1.0"
}
}
}

provider "yeedu" {
api_token = var.yeedu_api_token
}

# Data Science Environment
resource "yeedu_cluster" "data_science" {
name = "ds-team-${var.environment}"

compute {
cloud_provider = "aws"
region = "us-west-2"
instance_type = "m5.xlarge"
min_nodes = 1
max_nodes = 5
}

runtime {
image = "yeedu/datascience:python3.9"
jupyter = true
packages = [
"pandas>=1.5.0",
"numpy>=1.24.0",
"scikit-learn>=1.2.0",
"matplotlib>=3.6.0"
]
}

storage {
persistent_volume_size = "100GB"
backup_enabled = true
backup_schedule = "0 2 * * *" # Daily at 2 AM
}

auto_scheduling {
start_cron = "0 8 * * 1-5" # 8 AM weekdays
stop_cron = "0 18 * * 1-5" # 6 PM weekdays
}

tags = {
Environment = var.environment
Team = "data-science"
CostCenter = "engineering"
}
}

# Spark Processing Cluster
resource "yeedu_cluster" "spark_processing" {
name = "spark-${var.environment}"

compute {
cloud_provider = "aws"
region = "us-west-2"
instance_type = "r5.2xlarge" # Memory optimized
min_nodes = 2
max_nodes = 20
}

runtime {
image = "yeedu/spark:3.4.0"
spark_config = {
"spark.sql.adaptive.enabled" = "true"
"spark.sql.adaptive.coalescePartitions.enabled" = "true"
"spark.serializer" = "org.apache.spark.serializer.KryoSerializer"
}
}

auto_scaling {
metric = "cpu_utilization"
target = 70
scale_up = 2
scale_down = 1
cooldown = 300
}

depends_on = [yeedu_cluster.data_science]
}

# Output cluster endpoints
output "data_science_endpoint" {
value = yeedu_cluster.data_science.endpoint
}

output "spark_endpoint" {
value = yeedu_cluster.spark_processing.endpoint
}

Monitoring Integration

Prometheus Configuration

# prometheus.yml
global:
scrape_interval: 15s

scrape_configs:
- job_name: 'yeedu-clusters'
static_configs:
- targets: ['api.yeedu.io:443']
scheme: https
metrics_path: /v1/metrics
bearer_token: 'your-api-token'
scrape_interval: 30s
params:
format: ['prometheus']

rule_files:
- "yeedu-alerts.yml"

alerting:
alertmanagers:
- static_configs:
- targets:
- alertmanager:9093

Alert Rules

# yeedu-alerts.yml
groups:
- name: yeedu-cluster-alerts
rules:
- alert: ClusterStartupSlow
expr: yeedu_cluster_startup_duration_seconds > 120
for: 0m
labels:
severity: warning
annotations:
summary: "Cluster {{ $labels.cluster_name }} taking too long to start"
description: "Startup time {{ $value }}s exceeds 2 minute threshold"

- alert: ClusterStartupFailure
expr: increase(yeedu_cluster_start_failures_total[5m]) > 0
for: 0m
labels:
severity: critical
annotations:
summary: "Cluster start failures detected"
description: "{{ $value }} cluster start failures in last 5 minutes"

- alert: HighClusterCosts
expr: yeedu_cluster_cost_dollars_daily > 500
for: 15m
labels:
severity: warning
annotations:
summary: "High daily cluster costs: ${{ $value }}"
description: "Cluster {{ $labels.cluster_name }} daily cost exceeding budget"

- alert: ClusterResourcesHigh
expr: yeedu_cluster_cpu_utilization_percent > 85
for: 10m
labels:
severity: warning
annotations:
summary: "High resource utilization on {{ $labels.cluster_name }}"
description: "CPU utilization {{ $value }}% for 10+ minutes"

Next Steps

Learning Path

  1. Quick Start: Getting Started Guide
  2. Monitoring: Cluster Monitoring and Metrics
  3. Cost Control: Cost Optimization Strategies
  4. Automation: API and CLI Reference
  5. Advanced: Infrastructure as Code

Additional Resources