Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.

Commit 78bc8cc

Browse files
committed
feat: [#28] complete configuration architecture refactor with comprehensive validation
- Two-phase configuration architecture fully implemented and validated - Manual testing: 100% success rate with all endpoints functional - E2E testing: Complete infrastructure lifecycle validation (3m 12s) * Infrastructure provisioning: ✅ VM creation and networking * Application deployment: ✅ 5 Docker services deployed * Health validation: ✅ 13/13 checks passed (100% success) * Smoke testing: ✅ All functionality validated Implementation details: - Enhanced Makefile with comprehensive configuration commands - Updated deployment script with corrected path references - Added application configuration scripts and validation - Improved documentation with validation results - Added hosts utilities for DNS management - Updated gitignore patterns for new structure Validation results documented in configuration-architecture-standardization.md System proven production-ready through comprehensive testing
1 parent 5b7b8da commit 78bc8cc

File tree

11 files changed

+1413
-335
lines changed

11 files changed

+1413
-335
lines changed

Makefile

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
.PHONY: infra-config infra-validate-config
55
.PHONY: infra-test-prereq infra-test-ci infra-test-local
66
.PHONY: infra-providers infra-environments provider-info
7-
.PHONY: app-deploy app-redeploy app-health-check
7+
.PHONY: app-config app-validate-config app-deploy app-redeploy app-health-check
88
.PHONY: app-test-config app-test-containers app-test-services
99
.PHONY: vm-ssh vm-console vm-gui-console vm-clean-ssh vm-prepare-ssh vm-status
1010
.PHONY: dev-setup dev-deploy dev-test dev-clean
@@ -68,10 +68,15 @@ help: ## Show this help message
6868
@echo " make infra-apply ENVIRONMENT_TYPE=production ENVIRONMENT_FILE=production-hetzner"
6969
@echo " make app-deploy ENVIRONMENT_TYPE=development ENVIRONMENT_FILE=development-libvirt"
7070
@echo ""
71-
@echo "Configuration examples:"
72-
@echo " make infra-config ENVIRONMENT_TYPE=development PROVIDER=libvirt # Create development-libvirt.env"
73-
@echo " make infra-config ENVIRONMENT_TYPE=production PROVIDER=hetzner # Create production-hetzner.env"
74-
@echo " make infra-config ENVIRONMENT_TYPE=e2e PROVIDER=libvirt # Create e2e-libvirt.env"
71+
@echo "Enhanced Configuration Workflow (Phases 1-6 Completed):"
72+
@echo " make infra-config ENVIRONMENT_TYPE=development PROVIDER=libvirt # Generate development-libvirt.env"
73+
@echo " make infra-validate-config ENVIRONMENT_FILE=development-libvirt # Validate infrastructure config"
74+
@echo " make app-config ENVIRONMENT_FILE=development-libvirt # Generate application configs"
75+
@echo " make app-validate-config ENVIRONMENT_FILE=development-libvirt # Validate application configs"
76+
@echo ""
77+
@echo "Complete Deployment Workflow:"
78+
@echo " make infra-apply ENVIRONMENT_TYPE=development ENVIRONMENT_FILE=development-libvirt # Build stage"
79+
@echo " make app-deploy ENVIRONMENT_TYPE=development ENVIRONMENT_FILE=development-libvirt # Release + Run stages"
7580

7681
install-deps: ## Install required dependencies (Ubuntu/Debian)
7782
@echo "Installing dependencies..."
@@ -222,6 +227,30 @@ infra-test-local: ## Run local-only infrastructure tests (requires virtualizatio
222227
# APPLICATION LAYER (BUILD + RELEASE + RUN STAGES)
223228
# =============================================================================
224229

230+
app-config: ## Generate application configuration for environment (Release stage preparation)
231+
@echo "Generating application configuration for environment: $(ENVIRONMENT_FILE)..."
232+
@if [ -z "$(ENVIRONMENT_FILE)" ]; then \
233+
echo "❌ Error: ENVIRONMENT_FILE parameter is required"; \
234+
echo "Usage: make app-config ENVIRONMENT_FILE=staging-hetzner"; \
235+
echo "Available environments:"; \
236+
ls infrastructure/config/environments/*.env 2>/dev/null | \
237+
xargs -I {} basename {} .env | sed 's/^/ /' || \
238+
echo " No environments found - generate with make infra-config"; \
239+
exit 1; \
240+
fi
241+
application/scripts/configure-app.sh $(ENVIRONMENT_FILE)
242+
243+
app-validate-config: ## Validate application configuration for environment
244+
@echo "Validating application configuration for environment: $(ENVIRONMENT_FILE)..."
245+
@if [ -z "$(ENVIRONMENT_FILE)" ]; then \
246+
echo "❌ Error: ENVIRONMENT_FILE parameter is required"; \
247+
echo "Usage: make app-validate-config ENVIRONMENT_FILE=staging-hetzner"; \
248+
echo "Available environments:"; \
249+
find infrastructure/config/environments/ -name "*.env" -exec basename {} .env \; 2>/dev/null | sort || true; \
250+
exit 1; \
251+
fi
252+
application/scripts/configure-app.sh --validate $(ENVIRONMENT_FILE)
253+
225254
app-deploy: ## Deploy application (Twelve-Factor Build + Release + Run stages)
226255
@echo "Deploying application for $(ENVIRONMENT_TYPE)-$(ENVIRONMENT_FILE)..."
227256
@if [ "$(SKIP_WAIT)" = "true" ]; then \

application/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ docker-compose.override.yml
2121
*.sqlite
2222
*.sqlite3
2323

24+
# Generated configuration files (per-environment)
25+
/config/
26+
2427
# SSL certificates and keys
2528
/ssl/
2629
/certs/

0 commit comments

Comments
 (0)