yamlforge-infra


Nameyamlforge-infra JSON
Version 1.0.0b4 PyPI version JSON
download
home_pageNone
SummaryMulti-Cloud Infrastructure as Code and PaaS Management Suite (BETA - Feature Complete)
upload_time2025-08-13 17:49:09
maintainerNone
docs_urlNone
authorPatrick T. Rutledge III
requires_python>=3.8
licenseNone
keywords terraform multi-cloud infrastructure-as-code paas management yaml aws azure gcp openshift kubernetes
VCS
bugtrack_url
requirements PyYAML boto3 google-cloud-compute google-cloud-dns oci alibabacloud-ecs20140526 alibabacloud-tea-openapi ibm-cloud-sdk-core ibm-vpc requests streamlit langchain langchain-anthropic langchain-google-vertexai langgraph streamlit-chat pydantic jsonschema redis python-dotenv anthropic pytest pytest-asyncio black flake8 mypy python-keycloak aiohttp kubernetes
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # YamlForge

**Universal Infrastructure as Code Across All Clouds**

Write your infrastructure once in elegant YAML syntax and deploy it seamlessly across AWS, Azure, GCP, OCI, Alibaba Cloud, IBM Cloud, and VMware. YamlForge eliminates cloud lock-in by providing a universal interface that generates production-ready Terraform configurations with built-in AI assistance.

