0% found this document useful (0 votes)
18 views17 pages

Jenkins CI/CD for Java on AWS

The document outlines the setup of a Jenkins CI/CD pipeline for deploying a Java application using Maven and Tomcat on an AWS EC2 instance. It details the process of building, testing, packaging, and deploying the application, along with the necessary tools and configurations, including Git, Jenkins, and email notifications. Additionally, it provides steps for configuring security settings and integrating with Docker Hub for image management.

Uploaded by

dayashankar
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views17 pages

Jenkins CI/CD for Java on AWS

The document outlines the setup of a Jenkins CI/CD pipeline for deploying a Java application using Maven and Tomcat on an AWS EC2 instance. It details the process of building, testing, packaging, and deploying the application, along with the necessary tools and configurations, including Git, Jenkins, and email notifications. Additionally, it provides steps for configuring security settings and integrating with Docker Hub for image management.

Uploaded by

dayashankar
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

AWS DevOps Project |Build Jenkins CI/CD Pipeline for

Java Application deployment | Maven | Tomcat |


Webhooks

CI/CD Pipeline (Jenkins): Jenkins is configured to monitor


the Git repository. Upon detecting changes, it performs the
following:
o Build: Uses Maven to compile the Java application.
o Test: Runs unit tests to ensure code quality
o Package: Packages the application into a deployable
format (e.g., WAR or JAR file).
Deploy: Transfers the packaged application to the AWS EC2
instance
 AWS EC2 Instance (Web Server): Hosts the deployed Java
application, making it accessible to end-users.
 Developer writes Java code and defines dependencies in
[Link].
 Maven reads [Link], downloads necessary libraries,
compiles code and package it into a .war file
 Tomcat takes the .war file and deploys it as a web app
accessible via a browser.

🔧 Tools and Technologies Used


 Java & Maven: For application development and build
automation.
 Git: Version control system to manage source code.
 Jenkins: Automates the build, test, and deployment
processes.
 AWS EC2: Provides scalable computing capacity to host the
application.
Configure Infrastructure in AWS Cloud
Launch an EC2 Instance Ubuntu (22.04) T2 medium Instance

EC2instance->Security Groups->Edit inbound Rules:


Configure Security Group
Install the [Link]
Create Docker file
Jenkins ->Manage Jenkins ->Credentials
Add Credentials of Docker Hub
Install the tools and required Plugins in Manage Jenkins
Maven 3
Jenkins SMTP Configuration
Please go to:
Jenkins Dashboard → Manage Jenkins → Configure System → Extended
E-mail Notification
Fill in the following exact values (for Gmail):
 SMTP Server: [Link]

 Use SMTP Authentication: ✅ checked


o User Name: singhpreeti1618@[Link]
o Password: Use App Password
 SMTP Port: 587

 Use TLS: ✅ checked


 Charset: UTF-8
If Using Gmail, Enable App Passwords
Gmail blocks access from “less secure apps,” so use an App Password.
Steps:
1. Go to [Link]
2. Enable 2-Step Verification
3. Click App Passwords
4. Generate password for Mail > Other (Custom Name: MavenApp)
5. Copy and use this password in Jenkins

Install Email extension Plugin


War file is created from [Link] using Maven build tool
Gmail Alert for Pipeline Success

Image successfully pushed to Docker Hub


Thanks for viewing!

-Preeti Singh | LinkedIn: [Link] | GitHub:


[Link]

You might also like