Skip to content

Commit 45edc5e

Browse files
authored
Update README.md
1 parent e9fed07 commit 45edc5e

File tree

1 file changed

+82
-35
lines changed

1 file changed

+82
-35
lines changed

README.md

Lines changed: 82 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,53 +6,89 @@ This project demonstrates a complete monitoring-enabled deployment pipeline for
66

77
## ✅ Project Highlights
88

9-
- 🟢 **Node.js Application**: Lightweight backend service written in Node.js, exposing basic endpoints for monitoring.
10-
- 🐳 **Dockerized**: Fully containerized using Docker with a production-ready `Dockerfile`.
11-
-**Kubernetes Native**: Application and observability stack deployed via Kubernetes manifests, including Deployments, Services, and Persistent Volumes.
12-
- 📈 **Prometheus Integration**: Configured to scrape metrics from the application with a custom `prometheus.yml`.
13-
- 📊 **Grafana Dashboards**: Set up to visualize key application and cluster metrics with persistent storage.
14-
- 🤖 **CI/CD with GitHub Actions**: Automated pipeline builds and pushes Docker images to Docker Hub on every commit to `main`.
15-
- 🧪 **Minikube Deployment**: Manual deployment workflow using Minikube for local development and testing.
9+
* 🟢 **Node.js Application**: Lightweight backend service written in Node.js, exposing basic endpoints for monitoring.
10+
* 🐳 **Dockerized**: Fully containerized using Docker with a production-ready `Dockerfile`.
11+
***Kubernetes Native**: Application and observability stack deployed via Kubernetes manifests, including Deployments, Services, and Persistent Volumes.
12+
* 📊 **Prometheus Integration**: Configured to scrape metrics from the application with a custom `prometheus.yml`.
13+
* 📈 **Grafana Dashboards**: Set up to visualize key application and cluster metrics with persistent storage.
14+
* 🤖 **CI/CD with GitHub Actions**: Automated pipeline builds and pushes Docker images to Docker Hub on every commit to `main`.
15+
* 🧰 **Minikube Deployment**: Manual deployment workflow using Minikube for local development and testing.
1616

1717
---
1818

1919
## ⚙️ Technologies Used
2020

21-
- **Node.js**, **Express**
22-
- **Docker**, **Docker Hub**
23-
- **Kubernetes**, **Minikube**
24-
- **Prometheus**, **Grafana**
25-
- **GitHub Actions (CI/CD)**
26-
- **YAML**
21+
* **Node.js**, **Express**
22+
* **Docker**, **Docker Hub**
23+
* **Kubernetes**, **Minikube**
24+
* **Prometheus**, **Grafana**
25+
* **GitHub Actions (CI/CD)**
26+
* **YAML**
2727

2828
---
2929

30-
<h3>✅ GitHub Actions Success</h3>
31-
<p>Shows multiple successful workflow runs:</p>
32-
<img src="screenshots/github-actions-success.png" alt="GitHub Actions Success" width="600"/>
33-
<br/><br/>
30+
### ✅ GitHub Actions Success
3431

35-
<h3>📦 Node.js App Running (Browser Output)</h3>
36-
<img src="screenshots/Node.js-app-running-on-browser.png" alt="Node.js App Running" width="600"/>
37-
<br/><br/>
32+
Shows multiple successful workflow runs:
3833

39-
<h3>📈 Prometheus - Targets Page</h3>
40-
<img src="screenshots/prometheus-targets-page.png" alt="Prometheus Targets" width="600"/>
41-
<br/><br/>
34+
![GitHub Actions Success](screenshots/github-actions-success.png)
4235

43-
<h3>📊 Grafana - Custom Dashboard</h3>
44-
<img src="screenshots/Grafana-Dashboard.png" alt="Grafana Dashboard" width="600"/>
45-
<br/><br/>
36+
### 📦 Node.js App Running (Browser Output)
4637

47-
<h3>🔌 Prometheus Service - Terminal Output</h3>
48-
<img src="screenshots/prometheus-service-terminal.png" alt="Prometheus Terminal" width="600"/>
49-
<br/><br/>
38+
![Node.js App Running](screenshots/Node.js-app-running-on-browser.png)
5039

51-
<h3>📊 Grafana Service - Terminal Output</h3>
52-
<img src="screenshots/grafana-service-terminal.png" alt="Grafana Terminal" width="600"/>
53-
<br/><br/>
40+
### 📈 Prometheus - Targets Page
5441

42+
![Prometheus Targets](screenshots/prometheus-targets-page.png)
5543

44+
### 📊 Grafana - Custom Dashboard
45+
46+
![Grafana Dashboard](screenshots/Grafana-Dashboard.png)
47+
48+
### 🔌 Prometheus Service - Terminal Output
49+
50+
![Prometheus Terminal](screenshots/prometheus-service-terminal.png)
51+
52+
### 📊 Grafana Service - Terminal Output
53+
54+
![Grafana Terminal](screenshots/grafana-service-terminal.png)
55+
56+
---
57+
58+
## 🔄 GitHub Actions CI/CD Setup
59+
60+
This project uses GitHub Actions to automatically build and push Docker images to Docker Hub when you push code to the `main` branch.
61+
62+
### 🥉 How It Works:
63+
64+
1. **Docker Build & Push**
65+
66+
* The workflow defined in `.github/workflows/ci-cd.yml` runs on each `main` branch push.
67+
* It builds the Docker image and pushes it to Docker Hub using secrets for authentication.
68+
69+
2. **Secrets Required**
70+
71+
* Add the following secrets to your GitHub repository:
72+
73+
| Secret Name | Description |
74+
| ----------------- | --------------------------------- |
75+
| `DOCKER_USERNAME` | Your Docker Hub username |
76+
| `DOCKER_PASSWORD` | Your Docker Hub password or token |
77+
78+
3. **Trigger**
79+
80+
* Push your code to the `main` branch. GitHub Actions will:
81+
82+
* Checkout code
83+
* Set up Docker Buildx
84+
* Login to Docker Hub
85+
* Build & push image to Docker Hub
86+
* Tag format: `DOCKER_USERNAME/my-first-docker-image:latest`
87+
88+
4. **CI Only**
89+
90+
* The workflow automates **CI** — i.e., build and push to Docker Hub.
91+
* You can then manually pull & deploy using Kubernetes (**CD step**) via Minikube.
5692

5793
---
5894

@@ -64,20 +100,31 @@ Deploy the application and observability stack locally using Minikube:
64100

65101
```bash
66102
minikube start
103+
```
67104

68-
# Create namespaces for Prometheus and Grafana
105+
### 2. Create Namespaces
69106

107+
```bash
70108
kubectl create namespace prometheus
71109
kubectl create namespace grafana
110+
```
72111

73-
# Apply all Kubernetes manifests
112+
### 3. Apply All Kubernetes Manifests
74113

114+
```bash
75115
kubectl apply -f k8s/
76116
kubectl apply -f k8s/prometheus
77117
kubectl apply -f k8s/grafana
118+
```
78119

79-
# Expose services via Minikube
120+
### 4. Expose Services via Minikube
80121

122+
```bash
81123
minikube service grafana
82124
minikube service prometheus-service -n prometheus
83125
minikube service node-service
126+
```
127+
128+
---
129+
130+
Feel free to ⭐ the repo if you found it helpful or fork it to expand and build upon it!

0 commit comments

Comments
 (0)