This project demonstrates a full DevOps workflow by building, containerizing, and deploying a Node.js application using:
- Jenkins for CI/CD automation
- Docker for containerization
- Kubernetes for orchestration
- AWS EC2 as the hosting environment
The pipeline automates:
- Code build & test
- Docker image creation
- Pushing the image to Docker Hub
- Deploying the app to Kubernetes (currently manual, can be automated later)
- Backend: Node.js + Express
- CI/CD: Jenkins
- Containerization: Docker
- Orchestration: Kubernetes (kubectl / k3s / minikube)
- Hosting: AWS EC2 (Ubuntu)
- Registry: Docker Hub
├── ansible/ # Ansible playbooks (infra automation)
├── k8s/ # Kubernetes manifests
│ ├── deployment.yaml
│ ├── service.yaml
│ └── ingress.yaml # Added ingress config
├── public/ # Static assets for Node.js app
├── terraform/ # Terraform IaC files
├── .dockerignore
├── .gitattributes
├── .gitignore
├── Dockerfile # Docker build instructions
├── Jenkinsfile # CI/CD pipeline definition
├── package-lock.json
├── package.json
├── server.js # Node.js server-
Developer pushes code to GitHub
-
Jenkins pulls the code via webhook
-
Jenkins builds the Docker image and tags it
-
Docker image is pushed to Docker Hub
-
(Manual step) Run kubectl apply -f k8s/ to deploy to Kubernetes cluster
-
Before running this project, ensure you have:
-
AWS EC2 instance (Ubuntu)
-
Docker installed
-
Jenkins installed and configured
-
Kubernetes cluster (minikube, k3s, or full cluster)
-
Docker Hub account
1️⃣ Clone Repository
git clone https://github.com/Aamir017/CI-CD-Pipeline-for-Log-Monitoring.git
cd CI-CD-Pipeline-for-Log-Monitoring
2️⃣ Build & Run Locally
docker build -t log-monitor .
docker run -p 3000:3000 log-monitor
Open http://localhost:3000 in your browser.
3️⃣ Jenkins Setup
-
Install required Jenkins plugins:
-
Docker Pipeline
-
Git
-
Kubernetes CLI
-
-
Create a new Pipeline job and link it to your GitHub repo
-
Add your Docker Hub credentials in Jenkins
Create Deployment
kubectl apply -f k8s/deployment.yaml
Create Service
kubectl apply -f k8s/service.yaml
Check Pods
kubectl get pods
👤 Author Sk. Aamir Ahmed
- LinkedIn: skaamir10