Skip to main content

Rails-like infrastructure management for AWS, Google Cloud, and DigitalOcean

Project description

InfraDSL - The Rails of Modern Infrastructure

"If a dev can't read it and use it in 5 minutes, it's too complex."

InfraDSL brings Rails' "convention over configuration" philosophy to cloud infrastructure. Deploy production-ready systems with the same simplicity as writing business logic.

🚀 The Rails Philosophy for Infrastructure

Convention over ConfigurationDeveloper-First ExperienceFocus on What, Not How

# Deploy a complete microservices stack in 6 lines
GoogleCloud.GKE("production").create()
GoogleCloud.CloudRun("users").container("users", "services/users/").create()
GoogleCloud.CloudRun("products").container("products", "services/products/").create()
GoogleCloud.CloudRun("orders").container("orders", "services/orders/").create()
GoogleCloud.Vm("database").service("postgres").create()

Result: Production infrastructure with auto-scaling, HTTPS, monitoring, and enterprise security.

⚡ Quick Start (One-Line Install)

🎯 Super Quick Install

curl -fsSL https://raw.githubusercontent.com/infradsl/infradsl/main/setup.sh | bash

That's it! The script will:

  • ✅ Install all dependencies (Python, Node.js, Docker)
  • ✅ Set up the Python backend (InfraDSL CLI)
  • ✅ Set up the React frontend (Web Interface)
  • ✅ Configure containerization
  • ✅ Create startup scripts

🚀 Start the Application

cd ~/infradsl
./start-dev.sh    # Development mode with hot reload
# or
./start-prod.sh   # Production mode with containers

Access Points:

Manual Installation (Advanced)

If you prefer manual setup:

# Clone repository
git clone https://github.com/infradsl/infradsl.git
cd infradsl

# Backend setup
cd infradsl
pip install -r requirements.txt
pip install -e .

# Frontend setup  
cd ../client
npm install
npm run dev

# Start backend
cd ../infradsl
python -m infradsl.cli

Authentication

Create cloud provider credentials:

Google Cloud (config/gcp-service-account.json):

{
  "type": "service_account",
  "project_id": "your-project",
  "private_key_id": "...",
  "private_key": "-----BEGIN PRIVATE KEY-----\n...",
  "client_email": "your-service@project.iam.gserviceaccount.com"
}

AWS (.env file):

AWS_ACCESS_KEY_ID=your_access_key
AWS_SECRET_ACCESS_KEY=your_secret_key
AWS_DEFAULT_REGION=us-east-1

DigitalOcean (.env file):

DIGITALOCEAN_TOKEN=your_do_token

First Deployment (30 seconds)

from infradsl.providers.googlecloud import GoogleCloud

# Deploy serverless container to production
GoogleCloud.CloudRun("my-app").image("gcr.io/cloudrun/hello").create()

Result: Live HTTPS URL with global CDN and auto-scaling.

🎯 Core Features

Universal Container Engine Support

  • 🐧 Podman (preferred): Daemonless, rootless, enhanced security
  • 🐳 Docker: Traditional container engine with full compatibility
  • 🔄 Automatic Detection: No configuration needed - just works!

Multi-Cloud Support

  • Google Cloud: VMs, GKE, Cloud Run, Load Balancers, Artifact Registry
  • DigitalOcean: Droplets, Kubernetes, Container Registry, Load Balancers
  • AWS & Azure: Coming soon with same Rails simplicity

Smart Container Builds

  • Language Detection: Node.js, Python, Go, Java automatically detected
  • Cross-Architecture: ARM64 Mac → x86_64 production builds
  • Security Hardening: Non-root users, minimal base images, health checks
  • Registry Integration: Automatic push to cloud registries

💻 Usage Examples

Google Cloud - Serverless Containers

from infradsl.providers.googlecloud import GoogleCloud

# Rails way: Deploy container from source code
GoogleCloud.CloudRun("my-webapp").container("webapp", "src/", 8080).create()

# Production API with custom configuration
api = (GoogleCloud.CloudRun("production-api")
    .container("api", "api-src/", 8080)
    .memory("1Gi")
    .cpu("2000m")
    .auto_scale(min_instances=2, max_instances=50)
    .environment({"DATABASE_URL": "postgresql://..."})
    .create())

Google Cloud - Kubernetes Clusters

# Simple cluster with Rails defaults
GoogleCloud.GKE("my-app").create()

# Production cluster with customization
cluster = (GoogleCloud.GKE("production")
    .location("europe-north1")  # Regional HA
    .nodes(5)
    .machine_type("e2-standard-4")
    .auto_scale(min_nodes=3, max_nodes=20)
    .create())

