Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: create volume for private LMS/CMS media assets #1124

Merged
merged 3 commits into from
Oct 2, 2024

Conversation

ormsbee
Copy link
Contributor

@ormsbee ormsbee commented Sep 26, 2024

Content Libraries will store asset files like images, transcripts, and PDFs using Learning Core–which in turn uses django-storages and expects some backing file store. These files should NOT be directly accessible via the browser, both because of access policies and the fact that the filenames will not be meaningful by themselves and must be translated by app logic. For details see:

The existing /data/openedx-media -> /openedx/media mount is publicly accessible by browser, and so is not appropriate for this purpose. This commit creates a parallel /data/openedx-media-private -> /openedx/media-private volume mapping instead.

This commit also creates configuration needed for openedx-learning to point to this new directory.

This commit does NOT currently add support for this in k8s, as that will require changes to the minio plugin.

Content Libraries will store asset files like images, transcripts, and
PDFs using Learning Core–which in turn uses django-storages and expects
some backing file store. These files should NOT be directly accessible
via the browser, both because of access policies and the fact that the
filenames will not be meaningful by themselves and must be translated by
app logic. For details see:

* https://github.com/openedx/openedx-learning/blob/main/docs/decisions/0015-serving-static-assets.rst
* https://github.com/openedx/openedx-learning/blob/main/openedx_learning/apps/authoring/contents/models.py
* https://github.com/openedx/openedx-learning/blob/main/openedx_learning/apps/authoring/components/models.py

The existing /data/openedx-media -> /openedx/media mount is publicly
accessible by browser, and so is not appropriate for this purpose. This
commit creates a parallel /data/openedx-media-private ->
/openedx/media-private volume mapping instead.

This commit also creates configuration needed for openedx-learning to
point to this new directory.

This commit does NOT currently add support for this in k8s, as that will
require changes to the minio plugin.
@kdmccormick kdmccormick self-requested a review September 26, 2024 20:02
@@ -246,5 +246,14 @@
"user": None,
}

LEARNING_CORE = {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I should probably make this OPENEDX_LEARNING, to reduce confusion...

@bradenmacdonald
Copy link
Contributor

✅ I tested this using these instructions and it's working well.

@kdmccormick kdmccormick merged commit 6843f14 into overhangio:nightly Oct 2, 2024
2 checks passed
@regisb
Copy link
Contributor

regisb commented Oct 3, 2024

Here's the corresponding MinIO issue: overhangio/tutor-minio#48

@ormsbee ormsbee deleted the private-media branch October 25, 2024 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants