Skip to main content

Cross-cloud GPU provisioning CLI โ€” save 60% on compute with parallel multi-cloud arbitrage

Project description

๐Ÿš€ Terradev CLI - Cross-Cloud Compute Optimization Platform

Parallel provisioning and orchestration for cross-cloud optimized compute.

Terradev operates faster than any sequential tool by orders of magnitude to find and stage datasets, then deploy optimal compute instances across multiple cloud providers simultaneously.


๐ŸŽฏ Overview

Terradev is a CLI tool that fits as a set of procurement heuristics in-between tools like Grafana, Kubernetes and cloud-compute providers. It combines parallel quoting, latency testing, parallelized data storage, and automated containerized deployment to save developers running portable workloads 20%+ on compute costs.

๐Ÿš€ Key Features

  • ๐Ÿ”„ Parallel Provisioning: Query all cloud providers simultaneously for optimal pricing
  • ๐Ÿ’ฐ Cost Optimization: Save 20%+ on compute costs through intelligent provider selection
  • ๐ŸŒ Multi-Cloud Support: AWS, GCP, Azure, RunPod, VastAI, Lambda Labs, CoreWeave, TensorDock
  • โšก Real-Time Quoting: Get instant quotes from all providers in parallel
  • ๐Ÿ“Š Analytics & Insights: Comprehensive cost analytics and optimization recommendations
  • ๐Ÿณ Container Orchestration: Automated deployment and management
  • ๐Ÿ“ฆ Dataset Staging: Parallel dataset staging across regions for optimal access
  • ๐Ÿ”’ Secure Credential Management: Encrypted storage of cloud provider credentials

๐Ÿ› ๏ธ Installation

Prerequisites

  • Python 3.9+
  • Cloud provider accounts and API keys
  • Docker (for containerized deployments)

Quick Install

# Clone the repository
git clone https://github.com/terradev/terradev-cli.git
cd terradev-cli

# Install dependencies
pip install -r requirements.txt

# Install CLI
pip install -e .

Verify Installation

terradev --version
terradev --help

๐Ÿ”ง Configuration

Initial Setup

# Configure your cloud providers
terradev configure --provider aws --region us-east-1
terradev configure --provider gcp --region us-central1
terradev configure --provider runpod

# View current configuration
terradev configure

Supported Providers

Provider GPU Types Regions Features
AWS A100, V100, H100 Global Spot instances, on-demand
GCP A100, V100, T4 Global Preemptible instances
Azure A100, V100 Global Spot instances
RunPod RTX4090, A100 Global GPU cloud platform
VastAI A100, RTX4090 Global Marketplace
Lambda Labs A100, RTX6000 Global AI cloud
CoreWeave A100, RTX4090 Global Kubernetes
TensorDock RTX4090, A100 Global GPU marketplace

๐Ÿš€ Quick Start

1. Get Real-Time Quotes

# Get quotes for A100 GPUs across all providers
terradev quote --gpu-type A100 --parallel 8

# Filter by specific providers and regions
terradev quote --gpu-type V100 --providers aws gcp runpod --region us-east-1

2. Provision Instances

# Provision optimal A100 instances
terradev provision --gpu-type A100 --count 2 --max-price 3.0

# Dry run to see what would be provisioned
terradev provision --gpu-type RTX4090 --count 1 --dry-run

3. Manage Instances

# View all instances
terradev status

# Manage specific instance
terradev manage --instance-id aws_i-1234567890abcdef --action status
terradev manage --instance-id runpod_abc123 --action stop

4. Stage Datasets

# Stage dataset across multiple regions
terradev stage --dataset "my-training-data" --target-regions us-east-1 us-west-2 eu-west-1

5. Execute Commands

# Execute commands on instances
terradev execute --instance-id aws_i-1234567890abcdef --command "nvidia-smi"

๐Ÿ“Š Advanced Features

Cost Analytics

# View cost analytics for the last 30 days
terradev analytics --days 30 --format table

# Get JSON output for integration
terradev analytics --days 7 --format json

Automatic Optimization

# Run cost optimization recommendations
terradev optimize

