This project focuses on the automated deployment and lifecycle management of a MERN Stack application on AWS. The entire environment, including infrastructure, application deployment, and monitoring, will be fully automated using tools like Terraform, Jenkins, ArgoCD, Prometheus, and Grafana. The application will run on a secure and scalable EKS cluster within a private VPC.
To begin, a single EC2 instance will be manually launched in AWS. This instance will serve as the control node and will have Terraform and Jenkins installed. Using Jenkins, we will run Terraform scripts to provision the infrastructure. The automated setup will include a private VPC, an EKS cluster with two worker nodes, and a dedicated jump server. The jump server will be the only point of administrative access to the EKS cluster, ensuring a secure and controlled environment.
A full CI/CD pipeline will be built using Jenkins for Continuous Integration and ArgoCD for Continuous Deployment. Jenkins will manage several automated stages, including pulling source code from a GitHub repository, performing code quality analysis with SonarQube, running dependency checks via OWASP, conducting file scanning, and building the application into a Docker image. The image will then be scanned for vulnerabilities using Trivy before being pushed to Amazon ECR (a private container registry). Once the image is securely stored, the Kubernetes deployment manifest will be updated with the new version.
After the CI process is complete, ArgoCD will automatically deploy the updated application to the EKS cluster using the updated manifests. This ensures a consistent and reliable deployment pipeline with minimal manual intervention.
To make the application accessible, a custom domain will be configured and integrated with AWS Route 53. This allows users to access the application through a friendly and secure URL.
For observability and monitoring, Prometheus will be deployed to collect metrics from the infrastructure and application. Grafana will be configured to visualize these metrics, providing real-time dashboards and insights into system performance and health.
In this project, the following tools and technologies were used to automate and deploy the MERN Stack application on Amazon EKS: