docs: Reorganize scripts documentation with comprehensive guides#33
Merged
Conversation
Add comprehensive architectural decision record (ADR) for replacing pgBouncer with HAProxy for AAP database connection routing due to AAP/pgBouncer compatibility issues. Changes: - Add haproxy-pgbouncer-architectural-analysis.md: 500+ line ADR covering architecture comparison, design validation, implementation guidance, health check scripts, and trade-off analysis - Update aap-containerized-enterprise-dr-architecture.md: Revise HAProxy configuration, network topology, and inventory files to reflect HAProxy database router pattern - Update .gitignore: Add .pub pattern Key architectural decision: - HAProxy routes AAP containers to PostgreSQL VIP (EFM-managed) - External health check validates writable node via pg_is_in_recovery() - Clean separation: EFM handles DB failover, HAProxy handles routing - Trade-off: Requires +67% max_connections (no pooling) but simpler ops RTO/RPO impact: Failover detection ~25s (well within 5min target) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Change pattern from `.pub` (specific file) to `*.pub` (all .pub files) to ensure SSH public keys and other .pub files are never committed. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add comprehensive replication test report (REPLICATION-TEST-REPORT-20260402.md) - Document test results: streaming replication, failover, data consistency - Include performance metrics: 0ms lag, 15s failover time - Add PostgreSQL cluster configuration (3 instances: 1 primary + 2 replicas) - Create reports directory structure with README Tests performed: - Streaming replication validation - Automatic failover simulation - Data consistency verification - Read-only enforcement - LSN synchronization checks - Post-failover replication All tests passed ✅ Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Refactored the scripts directory documentation to improve discoverability and provide detailed reference materials: Changes: - Moved comprehensive guide from scripts/README.md to docs/scripts-guide.md - Created concise scripts/README.md as quick reference index - Added docs/scripts-library-reference.md with detailed API docs - Added docs/scripts-hooks-and-cicd.md covering quality automation - Updated docs/INDEX.md to reference new documentation New Documentation: 1. scripts/README.md - Quick reference organized by category 2. docs/scripts-guide.md - Complete usage guide (moved from scripts/) 3. docs/scripts-library-reference.md - Library functions API reference 4. docs/scripts-hooks-and-cicd.md - Pre-commit hooks and CI/CD guide Library Reference includes: - aap-scaling.sh functions (validate_cluster_context, scale_deployment, etc.) - logging.sh functions (setup_logging, log levels, rotation) - Complete usage examples and best practices Hooks & CI/CD Guide covers: - Pre-commit hooks setup and usage - run-ci-checks-locally.sh comprehensive documentation - GitHub Actions integration - Tool installation guide (shellcheck, kubeval, yamllint) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fixed bash syntax error in deploy-aap-lab-external-pg.sh caused by incorrect backslash escaping in regex pattern. Removed unnecessary double-backslash escape that was causing parse error. Error: [\'\"\;] → Fixed: [\'\"\;] This fixes the CI Bash Syntax Validation failure. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fixed ShellCheck SC2168 errors by removing 'local' keyword from variable declarations in main script body. The 'local' keyword is only valid inside function definitions. Changes: - scripts/dr-failover-test.sh: Removed 'local' from retry logic vars - scripts/measure-rto-rpo.sh: Removed 'local' from temp file vars ShellCheck errors resolved: - dr-failover-test.sh:272-274: 'local' only valid in functions - measure-rto-rpo.sh:251,253: 'local' only valid in functions 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
Refactored the scripts directory documentation to improve discoverability and provide detailed reference materials for all automation scripts, libraries, and CI/CD tooling.
Changes
Documentation Reorganization
scripts/README.mdtodocs/scripts-guide.mdscripts/README.mdas quick reference indexdocs/scripts-library-reference.mdwith detailed API documentationdocs/scripts-hooks-and-cicd.mdcovering quality automationdocs/INDEX.mdto reference new documentationNew Documentation Files
1. scripts/README.md (Rewritten)
Quick reference organized by category:
2. docs/scripts-guide.md (Moved)
Comprehensive usage guide covering:
3. docs/scripts-library-reference.md (NEW)
Complete library API documentation:
validate_cluster_context- Cluster context validationvalidate_database_primary- Split-brain preventionscale_deployment- Idempotent scaling operationswait_for_pods- Pod readiness monitoringsetup_logging- Log initializationlog,log_error,log_warn,log_success- Structured loggingrotate_logs- Log rotation4. docs/scripts-hooks-and-cicd.md (NEW)
Pre-commit hooks and CI/CD automation:
check-script-permissions.shdocumentationvalidate-openshift-manifests.shdocumentationrun-ci-checks-locally.shcomprehensive guideBenefits
✅ Improved discoverability - Quick reference in scripts/ with detailed docs in docs/
✅ Better organization - Documentation organized by use case and audience
✅ Complete API reference - Library functions fully documented with examples
✅ CI/CD transparency - All quality checks documented and runnable locally
✅ Consistent structure - Follows repository documentation patterns
Testing
Related Documentation
🤖 Generated with Claude Code