Dataset Management

# Stage with compression
terradev stage --dataset "large-dataset.zip" --compression high --target-regions us-east-1

# Stage to specific cloud regions
terradev stage --dataset "training-images" --target-regions us-east-1 eu-west-1 asia-east-1

๐ŸŒ API Integration

Environment Variables

export TERRADEV_CONFIG_PATH="$HOME/.terradev/config.json"
export TERRADEV_AUTH_PATH="$HOME/.terradev/auth.json"
export TERRADEV_LOG_LEVEL="INFO"

Configuration File

{
  "default_providers": ["aws", "gcp", "runpod"],
  "parallel_queries": 6,
  "max_price_threshold": 10.0,
  "preferred_regions": ["us-east-1", "us-west-2", "eu-west-1"],
  "optimization_settings": {
    "price_weight": 0.4,
    "latency_weight": 0.2,
    "reliability_weight": 0.3,
    "availability_weight": 0.1
  }
}

๐Ÿ”’ Security

Credential Management

Terradev uses encrypted credential storage:

# Credentials are encrypted at rest
ls ~/.terradev/
# config.json  auth.json

# Backup credentials securely
terradev backup --file my-backup.json

# Restore credentials
terradev restore --file my-backup.json

Security Features

  • ๐Ÿ” Encrypted Storage: All credentials encrypted with Fernet
  • ๐Ÿ”‘ Secure Key Management: Automatic key generation and rotation
  • ๐Ÿ›ก๏ธ Permission Control: Role-based access to cloud resources
  • ๐Ÿ“‹ Audit Trail: Complete audit log of all operations
  • ๐Ÿ”„ Token Rotation: Automatic API key rotation support

๐Ÿ“ˆ Performance

Parallel Processing

Terradev achieves 4-6x faster provisioning through parallel processing:

# Sequential approach (slow)
# Provider 1: 2.5s โ†’ Provider 2: 2.3s โ†’ Provider 3: 2.7s = 7.5s total

# Terradev parallel approach (fast)
# Provider 1: 2.5s โ†˜
# Provider 2: 2.3s โ†’ 2.7s total (fastest provider)
# Provider 3: 2.7s โ†—

Cost Savings

Typical cost savings with Terradev:

  • AWS Spot vs On-Demand: 60-70% savings
  • Multi-Cloud Arbitrage: 15-25% savings
  • Regional Optimization: 10-20% savings
  • Dataset Staging: 50-80% egress cost reduction

๐Ÿณ Docker Integration

Containerized Deployment

# Build Docker image
docker build -t terradev-cli .

# Run with mounted credentials
docker run -v ~/.terradev:/root/.terradev terradev-cli quote --gpu-type A100

Kubernetes Deployment

apiVersion: batch/v1
kind: Job
metadata:
  name: terradev-provision
spec:
  template:
    spec:
      containers:
      - name: terradev
        image: terradev-cli:latest
        command: ["terradev", "provision", "--gpu-type", "A100"]
        volumeMounts:
        - name: config
          mountPath: /root/.terradev
      volumes:
      - name: config
        secret:
          secretName: terradev-config

๐Ÿ“Š Monitoring & Analytics

Real-Time Monitoring

# Monitor provisioning progress
terradev status --watch

# Get detailed analytics
terradev analytics --days 30 --detailed

Integration with Grafana

Terradev provides metrics for Grafana dashboards:

  • Cost Metrics: Real-time cost tracking
  • Performance Metrics: Provisioning speed and success rates
  • Utilization Metrics: GPU utilization and availability
  • Savings Metrics: Cost savings and optimization impact

๐Ÿ”ง Troubleshooting

Common Issues

Authentication Errors

# Check credentials
terradev configure

# Re-authenticate
terradev configure --provider aws --api-key YOUR_KEY --secret-key YOUR_SECRET

Provider Connection Issues

# Test provider connectivity
terradev quote --provider aws --gpu-type A100 --dry-run

# Check logs
terradev --verbose status

Instance Provisioning Failures

# Check instance status
terradev manage --instance-id INSTANCE_ID --action status

