The project is a modern web application built with React for the front-end, Node.js for the back-end, and MongoDB as the database. The deployment is orchestrated using Docker containers, and the continuous integration and deployment (CI/CD) process is managed through Jenkins. Kubernetes is employed for container orchestration and scaling.
The frontend of the application is developed using React, a popular JavaScript library for building user interfaces. It provides a dynamic and responsive user experience.
The backend of the application is powered by Node.js, offering a scalable and efficient server-side runtime. It interacts with the MongoDB database to retrieve and update data.
MongoDB, a NoSQL database, is utilized for storing and managing data in a flexible and scalable manner.
- Frontend: React
- Backend: Node.js
- Database: MongoDB
- Containerization: Docker
- Container Orchestration: Kubernetes
- CI/CD: Jenkins
The project follows a microservices architecture, with each component residing in its own Docker container. This allows for modularity, scalability, and easy deployment across different environments.
Jenkins is configured to automate the CI/CD pipeline. The pipeline includes steps for code retrieval from the source repository, building Docker images, pushing images to Docker Hub.
Follow these steps to set up the development environment, configure Docker Compose, and deploy the application using Kubernetes and Jenkins.
Make sure you have the following prerequisites installed on your system:
- Docker
- Docker Compose
- Kubernetes (kubectl)
- Jenkins
Before deploying the application, ensure that you have a Kubernetes cluster available. If you don't have one, you can use tools like Minikube or set up a cluster on a cloud provider such as Google Kubernetes Engine (GKE) or Amazon EKS.
-
Clone the project repository to your local machine:
git clone https://github.com/HazemKaroui/Amazona-DevOps.git
-
Navigate to the project directory:
cd Amazona-DevOps
-
Customize the Docker Compose file (
docker-compose.yml
) if necessary. Update environment variables, service names, or ports based on your requirements. -
Build and start the Docker containers:
docker-compose up -d
-
Install Jenkins on your preferred environment. You can follow the official Jenkins installation guide for your system.
-
Access the Jenkins dashboard and install necessary plugins, including the Docker and Kubernetes plugins.
-
Configure Jenkins to connect to your version control system (GitHub/GitLab) and set up a new pipeline project.
-
In the Jenkins pipeline configuration, define the necessary environment variables and credentials for Docker Hub and your Kubernetes cluster.
-
Save the pipeline configuration and trigger a build to initiate the CI/CD process.
Once the CI/CD pipeline is complete, access the deployed application using the external IP address or domain provided by your Kubernetes cluster. You can find the IP address by running:
kubectl get service frontend-service
When you're finished testing the application, clean up the resources by running:
bash
docker-compose down
kubectl delete deployment frontend-deployment backend-deployment
kubectl delete service frontend-service backend-service