{"id":16782139,"url":"https://github.com/arup-g/java-cicd-implementation","last_synced_at":"2026-04-19T03:31:17.231Z","repository":{"id":229868497,"uuid":"771633573","full_name":"ARUP-G/Java-CICD-Implementation","owner":"ARUP-G","description":"Deploying a Spring Boot app with Docker, Jenkins, ArgoCD, Kubernetes","archived":false,"fork":false,"pushed_at":"2024-04-13T19:27:29.000Z","size":980,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-13T21:15:05.675Z","etag":null,"topics":["argocd","docker","dockerhub","java","kubernetes-deployment","maven","sonarqube","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ARUP-G.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-13T16:55:55.000Z","updated_at":"2024-04-03T16:51:47.000Z","dependencies_parsed_at":"2024-09-15T03:20:03.218Z","dependency_job_id":null,"html_url":"https://github.com/ARUP-G/Java-CICD-Implementation","commit_stats":null,"previous_names":["arup-g/java-cicd-implementation"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ARUP-G/Java-CICD-Implementation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ARUP-G%2FJava-CICD-Implementation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ARUP-G%2FJava-CICD-Implementation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ARUP-G%2FJava-CICD-Implementation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ARUP-G%2FJava-CICD-Implementation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ARUP-G","download_url":"https://codeload.github.com/ARUP-G/Java-CICD-Implementation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ARUP-G%2FJava-CICD-Implementation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31993662,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["argocd","docker","dockerhub","java","kubernetes-deployment","maven","sonarqube","spring-boot"],"created_at":"2024-10-13T07:44:32.669Z","updated_at":"2026-04-19T03:31:17.215Z","avatar_url":"https://github.com/ARUP-G.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Java-CICD-Implementation \n## Overview\nThis project is a SpringBoot application developed to demonstrate a Continuous Integration and Continuous Deployment (CI/CD) pipeline using Docker, Jenkins, ArgoCD, Kubernetes, and SonarQube. The application serves as a template for developers to understand and implement CI/CD practices in their SpringBoot projects.\n**The entire setup is deployed on an AWS EC2 instance, showcasing a cloud-based infrastructure for continuous integration and deployment.**\n \n ![App](images/app.png)\n\n## Features\n- SpringBoot application template.\n- CI/CD pipeline implemented with Docker, Jenkins, ArgoCD, Kubernetes, and SonarQube.\n- Docker containers for building, testing, and deploying the application.\n- Jenkins for automating build, test, and deployment processes.\n- ArgoCD for continuous delivery and GitOps-based deployment.\n- Kubernetes for container orchestration and deployment.\n- SonarQube for code quality analysis and static code scanning.\n- AWS EC2 instance for hosting the entire setup.\n\n## Prerequisites\n\n- AWS account with EC2 access.\n- Basic knowledge of AWS services.\n- Docker installed on your EC2 instance.\n- Kubernetes cluster configured on PC (e.g., Minikube, Docker Desktop Kubernetes, or any cloud provider).\n- Jenkins installed and configured on EC2.\n- ArgoCD setup with access to your Kubernetes cluster.\n- SonarQube server accessible from your EC2 instance.\n\n## Getting Started\n1. **Launch an EC2 instance on AWS with appropriate permissions.**\n - Go to AWS Console\n - Instances\n - Launch instances\n - EC2 \u003e Instances \n - In the bottom tabs -\u003e Click on Security\n - Security groups\n - Add inbound traffic rules \n - Allow TCP port:`8080`(for Jenkins) \u0026 port:`9000` (for Sonarqube)\n\n ![Inbound Rules](images/inboundRules.png)\n\n2. **SSH into your EC2 instance.**\n3. **Clone this repository to your EC2 instance.**\n\n```sh\n git clone https://github.com/ARUP-G/Java-CICD-Implementation\n```\n4. **Navigate to the project directory.**\n```sh\ncd Java-CICD-Implementation/spring-boot-app\n```\n5. **Build the Docker image.**\n```sh\ndokcer build -t spring-boot-app .\n```\n6. **Run the Docker container locally for testing.**\n```sh\ndocker run -d -p 8000:8000 spring-boot-app\n```\n7. **Access the application at** `http://your_ec2_public_ip:8000`.\n\n## AWS EC2 Configuration\n- Update existing packages\n```sh\nsudo apt update\n```\n- Download Java (JDK) for Jenkins to run\n```sh\nsudo apt install openjdk-17-jre -y\n```\n- Download Jenkins\n```sh\nsudo wget -O /usr/share/keyrings/jenkins-keyring.asc \\\n  https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key\necho deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \\\n  https://pkg.jenkins.io/debian-stable binary/ | sudo tee \\\n  /etc/apt/sources.list.d/jenkins.list \u003e /dev/null\nsudo apt-get update\nsudo apt-get install jenkins\n```\n- Check if Jenkins Running properly\n```sh\nps -ef | grep jennkins\n```\n- Can Access the jenkins in `http://your_ec2_public_ip:8080`\n- For admin password\n```sh\n sudo cat /var/lib/jenkins/secrets/initialAdminPassword\n```\n- **Docker** install for build and pipeline agent\n```sh\nsudo apt install docker.io\n```\n- Grant Jenkins user and Ubuntu user permission to docker deamon\n```sh\nsudo su -\nusermod -aG docker jenkins\nusermod -aG docker ubuntu\nsystemctl restart docker\n```\n\n\n## CI/CD Pipeline\n**The CI/CD pipeline is implemented with Jenkins and ArgoCD:**\n\n### Jenkins is responsible for:\n\n- Triggering the pipeline on code commits.\n- Building the Docker image.\n- Scanning code with SonarQube.\n- Pushing the Docker image to the Docker registry.\n- Update imageTag in deployment manifest repository .\n- ArgoCD continuously monitors the Git repository for changes and automatically deploys the application to Kubernetes clusters.\n### Jenkins Configuration\n\n- Install necessary plugins: Docker Pipeline, Kubernetes Continuous Deploy, SonarQube Scanner, etc.\n- Configure Jenkins credentials for Docker registry `'docker-cred'`, Github `'github'`, and SonarQube server token `'sonarqube'`.\n- Create a Jenkins pipeline job and configure the pipeline script from Jenkinsfile with proper path `spring-boot-app/Jenkinsfile`.\n\n\n![jenkinsbuild](images/jenkins.png)\n\n### ArgoCD Configuration\n- Start Minikube cluster on PC (For Minikube Installation \"https://minikube.sigs.k8s.io/docs/start/\")\n```sh\nminikube start\n```\n- Create namespace\n\n```sh\nkubectl create namespace argocd\n```\n\n- Install ArgoCD\n\n```sh\nkubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml\n```\n\n- To show all the services of Argocd\n```sh\n kubectl get services -n argocd\n ```\n- To connect to ArgoCD server\n```sh\n kubectl edit svc argocd-server -n argocd\n\n # in the text/yaml file change the type from ClustreIP to NodePort and save\n\n type: NodePort\n```\n- Create tunnel to Argocd-server\n```sh\n minikube service argocd-server -n argocd\n```\n- Click any of 2 IP provided by Minikube and open ArgoCD\n- Secret to Login \u0026 decode it from base64\n```sh\n kubectl get secret -n argocd\n kubectl edit secret argocd-initial-admin-secret -n argocd\n ```\n - Create ArgoCD application\n\n ![ArgoCD-create](images/argoCreat.png)\n\n - Check Spring-boot-application\n\n![ArgoCD-status](images/argo-deploy.png)\n### SonarQube Configuration\n- Install and configure SonarQube server (Docker image).\n```sh\ndocker run -d -p 9000:9000 sonarqube:lts-community\n```\n- Access SonarQube server `\"http://your_ec2_public_ip:9000\"`\n\n![Sonarqube](images/sonarqube-1.png)\n\n- Set up a SonarQube project for your SpringBoot application and modify `Static Code Analysis` stage and update `SONAR_URL`\n```sh\n SONAR_URL = \"http://your_ec2_public_ip:9000\"\n ```\n- Obtain SonarQube access token and configure it in Jenkins under credentials.\n\n![Sonarqube-app-status](images/soanrqube-2.png)\n\n## Monitoring\n- Monitor the CI/CD pipeline execution in Jenkins.\n- Monitor application health and performance in ArgoCD dashboard.\n- Analyze code quality and vulnerabilities in SonarQube.\n\n## AWS Security\n- Ensure proper security configurations on your AWS EC2 instance, including security groups, IAM roles, and network access control.\n\n## License\nThis project is licensed under the Apache License.\n\n## Contributors\nArup Das\n\n## Acknowledgments\nSpecial thanks to the developers of Docker, Jenkins, ArgoCD, Kubernetes, and SonarQube for their fantastic tools and contributions to the open-source community.\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farup-g%2Fjava-cicd-implementation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farup-g%2Fjava-cicd-implementation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farup-g%2Fjava-cicd-implementation/lists"}