Skip to main content

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

Project description

InfraDSL - The Rails of Modern Infrastructure

"Infrastructure as simple as business logic"

InfraDSL brings Rails-like simplicity to cloud infrastructure management. Deploy production-ready applications to AWS, Google Cloud, and DigitalOcean with 95% less code than traditional tools. Currently, in active development. Any feedback is welcome!

🚀 Quick Start

Install

pip install infradsl

Deploy in 30 seconds

from infradsl import AWS, GoogleCloud, DigitalOcean

# Deploy a web server in one line
server = AWS.EC2("web-server").t3_micro().ubuntu().service("nginx").create()

# Container app to Google Cloud Run
app = GoogleCloud.CloudRun("my-app").container("webapp", "./src").public().create()

# Complete production stack
database = AWS.RDS("app-db").postgresql().production().create()
storage = AWS.S3("app-assets").website().public().create()
api = AWS.ECS("app-api").fargate().container("api:latest").create()

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

🎯 Revolutionary Features

Cross-Cloud Magic

InfraDSL automatically selects optimal cloud providers per service based on cost, performance, and compliance:

from infradsl import InfraDSL

app = InfraDSL.Application("my-app")
    .auto_optimize()
    .database("postgresql")      # → GCP (best price/performance)
    .compute("web-servers")      # → AWS (best global coverage)
    .cdn("static-assets")        # → Cloudflare (best edge network)
    .storage("user-uploads")     # → DigitalOcean (best simplicity)
    .create()

Universal Provider Support

  • AWS: EC2, ECS, RDS, S3, Lambda, CloudFront, Route53
  • Google Cloud: GKE, Cloud Run, Compute Engine, Cloud SQL, Cloud Storage
  • DigitalOcean: Droplets, Kubernetes, Databases, Spaces, Load Balancers
  • Cloudflare: CDN, DNS, Workers, R2 Storage, SSL/TLS

CLI Commands

infradsl init my-project aws          # Initialize new project
infradsl preview main.py              # Preview changes
infradsl apply main.py                # Deploy infrastructure
infradsl destroy main.py              # Clean up resources
infradsl doctor                       # Check setup and diagnose issues

🔧 Setup & Authentication

AWS Credentials

# Via AWS CLI
aws configure

# Or environment variables
export AWS_ACCESS_KEY_ID=your_access_key
export AWS_SECRET_ACCESS_KEY=your_secret_key
export AWS_DEFAULT_REGION=us-east-1

Google Cloud Credentials

# Via gcloud CLI
gcloud auth application-default login

# Or service account key
export GOOGLE_APPLICATION_CREDENTIALS=path/to/service-account.json

DigitalOcean Token

export DIGITALOCEAN_TOKEN=your_do_token

💻 Usage Examples

AWS Infrastructure

from infradsl import AWS

# Simple web server
server = AWS.EC2("web-server").t3_micro().ubuntu().create()

# Production API with load balancer
api = (AWS.ECS("production-api")
    .fargate()
    .container("api:latest")
    .auto_scale(min=2, max=50)
    .load_balancer()
    .create())

# Database with automated backups
db = (AWS.RDS("app-db")
    .postgresql()
    .production()
    .encrypted()
    .create())

Google Cloud

from infradsl import GoogleCloud

# Serverless container
app = (GoogleCloud.CloudRun("my-app")
    .container("webapp", "./src")
    .public()
    .create())

# Kubernetes cluster
cluster = (GoogleCloud.GKE("production")
    .location("us-central1")
    .auto_scale(min_nodes=3, max_nodes=20)
    .create())

DigitalOcean

from infradsl import DigitalOcean

# Simple droplet
droplet = (DigitalOcean.Droplet("web-server")
    .size("s-2vcpu-2gb")
    .region("nyc1")
    .create())

# Kubernetes cluster
cluster = (DigitalOcean.Kubernetes("app-cluster")
    .region("fra1")
    .nodes(3)
    .create())

🏗️ Key Benefits

95% Code Reduction

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

Developer Experience

  • Time to Production: Days → Minutes
  • Learning Curve: Weeks → 5 minutes
  • Rails-like Simplicity: Intuitive, chainable API

Production Ready

  • Security: Automatic best practices
  • Auto-scaling: Built-in by default
  • Monitoring: Enterprise-grade observability

🛣️ What's Next

  • Template Marketplace: Reusable infrastructure patterns
  • Cost Optimization: Automatic resource rightsizing
  • Multi-Cloud Intelligence: Cross-provider optimization
  • IDE Integration: VS Code and JetBrains extensions

📚 Documentation

Visit https://docs.infradsl.dev for complete documentation, tutorials, and examples.

🤝 Contributing

We welcome contributions! Check out our GitHub repository for issues and contribution guidelines.


Built with ❤️ for Engineers 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.2.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.2-py3-none-any.whl (1.6 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: infradsl-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 49ef1b4a59c9e9abc403eb2602691ff9b36a9db6474b9209736411bb2c0976c3
MD5 1f0e2ed9f285c7c09dbd5160716707d9
BLAKE2b-256 8d33f98d2888ba6faeb76c480f597a545a2c19369949a41b6cc518f36eef1920

See more details on using hashes here.

File details

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

File metadata

  • Download URL: infradsl-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a19286f5b2f1fe48637767b6778aab9d5ab8b17af35835cb83a08a01e4ac4676
MD5 38dfe466e2856aae9f6cc4c89574b62e
BLAKE2b-256 f3278616a968ef0f5d046eb74dc5e1b8d8c569181abd281f23807146a24e7860

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