docs: Add AAP 2.6 containerized DR architectures and validation#29
Merged
docs: Add AAP 2.6 containerized DR architectures and validation#29
Conversation
Add comprehensive multi-datacenter disaster recovery architectures for Ansible Automation Platform 2.6 containerized deployments, validated against Red Hat's official tested deployment models. New Documentation: 1. AAP Containerized Growth DR Architecture (16 VMs) - 3-node multi-component design per datacenter - Cost-optimized for small-medium deployments (<500 jobs/hour) - Component colocation on 3 AAP nodes - Based on Red Hat Container Growth Topology 2. AAP Containerized Enterprise DR Architecture (26 VMs) - 8-node dedicated component design per datacenter - Production-grade with full component isolation - 2x Gateway, 2x Controller, 2x Hub, 2x EDA per DC - Based on Red Hat Container Enterprise Topology 3. Architecture Validation Report - Detailed comparison against Red Hat AAP 2.6 tested models - Critical issues identified and resolved - Database naming corrections (awx, automationhub, etc.) - Redis colocation requirements validated - Network port requirements documented Key Features (Both Architectures): - Active/Passive multi-datacenter failover - EDB PostgreSQL streaming replication + WAL archiving - EDB Failover Manager (EFM) automated database failover - Automated AAP startup on failover (< 5 min RTO) - Redis colocated per Red Hat requirements - Global Load Balancer for traffic management - Comprehensive failover/failback procedures Changes: - docs/INDEX.md: Added both architectures with selection guide - docs/aap-architecture-validation-report.md: 524 lines (NEW) - docs/aap-containerized-enterprise-dr-architecture.md: 1338 lines (NEW) - docs/aap-containerized-growth-dr-architecture.md: 782 lines (NEW) Total: 2,657 lines of new documentation Validation: - Conforms to Red Hat AAP 2.6 Container Growth Topology - Conforms to Red Hat AAP 2.6 Container Enterprise Topology - Multi-DC extension follows PostgreSQL best practices - Inventory files match Red Hat's structure - Database names validated against AAP 2.6 requirements Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Address multiple security vulnerabilities and improve code maintainability: Security Fixes: - Prevent command injection in AAP API authentication (jq-based JSON) - Add TLS certificate validation with AAP_CA_BUNDLE support - Fix SQL injection risk in password substitution - Improve datacenter detection with strict pattern matching - Add placeholder config validation to prevent deployment errors Reliability Improvements: - Fix race conditions in metrics collection (atomic file updates) - Add retry logic for database promotion checks - Implement idempotency in scaling scripts - Standardize error handling (set -euo pipefail) Maintainability: - Create shared logging library (scripts/lib/logging.sh) - Create shared AAP scaling library (scripts/lib/aap-scaling.sh) - Improve grep patterns to prevent false matches - Remove copyright headers from all files except LICENSE - Update .gitignore to prevent credential leakage Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses multiple critical security vulnerabilities and improves code maintainability across the DR automation scripts. All changes have been tested and follow secure coding best practices.
Critical Security Fixes 🔒
1. Command Injection Prevention
scripts/validate-aap-data.shjqfor safe JSON construction with proper escaping2. TLS Certificate Validation
scripts/validate-aap-data.sh, multiple curl callscurl -kdisables TLS verification (MITM vulnerable)AAP_CA_BUNDLEenvironment variable support with system CA fallback3. SQL Injection Prevention
aap-deploy/openshift/scripts/deploy-aap-lab-external-pg.sh4. Improved Datacenter Detection
scripts/efm-aap-failover-wrapper.shcasestatement pattern matching with explicit patterns5. Placeholder Config Validation
scripts/efm-aap-failover-wrapper.sh,scripts/scale-aap-*.shReliability Improvements ⚙️
6. Race Condition Fix
scripts/measure-rto-rpo.sh.bakfilesmktemp+mv7. Database Promotion Retry Logic
scripts/dr-failover-test.sh8. Idempotent Scaling Operations
scripts/scale-aap-up.sh,scripts/scale-aap-down.sh9. Standardized Error Handling
set -evsset -euo pipefailset -euo pipefailfor stricter error detectionMaintainability Enhancements 📚
10. Shared Logging Library
scripts/lib/logging.shlog,log_error,log_warn,log_success)/var/log, falls back to/tmp)11. Shared AAP Scaling Library
scripts/lib/aap-scaling.sh12. Improved Grep Patterns
grep -E "automation|aap-gateway"match unintended podsgrep -E '^(automation-(controller|hub)|aap-gateway)'13. Enhanced .gitignore
.gitignore*.secret.yaml(but allow*.secret.yaml.example).DS_Storeand backup files14. Documentation Updates
CONTRIBUTING.mdset -euo pipefail15. Copyright Removal
New Files
scripts/lib/logging.sh- Shared logging functionsscripts/lib/aap-scaling.sh- Shared AAP scaling functionsdocs/aap-containerized-quickstart.md- New quickstart documentationModified Files
.gitignore- Enhanced credential protectionCONTRIBUTING.md- Updated guidelinesaap-deploy/openshift/scripts/deploy-aap-lab-external-pg.sh- SQL injection fixscripts/dr-failover-test.sh- Retry logic, copyright removalscripts/efm-aap-failover-wrapper.sh- Datacenter detection fixscripts/measure-rto-rpo.sh- Race condition fixscripts/scale-aap-up.sh- Idempotency, shared librariesscripts/scale-aap-down.sh- Idempotency, shared librariesscripts/validate-aap-data.sh- Command injection and TLS fixesTesting Checklist
Breaking Changes
None. All changes are backward compatible.
Environment Variables
New Optional Variables:
AAP_CA_BUNDLE- Path to CA certificate bundle for TLS verification (default: system bundle)CLUSTER_CONTEXT- Can be set via environment instead of editing scriptsRecommended Next Steps
Generated with assistance from Claude Sonnet 4.5