How tape4/spring-cicd-template works
1. Nginx – acting as the front door for HTTP requests and managing load balancing and routing between multiple Spring Application instances.
2. Spring Boot Applications – running as two separate instances to support a zero-downtime deployment via rolling updates.
Storage and Cache – comprising MariaDB (for persistent data) and Redis (for caching).
4. Monitoring and Logging – which includes Prometheus (recording metrics), Grafana (displaying dashboards), and Loki (handling log aggregation).
The project also contains dedicated directories and scripts to manage infrastructure (such as launching or shutting down services and executing rolling updates).
Main Components
• Frontend Gateway: Represented by Nginx (including an additional Nginx-status component for monitoring).
• Backend Services: Include MariaDB and Redis as the system’s data persistence and caching backend.
• External User: Indicate an external “User” node showing the entry point of HTTP requests into the system.
Relationships and Data Flows
• How the Spring Boot application(s) emit metrics or log data to Prometheus and Loki, which in turn feed into Grafana for visualization.
• Additional interactions where the Spring applications query or update data in MariaDB and use Redis for caching.
Architectural Patterns and Design Principles
• Zero-Downtime Deployment: Show how the two instances of the Spring application allow for rollback and smooth transitions during rolling updates.
Technologies and Frameworks
• Spring Boot for the application services.
• MariaDB and Redis for backend storage.
• Docker Compose for container orchestration.
• Nginx for load balancing and reverse proxy.
• Prometheus, Grafana, and Loki for monitoring and logging.
Overall Detailed Approach
• Within the AWS EC2 boundary, segregate the four layers:
• Layer 1: Nginx (plus status endpoints).
• Layer 2: Spring Boot Applications where at least two instances are depicted with state annotations.
• Layer 3: Monitoring which aggregates data from Prometheus, Grafana, and Loki.
• Layer 4: Backend services (MariaDB and Redis).