Ora Map Helm Chart
Helm chart for deploying Ora Map application in Kubernetes with microservices architecture.
Architecture
This chart deploys three main components:
- Backend: Node.js Express API server with MongoDB integration (Port 3000)
- Frontend: Nginx serving static files with API proxy (Port 80)
- MongoDB: Database for storing family location data (Port 27017)
Installation
Prerequisites
- Kubernetes cluster 1.19+
- Helm 3.0+
- Docker images built and pushed to Harbor registry
Install Chart
# 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
helm upgrade oramap ./oramap
Uninstall Chart
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 |
mongodb.enabled |
Enable MongoDB deployment | true |
mongodb.image.repository |
MongoDB image repository | mongo |
mongodb.image.tag |
MongoDB image tag | 7.0 |
mongodb.persistence.enabled |
Enable persistent storage | true |
mongodb.persistence.size |
PVC size | 5Gi |
mongodb.persistence.storageClass |
Storage class name | "" (default) |
mongodb.database |
Database name | oramap |
Example Custom Values
# custom-values.yaml
backend:
image:
tag: "v1.0.0"
mongodb:
persistence:
enabled: true
size: 10Gi
storageClass: "fast-ssd"
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
MongoDB StatefulSet
- Persistent database storage for family data
- Health checks using mongosh
- Configurable storage size and class
- Automatic PVC creation
Database Setup
Initial Data Seeding
After deployment, seed the database with initial family data:
# Access the backend pod
kubectl exec -it deployment/oramap-backend -- sh
# Run the seed script
npm run seed
# Or force re-seed
npm run seed:force
MongoDB Access
# Port-forward to MongoDB
kubectl port-forward svc/oramap-mongodb 27017:27017
# Check StatefulSet
kubectl get statefulset oramap-mongodb
kubectl get pvc
View Logs
# Backend logs
kubectl logs -l app=oramap-backend
# Frontend logs
kubectl logs -l app=oramap-frontend
# MongoDB logs
kubectl logs oramap-mongodb-0
CI/CD Integration
The Woodpecker CI pipeline automatically:
- Builds backend and frontend Docker images
- Tags with branch name and commit SHA
- Pushes to Harbor registry
- 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
kubectl get pods -l release=oramap
View Logs
# Backend logs
kubectl logs -l app=oramap-backend
# Frontend logs
kubectl logs -l app=oramap-frontend
Check Services
kubectl get svc -l release=oramap
Test Backend Health
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