π OpenEdX on AWS EKS β Al Nafi Technical Assessment
Cloud Platform: AWS (EKS Only) Deployment Method: Tutor + tutor-k8s Ingress: Nginx TLS: Letβs Encrypt via cert-manager Status: Production-ready deployment
1οΈβ£ Project Overview:
This project demonstrates a real production deployment of the OpenEdX Learning Management System on AWS EKS (Kubernetes). The goal was not just to βmake it runβ, but to:
- Use AWS-native infrastructure
- Follow enterprise architecture
- Separate application and databases
- Enable security, scalability, and observability
- Document everything clearly
- This repository represents hands-on execution, not theory.
2. High-Level Architecture (Easy View)
The diagram below shows how users access the OpenEdX LMS, how traffic flows through AWS EKS, and how the platform securely connects to external databases.
2οΈβ£ What Was Built:
- AWS EKS cluster with proper networking
- OpenEdX LMS & CMS running in Kubernetes
- All databases external to Kubernetes
- Nginx Ingress replacing default Caddy
- HTTPS using Letβs Encrypt (cert-manager)
- Horizontal Pod Autoscaling (HPA)
- Load testing to prove autoscaling
- Backup & restore automation (scripts provided)
- Clean documentation & reproducible setup
3οΈβ£ Architecture Summary:
- Users open https://lms.blackmode.io
- Traffic goes to Nginx Ingress (AWS Load Balancer)
- Nginx routes requests to OpenEdX LMS/CMS pods
- OpenEdX connects to external databases:
- MySQL (RDS)
- MongoDB (EC2)
- OpenSearch
- Redis
- Kubernetes HPA automatically scales LMS & CMS under load
4οΈβ£ Repository Structure β What Each Folder Does
πΉ .github/workflows/
ci.yml Basic CI pipeline structure for validation and automation readiness.
πΉ infra/terraform/
Provisioning all AWS infrastructure
- envs/prod/ β Production environment
- network/ β VPC, subnets, routing
- eks/ β EKS cluster & node groups
- security/ β IAM roles, security groups
- mongo-userdata.sh β MongoDB EC2 initialization
- elasticsearch-userdata.sh β OpenSearch setup
- variables.tf / outputs.tf β Terraform inputs & outputs
- Shows infrastructure-as-code discipline
πΉ k8s/
All Kubernetes manifests ingress-nginx/
- namespace.yaml β Nginx namespace
- values.yaml β Nginx configuration openedx/
- namespace.yaml β OpenEdX isolation
- ingress.yaml β Routing & TLS
- clusterissuer-letsencrypt.yaml β HTTPS issuer
- hpa-lms.yaml / hpa-cms.yaml β Autoscaling
- pvc-uploads.yaml β Persistent storage
- probes-patch.yaml β Health checks
- secrets-external-services.yaml β External DB connectivity
πΉ tutor/
Tutor configuration for OpenEdX
- config.yml β Core Tutor config
- init/ β DB initialization
- themes/alnafi/ β Custom Al Nafi LMS theme
- index.html
- alnafi.css
- theme.json
πΉ scripts/
Operational automation
- deploy-openedx.sh β Full deployment
- backup-all.sh β Backup all databases & volumes
- restore-all.sh β Restore backups
- init-external-dbs.sh β Prepare DBs
- tutor-bootstrap.sh β Install Tutor
- tutor-configure-external-services.sh
- validate.sh β Deployment checks
πΉ loadtest/
- lms-smoke.js β k6 load test for autoscaling proof
πΉ docs/
Professional documentation
- deployment-guide.md
- config-decisions.md
- monitoring.md
- backup-dr.md
- troubleshooting.md
- evidence-template.md
5οΈβ£ Deployment Steps (What Was Done):
Step 1: Provision AWS Infrastructure
cd infra/terraform/envs/prod
terraform init
terraform plan
terraform apply -auto-approve
Step 2: Connect to EKS
aws eks update-kubeconfig --region ap-south-1 --name openedx-prod
Step 3: Install Nginx Ingress
kubectl apply -f k8s/ingress-nginx/namespace.yaml
helm upgrade --install ingress-nginx ingress-nginx/ingress-nginx \
-n ingress-nginx -f k8s/ingress-nginx/values.yaml
Step 4: Enable HTTPS (cert-manager)
kubectl apply -f k8s/openedx/clusterissuer-letsencrypt.yaml
kubectl get certificate -A
Step 5: Deploy OpenEdX
tutor config save
tutor k8s upgrade
Step 6: Apply Autoscaling
kubectl apply -f k8s/openedx/hpa-lms.yaml
kubectl apply -f k8s/openedx/hpa-cms.yaml
Before Load:
Load Testing
k6 run loadtest/lms-smoke.js
During Load:
After Load:
Step 7: Apply Al Nafi Theme
kubectl -n openedx rollout restart deploy/lms
6οΈβ£ CloudFront & WAF (Architectural Note)
AWS CloudFront and WAF are part of the target enterprise architecture and are fully documented in this repository. Due to AWS account service access limitations, they could not be provisioned during execution. β‘ HTTPS is securely terminated at Nginx Ingress using Letβs Encrypt, which still provides encrypted, production-grade access.
Log in or sign up for Devpost to join the conversation.