config-repo
centralised config repo
Overview
Complete Configuration Repository Structure
config-repo/
βββ application.yml # Global defaults
βββ shared/
β βββ base/
β β βββ application.yml # π’ Base profile (inherited by all)
β βββ postgres.yml # ποΈ PostgreSQL configs
β βββ rabbitmq.yml # π RabbitMQ configs
β βββ elasticsearch.yml # π Elasticsearch configs
β βββ redis.yml # π Redis configs
β βββ monitoring.yml # π Prometheus/Grafana/Loki
β βββ vault.yml # π Vault integration
β
βββ π gateway-service/ # API Gateway
β βββ application.yml # Inherits shared/base
β βββ application-local.yml # π₯οΈ Local dev (Port 8080, no auth)
β βββ application-uat.yml # π§ͺ UAT (Port 8080, UAT DB)
β βββ application-prod.yml # π Prod (HTTPS, prod DB)
β
βββ π° payments-service/ # Payment Processing
β βββ application.yml # Base transaction configs
β βββ application-local.yml # π₯οΈ H2 database, mock mode
β βββ application-uat.yml # π§ͺ Sandbox payment gateway
β βββ application-prod.yml # π PCI-DSS compliant
β
βββ π stockmarket-service/ # Market Data
β βββ application.yml # Real-time feed configs
β βββ application-local.yml # π₯οΈ Mock market data
β βββ application-uat.yml # π§ͺ Test API endpoints
β βββ application-prod.yml # π Live market connections
β
βββ π order-service/ # Order Management
β βββ application.yml # Order validation rules
β βββ application-local.yml # π₯οΈ No inventory checks
β βββ application-uat.yml # π§ͺ Partial inventory validation
β βββ application-prod.yml # π Strict validation
β
βββ π discovery-service/ # Service Discovery
β βββ application.yml # Registry config
β βββ application-local.yml # π₯οΈ Standalone mode
β βββ application-uat.yml # π§ͺ Cluster mode
β βββ application-prod.yml # π Multi-zone deployment
β
βββ βοΈ config-service/ # Config Server
β βββ application.yml # Git repo config
β βββ application-local.yml # π₯οΈ Filesystem backend
β βββ application-uat.yml # π§ͺ Git UAT repo
β βββ application-prod.yml # π Git prod + Vault
β
βββ π¦ framework-commons/ # Shared Libraries
β βββ application.yml # Common beans
β βββ application-local.yml # π₯οΈ Debug logging
β βββ application-uat.yml # π§ͺ Info logging
β βββ application-prod.yml # π Warn logging
β
βββ π₯ user-service/ # User Management
β βββ application.yml # Auth config
β βββ application-local.yml # π₯οΈ In-memory auth
β βββ application-uat.yml # π§ͺ LDAP integration
β βββ application-prod.yml # π OAuth2 + MFA
β
βββ π kyc-service/ # Identity Verification
β βββ application.yml # ID check config
β βββ application-local.yml # π₯οΈ Mock verification
β βββ application-uat.yml # π§ͺ Sandbox API
β βββ application-prod.yml # π Live ID checks
β
βββ βοΈ notification-service/ # Notifications
β βββ application.yml # Delivery config
β βββ application-local.yml # π₯οΈ Log to console
β βββ application-uat.yml # π§ͺ Send to test envs
β βββ application-prod.yml # π Production SMTP
β
βββ π³ wallet-service/ # Digital Wallet
β βββ application.yml # Wallet config
β βββ application-local.yml # π₯οΈ Fake balances
β βββ application-uat.yml # π§ͺ Test blockchain
β βββ application-prod.yml # π Real transactions
β
βββ π¦ core-banking/ # Banking Core
βββ application.yml # Core banking config
βββ application-local.yml # π₯οΈ Simulated core
βββ application-uat.yml # π§ͺ Banking sandbox
βββ application-prod.yml # π Live core banking
Shared Configurations
The shared/ directory contains configurations that are shared across all services:
- PostgreSQL (
postgres.yml): Contains database credentials and service-specific database names (e.g.,service-name-db). - RabbitMQ (
rabbitmq.yml): Defines two queues per service (main queue and dead letter queue). - Elasticsearch (
elasticsearch.yml): Configures unique indices for each service (e.g.,service-name-{env:local}). - Redis (
redis.yml): Shared Redis configurations. - Monitoring (
monitoring.yml): Includes configurations for Grafana, Loki, and Prometheus. - Vault (
vault.yml): HashiCorp Vault configurations for secure secret management.
Environment-Specific Configurations
Each service has the following environment-specific configuration files:
application-local.yml: Local development environment.application-uat.yml: User Acceptance Testing (UAT) environment.application-prod.yml: Production environment.
How to Use
- Spring Cloud Config Server: Point your Spring Cloud Config Server to this repository to serve configurations to your microservices.
- Environment Variables: Use environment variables to override sensitive values (e.g., database credentials, API keys).
- Shared Configurations: Leverage the
shared/directory for common configurations across services.
Monitoring and Observability
The repository includes configurations for monitoring and observability tools:
- Grafana: Dashboard configurations for visualizing metrics.
- Loki: Centralized logging configurations.
- Prometheus: Metrics scraping configurations.
Security
- HashiCorp Vault: Securely manage secrets such as database credentials, API keys, and tokens.
Contributing
Feel free to contribute to this repository by adding new configurations or improving existing ones. Ensure that all changes are tested in the appropriate environments.
This repository is a critical part of the infrastructure and ensures consistent and centralized configuration management for all microservices.