Using RWX volumes on k8s

Hi! I am trying to get Open edX up on a Kubernetes Cluster and was able to deploy it with ease thanks to Tutor!

However, while trying out the studio I noticed that file uploads are stored in MongoDB. Another alternative seems to be running MinIO and using it for storage. The k8s cluster I am using supports RWX volumes and I was thinking if I could directly use the volumes for my storage purpose as it will also be easy and faster to snapshot the volumes. I would be grateful if I could get some help as to what all configuration changes need to be done and where to mount the volume to achieve this.

Thanks!

Good catch @umar! Unfortunately, storing file uploads in Mongodb is a feature that is embedded deep inside the edx-platform modulestore component, and there is no real alternative to change that for the moment. Note that there is work-in-progress to get rid of MongoDb and move the data to MySQL, though: Store split modulestore's course indexes in Django/MySQL (Take 2) by bradenmacdonald · Pull Request #29058 · edx/edx-platform · GitHub

Thanks for the reply @regis! According to these docs, some files are persisted on the disk. I am running multiple replicas of LMS and CMS pods and have mounted three ReadWriteMany volumes on these paths -

* CMS: 
1. /openedx/media: media
2. /openedx/data: cms-data

* CMS Worker: 
1. /openedx/media: media
2. /openedx/data: cms-data

* LMS: 
1. /openedx/media: media
2. /openedx/data: lms-data

* LMS Worker: 
1. /openedx/media: media
2. /openedx/data: lms-data

I hope this will take care of all the data that needs to be persisted on the disk.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.