Abstract
This case study outlines the design and implementation of a complete CI/CD pipeline for a Java ATM Simulation application. The project aimed to strengthen hands-on skills in DevOps automation, continuous integration, code quality analysis, artifact management, and deployment workflows using real-world tools on AWS.
Project Goals
Develop a fully automated CI/CD pipeline from code commit to deployment.
Integrate Jenkins, Maven, SonarQube, Nexus, and Tomcat into a streamlined workflow.
Deploy services on separate AWS EC2 instances to mimic production infrastructure.
Implement artifact versioning and reliable storage.
Enable automated deployment to an application server with minimal manual intervention.
Tools & Technology Stack
AWS EC2: Dedicated servers for Jenkins, SonarQube, Nexus, and Tomcat.
Jenkins: CI server and pipeline orchestration.
Maven: Build automation and dependency management.
SonarQube: Static code analysis and code quality reporting.
Nexus Repository Manager: Artifact storage and version control.
Apache Tomcat: Application server deployment.
GitHub: Source code management.
Java 11+: Application and tooling requirement.
Jenkins Plugins: Git, Maven, SSH Agent, SonarQube Scanner.
Infrastructure Setup
Four EC2 instances were provisioned, each hosting a separate tool to simulate production:
Jenkins on port 8080
SonarQube on port 9000
Nexus on port 8081
Tomcat on port 8080
Java was installed on all instances, and security groups were configured for inter-tool communication. Each server was validated for accessibility via a browser to ensure proper connectivity.
Pipeline Design & Implementation
- Source Control Integration
The ATM Simulation project was pushed to GitHub. Jenkins was configured to clone the repository automatically on each build trigger using a declarative pipeline script.
- Build & Test Automation
mvn clean package was used to compile code, execute tests, and generate artifacts. Maven ensured dependency management and consistent builds across environments.
- Code Quality Analysis
SonarQube was integrated by updating pom.xml and Jenkins credentials. Running mvn sonar:sonar generated detailed code metrics, highlighting vulnerabilities and enforcing coding standards.
- Artifact Management
A Maven repository was created in Nexus. pom.xml and Jenkins settings.xml were configured to upload artifacts via mvn deploy, ensuring version-controlled storage and rollback capability.
- Automated Deployment to Tomcat
Tomcat manager roles and credentials were configured. Jenkins deployed the final WAR file, completing the continuous delivery process. Poll SCM triggers enabled automation for every commit.
- Advanced Jenkins Configuration
The SSH Agent plugin simulated a master-slave architecture, enabling distributed builds and enhancing pipeline scalability.
Challenges & Solutions
Tool Version Conflicts: Resolved Java compatibility issues for SonarQube and Nexus.
Nexus Deployment Failures: Fixed misconfigurations in pom.xml and settings.xml.
Tomcat Deployment Errors: Corrected manager roles and permissions for successful deployment.
Pipeline Failures: Updated Jenkins plugins and validated pipeline scripts to resolve build issues.
Key Learnings
Hands-on experience in end-to-end CI/CD workflows.
Integration between source control, CI servers, artifact repositories, and application servers.
Best practices in artifact versioning, storage, and automated deployment.
Troubleshooting pipeline failures and ensuring tool compatibility.
Leveraging Jenkins plugins for scalable master-slave architectures.
Real-world automation of software delivery and cloud deployment.
Conclusion
This project provided practical exposure to enterprise-grade DevOps practices, including automation, CI/CD pipeline creation, artifact management, and deployment orchestration. It strengthened problem-solving, tool integration, and cloud deployment skills, demonstrating the ability to implement and manage robust DevOps workflows in real-world environments while reinforcing a commitment to continuous learning in automation and CI/CD.