-
Notifications
You must be signed in to change notification settings - Fork 35
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
Let's talk about OEP-45 (Configuring & Operating Open edX) #587
Labels
Comments
Thanks. I hope to be able to dig into this at a later time. One quick question is whether the replacement to ecommerce is not a separate service? |
4 tasks
@robrap As I understand it, the replacement to ecommerce will be a set of easily-integratable LMS and CMS APIs, plus one or more ready-to-go integrations using those APIs, such as the wordpress plugin. |
This was referenced Jul 19, 2024
kdmccormick
removed
the
help wanted
Ready to be picked up by anyone in the community
label
Jul 29, 2024
kdmccormick
added a commit
to openedx/edx-platform
that referenced
this issue
Jan 16, 2025
This is a pure refactoring of lms/envs/production.py, removing several redundant statements that have accrued over the years as the platform moved from python-only, to python+json, to python+json+yaml, to today's python+yaml setup. Notes on some of the more involved refactorings: * AWS Locals Load block is handled by the YAML loading at the very top, we don't need to re-load it since there were no changes to those settings between the YAML loading at the top and this section. * MKTG_URL_OVERRIDES, we drop doing any overrides and remove it from the merge list beacuse the default value in lms/envs/common.py is empty. So the update is a no-op and is the same as just loading this data directly from the YAML config. * CODE_JAIL block, we've been overriding the entire dict if it is in your YAML config, so then going through and updating the individual values is not necessary. * SSL_AUTH_EMAIL_DOMAIN and SSL_AUTH_DN_FORMAT_STRING are not used anywhere in the openedx org, looks like they were used by the old `dashboard` djangoapp and can probably be deleted but might be used by plugins so not removing for now to keep the change backward compatible. * DEFAULT_FILE_STORAGE, previously two of the braches were no-ops so we only keep the one branch we need for when we want to update DEFAULT_FILE_STORAGE automatically if AWS keys are set. Somewhat related to: openedx/open-edx-proposals#587 Co-Authored-By: Feanil Patel <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Four years ago we adopted Open edX Proposal (OEP) #45 after significant discussion. I think it's time to take a look about how the proposal matches our reality today. Without evaluating their merits, let me lay the major decisions of the OEP out next to the current state of Open edX operations in Redwood. Please let me know if you disagree with my assessments.
Containerization
The OEP said that we would stop distributing Ansible playbooks to provision Open edX VMs (a.k.a. the "native installation"), and that we would start distributing production-ready Docker images from Dockerfiles in all deployable Open edX repositories.
Towards this goal, many repositories now have a Dockerfile which is build and pushed to the unsupported openedx DockerHub org. As far as I know, however, these files are only used for the deprecated Devstack tool and, in some cases, for 2U production deployments. As a whole, I would say that the project has not adopted these upstream Dockerfiles.
Completely separately, Tutor replaced the Ansible playbooks as the community-supported distribution in Maple, and more recently replaced Devstack as the supported development tool. Tutor maintains its own Jinja2-templated Dockerfiles, which Edly builds and pushes to the overhangio DockerHub org.
Related:
Micro-Services (IDAs)
Reflecting the operational strategy of edX.org at the time, the OEP emphasizes the need for ease of configuring micro-services, also called "IDAs" (independently deployable applications). Transitioning towards a micro-service architecture is not an explicit goal of the OEP, but it is the unstated basis for so many other decisions that I think we must consider it as a decision in itself.
As of Redwood, I know of six Open edX micro-services deployed outside of edX.org:
The vast majority of core Open edX features are still exposed by the LMS (learning management system) and CMS (content management studio), both defined in edx-platform. I am not aware of any plans to extract any portions of edx-platform into micro-services, nor any plans to develop new core features as micro-services.
Django Settings Loading
The OEP declares that sites will configure each IDA's Django settings with an
<APPNAME>_CFG
yaml file, parsed and loaded by a single special DJANGO_SETTING_MODULE. This contrasts with the Django convention, which is that sites override Django settings using a their own DJANGO_SETTINGS_MODULE. The rationale is that all Open edX customization can be reasonably specified in yaml; so, it is operationally safer to avoid custom DJANGO_SETTINGS_MODULEs, and it is operationally desirable for all operation modes to execute the same Python module for configuration. This was briefly discussed in the OEP-45 review.For example, production LMS config would look like:
lms/settings/__init__.py
lms/settings/required.py
import lms/settings/defaults.py
/openedx/config/lms.yml
As of Redwood, we do not know of any site other than edX.org that successfully uses only yaml files for configuration. The DJANGO_SETTINGS_MODULE that loads these yaml files is not simple, either; it declares defaults, imports from other Django settings modules, sets more defaults, handles dozens of special cases, and has a special Open-edX-specific "derived settings" mechanism to handle settings that depend on other settings.
Tutor does provide yaml files, but it also has custom production and development settings files. The result is multiple layers of indirection between the community-supported Open edX distribution and actual Django settings. So, production LMS configuration actually looks like:
lms/envs/tutor/production.py
tutor/templates/apps/openedx/settings/lms/production.py
tutor/templates/apps/openedx/settings/partials/common_lms.py
tutor/templates/apps/openedx/settings/partials/common_all.py
config.yml
)lms/envs/production.py
lms/envs/common.py
/openedx/config/lms.yml
tutor/templates/apps/openedx/config/lms.env.yml
tutor/templates/apps/openedx/config/partials/auth.yml
Django Settings Documentation
The OEP declares that Django settings with and without without reasonable defaults should be declared in separate Python modules,
default.py
andrequired.py
, respectively. It declares that all of these settings are to be documented using Sphinx autodoc.As of Redwood, Open edX does not distinguish between default-provided and required settings. Many "default" settings are inappropriate for any environment, and many "required" settings can be easily missed. Tutor, however, follows the spirit of this recommendation by splitting its own configuration options between
CONFIG_DEFAULTS
andCONFIG_UNIQUE
; the former is similar todefault.py
, and the latter safely generates something similar torequired.py
.Furthermore, Open edX does not use Sphinx autodoc; however, we do use code-annotations to generate rST, which matches the OEP's autodoc decision in spirit. Unfortunately, many settings remain undocumented, and we do not lint to enforce that new settings are documented with code-annotations.
Operations Manuals
The OEP recommends that every IDA have a site operator reference manual defined at
./docs/operations
. I do not know of any Open edX IDAs that have such a documentation folder.edx-platform does have a references folder, which is published here. These docs are not a complete operations guide, but they at least contain a list of feature toggles. Some IDAs also have basic operator instructions in their README.
Otherwise, the most complete guide for Open edX operators in Redwood is probably Tutor's documentation.
Sub-decisions
It's worth noting that there are two ADRs nested under OEP-45. I didn't review these in detail, but I believe that they are both significantly closer to reality than the OEP itself:
The text was updated successfully, but these errors were encountered: