ADR-007: Virtual Infrastructure Testing Environment
Date
2025-03-09
Status
Accepted
Decision Makers
- Development Team
- Infrastructure Team
- QA Engineers
Context
The project requires a reliable, reproducible testing environment for OpenShift deployments that can:
- Simulate bare metal infrastructure
- Support both connected and disconnected installations
- Provide consistent network configurations
- Enable automated testing and validation
- Support various cluster configurations
Considered Options
1. VirtualBox
- Pros:
- Cross-platform support
- GUI management
- Cons:
- Performance overhead
- Limited automation capabilities
- Network limitations
2. VMware Workstation/Fusion
- Pros:
- Enterprise support
- Mature tooling
- Cons:
- License costs
- Platform limitations
- Complex automation
3. KVM/QEMU with libvirt (Selected)
- Pros:
- Native Linux performance
- Extensive automation support
- Network flexibility
- BMC emulation capability
- Cons:
- Linux-specific
- Setup complexity
- Resource requirements
Decision
Implement virtual infrastructure testing using KVM/QEMU with libvirt, featuring:
- Core Components
hack/ ├── deploy-on-kvm.sh # VM deployment ├── watch-and-reboot-kvm-vms.sh # VM monitoring ├── configure_dns_entries.sh # DNS configuration ├── deploy-freeipa.sh # Identity management └── vyos-router.sh # Network routing
- Infrastructure Management
- KVM/QEMU for virtualization
- Libvirt for VM management
- VyOS for network routing
- FreeIPA for identity services
- Resource Management
- Dynamic resource allocation
- Automated VM provisioning
- Network configuration
- Storage management
Implementation
VM Deployment Process
- Environment Setup
```bash
System requirements
- libvirt
- qemu-kvm
- virt-manager
- cloud-init ```
- Network Configuration
```bash
Network components
- Bridge networks
- VLANs
- DNS configuration
- DHCP services ```
- VM Management
```bash
Key operations
- VM creation
- Resource allocation
- Network attachment
- Boot monitoring ```
Infrastructure Components
- Virtualization Layer
- KVM for hardware virtualization
- QEMU for machine emulation
- Libvirt for management API
- Network Infrastructure
- VyOS router for routing
- Bridge networks for connectivity
- VLAN support for segregation
- Support Services
- FreeIPA for identity management
- DNS for name resolution
- DHCP for IP management
Test Integration
- Deployment Testing
# Test execution ./e2e-tests/run_e2e.sh <site_config>
- Infrastructure Validation
# Environment checks ./e2e-tests/validate_env.sh
Consequences
Positive
- Native virtualization performance
- Comprehensive automation support
- Flexible network configuration
- Integrated identity management
- Resource optimization
- Reproducible environments
Negative
- Linux platform dependency
- Complex initial setup
- High resource requirements
- Technical expertise needed
Test Scenarios
Basic Testing
- Single-node deployments
- Multi-node clusters
- Network configurations
- Storage setups
Advanced Testing
- Disconnected installations
- Custom network topologies
- High-availability configurations
- Failure scenarios
Related ADRs
- ADR-013: End-to-End Testing Framework
- ADR-006: Testing and Execution Environment
- ADR-009: Testing Infrastructure and ISO Management