In this blog, I’m thrilled to share the step-by-step demonstration of my latest DevOps project, showcasing the deployment of the Spring PetClinic Application using an automated CI/CD pipeline. This project integrates the power of AWS EKS, Jenkins, SonarQube, and Helm Charts to achieve seamless and efficient application deployment.
Project Overview
This project focuses on deploying the Spring PetClinic Application to an AWS EKS Cluster with the following key objectives:
- Set up an AWS EKS cluster for container orchestration.
- Configure a Jenkins CI/CD pipeline to automate the build, test, and deployment process.
- Integrate SonarQube for static code analysis and quality checks.
- Deploy the application using Helm Charts for scalability and manageability.
- Use AWS ECR to store Docker images securely.
Tech Stack Used
- AWS EKS: Managed Kubernetes service for running containerized applications.
- Jenkins: Automation server to set up CI/CD pipelines.
- SonarQube: Tool for static code analysis to ensure code quality.
- Helm: Package manager for Kubernetes, enabling efficient deployment.
- Docker: Containerization platform to package and run the application.
- Kubernetes: For container orchestration.
- AWS ECR: Elastic Container Registry for secure Docker image storage.
- GitHub: Version control system to host the project repository.
🔗 GitHub Repository: Spring PetClinic Project
🎥 Watch the Demo Video: YouTube Link
Step-by-Step Process
1. Setting Up the AWS EKS Cluster
The foundation of this project is an AWS EKS cluster:
- Node Groups: Configured managed node groups for running Kubernetes workloads.
- Networking: Set up VPC, subnets, and security groups to ensure secure and reliable communication.
- Storage: Configured PersistentVolumes and PersistentVolumeClaims for the MySQL database used by the application.
2. Configuring Jenkins
Jenkins was used to automate the entire CI/CD process:
- Integrated with GitHub to pull the latest code changes.
- Configured pipeline stages to build, test, and deploy the application.
- Used environment variables for dynamic configurations.
3. SonarQube Integration
SonarQube was integrated into the Jenkins pipeline for:
- Static code analysis to identify bugs, vulnerabilities, and code smells.
- Generating quality reports to ensure adherence to coding standards.
4. Creating and Deploying Helm Charts
Helm Charts were used to manage the Kubernetes manifests:
- Defined templates for Deployments, Services, and ConfigMaps.
- Parameterized configurations for flexibility across environments.
5. Application Deployment
The CI/CD pipeline automated the deployment of the Spring PetClinic Application:
- Built Docker images and pushed them to AWS Elastic Container Registry (ECR).
- Used Helm Charts to deploy the application and its MySQL database to the EKS cluster.
Key Highlights
- End-to-End Automation
- The CI/CD pipeline automates the entire process, from code checkout to application deployment.
- Scalability and Reliability
- Leveraged Kubernetes and Helm to ensure scalable and fault-tolerant deployments.
- Enhanced Code Quality
- SonarQube integration ensured high-quality and secure code.
- Seamless Monitoring
- Kubernetes’ built-in monitoring capabilities provided insights into resource utilization and pod statuses.
Pipeline Stages
- Code Checkout: Pulls the latest code from GitHub.
- Trivy Scan: Scans the repository and Docker images for vulnerabilities.
- Unit Testing: Runs unit tests using Maven.
- SonarQube Analysis: Ensures code quality and adherence to best practices.
- Build and Push Docker Image: Builds Docker images and pushes them to AWS ECR.
- Helm Deployment: Deploys the application and MySQL database to the EKS cluster.
- Health Checks: Validates the readiness and liveness of the deployed application.
Challenges and Solutions
- Challenge: Scheduling pods on nodes in the correct availability zone.
- Solution: Used
nodeAffinity
in the Kubernetes manifests to ensure pods were scheduled in the zone where the PersistentVolumes were created.
- Solution: Used
- Challenge: Ensuring seamless integration between Jenkins and SonarQube.
- Solution: Configured SonarQube tokens and credentials securely in Jenkins.
- Challenge: Automating deployment across environments.
- Solution: Parameterized Helm values for flexibility across dev, QA, and production environments.
Conclusion
This project demonstrates the power of integrating modern DevOps tools to achieve efficient and reliable application deployments. With AWS EKS, Jenkins, SonarQube, and Helm working together, the entire process—from code commit to deployment—was automated and streamlined.
📌 GitHub Repository: Spring PetClinic Project
🎥 Demo Video: Watch Now
I hope this blog inspires you to explore the possibilities of DevOps automation. Feel free to reach out if you have any questions or feedback!
Your Thoughts Matter!
I’d love to hear what you think about this article — feel free to share your opinions in the comments below (or above, depending on your device!). If you found this helpful or enjoyable, a clap, a comment, or even a highlight of your favorite sections would mean a lot.
For more insights into the world of technology and data, visit subbutechops.com. There’s plenty of exciting content waiting for you to explore!
Thank you for reading, and happy learning! 🚀

#DevOps #AWS #Kubernetes #Helm #Jenkins #SonarQube #Docker #AWS-ECR #CICD #CloudComputing