# View detailed error logs
terradev --verbose provision --gpu-type A100 --dry-run

Debug Mode

# Enable verbose logging
terradev --verbose quote --gpu-type A100

# Debug specific provider
terradev --verbose quote --provider aws --gpu-type A100

๐Ÿค Contributing

Development Setup

# Clone repository
git clone https://github.com/terradev/terradev-cli.git
cd terradev-cli

# Create virtual environment
python -m venv venv
source venv/bin/activate  # Linux/Mac
# or
venv\Scripts\activate  # Windows

# Install development dependencies
pip install -r requirements-dev.txt

# Install in development mode
pip install -e .

Running Tests

# Run all tests
pytest

# Run specific test
pytest tests/test_providers.py

# Run with coverage
pytest --cov=terradev_cli

Adding New Providers

  1. Create provider class in terradev_cli/providers/
  2. Implement BaseProvider interface
  3. Register in ProviderFactory
  4. Add tests
  5. Update documentation

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ†˜ Support

Getting Help

Feature Requests

We welcome feature requests! Please:

  1. Check existing issues
  2. Use the feature request template
  3. Provide detailed requirements
  4. Include use cases and examples

๐Ÿ—บ๏ธ Roadmap

Upcoming Features

  • ๐ŸŒ Web Dashboard: Web-based management interface
  • ๐Ÿ“ฑ Mobile App: iOS and Android applications
  • ๐Ÿ”Œ Plugin System: Extensible plugin architecture
  • ๐Ÿค– AI Optimization: ML-based cost optimization
  • ๐Ÿ“Š Advanced Analytics: Predictive cost analysis
  • ๐Ÿ”— API Gateway: RESTful API for integration
  • ๐Ÿ“ˆ Real-Time Monitoring: Live dashboard and alerts

Provider Expansion

  • Oracle Cloud: OCI GPU instances
  • IBM Cloud: IBM GPU offerings
  • Alibaba Cloud: Alibaba GPU instances
  • DigitalOcean: DO GPU droplets
  • Hetzner Cloud: Hetzner GPU servers

๐ŸŽ‰ Success Stories

Case Studies

Machine Learning Startup

  • Problem: High GPU costs on single cloud provider
  • Solution: Terradev multi-cloud optimization
  • Result: 35% cost reduction with improved performance

Research Institution

  • Problem: Slow sequential provisioning
  • Solution: Parallel provisioning with Terradev
  • Result: 6x faster instance deployment

Enterprise ML Team

  • Problem: Complex multi-cloud management
  • Solution: Unified Terradev interface
  • Result: 50% reduction in management overhead

๐Ÿš€ Get Started Now

Ready to save 20%+ on your compute costs?

# Install Terradev
pip install terradev-cli

# Configure your providers
terradev configure --provider aws --region us-east-1

# Get your first quotes
terradev quote --gpu-type A100

# Start saving!
terradev provision --gpu-type A100 --count 2

๐Ÿš€ Terradev - Parallel provisioning for cross-cloud compute optimization


Built for developers who demand the best performance at the best price.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

terradev_cli-1.1.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

terradev_cli-1.1.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file terradev_cli-1.1.0.tar.gz.

File metadata

  • Download URL: terradev_cli-1.1.0.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for terradev_cli-1.1.0.tar.gz
Algorithm Hash digest
SHA256 e92df27a93b63243c6e276c9f30e0614cb31b6b9af204c70a85dfbeb5a1686ed
MD5 948011bfe93189caab6648ac6fe76b0a
BLAKE2b-256 0d9bc2df5d95d08e2befb293fa5af44ccfc85653b571b5713479130c1986a547

See more details on using hashes here.

File details

Details for the file terradev_cli-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: terradev_cli-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for terradev_cli-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 24fc46008960f109c2cbd543e11eb51e4b7123a177a0b5f3fd2d88cf9b8de1b0
MD5 0499fc28d8764307165679f6920670f0
BLAKE2b-256 9482467b50bc63d2747178d260a36286fd125c310a8d37245936f12f2ccdf514

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page