Skip to content

Commit 810916e

Browse files
committed
Add support for helm
Signed-off-by: Mihai Criveti <[email protected]>
1 parent bfac346 commit 810916e

File tree

2 files changed

+181
-76
lines changed

2 files changed

+181
-76
lines changed

docs/docs/deployment/helm.md

Lines changed: 161 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,67 @@
1-
# 🚀 Helm Quick-Start Guide (any Kubernetes cluster)
1+
# 🚀 Deploying the MCP Gateway Stack with Helm
22

3-
This doc shows how to use Helm to install, upgrade, and remove the MCP Gateway with PostgreSQL, Redis, PgAdmin and Redis on **any** Kubernetes cluster—local (*kind*, Docker Desktop, Minikube), on-prem (RKE, Rancher), or managed (*EKS*, *AKS*, *GKE*, *Openshift*, etc.).
3+
This guide walks you through installing, upgrading, and removing the full **MCP Gateway Stack** using Helm. The stack includes:
4+
5+
* 🧠 MCP Context Forge (the gateway)
6+
* 🗄 PostgreSQL database
7+
* ⚡ Redis cache
8+
* 🧑‍💻 PgAdmin UI (optional)
9+
* 🧰 Redis Commander UI (optional)
10+
11+
Everything is deployable via Helm on any Kubernetes cluster (Minikube, kind, EKS, AKS, GKE, OpenShift, etc.).
12+
13+
> 📦 Helm chart location:
14+
> [https://github.com/IBM/mcp-context-forge/tree/main/charts/mcp-stack](https://github.com/IBM/mcp-context-forge/tree/main/charts/mcp-stack)
415
516
---
617

718
## 📋 Prerequisites
819

9-
| Requirement | Notes & Minimum Versions |
10-
| ----------------------------- | ---------------------------------------------------------------------------------------------- |
11-
| **Kubernetes** | Cluster reachable by `kubectl`; tested on v1.23 – v1.30 |
12-
| **Helm 3** | [https://helm.sh/docs/intro/install/](https://helm.sh/docs/intro/install/) |
13-
| **kubectl** | `kubectl version --short` should return client *and* server |
14-
| **Container registry access** | If images are private, configure `imagePullSecrets` or `docker login` on all nodes |
15-
| **(Ingress)** | Either an Ingress controller **or** a cloud LB Service class, depending on how you expose HTTP |
20+
| Requirement | Notes |
21+
| ------------------ | ------------------------------------------------------------ |
22+
| Kubernetes ≥ 1.23 | Local (Minikube/kind) or managed (EKS, AKS, GKE, etc.) |
23+
| Helm 3 | Used for installing and managing releases |
24+
| kubectl | Configured to talk to your target cluster |
25+
| Ingress Controller | NGINX, Traefik, or cloud-native (or disable via values.yaml) |
26+
| StorageClass (RWX) | Required for PostgreSQL PVC unless persistence is disabled |
27+
28+
---
29+
30+
## 🧭 Architecture
31+
32+
```mermaid
33+
flowchart TD
34+
subgraph Ingress Layer
35+
ingress[NGINX Ingress Controller]
36+
end
37+
38+
subgraph Application Layer
39+
mcp[MCP Context Forge]
40+
pgadmin[PgAdmin UI<br/>optional]
41+
rediscommander[Redis Commander UI<br/>optional]
42+
end
43+
44+
subgraph Data Layer
45+
postgres[(PostgreSQL)]
46+
redis[(Redis)]
47+
end
48+
49+
ingress --> mcp
50+
ingress --> pgadmin
51+
ingress --> rediscommander
52+
53+
mcp --> postgres
54+
mcp --> redis
55+
56+
pgadmin --> postgres
57+
rediscommander --> redis
58+
```
1659

1760
---
1861

19-
## 1 — Install Helm & kubectl
62+
## 🛠 Step 1 - Install Helm & kubectl
2063

21-
### macOS (Homebrew)
64+
### macOS
2265

2366
```bash
2467
brew install helm kubernetes-cli
@@ -27,148 +70,190 @@ brew install helm kubernetes-cli
2770
### Linux
2871

2972
```bash
73+
# Helm
3074
curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
31-
# kubectl:
75+
76+
# kubectl
3277
curl -LO "https://dl.k8s.io/release/$(curl -sSL https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
33-
sudo install -m 0755 kubectl /usr/local/bin
78+
chmod +x kubectl
79+
sudo mv kubectl /usr/local/bin
3480
```
3581

36-
### Windows (PowerShell + Chocolatey)
82+
### Windows (PowerShell)
3783

3884
```powershell
3985
choco install -y kubernetes-helm kubernetes-cli
4086
```
4187

42-
Verify:
88+
Verify installation:
4389

4490
```bash
4591
helm version
4692
kubectl version --short
47-
kubectl config get-contexts # choose your target context
93+
kubectl config get-contexts
4894
```
4995

5096
---
5197

52-
## 2 — Lint and (optionally) package
98+
## 📦 Step 2 - Clone and inspect the chart
5399

54100
```bash
55-
# Static template check
56-
helm lint charts/mcp-stack
57-
58-
# Optional: package into dist/ for CI or air-gapped clusters
59-
mkdir -p dist
60-
helm package charts/mcp-stack -d dist
101+
git clone https://github.com/IBM/mcp-context-forge.git
102+
cd mcp-context-forge/charts/mcp-stack
103+
helm lint .
61104
```
62105

63106
---
64107

65-
## 3 — Deploy / Upgrade
108+
## 🧾 Step 3 - Customize values
66109

67-
### 3-A Minimal install (namespace `mcp`)
110+
Copy and modify the default `values.yaml`:
68111

69112
```bash
70-
helm upgrade --install mcp-stack charts/mcp-stack \
71-
--namespace mcp --create-namespace \
72-
--wait # blocks until Deployments & Jobs are ready
113+
cp values.yaml my-values.yaml
73114
```
74115

75-
### 3-B With environment overrides file
116+
Then edit fields such as:
76117

77-
```bash
78-
helm upgrade --install mcp-stack charts/mcp-stack \
79-
-n mcp --create-namespace \
80-
-f envs/prod-values.yaml \
81-
--set mcpContextForge.image.tag=v1.2.3
118+
```yaml
119+
mcpContextForge:
120+
image:
121+
repository: ghcr.io/ibm/mcp-context-forge
122+
tag: latest
123+
124+
ingress:
125+
enabled: true
126+
host: gateway.local
127+
className: nginx
128+
129+
postgres:
130+
credentials:
131+
user: admin
132+
password: test123
133+
134+
pgadmin:
135+
enabled: true
136+
137+
redisCommander:
138+
enabled: true
82139
```
83140
84-
*(The chart's `values.yaml` documents every knob—replicas, resources, ingress host, DB credentials, persistence, …)*
141+
---
142+
143+
## 🚀 Step 4 - Install / Upgrade the stack
144+
145+
```bash
146+
helm upgrade --install mcp-stack . \
147+
--namespace mcp --create-namespace \
148+
-f my-values.yaml \
149+
--wait
150+
```
85151

86152
---
87153

88-
## 4 — Verify
154+
## ✅ Step 5 - Verify deployment
89155

90156
```bash
91-
# All resources in the namespace
92157
kubectl get all -n mcp
93-
94-
# Release status
95158
helm status mcp-stack -n mcp
159+
```
160+
161+
If using Ingress:
96162

97-
# Tail logs
98-
kubectl logs -n mcp deploy/mcp-stack-app -f
163+
```bash
164+
kubectl get ingress -n mcp
165+
curl http://gateway.local/health
99166
```
100167

101-
### Ingress / Service exposure
168+
If not using Ingress:
102169

103-
* **Ingress controller present** → run `kubectl get ingress -n mcp`.
104-
* **No Ingress** → change `mcpContextForge.service.type` to `LoadBalancer` or `NodePort`.
170+
```bash
171+
kubectl port-forward svc/mcp-stack-app 8080:80 -n mcp
172+
curl http://localhost:8080/health
173+
```
105174

106175
---
107176

108-
## 5 — Updates & Rollbacks
177+
## 🔄 Step 6 - Upgrade & Rollback
109178

110-
### Rolling upgrade
179+
### Upgrade (e.g. new image tag)
111180

112181
```bash
113-
helm upgrade mcp-stack charts/mcp-stack -n mcp \
114-
--set mcpContextForge.image.tag=v1.3.0
182+
helm upgrade mcp-stack . -n mcp \
183+
--set mcpContextForge.image.tag=v1.2.3 \
184+
--wait
115185
```
116186

117-
### Diff before upgrade (requires plugin)
187+
### Preview changes (diff plugin)
118188

119189
```bash
120-
helm plugin install https://github.com/databus23/helm-diff # once
121-
helm diff upgrade mcp-stack charts/mcp-stack -n mcp -f values.yaml
190+
helm plugin install https://github.com/databus23/helm-diff
191+
helm diff upgrade mcp-stack . -n mcp -f my-values.yaml
122192
```
123193

124-
### Roll back
194+
### Rollback
125195

126196
```bash
127-
helm rollback mcp-stack <REVISION> -n mcp
128-
# list revisions:
129-
helm history mcp-stack -n mcp
197+
helm rollback mcp-stack 1 -n mcp
130198
```
131199

132200
---
133201

134-
## 6 — Uninstall
202+
## 🧹 Step 7 - Uninstall
135203

136204
```bash
137205
helm uninstall mcp-stack -n mcp
138-
# Optional: delete namespace / PVCs
139-
kubectl delete ns mcp
206+
kubectl delete ns mcp # optional cleanup
207+
```
208+
209+
---
210+
211+
## 🧪 CI/CD: Packaging & OCI Push
212+
213+
```bash
214+
helm lint .
215+
helm package . -d dist/
216+
helm push dist/mcp-stack-*.tgz oci://ghcr.io/<your-org>/charts
140217
```
141218

142-
Persistent volumes created with the namespace remain until you delete the PVC/PV objects (or the storage class policy garbage-collects them).
219+
Used with GitOps tools like Argo CD or Flux.
143220

144221
---
145222

146-
## 7 — Troubleshooting Cheatsheet
223+
## 🧯 Troubleshooting
147224

148-
| Symptom | Quick check | |
149-
| ------------------------------------ | ----------------------------------------------------- | ---------------------------------------------------- |
150-
| Pods stuck in `ImagePullBackOff` | `kubectl describe pod …`pull secret / repo access | |
151-
| `CrashLoopBackOff` | `kubectl logs …` → env vars, DB connectivity | |
152-
| Ingress 404 / no address | \`kubectl get svc -A | grep ingress\` – controller running? LB provisioned? |
153-
| Helm hook failures (Jobs) | `kubectl get jobs -n mcp && kubectl logs job/<name>` | |
154-
| Template error during `helm install` | `helm lint charts/mcp-stack` or run \`helm template | yq\` |
225+
| Symptom | Command / Fix | |
226+
| ------------------- | -------------------------------------------------- | ---------------------------------- |
227+
| ImagePullBackOff | Check pull secrets & image name | |
228+
| Ingress 404 / no IP | \`kubectl get svc -A | grep ingress\` - controller ready? |
229+
| CrashLoopBackOff | `kubectl logs -n mcp deploy/mcp-stack-app` | |
230+
| Job fails | `kubectl get jobs -n mcp && kubectl logs job/` | |
231+
| Invalid values | `helm lint . && helm template . -f my-values.yaml` | |
155232

156233
---
157234

158-
## 8 — CI/CD tips
235+
## 🧾 values.yaml - Common Keys
236+
237+
| Key | Default | Purpose |
238+
| -------------------------------------------- | ----------- | ---------------------------------- |
239+
| `mcpContextForge.image.tag` | `latest` | Image version for the Gateway |
240+
| `mcpContextForge.ingress.enabled` | `true` | Enables ingress |
241+
| `mcpContextForge.service.type` | `ClusterIP` | Change to `LoadBalancer` if needed |
242+
| `postgres.persistence.enabled` | `true` | Enables a persistent volume claim |
243+
| `pgadmin.enabled` / `redisCommander.enabled` | `false` | Optional admin UIs |
159244

160-
* **Package once** → push chart (`.tgz`) to OCI registry (`helm push` with `oci://` URLs) or `chartmuseum`.
161-
* **Values per environment**`values-dev.yaml`, `values-prod.yaml`, etc.
162-
* **GitOps** → use Argo CD / Flux to watch the chart + values in Git and auto-sync.
245+
See full annotations in `values.yaml`.
163246

164247
---
165248

166-
## 🌐 Further reading
249+
## 📚 Further Reading
167250

168-
* Helm docs – [https://helm.sh/docs/](https://helm.sh/docs/)
169-
* Kubernetes Ingress concepts – [https://kubernetes.io/docs/concepts/services-networking/ingress/](https://kubernetes.io/docs/concepts/services-networking/ingress/)
170-
* Persistent Volumes – [https://kubernetes.io/docs/concepts/storage/persistent-volumes/](https://kubernetes.io/docs/concepts/storage/persistent-volumes/)
251+
* Helm: [https://helm.sh/docs/](https://helm.sh/docs/)
252+
* Kubernetes Ingress: [https://kubernetes.io/docs/concepts/services-networking/ingress/](https://kubernetes.io/docs/concepts/services-networking/ingress/)
253+
* Persistent Volumes: [https://kubernetes.io/docs/concepts/storage/persistent-volumes/](https://kubernetes.io/docs/concepts/storage/persistent-volumes/)
254+
* Helm OCI Registry: [https://helm.sh/docs/topics/registries/](https://helm.sh/docs/topics/registries/)
255+
* Argo CD: [https://argo-cd.readthedocs.io](https://argo-cd.readthedocs.io)
171256

172257
---
173258

174-
Deploying with Helm turns your stack into a versioned, repeatable artefact—ideal for local dev, staging, and production alike.
259+
✅ You now have a production-ready Helm workflow for MCP Context Forge. It's CI-friendly, customizable, and tested across Kubernetes distributions.

docs/docs/deployment/minikube.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,26 @@ Minikube provides a self-contained environment, enabling you to replicate produc
1919
| **Container driver** | Docker 20.10+ or Podman 4.7+; Docker is the simplest choice on macOS and Windows. |
2020
| **kubectl** | Automatically configured by `minikube start`; alternatively, use `minikube kubectl -- …` if not installed. |
2121

22+
## Architecture
23+
24+
```
25+
┌─────────────────────────────┐
26+
│ NGINX Ingress │
27+
└──────────┬───────────┬──────┘
28+
│/ │/
29+
┌──────────────▼─────┐ ┌────▼───────────┐
30+
│ MCP Context Forge │ │ PgAdmin (opt.) │
31+
└─────────┬──────────┘ └────┬───────────┘
32+
│ │
33+
┌────────────▼──────┐ ┌────────▼────────────┐
34+
│ PostgreSQL │ │ Redis Commander(opt)│
35+
└────────┬──────────┘ └────────┬────────────┘
36+
│ │
37+
┌─────▼────┐ ┌─────▼────┐
38+
│ PV │ │ Redis │
39+
└──────────┘ └──────────┘
40+
```
41+
2242
---
2343

2444
## 🚀 Step 1 – Install Minikube and kubectl

0 commit comments

Comments
 (0)