Commit ed49c65
authored
refactor: consolidate init scripts and improve infrastructure (#65)
Major infrastructure improvements reducing code duplication and improving maintainability:
## Shared Bash Library
- Create scripts/lib/service-init-common.sh with common Vault AppRole functions
- Refactor all 5 service init scripts (postgres, mysql, redis, mongodb, rabbitmq)
- Reduce ~1600 lines of duplicated code across init scripts
- Fix MySQL JSON parsing: replace fragile grep/sed with jq
- Add support for microdnf/yum package managers (Oracle Linux)
## Docker Compose YAML Anchors
- Add x-redis-common anchor for Redis node configuration
- Add x-redis-exporter-common anchor for Redis exporters
- Reduce ~200 lines of duplicated YAML
## Python Modularization
- Create scripts/devstack/ Python package with type hints
- Modularize into utils.py, vault.py, backup.py modules
- Add comprehensive docstrings and type annotations
## Testing Improvements
- Add parallel test execution (--parallel, --jobs flags)
- Consolidate rollback tests into single parameterized test
- Support basic/standard/comprehensive test levels
## Documentation
- Add Mermaid architecture diagrams to docs/ARCHITECTURE.md
- System overview, startup flow, and network topology diagrams
## Other
- Add configs/network.yaml for centralized network configuration
- Update .gitignore to allow scripts/lib/ directory
All 17 test suites pass (571+ tests).1 parent cc01cb8 commit ed49c65
File tree
16 files changed
+2851
-1636
lines changed- configs
- mongodb/scripts
- mysql/scripts
- postgres/scripts
- rabbitmq/scripts
- redis/scripts
- docs
- scripts
- devstack
- lib
- tests
16 files changed
+2851
-1636
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| |||
0 commit comments