[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
[![Terraform](https://img.shields.io/badge/Terraform-1.0+-blue.svg)](https://www.terraform.io/)

## The Vision

**Universal infrastructure that works everywhere.**

YamlForge breaks down the barriers between cloud providers. Define your infrastructure once using intuitive YAML syntax, and watch it materialize across any cloud environment. Whether you're deploying OpenShift clusters, Kubernetes workloads, or custom applications, YamlForge provides the abstraction layer that makes multi-cloud a reality.

### Why YamlForge?

- **Universal Cloud Support**: Deploy to any major cloud provider with identical syntax
- **Intelligent Assistance**: AI-powered configuration generation from natural language
- **Enterprise Patterns**: Pre-built templates for OpenShift, Kubernetes, and production workloads
- **Zero Lock-in**: Migrate between clouds without rewriting your infrastructure code
- **Production Hardened**: Built-in security, compliance, and operational best practices
- **Developer Experience**: Intuitive YAML syntax that abstracts away cloud complexity

⚠️  BETA SOFTWARE WARNING ⚠️

This is v1.0 BETA - Feature Complete with Testing Needed

This software is feature complete but requires thorough testing in various environments.

Use with caution in production. Extensive testing recommended before critical deployments.

## Quick Start

### Installation
```bash
git clone https://github.com/rut31337/YamlForge.git
cd YamlForge
pip install -r requirements.txt

# Verify Terraform v1.12.0+ is installed
terraform version  # Should show v1.12.0 or newer
```

**Requirement:** Terraform v1.12.0+ required for OpenShift/ROSA support

### DemoBuilder - AI-Powered Configuration Assistant

**Interactive chatbot for YamlForge configuration generation:**

DemoBuilder is a conversational AI assistant that helps you create YamlForge configurations through natural language. Simply describe your infrastructure needs, and DemoBuilder will generate, validate, and analyze configurations in real-time.

**Features:**
- Natural language infrastructure generation
- Real-time cost analysis across cloud providers  
- Interactive configuration refinement
- Schema validation and auto-correction
- Provider selection and filtering

**Deploy DemoBuilder to OpenShift:**
```bash
export ANTHROPIC_API_KEY="your-api-key"
./demobuilder/deployment/openshift/deploy-s2i.sh
```

📖 **[Full DemoBuilder Deployment Guide](demobuilder/DEPLOYMENT.md)**

### Define Once, Deploy Everywhere
```yaml
# infrastructure.yaml
guid: "demo1"

yamlforge:
  cloud_workspace:
    name: "multi-cloud-demo-{guid}"
    description: "Multi-cloud deployment demonstration"
  
  # Deploy instances across multiple clouds using universal locations
  # us-east maps to: AWS us-east-1, Azure East US, GCP us-east1, IBM VPC us-east
  instances:
    - name: "web-aws-{guid}"
      provider: "aws"
      region: "us-east"
      flavor: "medium"
      image: "RHEL9-latest"
      count: 3  # Deploy 3 identical instances
      
    - name: "web-azure-{guid}"
      provider: "azure"
      region: "us-east"
      flavor: "medium"
      image: "RHEL9-latest"
      count: 2  # Deploy 2 identical instances
      
    - name: "web-gcp-{guid}"
      provider: "gcp"
      region: "us-east"
      flavor: "medium"
      image: "RHEL9-latest"
      # count: 1 (default - single instance)
  
  # Deploy OpenShift clusters using universal locations
  # us-east maps to: AWS us-east-1, Azure East US, GCP us-east1, IBM VPC us-east
  openshift_clusters:
    - name: "aws-rosa-{guid}"
      type: "rosa-classic"
      region: "us-east"
      version: "4.18.19"
      size: "medium"
      
    - name: "azure-aro-{guid}"
      type: "aro"
      region: "us-east"
      version: "latest"
      size: "medium"
  
  # Security configuration
  security_groups:
    - name: "web-access-{guid}"
      description: "Allow web traffic"
      rules:
        - direction: "ingress"
          protocol: "tcp"
          port_range: "80"
          source: "0.0.0.0/0"
        - direction: "ingress"
          protocol: "tcp"
          port_range: "443"
          source: "0.0.0.0/0"
```

### CNV Example: Virtual Machines on Kubernetes/OpenShift
```yaml
# cnv-infrastructure.yaml
guid: "cnv1"

yamlforge:
  cloud_workspace:
    name: "cnv-workspace-{guid}"
    description: "CNV virtual machines on OpenShift"
  
  instances:
    - name: "cnv-vm-{guid}"
      provider: "cnv"
      flavor: "small"  # 1 vCPU, 1GB RAM
      image: "rhel-9.6"  # Dynamic discovery from DataVolumes
      ssh_key: "~/.ssh/id_rsa.pub"
```

**Environment Setup:**
```bash
# Set OpenShift cluster credentials
export OPENSHIFT_CLUSTER_URL="https://api.cluster.example.com:6443"
export OPENSHIFT_CLUSTER_TOKEN="your_openshift_token"

# Deploy CNV VM
python yamlforge.py cnv-infrastructure.yaml -d output/ --auto-deploy
```

### Deploy with Confidence
```bash
# Set up environment variables (copy and customize the template)
cp envvars.example.sh envvars.sh
# Edit envvars.sh with your credentials, then:
source envvars.sh

# See Command Line Options section for deployment commands
```

### Configurable Default Username

YamlForge provides a configurable default username across all cloud providers for consistent SSH access:

**Default Behavior**: All instances use `cloud-user` as the default SSH username
**Customization**: Override in `defaults/core.yaml` or per-instance

```yaml
# defaults/core.yaml - Organization-wide setting
security:
  default_username: "cloud-user"  # Change to your preferred username

# Or override per instance
yamlforge:
  instances:
    - name: "my-vm"
      provider: "aws"
      username: "my-custom-user"  # Instance-specific override
```

**Provider Support**:
- **AWS/Azure**: Automatically creates the user via user data scripts
- **GCP/OCI/IBM**: Native support, no additional scripts needed
- **All Providers**: Consistent SSH commands and outputs

See [Core Configuration Documentation](docs/configuration/core-configuration.md) for complete details.

## Command Line Options

```bash
# Analyze configuration without generating Terraform
python yamlforge.py config.yaml --analyze

# Generate Terraform files
python yamlforge.py config.yaml -d output/

# Generate and deploy automatically
python yamlforge.py config.yaml -d output/ --auto-deploy

# Generate with verbose output (shows generated files, detailed AMI search info)
python yamlforge.py config.yaml -d output/ --verbose

# Generate without cloud credentials (uses placeholders, skips dynamic lookups, mainly for testing/development)
python yamlforge.py config.yaml -d output/ --no-credentials
```

**Available Flags:**
- `--analyze`: Analyze configuration and show provider selections, cost analysis, and mappings without generating Terraform
- `-d, --output-dir`: Specify output directory for generated Terraform files (required unless using `--analyze`)
- `--auto-deploy`: Automatically deploy infrastructure after generating Terraform (cannot be used with `--analyze`)
- `--verbose`: Show detailed output including generated files and dynamic lookups
- `--no-credentials`: Skip cloud credential validation and use placeholders (mainly for testing/development, may result in unusable Terraform)

## Configuration Analysis

**Explore options without generating Terraform:**
Perfect for AI chatbots and exploring configurations:

```bash
# Analyze what providers would be selected and their costs
python yamlforge.py my-config.yaml --analyze
```

**Example Analysis Output:**
```
================================================================================
  YAMLFORGE CLOUD ANALYSIS
================================================================================
Global provider exclusions: vmware, alibaba (excluded from cost comparison)
Global unexcluded providers: aws, azure, gcp, ibm_vpc, ibm_classic, oci

INSTANCES (2 found):
----------------------------------------

1. web-server-test1:
   Provider: cheapest (aws)
   Region: us-east (us-east1)
   Size: medium (t3.medium)
   Image: RHEL9-latest (RHEL-9.*)
   Cost analysis for instance 'web-server-test1':
     aws: $0.0416/hour → $0.0312/hour (25.0% discount) (t3.medium, 2 vCPU, 4GB) ← SELECTED
     gcp: $0.0335/hour (e2-medium, 1 vCPU, 4GB)
     azure: $0.0752/hour (Standard_B4ms, 4 vCPU, 16GB)

2. gpu-worker-test1:
   Provider: cheapest-gpu (gcp)
   Region: us-east (us-east1)
   GPU Count: 1
   GPU Type: NVIDIA T4
   GPU Flavor: n1-standard-4-t4
   Image: RHEL9-latest (rhel-cloud/rhel-9)
   GPU-optimized cost analysis for instance 'gpu-worker-test1':
     gcp: $0.3500/hour (n1-standard-4-t4, 4 vCPU, 15GB, 1x NVIDIA T4) ← SELECTED
     aws: $0.5260/hour → $0.3945/hour (25.0% discount) (g4dn.xlarge, 4 vCPU, 16GB, 1x NVIDIA T4)

REQUIRED PROVIDERS:
----------------------------------------
  • aws
  • gcp
```

**Perfect for AI Chatbots:**
- "What's the cheapest GPU instance?"
- "What would a medium server cost on different clouds?"
- "What providers do I need for this configuration?"
- "Show me the mapped regions and flavors for this configuration"

### AI-Assisted Configuration

**DemoBuilder - Conversational Infrastructure Assistant:**
YamlForge includes DemoBuilder, a Streamlit-based conversational AI that transforms natural language into YamlForge configurations with advanced context-aware modification capabilities:

```bash
# Run the interactive AI assistant
cd demobuilder
streamlit run app.py
```

**Example Conversations:**
- "I need 3 RHEL VMs on AWS with SSH access"
- "Deploy a small ROSA cluster for development"
- "Create the cheapest GPU instance for machine learning"
- "Add an OpenShift HCP cluster to my existing infrastructure"
- "Add a bastion host to my current setup"
- "Change all instances to use the cheapest provider"
- "Remove one VM and add monitoring infrastructure"

**Advanced Features:**
- **Pure AI-Driven Modifications**: Context-aware configuration changes without static keyword matching
- **Natural Language Processing**: Describe infrastructure in plain English with intelligent intent recognition
- **Real-time Schema Validation**: Auto-validates and fixes configurations against YamlForge schema
- **Live Cost Analysis**: Direct integration with YamlForge `--analyze` mode for instant cost feedback
- **Interactive Refinement**: Seamlessly modify existing configurations through conversation
- **Multi-cloud Support**: All 11 YamlForge providers with intelligent cost optimization
- **Preservation Logic**: Maintains existing infrastructure while adding only requested changes
- **Smart Instance Naming**: Automatically generates meaningful names based on context (bastion-host, web-server, database, etc.)

**Configuration Modification Examples:**
```
Initial: "Deploy a ROSA HCP cluster"
→ Creates ROSA HCP cluster configuration

Follow-up: "Add a bastion host"
→ Preserves existing cluster, adds bastion-host instance with appropriate configuration

Follow-up: "Add monitoring and a database server"
→ Preserves cluster and bastion, adds monitoring-server and database instances

Follow-up: "Make everything use the cheapest providers"
→ Updates all components to use cost-optimized providers while maintaining functionality
```

**Training AI to Use YamlForge:**
Provide the AI with our JSON schema ([`docs/yamlforge-schema.json`](docs/yamlforge-schema.json)) and real examples from the `examples/` directory. Emphasize the required 5-character GUID, valid provider names, and exact field structure. See [AI Training Guide](docs/ai-training.md) for comprehensive training materials.

Use AI assistants to generate YamlForge configurations from natural language:

```bash
# Ask your AI assistant:
"Create a YamlForge YAML configuration for: 
'Production OpenShift cluster on AWS with monitoring and a sample web application'"

# AI generates valid YAML following our [schema](docs/yamlforge-schema.json)
# Save the output and analyze/deploy with YamlForge
python yamlforge.py ai-generated-config.yaml --analyze  # See what it will do
python yamlforge.py ai-generated-config.yaml -d output/ --auto-deploy  # Deploy it
## Real-World Scenarios

### Multi-Cloud Strategy
Deploy identical infrastructure across multiple clouds for redundancy and compliance:
```yaml
guid: "prod1"

yamlforge:
  cloud_workspace:
    name: "production-multi-cloud-{guid}"
    description: "Production deployment across multiple clouds"
  
  instances:
    - name: "app-aws-{guid}"
      provider: "aws"
      region: "us-east"
      flavor: "large"
      image: "RHEL9-latest"
    - name: "app-azure-{guid}"
      provider: "azure"
      region: "us-east"
      flavor: "large"
      image: "RHEL9-latest"
    - name: "app-gcp-{guid}"
      provider: "gcp"
      region: "us-east"
      flavor: "large"
      image: "RHEL9-latest"
```

### Cloud Migration
Seamlessly migrate workloads between cloud providers:
```yaml
guid: "mig1"

yamlforge:
  cloud_workspace:
    name: "migration-to-aws-{guid}"
    description: "Migrating from Azure to AWS"
  
  instances:
    - name: "migrated-app-{guid}"
      provider: "aws"  # Migrate from Azure to AWS
      region: "us-east"
      flavor: "medium"
      image: "RHEL9-latest"
```

### Flavor Mapping
No need to memorize provider-specific instance types! YamlForge automatically maps your CPU and memory requirements to the appropriate instance type for each cloud:

```yaml
guid: "flav1"

yamlforge:
  cloud_workspace:
    name: "flavor-mapping-{guid}"
    description: "Demonstrating CPU/memory to flavor mapping"
  
  instances:
    - name: "web-server-{guid}"
      provider: "aws"
      region: "us-east"
      cores: 2
      memory: 4096  # MB - YamlForge selects t3.medium automatically
      image: "RHEL9-latest"
    - name: "app-server-{guid}"
      provider: "azure"
      region: "us-east"
      cores: 4
      memory: 8192  # MB - YamlForge selects Standard_D2s_v3 automatically
      image: "RHEL9-latest"
    - name: "database-{guid}"
      provider: "gcp"
      region: "us-east"
      cores: 8
      memory: 16384  # MB - YamlForge selects e2-standard-8 automatically
      image: "RHEL9-latest"
```

**Instead of learning:**
- AWS: t3.micro, t3.small, t3.medium, m5.large, c5.xlarge...
- Azure: Standard_B1s, Standard_D2s_v3, Standard_E4s_v3...
- GCP: e2-micro, e2-small, e2-standard-8, n2-standard-4...

**Just specify:** `cores: 4, memory: 8192` and YamlForge handles the rest!

**Or use simple t-shirt sizing:**
```yaml
guid: "size1"

yamlforge:
  cloud_workspace:
    name: "t-shirt-sizing-{guid}"
    description: "Using generic small/medium/large sizing"
  
  instances:
    - name: "web-server-{guid}"
      provider: "aws"
      region: "us-east"
      flavor: "small"  # Generic size - works on all clouds
      image: "RHEL9-latest"
    - name: "app-server-{guid}"
      provider: "azure"
      region: "us-east"
      flavor: "medium"  # Generic size - works on all clouds
      image: "RHEL9-latest"
    - name: "database-{guid}"
      provider: "gcp"
      region: "us-east"
      flavor: "large"  # Generic size - works on all clouds
      image: "RHEL9-latest"
```

**Available sizes:** `nano`, `micro`, `small`, `medium`, `large`, `xlarge`, `2xlarge`, `4xlarge`, `8xlarge`, `16xlarge`

### Instance Count and Scaling
Deploy multiple identical instances using the `count` field:

```yaml
guid: "scale1"

yamlforge:
  cloud_workspace:
    name: "scaling-demo-{guid}"
    description: "Instance scaling demonstration"
  
  instances:
    - name: "web-server-{guid}"
      provider: "aws"
      region: "us-east"
      flavor: "medium"
      image: "RHEL9-latest"
      count: 5  # Deploy 5 identical web servers
    
    - name: "worker-{guid}"
      provider: "gcp"
      region: "us-east"
      cores: 4
      memory: 8192
      image: "RHEL9-latest"
      count: 3  # Deploy 3 identical worker nodes
```

**Instance Naming**: When `count > 1`, instances are automatically named with suffixes:
- `web-server-scale1-1`, `web-server-scale1-2`, `web-server-scale1-3`, etc.
- Each instance gets identical configuration but unique names and resources

**Cost Analysis**: YamlForge automatically calculates total costs:
- Shows per-instance cost and total cost across all instances
- Includes count multipliers in cost summaries and analysis

### Provider Discounts

YamlForge supports configurable provider-specific discounts for accurate cost analysis in enterprise environments:

**Configuration Options:**
```yaml
# defaults/core.yaml - Organization-wide discounts
cost_analysis:
  provider_discounts:
    "aws": 10             # 10% enterprise agreement discount
    "azure": 20           # 20% EA discount  
    "gcp": 10             # 10% committed use discount
    "oci": 25             # 25% promotional discount
```

**Environment Variable Overrides:**
```bash
# Environment variables take precedence over core configuration
export YAMLFORGE_DISCOUNT_AWS=15        # 15% AWS discount
export YAMLFORGE_DISCOUNT_AZURE=20      # 20% Azure discount
export YAMLFORGE_DISCOUNT_GCP=10        # 10% GCP discount
export YAMLFORGE_DISCOUNT_OCI=25        # 25% OCI discount
export YAMLFORGE_DISCOUNT_IBM_VPC=18    # 18% IBM VPC discount
export YAMLFORGE_DISCOUNT_IBM_CLASSIC=12 # 12% IBM Classic discount
export YAMLFORGE_DISCOUNT_ALIBABA=30    # 30% Alibaba discount
export YAMLFORGE_DISCOUNT_VMWARE=5      # 5% VMware discount
```

**Features:**
- **Percentage-based**: Discounts specified as 0-100% 
- **Environment precedence**: Environment variables override core configuration
- **Cost analysis integration**: Applied to all cost displays and cheapest provider selection
- **Input validation**: Invalid values show warnings and default to 0%
- **Clear display**: Shows both original and discounted prices: `$0.0416/hour → $0.0312/hour (25.0% discount)`

### Cost Optimization
YamlForge offers two intelligent cost optimization providers:

**`cheapest`** - General cost optimization for balanced workloads:
```yaml
guid: "cost1"

yamlforge:
  cloud_workspace:
    name: "cost-optimized-{guid}"
    description: "Automatically select cheapest provider"
  
  instances:
    - name: "api-server-{guid}"
      provider: "cheapest"  # Finds cheapest instance meeting CPU/memory requirements
      region: "us-east"
      flavor: "medium"  # Must specify size or cores/memory
      image: "RHEL9-latest"
    - name: "database-server-{guid}"
      provider: "cheapest"  # CPU/memory only - no GPU needed
      region: "us-east"
      cores: 4
      memory: 8192  # MB
      image: "RHEL9-latest"
    - name: "ml-training-{guid}"
      provider: "cheapest"  # Can also optimize GPU workloads with specs
      region: "us-east"
      cores: 8
      memory: 16384  # MB
      gpu_type: "NVIDIA V100"
      gpu_count: 1
      image: "RHEL9-latest"
    - name: "app-server-{guid}"
      provider: "cheapest"  # Combines t-shirt sizing with cost optimization
      region: "us-east"
      flavor: "large"  # Generic size - YamlForge finds cheapest "large" across all clouds
      image: "RHEL9-latest"
```

**`cheapest-gpu`** - Specialized GPU cost optimization:
```yaml
guid: "gpu1"

yamlforge:
  cloud_workspace:
    name: "gpu-optimized-{guid}"
    description: "Cheapest GPU instances across all clouds"
  
  instances:
    - name: "gpu-worker-{guid}"
      provider: "cheapest-gpu"  # Focuses purely on GPU cost, ignores CPU/memory
      region: "us-east"
      gpu_type: "NVIDIA T4"  # Only GPU requirements needed
      gpu_count: 1
      image: "RHEL9-latest"
```

**Key Differences:**
- **`cheapest`**: Requires `size` or `cores`/`memory`, optimizes for overall cost
- **`cheapest-gpu`**: Only needs `gpu_type`/`gpu_count`, finds cheapest GPU regardless of CPU/memory

### Enterprise OpenShift
Deploy OpenShift clusters optimized for each cloud's native capabilities:
```yaml
guid: "ocp1"

yamlforge:
  cloud_workspace:
    name: "enterprise-openshift-{guid}"
    description: "Enterprise OpenShift across clouds"
  
  openshift_clusters:
    - name: "aws-rosa-{guid}"
      type: "rosa-classic"
      region: "us-east"
      version: "4.18.19"
      size: "large"  # Cluster size (not instance size)
    - name: "azure-aro-{guid}"
      type: "aro"
      region: "us-east"
      version: "latest"
      size: "large"  # Cluster size (not instance size)
```

### Generic Images
Use the same image names across all cloud providers:
```yaml
guid: "img1"

yamlforge:
  cloud_workspace:
    name: "multi-os-deployment-{guid}"
    description: "Deploying different operating systems across clouds"
  
  instances:
    - name: "web-server-{guid}"
      provider: "aws"
      region: "us-east"
      flavor: "medium"
      image: "RHEL9-latest"  # Generic name - maps to provider-specific images
    - name: "app-server-{guid}"
      provider: "azure"
      region: "us-east"
      flavor: "medium"
      image: "Ubuntu2204-latest"  # Ubuntu 22.04 LTS - works on all clouds
    - name: "db-server-{guid}"
      provider: "gcp"
      region: "us-east"
      flavor: "medium"
      image: "Fedora-latest"  # Fedora (latest stable) - works on all clouds
    - name: "monitoring-{guid}"
      provider: "oci"
      region: "us-east"
      flavor: "medium"
      image: "OracleLinux9-latest"  # Oracle Linux 9 - works on all clouds
```

### Generic Locations
Use simple region names that work across all cloud providers:
```yaml
# Instead of learning provider-specific regions:
# AWS: us-east-1, Azure: East US, GCP: us-east1, OCI: us-ashburn-1...

# Just use: "us-east" - YamlForge maps to the correct region for each provider
region: "us-east"  # Works on all clouds
```

## Universal Mappings

YamlForge uses generic names that work across all clouds. All mappings are customizable:

**Customizable Mappings:**
All mappings can be customized in the `mappings/` directory:
- `mappings/images.yaml` - Customize image mappings
- `mappings/locations.yaml` - Customize region mappings  
- `mappings/flavors/` - Customize instance type mappings
- `mappings/flavors_openshift/` - Customize OpenShift-specific mappings

**Unbiased and Transparent:**
YamlForge is not biased toward any specific operating system image or cloud provider. We only use information freely available on the internet to determine costs and make recommendations. Users can add their own operating system images in the `mappings/images.yaml` file to customize the available options for their deployments.

## Supported Platforms

### Cloud Providers
- **AWS** - Native EC2, VPC, Security Groups, ROSA clusters
- **Azure** - Virtual Machines, VNets, Network Security Groups, ARO clusters  
- **GCP** - Compute Engine with dynamic image discovery
- **IBM Cloud** - VPC Gen 2 and Classic Infrastructure ([Configuration](docs/ibm-vpc-configuration.md))
- **Oracle Cloud (OCI)** - Compute instances and networking
- **Alibaba Cloud** - ECS instances and VPC
- **VMware vSphere** - Virtual machines and networking
- **CNV** - Container Native Virtualization (KubeVirt) for Kubernetes and OpenShift clusters with automatic operator validation

### OpenShift Platforms
- **ROSA** (Classic & HCP) - Red Hat OpenShift Service on AWS
- **ARO** - Azure Red Hat OpenShift
- **OpenShift Dedicated** - Managed OpenShift clusters
- **Self-Managed** - Custom OpenShift deployments
- **HyperShift** - Hosted control planes

### Container Native Virtualization (CNV)
- **Kubernetes KubeVirt** - Upstream KubeVirt operator support
- **OpenShift CNV** - Red Hat CNV operator with enhanced features
- **Automatic Validation** - Kubernetes API-based operator validation
- **Environment Variables** - Direct cluster access via `OPENSHIFT_CLUSTER_URL` and `OPENSHIFT_CLUSTER_TOKEN`
- **Namespace Management** - Automatic namespace creation and CNV enablement
- **DataVolume Support** - Dynamic image discovery from DataVolumes
- **Cost Optimization** - Minimal cost since VMs use local cluster resources

## Key Features

- **Universal Cloud Support**: Deploy to any major cloud provider with identical syntax
- **Intelligent Assistance**: AI-powered configuration generation from natural language
- **Enterprise Patterns**: Pre-built templates for OpenShift, Kubernetes, and production workloads
- **Zero Lock-in**: Migrate between clouds without rewriting your infrastructure code
- **Production Hardened**: Built-in security, compliance, and operational best practices
- **Developer Experience**: Intuitive YAML syntax that abstracts away cloud complexity
- **Cost Optimization**: Automatic cheapest provider selection
- **GPU Support**: Complete GPU instance support with cost analysis
- **GUID-Based**: Unique deployment identification (5-char required)
- **Auto-Discovery**: Automatic flavor recommendation
- **Enterprise Security**: Red Hat Cloud Access, service accounts
- **Smart Detection**: Only includes Terraform providers you use
- **Unified Deployment**: Single command deploys infrastructure and OpenShift clusters
- **ROSA Integration**: Automated ROSA account role creation via CLI
- **CNV Integration**: Kubernetes API-based validation and deployment for virtual machines

## How It Works

```
Your Vision → YAML Definition → Universal Processing → Provider-Specific Terraform → Multi-Cloud Deployment
```

YamlForge acts as the intelligent translation layer between your infrastructure vision and the reality of multi-cloud deployment.

## Documentation

- [Getting Started](docs/quickstart.md)
- [DemoBuilder AI Assistant](demobuilder/README.md) - Conversational infrastructure configuration
- [Configuration Reference](docs/configuration/)
- [AI Training Guide](docs/ai-training.md)
- [Multi-Cloud Examples](examples/)
- [OpenShift Deployment](docs/openshift/)
- [CNV Provider](docs/cnv-provider.md)

## Contributing

Help us build the future of universal infrastructure. See our [Contributing Guide](CONTRIBUTING.md).

## License

This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.

## Author

**Patrick T. Rutledge III**

Project Link: [https://github.com/rut31337/YamlForge](https://github.com/rut31337/YamlForge) 

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "yamlforge-infra",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "terraform, multi-cloud, infrastructure-as-code, paas, management, yaml, aws, azure, gcp, openshift, kubernetes",
    "author": "Patrick T. Rutledge III",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/cf/be/2430f803b5325f53c2652ef2034cf647ec6500fda5b0655c929b972ea45d/yamlforge_infra-1.0.0b4.tar.gz",
    "platform": null,
    "description": "# YamlForge\n\n**Universal Infrastructure as Code Across All Clouds**\n\nWrite your infrastructure once in elegant YAML syntax and deploy it seamlessly across AWS, Azure, GCP, OCI, Alibaba Cloud, IBM Cloud, and VMware. YamlForge eliminates cloud lock-in by providing a universal interface that generates production-ready Terraform configurations with built-in AI assistance.\n\n[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)\n[![Terraform](https://img.shields.io/badge/Terraform-1.0+-blue.svg)](https://www.terraform.io/)\n\n## The Vision\n\n**Universal infrastructure that works everywhere.**\n\nYamlForge breaks down the barriers between cloud providers. Define your infrastructure once using intuitive YAML syntax, and watch it materialize across any cloud environment. Whether you're deploying OpenShift clusters, Kubernetes workloads, or custom applications, YamlForge provides the abstraction layer that makes multi-cloud a reality.\n\n### Why YamlForge?\n\n- **Universal Cloud Support**: Deploy to any major cloud provider with identical syntax\n- **Intelligent Assistance**: AI-powered configuration generation from natural language\n- **Enterprise Patterns**: Pre-built templates for OpenShift, Kubernetes, and production workloads\n- **Zero Lock-in**: Migrate between clouds without rewriting your infrastructure code\n- **Production Hardened**: Built-in security, compliance, and operational best practices\n- **Developer Experience**: Intuitive YAML syntax that abstracts away cloud complexity\n\n\u26a0\ufe0f  BETA SOFTWARE WARNING \u26a0\ufe0f\n\nThis is v1.0 BETA - Feature Complete with Testing Needed\n\nThis software is feature complete but requires thorough testing in various environments.\n\nUse with caution in production. Extensive testing recommended before critical deployments.\n\n## Quick Start\n\n### Installation\n```bash\ngit clone https://github.com/rut31337/YamlForge.git\ncd YamlForge\npip install -r requirements.txt\n\n# Verify Terraform v1.12.0+ is installed\nterraform version  # Should show v1.12.0 or newer\n```\n\n**Requirement:** Terraform v1.12.0+ required for OpenShift/ROSA support\n\n### DemoBuilder - AI-Powered Configuration Assistant\n\n**Interactive chatbot for YamlForge configuration generation:**\n\nDemoBuilder is a conversational AI assistant that helps you create YamlForge configurations through natural language. Simply describe your infrastructure needs, and DemoBuilder will generate, validate, and analyze configurations in real-time.\n\n**Features:**\n- Natural language infrastructure generation\n- Real-time cost analysis across cloud providers  \n- Interactive configuration refinement\n- Schema validation and auto-correction\n- Provider selection and filtering\n\n**Deploy DemoBuilder to OpenShift:**\n```bash\nexport ANTHROPIC_API_KEY=\"your-api-key\"\n./demobuilder/deployment/openshift/deploy-s2i.sh\n```\n\n\ud83d\udcd6 **[Full DemoBuilder Deployment Guide](demobuilder/DEPLOYMENT.md)**\n\n### Define Once, Deploy Everywhere\n```yaml\n# infrastructure.yaml\nguid: \"demo1\"\n\nyamlforge:\n  cloud_workspace:\n    name: \"multi-cloud-demo-{guid}\"\n    description: \"Multi-cloud deployment demonstration\"\n  \n  # Deploy instances across multiple clouds using universal locations\n  # us-east maps to: AWS us-east-1, Azure East US, GCP us-east1, IBM VPC us-east\n  instances:\n    - name: \"web-aws-{guid}\"\n      provider: \"aws\"\n      region: \"us-east\"\n      flavor: \"medium\"\n      image: \"RHEL9-latest\"\n      count: 3  # Deploy 3 identical instances\n      \n    - name: \"web-azure-{guid}\"\n      provider: \"azure\"\n      region: \"us-east\"\n      flavor: \"medium\"\n      image: \"RHEL9-latest\"\n      count: 2  # Deploy 2 identical instances\n      \n    - name: \"web-gcp-{guid}\"\n      provider: \"gcp\"\n      region: \"us-east\"\n      flavor: \"medium\"\n      image: \"RHEL9-latest\"\n      # count: 1 (default - single instance)\n  \n  # Deploy OpenShift clusters using universal locations\n  # us-east maps to: AWS us-east-1, Azure East US, GCP us-east1, IBM VPC us-east\n  openshift_clusters:\n    - name: \"aws-rosa-{guid}\"\n      type: \"rosa-classic\"\n      region: \"us-east\"\n      version: \"4.18.19\"\n      size: \"medium\"\n      \n    - name: \"azure-aro-{guid}\"\n      type: \"aro\"\n      region: \"us-east\"\n      version: \"latest\"\n      size: \"medium\"\n  \n  # Security configuration\n  security_groups:\n    - name: \"web-access-{guid}\"\n      description: \"Allow web traffic\"\n      rules:\n        - direction: \"ingress\"\n          protocol: \"tcp\"\n          port_range: \"80\"\n          source: \"0.0.0.0/0\"\n        - direction: \"ingress\"\n          protocol: \"tcp\"\n          port_range: \"443\"\n          source: \"0.0.0.0/0\"\n```\n\n### CNV Example: Virtual Machines on Kubernetes/OpenShift\n```yaml\n# cnv-infrastructure.yaml\nguid: \"cnv1\"\n\nyamlforge:\n  cloud_workspace:\n    name: \"cnv-workspace-{guid}\"\n    description: \"CNV virtual machines on OpenShift\"\n  \n  instances:\n    - name: \"cnv-vm-{guid}\"\n      provider: \"cnv\"\n      flavor: \"small\"  # 1 vCPU, 1GB RAM\n      image: \"rhel-9.6\"  # Dynamic discovery from DataVolumes\n      ssh_key: \"~/.ssh/id_rsa.pub\"\n```\n\n**Environment Setup:**\n```bash\n# Set OpenShift cluster credentials\nexport OPENSHIFT_CLUSTER_URL=\"https://api.cluster.example.com:6443\"\nexport OPENSHIFT_CLUSTER_TOKEN=\"your_openshift_token\"\n\n# Deploy CNV VM\npython yamlforge.py cnv-infrastructure.yaml -d output/ --auto-deploy\n```\n\n### Deploy with Confidence\n```bash\n# Set up environment variables (copy and customize the template)\ncp envvars.example.sh envvars.sh\n# Edit envvars.sh with your credentials, then:\nsource envvars.sh\n\n# See Command Line Options section for deployment commands\n```\n\n### Configurable Default Username\n\nYamlForge provides a configurable default username across all cloud providers for consistent SSH access:\n\n**Default Behavior**: All instances use `cloud-user` as the default SSH username\n**Customization**: Override in `defaults/core.yaml` or per-instance\n\n```yaml\n# defaults/core.yaml - Organization-wide setting\nsecurity:\n  default_username: \"cloud-user\"  # Change to your preferred username\n\n# Or override per instance\nyamlforge:\n  instances:\n    - name: \"my-vm\"\n      provider: \"aws\"\n      username: \"my-custom-user\"  # Instance-specific override\n```\n\n**Provider Support**:\n- **AWS/Azure**: Automatically creates the user via user data scripts\n- **GCP/OCI/IBM**: Native support, no additional scripts needed\n- **All Providers**: Consistent SSH commands and outputs\n\nSee [Core Configuration Documentation](docs/configuration/core-configuration.md) for complete details.\n\n## Command Line Options\n\n```bash\n# Analyze configuration without generating Terraform\npython yamlforge.py config.yaml --analyze\n\n# Generate Terraform files\npython yamlforge.py config.yaml -d output/\n\n# Generate and deploy automatically\npython yamlforge.py config.yaml -d output/ --auto-deploy\n\n# Generate with verbose output (shows generated files, detailed AMI search info)\npython yamlforge.py config.yaml -d output/ --verbose\n\n# Generate without cloud credentials (uses placeholders, skips dynamic lookups, mainly for testing/development)\npython yamlforge.py config.yaml -d output/ --no-credentials\n```\n\n**Available Flags:**\n- `--analyze`: Analyze configuration and show provider selections, cost analysis, and mappings without generating Terraform\n- `-d, --output-dir`: Specify output directory for generated Terraform files (required unless using `--analyze`)\n- `--auto-deploy`: Automatically deploy infrastructure after generating Terraform (cannot be used with `--analyze`)\n- `--verbose`: Show detailed output including generated files and dynamic lookups\n- `--no-credentials`: Skip cloud credential validation and use placeholders (mainly for testing/development, may result in unusable Terraform)\n\n## Configuration Analysis\n\n**Explore options without generating Terraform:**\nPerfect for AI chatbots and exploring configurations:\n\n```bash\n# Analyze what providers would be selected and their costs\npython yamlforge.py my-config.yaml --analyze\n```\n\n**Example Analysis Output:**\n```\n================================================================================\n  YAMLFORGE CLOUD ANALYSIS\n================================================================================\nGlobal provider exclusions: vmware, alibaba (excluded from cost comparison)\nGlobal unexcluded providers: aws, azure, gcp, ibm_vpc, ibm_classic, oci\n\nINSTANCES (2 found):\n----------------------------------------\n\n1. web-server-test1:\n   Provider: cheapest (aws)\n   Region: us-east (us-east1)\n   Size: medium (t3.medium)\n   Image: RHEL9-latest (RHEL-9.*)\n   Cost analysis for instance 'web-server-test1':\n     aws: $0.0416/hour \u2192 $0.0312/hour (25.0% discount) (t3.medium, 2 vCPU, 4GB) \u2190 SELECTED\n     gcp: $0.0335/hour (e2-medium, 1 vCPU, 4GB)\n     azure: $0.0752/hour (Standard_B4ms, 4 vCPU, 16GB)\n\n2. gpu-worker-test1:\n   Provider: cheapest-gpu (gcp)\n   Region: us-east (us-east1)\n   GPU Count: 1\n   GPU Type: NVIDIA T4\n   GPU Flavor: n1-standard-4-t4\n   Image: RHEL9-latest (rhel-cloud/rhel-9)\n   GPU-optimized cost analysis for instance 'gpu-worker-test1':\n     gcp: $0.3500/hour (n1-standard-4-t4, 4 vCPU, 15GB, 1x NVIDIA T4) \u2190 SELECTED\n     aws: $0.5260/hour \u2192 $0.3945/hour (25.0% discount) (g4dn.xlarge, 4 vCPU, 16GB, 1x NVIDIA T4)\n\nREQUIRED PROVIDERS:\n----------------------------------------\n  \u2022 aws\n  \u2022 gcp\n```\n\n**Perfect for AI Chatbots:**\n- \"What's the cheapest GPU instance?\"\n- \"What would a medium server cost on different clouds?\"\n- \"What providers do I need for this configuration?\"\n- \"Show me the mapped regions and flavors for this configuration\"\n\n### AI-Assisted Configuration\n\n**DemoBuilder - Conversational Infrastructure Assistant:**\nYamlForge includes DemoBuilder, a Streamlit-based conversational AI that transforms natural language into YamlForge configurations with advanced context-aware modification capabilities:\n\n```bash\n# Run the interactive AI assistant\ncd demobuilder\nstreamlit run app.py\n```\n\n**Example Conversations:**\n- \"I need 3 RHEL VMs on AWS with SSH access\"\n- \"Deploy a small ROSA cluster for development\"\n- \"Create the cheapest GPU instance for machine learning\"\n- \"Add an OpenShift HCP cluster to my existing infrastructure\"\n- \"Add a bastion host to my current setup\"\n- \"Change all instances to use the cheapest provider\"\n- \"Remove one VM and add monitoring infrastructure\"\n\n**Advanced Features:**\n- **Pure AI-Driven Modifications**: Context-aware configuration changes without static keyword matching\n- **Natural Language Processing**: Describe infrastructure in plain English with intelligent intent recognition\n- **Real-time Schema Validation**: Auto-validates and fixes configurations against YamlForge schema\n- **Live Cost Analysis**: Direct integration with YamlForge `--analyze` mode for instant cost feedback\n- **Interactive Refinement**: Seamlessly modify existing configurations through conversation\n- **Multi-cloud Support**: All 11 YamlForge providers with intelligent cost optimization\n- **Preservation Logic**: Maintains existing infrastructure while adding only requested changes\n- **Smart Instance Naming**: Automatically generates meaningful names based on context (bastion-host, web-server, database, etc.)\n\n**Configuration Modification Examples:**\n```\nInitial: \"Deploy a ROSA HCP cluster\"\n\u2192 Creates ROSA HCP cluster configuration\n\nFollow-up: \"Add a bastion host\"\n\u2192 Preserves existing cluster, adds bastion-host instance with appropriate configuration\n\nFollow-up: \"Add monitoring and a database server\"\n\u2192 Preserves cluster and bastion, adds monitoring-server and database instances\n\nFollow-up: \"Make everything use the cheapest providers\"\n\u2192 Updates all components to use cost-optimized providers while maintaining functionality\n```\n\n**Training AI to Use YamlForge:**\nProvide the AI with our JSON schema ([`docs/yamlforge-schema.json`](docs/yamlforge-schema.json)) and real examples from the `examples/` directory. Emphasize the required 5-character GUID, valid provider names, and exact field structure. See [AI Training Guide](docs/ai-training.md) for comprehensive training materials.\n\nUse AI assistants to generate YamlForge configurations from natural language:\n\n```bash\n# Ask your AI assistant:\n\"Create a YamlForge YAML configuration for: \n'Production OpenShift cluster on AWS with monitoring and a sample web application'\"\n\n# AI generates valid YAML following our [schema](docs/yamlforge-schema.json)\n# Save the output and analyze/deploy with YamlForge\npython yamlforge.py ai-generated-config.yaml --analyze  # See what it will do\npython yamlforge.py ai-generated-config.yaml -d output/ --auto-deploy  # Deploy it\n## Real-World Scenarios\n\n### Multi-Cloud Strategy\nDeploy identical infrastructure across multiple clouds for redundancy and compliance:\n```yaml\nguid: \"prod1\"\n\nyamlforge:\n  cloud_workspace:\n    name: \"production-multi-cloud-{guid}\"\n    description: \"Production deployment across multiple clouds\"\n  \n  instances:\n    - name: \"app-aws-{guid}\"\n      provider: \"aws\"\n      region: \"us-east\"\n      flavor: \"large\"\n      image: \"RHEL9-latest\"\n    - name: \"app-azure-{guid}\"\n      provider: \"azure\"\n      region: \"us-east\"\n      flavor: \"large\"\n      image: \"RHEL9-latest\"\n    - name: \"app-gcp-{guid}\"\n      provider: \"gcp\"\n      region: \"us-east\"\n      flavor: \"large\"\n      image: \"RHEL9-latest\"\n```\n\n### Cloud Migration\nSeamlessly migrate workloads between cloud providers:\n```yaml\nguid: \"mig1\"\n\nyamlforge:\n  cloud_workspace:\n    name: \"migration-to-aws-{guid}\"\n    description: \"Migrating from Azure to AWS\"\n  \n  instances:\n    - name: \"migrated-app-{guid}\"\n      provider: \"aws\"  # Migrate from Azure to AWS\n      region: \"us-east\"\n      flavor: \"medium\"\n      image: \"RHEL9-latest\"\n```\n\n### Flavor Mapping\nNo need to memorize provider-specific instance types! YamlForge automatically maps your CPU and memory requirements to the appropriate instance type for each cloud:\n\n```yaml\nguid: \"flav1\"\n\nyamlforge:\n  cloud_workspace:\n    name: \"flavor-mapping-{guid}\"\n    description: \"Demonstrating CPU/memory to flavor mapping\"\n  \n  instances:\n    - name: \"web-server-{guid}\"\n      provider: \"aws\"\n      region: \"us-east\"\n      cores: 2\n      memory: 4096  # MB - YamlForge selects t3.medium automatically\n      image: \"RHEL9-latest\"\n    - name: \"app-server-{guid}\"\n      provider: \"azure\"\n      region: \"us-east\"\n      cores: 4\n      memory: 8192  # MB - YamlForge selects Standard_D2s_v3 automatically\n      image: \"RHEL9-latest\"\n    - name: \"database-{guid}\"\n      provider: \"gcp\"\n      region: \"us-east\"\n      cores: 8\n      memory: 16384  # MB - YamlForge selects e2-standard-8 automatically\n      image: \"RHEL9-latest\"\n```\n\n**Instead of learning:**\n- AWS: t3.micro, t3.small, t3.medium, m5.large, c5.xlarge...\n- Azure: Standard_B1s, Standard_D2s_v3, Standard_E4s_v3...\n- GCP: e2-micro, e2-small, e2-standard-8, n2-standard-4...\n\n**Just specify:** `cores: 4, memory: 8192` and YamlForge handles the rest!\n\n**Or use simple t-shirt sizing:**\n```yaml\nguid: \"size1\"\n\nyamlforge:\n  cloud_workspace:\n    name: \"t-shirt-sizing-{guid}\"\n    description: \"Using generic small/medium/large sizing\"\n  \n  instances:\n    - name: \"web-server-{guid}\"\n      provider: \"aws\"\n      region: \"us-east\"\n      flavor: \"small\"  # Generic size - works on all clouds\n      image: \"RHEL9-latest\"\n    - name: \"app-server-{guid}\"\n      provider: \"azure\"\n      region: \"us-east\"\n      flavor: \"medium\"  # Generic size - works on all clouds\n      image: \"RHEL9-latest\"\n    - name: \"database-{guid}\"\n      provider: \"gcp\"\n      region: \"us-east\"\n      flavor: \"large\"  # Generic size - works on all clouds\n      image: \"RHEL9-latest\"\n```\n\n**Available sizes:** `nano`, `micro`, `small`, `medium`, `large`, `xlarge`, `2xlarge`, `4xlarge`, `8xlarge`, `16xlarge`\n\n### Instance Count and Scaling\nDeploy multiple identical instances using the `count` field:\n\n```yaml\nguid: \"scale1\"\n\nyamlforge:\n  cloud_workspace:\n    name: \"scaling-demo-{guid}\"\n    description: \"Instance scaling demonstration\"\n  \n  instances:\n    - name: \"web-server-{guid}\"\n      provider: \"aws\"\n      region: \"us-east\"\n      flavor: \"medium\"\n      image: \"RHEL9-latest\"\n      count: 5  # Deploy 5 identical web servers\n    \n    - name: \"worker-{guid}\"\n      provider: \"gcp\"\n      region: \"us-east\"\n      cores: 4\n      memory: 8192\n      image: \"RHEL9-latest\"\n      count: 3  # Deploy 3 identical worker nodes\n```\n\n**Instance Naming**: When `count > 1`, instances are automatically named with suffixes:\n- `web-server-scale1-1`, `web-server-scale1-2`, `web-server-scale1-3`, etc.\n- Each instance gets identical configuration but unique names and resources\n\n**Cost Analysis**: YamlForge automatically calculates total costs:\n- Shows per-instance cost and total cost across all instances\n- Includes count multipliers in cost summaries and analysis\n\n### Provider Discounts\n\nYamlForge supports configurable provider-specific discounts for accurate cost analysis in enterprise environments:\n\n**Configuration Options:**\n```yaml\n# defaults/core.yaml - Organization-wide discounts\ncost_analysis:\n  provider_discounts:\n    \"aws\": 10             # 10% enterprise agreement discount\n    \"azure\": 20           # 20% EA discount  \n    \"gcp\": 10             # 10% committed use discount\n    \"oci\": 25             # 25% promotional discount\n```\n\n**Environment Variable Overrides:**\n```bash\n# Environment variables take precedence over core configuration\nexport YAMLFORGE_DISCOUNT_AWS=15        # 15% AWS discount\nexport YAMLFORGE_DISCOUNT_AZURE=20      # 20% Azure discount\nexport YAMLFORGE_DISCOUNT_GCP=10        # 10% GCP discount\nexport YAMLFORGE_DISCOUNT_OCI=25        # 25% OCI discount\nexport YAMLFORGE_DISCOUNT_IBM_VPC=18    # 18% IBM VPC discount\nexport YAMLFORGE_DISCOUNT_IBM_CLASSIC=12 # 12% IBM Classic discount\nexport YAMLFORGE_DISCOUNT_ALIBABA=30    # 30% Alibaba discount\nexport YAMLFORGE_DISCOUNT_VMWARE=5      # 5% VMware discount\n```\n\n**Features:**\n- **Percentage-based**: Discounts specified as 0-100% \n- **Environment precedence**: Environment variables override core configuration\n- **Cost analysis integration**: Applied to all cost displays and cheapest provider selection\n- **Input validation**: Invalid values show warnings and default to 0%\n- **Clear display**: Shows both original and discounted prices: `$0.0416/hour \u2192 $0.0312/hour (25.0% discount)`\n\n### Cost Optimization\nYamlForge offers two intelligent cost optimization providers:\n\n**`cheapest`** - General cost optimization for balanced workloads:\n```yaml\nguid: \"cost1\"\n\nyamlforge:\n  cloud_workspace:\n    name: \"cost-optimized-{guid}\"\n    description: \"Automatically select cheapest provider\"\n  \n  instances:\n    - name: \"api-server-{guid}\"\n      provider: \"cheapest\"  # Finds cheapest instance meeting CPU/memory requirements\n      region: \"us-east\"\n      flavor: \"medium\"  # Must specify size or cores/memory\n      image: \"RHEL9-latest\"\n    - name: \"database-server-{guid}\"\n      provider: \"cheapest\"  # CPU/memory only - no GPU needed\n      region: \"us-east\"\n      cores: 4\n      memory: 8192  # MB\n      image: \"RHEL9-latest\"\n    - name: \"ml-training-{guid}\"\n      provider: \"cheapest\"  # Can also optimize GPU workloads with specs\n      region: \"us-east\"\n      cores: 8\n      memory: 16384  # MB\n      gpu_type: \"NVIDIA V100\"\n      gpu_count: 1\n      image: \"RHEL9-latest\"\n    - name: \"app-server-{guid}\"\n      provider: \"cheapest\"  # Combines t-shirt sizing with cost optimization\n      region: \"us-east\"\n      flavor: \"large\"  # Generic size - YamlForge finds cheapest \"large\" across all clouds\n      image: \"RHEL9-latest\"\n```\n\n**`cheapest-gpu`** - Specialized GPU cost optimization:\n```yaml\nguid: \"gpu1\"\n\nyamlforge:\n  cloud_workspace:\n    name: \"gpu-optimized-{guid}\"\n    description: \"Cheapest GPU instances across all clouds\"\n  \n  instances:\n    - name: \"gpu-worker-{guid}\"\n      provider: \"cheapest-gpu\"  # Focuses purely on GPU cost, ignores CPU/memory\n      region: \"us-east\"\n      gpu_type: \"NVIDIA T4\"  # Only GPU requirements needed\n      gpu_count: 1\n      image: \"RHEL9-latest\"\n```\n\n**Key Differences:**\n- **`cheapest`**: Requires `size` or `cores`/`memory`, optimizes for overall cost\n- **`cheapest-gpu`**: Only needs `gpu_type`/`gpu_count`, finds cheapest GPU regardless of CPU/memory\n\n### Enterprise OpenShift\nDeploy OpenShift clusters optimized for each cloud's native capabilities:\n```yaml\nguid: \"ocp1\"\n\nyamlforge:\n  cloud_workspace:\n    name: \"enterprise-openshift-{guid}\"\n    description: \"Enterprise OpenShift across clouds\"\n  \n  openshift_clusters:\n    - name: \"aws-rosa-{guid}\"\n      type: \"rosa-classic\"\n      region: \"us-east\"\n      version: \"4.18.19\"\n      size: \"large\"  # Cluster size (not instance size)\n    - name: \"azure-aro-{guid}\"\n      type: \"aro\"\n      region: \"us-east\"\n      version: \"latest\"\n      size: \"large\"  # Cluster size (not instance size)\n```\n\n### Generic Images\nUse the same image names across all cloud providers:\n```yaml\nguid: \"img1\"\n\nyamlforge:\n  cloud_workspace:\n    name: \"multi-os-deployment-{guid}\"\n    description: \"Deploying different operating systems across clouds\"\n  \n  instances:\n    - name: \"web-server-{guid}\"\n      provider: \"aws\"\n      region: \"us-east\"\n      flavor: \"medium\"\n      image: \"RHEL9-latest\"  # Generic name - maps to provider-specific images\n    - name: \"app-server-{guid}\"\n      provider: \"azure\"\n      region: \"us-east\"\n      flavor: \"medium\"\n      image: \"Ubuntu2204-latest\"  # Ubuntu 22.04 LTS - works on all clouds\n    - name: \"db-server-{guid}\"\n      provider: \"gcp\"\n      region: \"us-east\"\n      flavor: \"medium\"\n      image: \"Fedora-latest\"  # Fedora (latest stable) - works on all clouds\n    - name: \"monitoring-{guid}\"\n      provider: \"oci\"\n      region: \"us-east\"\n      flavor: \"medium\"\n      image: \"OracleLinux9-latest\"  # Oracle Linux 9 - works on all clouds\n```\n\n### Generic Locations\nUse simple region names that work across all cloud providers:\n```yaml\n# Instead of learning provider-specific regions:\n# AWS: us-east-1, Azure: East US, GCP: us-east1, OCI: us-ashburn-1...\n\n# Just use: \"us-east\" - YamlForge maps to the correct region for each provider\nregion: \"us-east\"  # Works on all clouds\n```\n\n## Universal Mappings\n\nYamlForge uses generic names that work across all clouds. All mappings are customizable:\n\n**Customizable Mappings:**\nAll mappings can be customized in the `mappings/` directory:\n- `mappings/images.yaml` - Customize image mappings\n- `mappings/locations.yaml` - Customize region mappings  \n- `mappings/flavors/` - Customize instance type mappings\n- `mappings/flavors_openshift/` - Customize OpenShift-specific mappings\n\n**Unbiased and Transparent:**\nYamlForge is not biased toward any specific operating system image or cloud provider. We only use information freely available on the internet to determine costs and make recommendations. Users can add their own operating system images in the `mappings/images.yaml` file to customize the available options for their deployments.\n\n## Supported Platforms\n\n### Cloud Providers\n- **AWS** - Native EC2, VPC, Security Groups, ROSA clusters\n- **Azure** - Virtual Machines, VNets, Network Security Groups, ARO clusters  \n- **GCP** - Compute Engine with dynamic image discovery\n- **IBM Cloud** - VPC Gen 2 and Classic Infrastructure ([Configuration](docs/ibm-vpc-configuration.md))\n- **Oracle Cloud (OCI)** - Compute instances and networking\n- **Alibaba Cloud** - ECS instances and VPC\n- **VMware vSphere** - Virtual machines and networking\n- **CNV** - Container Native Virtualization (KubeVirt) for Kubernetes and OpenShift clusters with automatic operator validation\n\n### OpenShift Platforms\n- **ROSA** (Classic & HCP) - Red Hat OpenShift Service on AWS\n- **ARO** - Azure Red Hat OpenShift\n- **OpenShift Dedicated** - Managed OpenShift clusters\n- **Self-Managed** - Custom OpenShift deployments\n- **HyperShift** - Hosted control planes\n\n### Container Native Virtualization (CNV)\n- **Kubernetes KubeVirt** - Upstream KubeVirt operator support\n- **OpenShift CNV** - Red Hat CNV operator with enhanced features\n- **Automatic Validation** - Kubernetes API-based operator validation\n- **Environment Variables** - Direct cluster access via `OPENSHIFT_CLUSTER_URL` and `OPENSHIFT_CLUSTER_TOKEN`\n- **Namespace Management** - Automatic namespace creation and CNV enablement\n- **DataVolume Support** - Dynamic image discovery from DataVolumes\n- **Cost Optimization** - Minimal cost since VMs use local cluster resources\n\n## Key Features\n\n- **Universal Cloud Support**: Deploy to any major cloud provider with identical syntax\n- **Intelligent Assistance**: AI-powered configuration generation from natural language\n- **Enterprise Patterns**: Pre-built templates for OpenShift, Kubernetes, and production workloads\n- **Zero Lock-in**: Migrate between clouds without rewriting your infrastructure code\n- **Production Hardened**: Built-in security, compliance, and operational best practices\n- **Developer Experience**: Intuitive YAML syntax that abstracts away cloud complexity\n- **Cost Optimization**: Automatic cheapest provider selection\n- **GPU Support**: Complete GPU instance support with cost analysis\n- **GUID-Based**: Unique deployment identification (5-char required)\n- **Auto-Discovery**: Automatic flavor recommendation\n- **Enterprise Security**: Red Hat Cloud Access, service accounts\n- **Smart Detection**: Only includes Terraform providers you use\n- **Unified Deployment**: Single command deploys infrastructure and OpenShift clusters\n- **ROSA Integration**: Automated ROSA account role creation via CLI\n- **CNV Integration**: Kubernetes API-based validation and deployment for virtual machines\n\n## How It Works\n\n```\nYour Vision \u2192 YAML Definition \u2192 Universal Processing \u2192 Provider-Specific Terraform \u2192 Multi-Cloud Deployment\n```\n\nYamlForge acts as the intelligent translation layer between your infrastructure vision and the reality of multi-cloud deployment.\n\n## Documentation\n\n- [Getting Started](docs/quickstart.md)\n- [DemoBuilder AI Assistant](demobuilder/README.md) - Conversational infrastructure configuration\n- [Configuration Reference](docs/configuration/)\n- [AI Training Guide](docs/ai-training.md)\n- [Multi-Cloud Examples](examples/)\n- [OpenShift Deployment](docs/openshift/)\n- [CNV Provider](docs/cnv-provider.md)\n\n## Contributing\n\nHelp us build the future of universal infrastructure. See our [Contributing Guide](CONTRIBUTING.md).\n\n## License\n\nThis project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.\n\n## Author\n\n**Patrick T. Rutledge III**\n\nProject Link: [https://github.com/rut31337/YamlForge](https://github.com/rut31337/YamlForge) \n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Multi-Cloud Infrastructure as Code and PaaS Management Suite (BETA - Feature Complete)",
    "version": "1.0.0b4",
    "project_urls": {
        "Homepage": "https://github.com/rut31337/YamlForge",
        "Issues": "https://github.com/rut31337/YamlForge/issues",
        "Repository": "https://github.com/rut31337/YamlForge"
    },
    "split_keywords": [
        "terraform",
        " multi-cloud",
        " infrastructure-as-code",
        " paas",
        " management",
        " yaml",
        " aws",
        " azure",
        " gcp",
        " openshift",
        " kubernetes"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a20497ab8ff9bba6f38b35edd554829c2ecb0615a29b4ea9f88510469fb12732",
                "md5": "a55bcc09976dae211f32589ada331c2f",
                "sha256": "9154e7ebdcc8be096490352cf9991d9cb1ed63f0964905ca75a3fe6247c81aeb"
            },
            "downloads": -1,
            "filename": "yamlforge_infra-1.0.0b4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a55bcc09976dae211f32589ada331c2f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 293161,
            "upload_time": "2025-08-13T17:49:07",
            "upload_time_iso_8601": "2025-08-13T17:49:07.862575Z",
            "url": "https://files.pythonhosted.org/packages/a2/04/97ab8ff9bba6f38b35edd554829c2ecb0615a29b4ea9f88510469fb12732/yamlforge_infra-1.0.0b4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "cfbe2430f803b5325f53c2652ef2034cf647ec6500fda5b0655c929b972ea45d",
                "md5": "c61bed1eca078d83a1219ab989d18cdd",
                "sha256": "12256b5543d5603fcb7e51c5d136e6362ea336f2eb62a9129bb33142cd22ca43"
            },
            "downloads": -1,
            "filename": "yamlforge_infra-1.0.0b4.tar.gz",
            "has_sig": false,
            "md5_digest": "c61bed1eca078d83a1219ab989d18cdd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 245389,
            "upload_time": "2025-08-13T17:49:09",
            "upload_time_iso_8601": "2025-08-13T17:49:09.019926Z",
            "url": "https://files.pythonhosted.org/packages/cf/be/2430f803b5325f53c2652ef2034cf647ec6500fda5b0655c929b972ea45d/yamlforge_infra-1.0.0b4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-13 17:49:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "rut31337",
    "github_project": "YamlForge",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "PyYAML",
            "specs": [
                [
                    ">=",
                    "6.0.2"
                ]
            ]
        },
        {
            "name": "boto3",
            "specs": [
                [
                    ">=",
                    "1.39.0"
                ]
            ]
        },
        {
            "name": "google-cloud-compute",
            "specs": [
                [
                    ">=",
                    "1.32.0"
                ]
            ]
        },
        {
            "name": "google-cloud-dns",
            "specs": [
                [
                    ">=",
                    "0.35.0"
                ]
            ]
        },
        {
            "name": "oci",
            "specs": [
                [
                    ">=",
                    "2.155.0"
                ]
            ]
        },
        {
            "name": "alibabacloud-ecs20140526",
            "specs": [
                [
                    ">=",
                    "7.0.0"
                ]
            ]
        },
        {
            "name": "alibabacloud-tea-openapi",
            "specs": [
                [
                    ">=",
                    "0.3.0"
                ]
            ]
        },
        {
            "name": "ibm-cloud-sdk-core",
            "specs": [
                [
                    ">=",
                    "3.16.7"
                ]
            ]
        },
        {
            "name": "ibm-vpc",
            "specs": [
                [
                    ">=",
                    "0.10.0"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    ">=",
                    "2.32.0"
                ]
            ]
        },
        {
            "name": "streamlit",
            "specs": [
                [
                    ">=",
                    "1.29.0"
                ]
            ]
        },
        {
            "name": "langchain",
            "specs": [
                [
                    ">=",
                    "0.1.0"
                ]
            ]
        },
        {
            "name": "langchain-anthropic",
            "specs": [
                [
                    ">=",
                    "0.1.0"
                ]
            ]
        },
        {
            "name": "langchain-google-vertexai",
            "specs": [
                [
                    ">=",
                    "0.1.0"
                ]
            ]
        },
        {
            "name": "langgraph",
            "specs": [
                [
                    ">=",
                    "0.0.40"
                ]
            ]
        },
        {
            "name": "streamlit-chat",
            "specs": [
                [
                    ">=",
                    "0.1.1"
                ]
            ]
        },
        {
            "name": "pydantic",
            "specs": [
                [
                    ">=",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "jsonschema",
            "specs": [
                [
                    ">=",
                    "4.17.0"
                ]
            ]
        },
        {
            "name": "redis",
            "specs": [
                [
                    ">=",
                    "4.5.0"
                ]
            ]
        },
        {
            "name": "python-dotenv",
            "specs": [
                [
                    ">=",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "anthropic",
            "specs": [
                [
                    ">=",
                    "0.25.0"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    ">=",
                    "7.4.0"
                ]
            ]
        },
        {
            "name": "pytest-asyncio",
            "specs": [
                [
                    ">=",
                    "0.21.0"
                ]
            ]
        },
        {
            "name": "black",
            "specs": [
                [
                    ">=",
                    "23.0.0"
                ]
            ]
        },
        {
            "name": "flake8",
            "specs": [
                [
                    ">=",
                    "6.0.0"
                ]
            ]
        },
        {
            "name": "mypy",
            "specs": [
                [
                    ">=",
                    "1.5.0"
                ]
            ]
        },
        {
            "name": "python-keycloak",
            "specs": [
                [
                    ">=",
                    "3.0.0"
                ]
            ]
        },
        {
            "name": "aiohttp",
            "specs": [
                [
                    ">=",
                    "3.8.0"
                ]
            ]
        },
        {
            "name": "kubernetes",
            "specs": [
                [
                    ">=",
                    "24.2.0"
                ]
            ]
        }
    ],
    "lcname": "yamlforge-infra"
}
        
Elapsed time: 0.73502s