Building Automated CI / CD Pipeline for Java Application with Kubernetes On AWS

About the client:

Our client works in Knowledge management industry. They heavily use a Java enterprise application to manage their unstructured documents.

Challenges:

The requirement was to build the CI/CD pipeline for a Java Enterprise Application on Kubernetes. The deployment should be automated in multiple environments.

Below are a few challenges they faced :

  • Unable to run tests in the real world.
  • The code coverage was very less.
  • Deploying code to production was a challenge.
  • Building the code was time-consuming.
  • Code review time was higher.
Our Solution:

The source code repository was maintained in Bitbucket.

We used Bitbucket webhooks to trigger the AWS lambda function using the API gateway. The lambda function was build to copy the source code to the S3 bucket dedicated to the deployment process. Then the AWS Codebuild project was configured to build the source in the S3 bucket and produce docker images. The docker images are pushed to AWS ECR and used by code deploy in the later stage of the pipeline.

The code deploy service is used to deploy the containers from ECR to the Kubernetes cluster. The Codedeploy is configured to deploy the code without any downtime.

 

AWSCICDPipelineforJavaApplicationWithKubernetes_0[1]

Business Benefits:

Our solution has successfully built continuous deployment in multiple environments with zero downtime. The client can now :

  • Run their tests continuously.
  • It can automate the deployment avoiding the possible mistakes in manual deployment.
  • Deploy to the staging environment and use the staging environment.
  • Can deploy their code automatically to the Production environment.

Moving to Continuous Deployment has changed the client’s development dramatically. The productive has increased significantly and lead to a more stable and better product. Steps like automated testing are helping them to build a better product for their users.

Like this article?

Share on facebook
Share on Facebook
Share on twitter
Share on Twitter
Share on linkedin
Share on Linkdin
Share on pinterest
Share on Pinterest

Leave a comment