Add Helm chart documentation
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
c457db534b
commit
f3da9b66c3
169
oramap/README.md
Normal file
169
oramap/README.md
Normal file
@ -0,0 +1,169 @@
|
|||||||
|
# Ora Map Helm Chart
|
||||||
|
|
||||||
|
Helm chart for deploying Ora Map application in Kubernetes with microservices architecture.
|
||||||
|
|
||||||
|
## Architecture
|
||||||
|
|
||||||
|
This chart deploys two main components:
|
||||||
|
|
||||||
|
- **Backend**: Node.js Express API server (Port 3000)
|
||||||
|
- **Frontend**: Nginx serving static files (Port 80)
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
### Prerequisites
|
||||||
|
|
||||||
|
- Kubernetes cluster 1.19+
|
||||||
|
- Helm 3.0+
|
||||||
|
- Docker images built and pushed to Harbor registry
|
||||||
|
|
||||||
|
### Install Chart
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# From the repository root
|
||||||
|
helm install oramap ./oramap
|
||||||
|
|
||||||
|
# Or with custom values
|
||||||
|
helm install oramap ./oramap -f custom-values.yaml
|
||||||
|
|
||||||
|
# Install in a specific namespace
|
||||||
|
helm install oramap ./oramap -n my-namespace --create-namespace
|
||||||
|
```
|
||||||
|
|
||||||
|
### Upgrade Chart
|
||||||
|
|
||||||
|
```bash
|
||||||
|
helm upgrade oramap ./oramap
|
||||||
|
```
|
||||||
|
|
||||||
|
### Uninstall Chart
|
||||||
|
|
||||||
|
```bash
|
||||||
|
helm uninstall oramap
|
||||||
|
```
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
The following table lists the configurable parameters and their default values:
|
||||||
|
|
||||||
|
| Parameter | Description | Default |
|
||||||
|
|-----------|-------------|---------|
|
||||||
|
| `backend.image.repository` | Backend image repository | `harbor.dvirlabs.com/my-apps/oramap-backend` |
|
||||||
|
| `backend.image.tag` | Backend image tag | `latest` |
|
||||||
|
| `backend.replicaCount` | Number of backend replicas | `1` |
|
||||||
|
| `backend.containerPort` | Backend container port | `3000` |
|
||||||
|
| `backend.resources.limits.cpu` | Backend CPU limit | `500m` |
|
||||||
|
| `backend.resources.limits.memory` | Backend memory limit | `512Mi` |
|
||||||
|
| `frontend.image.repository` | Frontend image repository | `harbor.dvirlabs.com/my-apps/oramap-frontend` |
|
||||||
|
| `frontend.image.tag` | Frontend image tag | `latest` |
|
||||||
|
| `frontend.replicaCount` | Number of frontend replicas | `1` |
|
||||||
|
| `frontend.containerPort` | Frontend container port | `80` |
|
||||||
|
| `service.type` | Kubernetes service type | `ClusterIP` |
|
||||||
|
| `ingress.enabled` | Enable ingress | `true` |
|
||||||
|
| `ingress.className` | Ingress class name | `traefik` |
|
||||||
|
| `ingress.hosts[0].host` | Ingress hostname | `oramap.dvirlabs.com` |
|
||||||
|
|
||||||
|
### Example Custom Values
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# custom-values.yaml
|
||||||
|
backend:
|
||||||
|
image:
|
||||||
|
tag: "v1.0.0"
|
||||||
|
replicaCount: 3
|
||||||
|
|
||||||
|
frontend:
|
||||||
|
image:
|
||||||
|
tag: "v1.0.0"
|
||||||
|
replicaCount: 2
|
||||||
|
|
||||||
|
ingress:
|
||||||
|
hosts:
|
||||||
|
- host: oramap.example.com
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
tls:
|
||||||
|
- secretName: oramap-tls
|
||||||
|
hosts:
|
||||||
|
- oramap.example.com
|
||||||
|
```
|
||||||
|
|
||||||
|
## Deployment Components
|
||||||
|
|
||||||
|
### Backend Deployment
|
||||||
|
|
||||||
|
- Runs Express.js API server
|
||||||
|
- Health checks on `/api/health`
|
||||||
|
- Configurable resources and replicas
|
||||||
|
|
||||||
|
### Frontend Deployment
|
||||||
|
|
||||||
|
- Runs Nginx serving static files
|
||||||
|
- Proxies `/api/*` requests to backend service
|
||||||
|
- Uses ConfigMap for nginx configuration
|
||||||
|
- Health checks on `/`
|
||||||
|
|
||||||
|
### Services
|
||||||
|
|
||||||
|
- **Backend Service**: Internal ClusterIP service on port 3000
|
||||||
|
- **Frontend Service**: ClusterIP service on port 80 (exposed via Ingress)
|
||||||
|
|
||||||
|
### Ingress
|
||||||
|
|
||||||
|
- Routes external traffic to frontend service
|
||||||
|
- TLS/SSL termination support
|
||||||
|
- Configurable hostname and paths
|
||||||
|
|
||||||
|
## CI/CD Integration
|
||||||
|
|
||||||
|
The Woodpecker CI pipeline automatically:
|
||||||
|
|
||||||
|
1. Builds backend and frontend Docker images
|
||||||
|
2. Tags with branch name and commit SHA
|
||||||
|
3. Pushes to Harbor registry
|
||||||
|
4. Updates this chart's values in the GitOps repository
|
||||||
|
|
||||||
|
## Accessing the Application
|
||||||
|
|
||||||
|
After installation, the application will be available at:
|
||||||
|
|
||||||
|
- **External**: https://oramap.dvirlabs.com (via Ingress)
|
||||||
|
- **Internal Backend API**: http://oramap-backend:3000
|
||||||
|
- **Internal Frontend**: http://oramap-frontend:80
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
### Check Pod Status
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kubectl get pods -l release=oramap
|
||||||
|
```
|
||||||
|
|
||||||
|
### View Logs
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Backend logs
|
||||||
|
kubectl logs -l app=oramap-backend
|
||||||
|
|
||||||
|
# Frontend logs
|
||||||
|
kubectl logs -l app=oramap-frontend
|
||||||
|
```
|
||||||
|
|
||||||
|
### Check Services
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kubectl get svc -l release=oramap
|
||||||
|
```
|
||||||
|
|
||||||
|
### Test Backend Health
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kubectl port-forward svc/oramap-backend 3000:3000
|
||||||
|
curl http://localhost:3000/api/health
|
||||||
|
```
|
||||||
|
|
||||||
|
## Version History
|
||||||
|
|
||||||
|
- **0.2.0**: Microservices architecture with separate backend and frontend
|
||||||
|
- **0.1.0**: Initial monolithic deployment
|
||||||
Loading…
x
Reference in New Issue
Block a user