Skip to content

KrMayank02/AWS-DevOps-Deploy-SpringBoot-App

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Capstone Project: AWS DevOps - CI/CD Pipeline for Spring Boot Application Deployment

Objective: To implement a CI/CD pipeline using AWS services for automating the deployment of a Spring Boot Application on Amazon ECS with Docker, integrating CodePipeline, CodeBuild and ECR for seamless updates.

Real-time Scenario: Imagine a retail company that has a Spring Boot-based inventory management system. The system is used by several departments and is hosted in containers to ensure scalability. The company wants to reduce the manual intervention required to deploy updates by automating the build and deployment process. By setting up a CI/CD pipeline, developers can push updates to a GitHub repository, automatically triggering a sequence of actions that build, containerize, and deploy the application without downtime. This ensures faster and more reliable system updates, minimizing operational delays.

Major Tools, AWS Services, Environment Used in this Project:

  • AWS CodePipeline
  • AWS CodeBuild
  • AWS ECR
  • AWS ECS
  • Docker
  • IAM

High Level Project Diagram:

image

High Level Tasks/Steps:

  • Fork the Springboot app project GitHub repository.
  • Create Amazon ECR Public Repository.
  • Check and update the buildspec.yml and Dockerfile in GitHub Repo.
  • Create AWS CodeBuild project to build the source code and push the image to AWS ECR repository.
  • Create AWS ECS cluster with Fargate (launch type), Task Definition and Service to deploy & run containerized application.
  • Create & configure AWS CodePipeline to trigger on GitHub changes, integrating CodeBuild and ECS for automated deployment.
  • Check and monitor the CI/CD pipeline execution in AWS CodePipeline for GitHub repo changes.

Output Results Screenshots:

Amazon ECR Public Repository with name “springboot”.

image
image

modify the buildspec.yml under github repo:

image
image
image

The build logs displayed that the Build completed, Image created and pushed to ECR.

image

Tail Logs Screesnhot:

image

Image pushed to ECR Repository, screenshot:

image

The Services “springboot-task-service-ya4jo0qk” has been created & deployed successfully in Amazon ECS:

image
image

CodePipeline got created.

The Execution of all the Stages of CodePipeline was done successfully.

image

The CodePipeline – Build stage pushed the image to ECR successfully.

image

The CodePipeline – Deploy stage deployed the latest app image into the ECS under Services >> Task definitions.

image
image

copy the Public IP of deployed Application and access it on browser with below URL: http://44.202.24.165:8080/demo/data

image
image

do some code changes in the Application GitHub Repository and then will check that due to Repository code changes if the AWS CodePipeline gets triggered:

image
image

Just after the code changes done in Github repo, the AWS CodePipeline execution started automatically.

image
image
image
image

Now copy the Public IP of latest deployed Application and access it on browser with below URL:

http://44.197.191.99:8080/demo/message

image

Hence, the AWS CodePipeline is correctly created & configured to automate the Build trigger and Deployment of the Application after any changes in GitHub repo. So, finally the Project is complete and the Objective has been met.

About

This Capstone Project Implements a CI/CD pipeline for Automating the Deployment of a Spring Boot Application using AWS Tools & Services like AWS CodePipeline, Docker with Amazon ECR, Amazon ECS with Fargate, IAM Roles, etc., ensuring reliability, scalability, and automation to address inefficiencies and enable seamless updates.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 82.3%
  • Dockerfile 17.7%