DigitalOcean - Container Applications

from infradsl.providers.digitalocean import DigitalOcean

# Container deployment with load balancer
app = (DigitalOcean.Droplet("web-app")
    .container("my-app:latest", "templates/web-app", 8080)
    .size("s-2vcpu-2gb")
    .region("fra1")
    .load_balancer("web-lb")
    .create())

Multi-Provider Infrastructure

# Development on DigitalOcean (cost-optimized)
dev_cluster = DigitalOcean.Kubernetes("dev-cluster").create()

# Production on Google Cloud (enterprise-grade)
prod_cluster = GoogleCloud.GKE("production").create()

# Same Rails API, different clouds

🏗️ Architecture Highlights

Rails Philosophy Implementation

  • Convention over Configuration: Sensible defaults for 90% of use cases
  • 5-Minute Rule: If it takes longer than 5 minutes to understand, it's too complex
  • Developer Joy: Infrastructure as simple as business logic
  • Production Ready: Enterprise-grade security and scaling by default

Technical Excellence

  • Type-Safe: Pydantic models with comprehensive validation
  • Error Handling: Helpful error messages with actionable suggestions
  • Cross-Platform: Works on macOS, Linux, Windows
  • Container Agnostic: Docker, Podman, or any OCI-compatible engine

Developer Experience

  • Fluent API: Chainable methods like Rails ActiveRecord
  • Auto-Detection: Language, framework, and container engine detection
  • Live Feedback: Real-time status updates and progress indicators
  • Rich Documentation: Examples for every use case

📊 Impact Metrics

Code Reduction

  • Kubernetes YAML: 500+ lines → 1 line (99.8% reduction)
  • Terraform: 100+ lines → 1 line (99% reduction)
  • Docker Configuration: 50+ lines → 0 lines (automatic)

Developer Productivity

  • Time to Production: Days → Minutes
  • Learning Curve: Weeks → 5 minutes
  • Deployment Complexity: Expert-level → Beginner-friendly

Production Quality

  • Security: Manual → Automatic best practices
  • Scalability: Fixed → Auto-scaling by default
  • Monitoring: Optional → Built-in enterprise-grade

🛣️ Roadmap

Phase 2: Container Revolution ✅ COMPLETE

  • Universal container engine support (Docker + Podman)
  • Google Cloud Run serverless containers
  • Smart Dockerfile/Containerfile generation
  • Cross-architecture builds (ARM64 → x86_64)

Phase 3: Multi-Cloud Harmony (Next)

  • AWS provider (EC2, EKS, Lambda, ECR)
  • Azure provider (VMs, AKS, Container Instances)
  • Universal cloud abstractions

Phase 4: Developer Experience Polish

  • Interactive CLI mode
  • IDE extensions (VS Code, JetBrains)
  • Template marketplace
  • Cost optimization insights

💡 Philosophy

"Infrastructure as simple as business logic"

InfraDSL transforms infrastructure from a barrier into an enabler. We believe developers should focus on building amazing applications, not wrestling with YAML configurations and cloud complexity.

Design Principles

  1. Rails Philosophy First: Convention over configuration in everything
  2. Developer Experience: Optimize for developer joy and productivity
  3. Production Ready: Security, scalability, and reliability by default
  4. Universal Compatibility: Work with any tool, any cloud, any architecture

Built with ❤️ for developers who want to ship, not configure infrastructure.

Project details


Download files

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

Source Distribution

infradsl-0.1.0.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

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

infradsl-0.1.0-py3-none-any.whl (1.6 MB view details)

Uploaded Python 3

File details

Details for the file infradsl-0.1.0.tar.gz.

File metadata

  • Download URL: infradsl-0.1.0.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for infradsl-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7dd79bc8578380e065bf14a2a92513fb84d18883c5f53ec81d4b3f65e0aad238
MD5 7d16fa58396ca5cea0849869fdffb226
BLAKE2b-256 fcd2323269215e3689ef4285a0428e95f99732b1f4b22e87d90fe64a351a5a3f

See more details on using hashes here.

File details

Details for the file infradsl-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: infradsl-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for infradsl-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ccb0e72eb22aee6f5f63356064069260b2e8a0c38b51933f5feaf70f3d531085
MD5 4d90dd43fa5a1b01bc3a650dba64f017
BLAKE2b-256 d21f429127cb57d2fe4e66d7f08cf789d3bbb2a9704b56abfc0c11742f13c8f4

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