This is a comprehensive DevOps project demonstrating the deployment of the YelpCamp(3-tier architecture) application across various environments. The project includes setting up a three-tier deployment process covering local, containerized, and Azure Kubernetes Service (AKS) environments.
YelpCamp is a full-stack web application designed for campground reviews. This project focuses on setting up a robust deployment pipeline for YelpCamp, ensuring reliability, scalability, and maintainability across different environments.
- Local Deployment: Allows developers to test the application locally before pushing changes to other environments.
- Container Deployment: Utilizes Docker containers for development and testing, incorporating Jenkins pipelines for automated builds, tests, and scans.
- Azure AKS Deployment: Automates deployment to Azure Kubernetes Service (AKS) for production-level environments, ensuring seamless scalability and reliability.
src contains source code of yelpcamp including Dockerfile, Manifests file.
Terraform consist instrastructure modular code.
scripts consist scripts to install tools on specific machine to reduce manual intervention.
- Docker: Containerization platform used for packaging the application and its dependencies.
- Jenkins: Automation server used for setting up continuous integration and continuous deployment (CI/CD) pipelines.
- GitHub: Version control system used for managing project source code and collaboration.
- Terraform: Infrastructure as code (IaC) tool used for provisioning and managing cloud infrastructure.
Modularized Code | Utilized workspace
- SonarQube: Open-source platform for static code analysis to detect bugs, vulnerabilities, and code smells.
- Trivy: Vulnerability scanner for containers and other artifacts, used for scanning Docker images.
-
Clone the Repository:
git clone https://github.com/vsingh55/3-tier-Architecture-Deployment-across-Multiple-Environments.git cd 3-tier-Architecture-Deployment-across-Multiple-Environments
-
Put the values of environment variable and change .auto.tfvars files.
-
Install Required Tools:
- Terraform
- kubectl
- Azure CLI
-
Initialize and Apply Terraform:
cd Terraform terraform init terraform workspace new dev terraform workspace select dev terraform apply -var-file=dev.auto.tfvars
-
Install Jenkins and Necessary Plugins. ( May Refer the Blog )
-
Add Credentials for Docker Hub, SonarQube, and Kubernetes in Jenkins.
-
Create Jenkins Pipeline Job:
- Use the
Jenkinsfile
from the repository.
- Use the
-
Prepare Kubernetes Manifests in the
Manifests
directory. -
Create Namespace in AKS:
kubectl create namespace webapps
-
Run Jenkins Pipeline to Deploy Docker Image to AKS.
-
Destroy Infrastructure:
terraform destroy -var-file=<name_of_environment>.auto.tfvars
-
Remove Unused Resources.
Check out the Blog below for detailed desscription of this project: click here
Contributions to the this project are Welcome! If you encounter any issues or have suggestions for improvement, feel free to open an issue or submit a pull request.
- This project was inspired by the need for a robust deployment pipeline for YelpCamp.
- Special thanks to the contributors and maintainers of the tools and technologies used in this project.
- Media management provided by Cloudinary.
- Maps integration provided by Mapbox.