From cc390ca1e3acf9b0cf33506beb88112d7ecb9104 Mon Sep 17 00:00:00 2001 From: Juan David Buitrago Date: Wed, 31 May 2023 11:30:41 +0200 Subject: [PATCH 1/8] refactor!: remove distro defaults settings to add from strain/conf file --- tutordistro/plugin.py | 135 +----------------------------------------- 1 file changed, 2 insertions(+), 133 deletions(-) diff --git a/tutordistro/plugin.py b/tutordistro/plugin.py index 714043c..2cd2fd8 100644 --- a/tutordistro/plugin.py +++ b/tutordistro/plugin.py @@ -17,140 +17,9 @@ templates = os.path.join(HERE, "templates") config = { - "defaults": { - "VERSION": __version__, - "EXTRA_MIDDLEWARES": [], - # DISTRO PACKAGES - "EOX_CORE_DPKG": { - "index": "git", - "name": "eox-core", - "repo": "eox-core", - "version": "v8.0.0", - "domain": "github.com", - "protocol": "https", - "path": "eduNEXT", - "variables": { - "development": { - "EOX_CORE_USERS_BACKEND": "eox_core.edxapp_wrapper" - ".backends.users_m_v1", - "EOX_CORE_ENROLLMENT_BACKEND": "eox_core.edxapp_wrapper" - ".backends.enrollment_o_v1", - "EOX_CORE_PRE_ENROLLMENT_BACKEND": "eox_core" - ".edxapp_wrapper" - ".backends" - ".pre_enrollment_l_v1", - }, - "production": { - "EOX_CORE_USERS_BACKEND": "eox_core.edxapp_wrapper" - ".backends.users_m_v1", - "EOX_CORE_ENROLLMENT_BACKEND": "eox_core.edxapp_wrapper" - ".backends.enrollment_o_v1", - "EOX_CORE_PRE_ENROLLMENT_BACKEND": "eox_core" - ".edxapp_wrapper" - ".backends" - ".pre_enrollment_l_v1", - }, - }, - "private": False, - }, - "EOX_TENANT_DPKG": { - "index": "git", - "name": "eox-tenant", - "repo": "eox-tenant", - "version": "v8.0.0", - "domain": "github.com", - "protocol": "https", - "path": "eduNEXT", - "variables": { - "development": { - "EOX_TENANT_USERS_BACKEND": "eox_tenant.edxapp_wrapper" - ".backends.users_l_v1", - "EOX_TENANT_LOAD_PERMISSIONS": False, - }, - "production": { - "EOX_TENANT_USERS_BACKEND": "eox_tenant.edxapp_wrapper" - ".backends.users_l_v1", - "EOX_TENANT_LOAD_PERMISSIONS": False, - }, - }, - "private": False, - }, - "EOX_THEMING_DPKG": { - "index": "git", - "name": "eox-theming", - "repo": "eox-theming", - "version": "v5.0.0", - "domain": "github.com", - "protocol": "https", - "path": "eduNEXT", - "EOX_THEMING_CONFIG_SOURCES": [ - "from_eox_tenant_microsite_v2", - "from_django_settings" - ], - "private": False, - }, - "EOX_HOOKS_DPKG": { - "index": "git", - "name": "eox-hooks", - "repo": "eox-hooks", - "version": "v4.0.0", - "domain": "github.com", - "protocol": "https", - "path": "eduNEXT", - "private": False, - }, - "EOX_TAGGING_DPKG": { - "index": "git", - "name": "eox-tagging", - "repo": "eox-tagging", - "version": "v5.0.0", - "domain": "github.com", - "protocol": "https", - "path": "eduNEXT", - "private": False, - }, - "EOX_AUDIT_MODEL_DPKG": { - "index": "git", - "name": "eox-audit-model", - "repo": "eox-audit-model", - "version": "v2.0.0", - "domain": "github.com", - "protocol": "https", - "path": "eduNEXT", - "private": False, - }, - "THEMES_ROOT": "/openedx/themes", - "THEME_DIRS": [ - "/openedx/themes/ednx-saas-themes/edx-platform", - "/openedx/themes/ednx-saas-themes/edx-platform/bragi-generator", - ], - "THEMES_NAME": [ - "bragi", - ], - "THEMES": [ - { - "name": "ednx-saas-themes", - "repo": "ednx-saas-themes", - "version": "edunext/olmo.master", - "domain": "github.com", - "protocol": "ssh", - "path": "eduNEXT", - }, - ], - "INSTALL_EDNX_REQUIREMENTS": False, - "DISABLE_MFE": False - }, + "defaults": {}, "unique": {}, - "overrides": { - "DOCKER_IMAGE_OPENEDX": - "docker.io/ednxops/distro-edunext-edxapp:olmo", - "DOCKER_IMAGE_OPENEDX_DEV": - "docker.io/ednxops/distro-edunext-edxapp-dev:olmo", - "EDX_PLATFORM_REPOSITORY": - "https://github.com/eduNEXT/edunext-platform.git", - "EDX_PLATFORM_VERSION": - "ednx-release/olmo.master", - }, + "overrides": {}, } From 7ba9670747f181228adcc244849b8a70f5a74f5e Mon Sep 17 00:00:00 2001 From: Juan David Buitrago Date: Fri, 2 Jun 2023 06:49:22 +0200 Subject: [PATCH 2/8] fix: fix errors when the settings are not define --- tutordistro/commands/enable_themes.py | 5 +++-- tutordistro/patches/cms-env | 2 ++ tutordistro/patches/lms-env | 2 ++ tutordistro/patches/openedx-cms-production-settings | 2 ++ tutordistro/patches/openedx-common-assets-settings | 2 ++ tutordistro/patches/openedx-development-settings | 4 +++- .../patches/openedx-dockerfile-post-python-requirements | 2 +- tutordistro/patches/openedx-dockerfile-pre-assets | 4 ++++ tutordistro/patches/openedx-lms-production-settings | 4 +++- 9 files changed, 22 insertions(+), 5 deletions(-) diff --git a/tutordistro/commands/enable_themes.py b/tutordistro/commands/enable_themes.py index 2fa3cf0..be09e33 100644 --- a/tutordistro/commands/enable_themes.py +++ b/tutordistro/commands/enable_themes.py @@ -26,5 +26,6 @@ def enable_themes() -> None: repository = ThemeGitRepository() enabler = ThemeEnabler(repository=repository) - for theme in config["DISTRO_THEMES"]: - enabler(settings=theme, tutor_root=directory, tutor_config=config) + if config.get("DISTRO_THEMES"): + for theme in config["DISTRO_THEMES"]: + enabler(settings=theme, tutor_root=directory, tutor_config=config) diff --git a/tutordistro/patches/cms-env b/tutordistro/patches/cms-env index 2be3b5e..29b025b 100644 --- a/tutordistro/patches/cms-env +++ b/tutordistro/patches/cms-env @@ -1,2 +1,4 @@ USE_EOX_TENANT: True +{% if DISTRO_DEFAULT_SITE_THEME is defined or DISTRO_THEMES_NAME is defined %} DEFAULT_SITE_THEME: "{{ DISTRO_DEFAULT_SITE_THEME | default(DISTRO_THEMES_NAME[0]) }}" +{%- endif -%} diff --git a/tutordistro/patches/lms-env b/tutordistro/patches/lms-env index 66ff96f..b97cf10 100644 --- a/tutordistro/patches/lms-env +++ b/tutordistro/patches/lms-env @@ -1,4 +1,6 @@ USE_EOX_TENANT: True +{% if DISTRO_DEFAULT_SITE_THEME is defined or DISTRO_THEMES_NAME is defined %} DEFAULT_SITE_THEME: "{{ DISTRO_DEFAULT_SITE_THEME | default(DISTRO_THEMES_NAME[0]) }}" +{%- endif -%} ENABLE_EOX_THEMING_DERIVE_WORKAROUND: True SESSION_COOKIE_DOMAIN: ".{{ LMS_HOST|common_domain(CMS_HOST) }}" diff --git a/tutordistro/patches/openedx-cms-production-settings b/tutordistro/patches/openedx-cms-production-settings index 9f75617..0d8b71e 100644 --- a/tutordistro/patches/openedx-cms-production-settings +++ b/tutordistro/patches/openedx-cms-production-settings @@ -11,7 +11,9 @@ {% endfor %} COMPREHENSIVE_THEME_DIRS.remove('/openedx/themes') +{% if DISTRO_THEME_DIRS is defined %} COMPREHENSIVE_THEME_DIRS.extend({{ DISTRO_THEME_DIRS }}) +{%- endif -%} ################## EOX_THEMING ################## from lms.envs.common import _make_mako_template_dirs # pylint: disable=import-error diff --git a/tutordistro/patches/openedx-common-assets-settings b/tutordistro/patches/openedx-common-assets-settings index e70aa7f..9ccb137 100644 --- a/tutordistro/patches/openedx-common-assets-settings +++ b/tutordistro/patches/openedx-common-assets-settings @@ -11,4 +11,6 @@ {% endfor %} COMPREHENSIVE_THEME_DIRS.remove('/openedx/themes') +{% if DISTRO_THEME_DIRS is defined %} COMPREHENSIVE_THEME_DIRS.extend({{ DISTRO_THEME_DIRS }}) +{%- endif -%} diff --git a/tutordistro/patches/openedx-development-settings b/tutordistro/patches/openedx-development-settings index b95d277..e7eb5d6 100644 --- a/tutordistro/patches/openedx-development-settings +++ b/tutordistro/patches/openedx-development-settings @@ -11,7 +11,9 @@ {% endfor %} COMPREHENSIVE_THEME_DIRS.remove('/openedx/themes') +{% if DISTRO_THEME_DIRS is defined %} COMPREHENSIVE_THEME_DIRS.extend({{ DISTRO_THEME_DIRS }}) +{%- endif -%} ################## EOX_THEMING ################## if "EOX_THEMING_DEFAULT_THEME_NAME" in locals() and EOX_THEMING_DEFAULT_THEME_NAME: @@ -21,6 +23,6 @@ if "EOX_THEMING_DEFAULT_THEME_NAME" in locals() and EOX_THEMING_DEFAULT_THEME_NA derive_settings("lms.envs.devstack") # EOL -{% if DISTRO_EXTRA_MIDDLEWARES %} +{% if DISTRO_EXTRA_MIDDLEWARES is defined %} MIDDLEWARE.extend({{ DISTRO_EXTRA_MIDDLEWARES }}) {%- endif -%} diff --git a/tutordistro/patches/openedx-dockerfile-post-python-requirements b/tutordistro/patches/openedx-dockerfile-post-python-requirements index 74e7da6..7189e3e 100644 --- a/tutordistro/patches/openedx-dockerfile-post-python-requirements +++ b/tutordistro/patches/openedx-dockerfile-post-python-requirements @@ -1,4 +1,4 @@ -{%- if DISTRO_INSTALL_EDNX_REQUIREMENTS %} +{%- if DISTRO_INSTALL_EDNX_REQUIREMENTS is defined and DISTRO_INSTALL_EDNX_REQUIREMENTS %} RUN pip install -r ./requirements/edunext/base.txt {%- endif %} {%- for pkg in iter_values_named(suffix="_DPKG") %} diff --git a/tutordistro/patches/openedx-dockerfile-pre-assets b/tutordistro/patches/openedx-dockerfile-pre-assets index 409bfbd..94c3c62 100644 --- a/tutordistro/patches/openedx-dockerfile-pre-assets +++ b/tutordistro/patches/openedx-dockerfile-pre-assets @@ -4,9 +4,13 @@ RUN openedx-assets xmodule \ && openedx-assets npm \ && openedx-assets webpack --env=prod \ && openedx-assets common +{% if DISTRO_THEMES_ROOT is defined %} COPY --chown=app:app ./themes/ {{ DISTRO_THEMES_ROOT }} +{% endif %} +{% if DISTRO_THEME_DIRS is defined and DISTRO_THEMES_NAME is defined %} RUN openedx-assets themes \ --theme-dirs {{ DISTRO_THEME_DIRS | join(' ') }} \ --themes {{ DISTRO_THEMES_NAME | join(' ') }} \ && openedx-assets collect --settings=tutor.assets \ && rdfind -makesymlinks true -followsymlinks true /openedx/staticfiles/ +{% endif %} diff --git a/tutordistro/patches/openedx-lms-production-settings b/tutordistro/patches/openedx-lms-production-settings index 376742c..cb80ba9 100644 --- a/tutordistro/patches/openedx-lms-production-settings +++ b/tutordistro/patches/openedx-lms-production-settings @@ -11,7 +11,9 @@ {% endfor %} COMPREHENSIVE_THEME_DIRS.remove('/openedx/themes') +{% if DISTRO_THEME_DIRS is defined %} COMPREHENSIVE_THEME_DIRS.extend({{ DISTRO_THEME_DIRS }}) +{%- endif -%} ################## EOX_THEMING ################## if "EOX_THEMING_DEFAULT_THEME_NAME" in locals() and EOX_THEMING_DEFAULT_THEME_NAME: @@ -21,6 +23,6 @@ if "EOX_THEMING_DEFAULT_THEME_NAME" in locals() and EOX_THEMING_DEFAULT_THEME_NA derive_settings("lms.envs.production") # EOL -{% if DISTRO_EXTRA_MIDDLEWARES %} +{% if DISTRO_EXTRA_MIDDLEWARES is defined %} MIDDLEWARE.extend({{ DISTRO_EXTRA_MIDDLEWARES }}) {%- endif -%} From 30f5041dd21ca2b30bea6f1bc6439e1a3016795a Mon Sep 17 00:00:00 2001 From: Juan David Buitrago Date: Wed, 14 Jun 2023 10:42:18 -0500 Subject: [PATCH 3/8] feat: add install extra file requirement setting --- .../patches/openedx-dockerfile-post-python-requirements | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tutordistro/patches/openedx-dockerfile-post-python-requirements b/tutordistro/patches/openedx-dockerfile-post-python-requirements index 7189e3e..e293175 100644 --- a/tutordistro/patches/openedx-dockerfile-post-python-requirements +++ b/tutordistro/patches/openedx-dockerfile-post-python-requirements @@ -1,5 +1,10 @@ -{%- if DISTRO_INSTALL_EDNX_REQUIREMENTS is defined and DISTRO_INSTALL_EDNX_REQUIREMENTS %} -RUN pip install -r ./requirements/edunext/base.txt +{%- if INSTALL_EXTRA_FILE_REQUIREMENTS is defined %} +# Install extra file requirements: this is useful for installing custom requirements. +COPY {{ INSTALL_EXTRA_FILE_REQUIREMENTS["path"] }} /openedx/requirements +{%- for file in INSTALL_EXTRA_FILE_REQUIREMENTS["files"] %} +# Install extra file {{ file }} from {{ INSTALL_EXTRA_FILE_REQUIREMENTS["path"] }} +RUN pip install -r /openedx/requirements{{ file }} +{% endfor %} {%- endif %} {%- for pkg in iter_values_named(suffix="_DPKG") %} {%- if pkg != 'None' -%} From b15c87e98a5892025d211511ab8789a56ce771b2 Mon Sep 17 00:00:00 2001 From: Juan David Buitrago Date: Sat, 17 Jun 2023 17:19:48 -0500 Subject: [PATCH 4/8] feat: add enable eox settings configuration --- tutordistro/patches/cms-env | 4 +++- tutordistro/patches/lms-env | 8 ++++++-- tutordistro/patches/openedx-cms-production-settings | 10 ++++++---- tutordistro/patches/openedx-common-assets-settings | 4 ++-- tutordistro/patches/openedx-development-settings | 8 +++++--- tutordistro/patches/openedx-lms-production-settings | 10 ++++++---- tutordistro/templates/distro/tasks/lms/pre-init | 10 +++++----- 7 files changed, 33 insertions(+), 21 deletions(-) diff --git a/tutordistro/patches/cms-env b/tutordistro/patches/cms-env index 29b025b..4184290 100644 --- a/tutordistro/patches/cms-env +++ b/tutordistro/patches/cms-env @@ -1,4 +1,6 @@ -USE_EOX_TENANT: True +{% if ENABLE_EOX_SETTINGS["USE_EOX_TENANT"] is defined %} +USE_EOX_TENANT: {{ ENABLE_EOX_SETTINGS["USE_EOX_TENANT"] }} +{% endif %} {% if DISTRO_DEFAULT_SITE_THEME is defined or DISTRO_THEMES_NAME is defined %} DEFAULT_SITE_THEME: "{{ DISTRO_DEFAULT_SITE_THEME | default(DISTRO_THEMES_NAME[0]) }}" {%- endif -%} diff --git a/tutordistro/patches/lms-env b/tutordistro/patches/lms-env index b97cf10..3e69693 100644 --- a/tutordistro/patches/lms-env +++ b/tutordistro/patches/lms-env @@ -1,6 +1,10 @@ -USE_EOX_TENANT: True +{% if ENABLE_EOX_SETTINGS["USE_EOX_TENANT"] is defined %} +USE_EOX_TENANT: {{ ENABLE_EOX_SETTINGS["USE_EOX_TENANT"] }} +{% endif %} {% if DISTRO_DEFAULT_SITE_THEME is defined or DISTRO_THEMES_NAME is defined %} DEFAULT_SITE_THEME: "{{ DISTRO_DEFAULT_SITE_THEME | default(DISTRO_THEMES_NAME[0]) }}" {%- endif -%} -ENABLE_EOX_THEMING_DERIVE_WORKAROUND: True +{% if ENABLE_EOX_SETTINGS["ENABLE_EOX_THEMING_DERIVE_WORKAROUND"] is defined %} +ENABLE_EOX_THEMING_DERIVE_WORKAROUND: {{ ENABLE_EOX_SETTINGS["ENABLE_EOX_THEMING_DERIVE_WORKAROUND"] }} +{% endif %} SESSION_COOKIE_DOMAIN: ".{{ LMS_HOST|common_domain(CMS_HOST) }}" diff --git a/tutordistro/patches/openedx-cms-production-settings b/tutordistro/patches/openedx-cms-production-settings index 0d8b71e..ecaa6a8 100644 --- a/tutordistro/patches/openedx-cms-production-settings +++ b/tutordistro/patches/openedx-cms-production-settings @@ -11,13 +11,15 @@ {% endfor %} COMPREHENSIVE_THEME_DIRS.remove('/openedx/themes') -{% if DISTRO_THEME_DIRS is defined %} +{%- if DISTRO_THEME_DIRS is defined %} COMPREHENSIVE_THEME_DIRS.extend({{ DISTRO_THEME_DIRS }}) -{%- endif -%} +{%- endif %} ################## EOX_THEMING ################## +{%- if ENABLE_EOX_SETTINGS["ENABLE_COMPREHENSIVE_THEMING"] is defined %} from lms.envs.common import _make_mako_template_dirs # pylint: disable=import-error -ENABLE_COMPREHENSIVE_THEMING = True +ENABLE_COMPREHENSIVE_THEMING = {{ ENABLE_EOX_SETTINGS["ENABLE_COMPREHENSIVE_THEMING"] }} TEMPLATES[1]["DIRS"] = _make_mako_template_dirs derive_settings("cms.envs.production") -# EOL \ No newline at end of file +# EOL +{%- endif %} diff --git a/tutordistro/patches/openedx-common-assets-settings b/tutordistro/patches/openedx-common-assets-settings index 9ccb137..3da8298 100644 --- a/tutordistro/patches/openedx-common-assets-settings +++ b/tutordistro/patches/openedx-common-assets-settings @@ -11,6 +11,6 @@ {% endfor %} COMPREHENSIVE_THEME_DIRS.remove('/openedx/themes') -{% if DISTRO_THEME_DIRS is defined %} +{%- if DISTRO_THEME_DIRS is defined %} COMPREHENSIVE_THEME_DIRS.extend({{ DISTRO_THEME_DIRS }}) -{%- endif -%} +{%- endif %} diff --git a/tutordistro/patches/openedx-development-settings b/tutordistro/patches/openedx-development-settings index e7eb5d6..af95b65 100644 --- a/tutordistro/patches/openedx-development-settings +++ b/tutordistro/patches/openedx-development-settings @@ -11,17 +11,19 @@ {% endfor %} COMPREHENSIVE_THEME_DIRS.remove('/openedx/themes') -{% if DISTRO_THEME_DIRS is defined %} +{%- if DISTRO_THEME_DIRS is defined %} COMPREHENSIVE_THEME_DIRS.extend({{ DISTRO_THEME_DIRS }}) -{%- endif -%} +{%- endif %} ################## EOX_THEMING ################## +{%- if ENABLE_EOX_SETTINGS["ENABLE_COMPREHENSIVE_THEMING"] is defined %} if "EOX_THEMING_DEFAULT_THEME_NAME" in locals() and EOX_THEMING_DEFAULT_THEME_NAME: from lms.envs.common import _make_mako_template_dirs # pylint: disable=import-error - ENABLE_COMPREHENSIVE_THEMING = True + ENABLE_COMPREHENSIVE_THEMING = {{ ENABLE_EOX_SETTINGS["ENABLE_COMPREHENSIVE_THEMING"] }} TEMPLATES[1]["DIRS"] = _make_mako_template_dirs derive_settings("lms.envs.devstack") # EOL +{%- endif %} {% if DISTRO_EXTRA_MIDDLEWARES is defined %} MIDDLEWARE.extend({{ DISTRO_EXTRA_MIDDLEWARES }}) diff --git a/tutordistro/patches/openedx-lms-production-settings b/tutordistro/patches/openedx-lms-production-settings index cb80ba9..502c645 100644 --- a/tutordistro/patches/openedx-lms-production-settings +++ b/tutordistro/patches/openedx-lms-production-settings @@ -11,18 +11,20 @@ {% endfor %} COMPREHENSIVE_THEME_DIRS.remove('/openedx/themes') -{% if DISTRO_THEME_DIRS is defined %} +{%- if DISTRO_THEME_DIRS is defined %} COMPREHENSIVE_THEME_DIRS.extend({{ DISTRO_THEME_DIRS }}) -{%- endif -%} +{%- endif %} ################## EOX_THEMING ################## +{%- if ENABLE_EOX_SETTINGS["ENABLE_COMPREHENSIVE_THEMING"] is defined %} if "EOX_THEMING_DEFAULT_THEME_NAME" in locals() and EOX_THEMING_DEFAULT_THEME_NAME: from lms.envs.common import _make_mako_template_dirs # pylint: disable=import-error - ENABLE_COMPREHENSIVE_THEMING = True + ENABLE_COMPREHENSIVE_THEMING = {{ ENABLE_EOX_SETTINGS["ENABLE_COMPREHENSIVE_THEMING"] }} TEMPLATES[1]["DIRS"] = _make_mako_template_dirs derive_settings("lms.envs.production") # EOL +{%- endif %} {% if DISTRO_EXTRA_MIDDLEWARES is defined %} MIDDLEWARE.extend({{ DISTRO_EXTRA_MIDDLEWARES }}) -{%- endif -%} +{%- endif %} diff --git a/tutordistro/templates/distro/tasks/lms/pre-init b/tutordistro/templates/distro/tasks/lms/pre-init index 802f1a1..4981033 100644 --- a/tutordistro/templates/distro/tasks/lms/pre-init +++ b/tutordistro/templates/distro/tasks/lms/pre-init @@ -1,5 +1,5 @@ -./manage.py lms migrate contenttypes -./manage.py lms migrate eox_core -./manage.py lms migrate eox_tenant -./manage.py lms migrate eox_tagging -./manage.py lms migrate eox_audit_model +{% if ENABLE_EOX_SETTINGS["pre_init_lms_tasks"] is defined %} +{% for task in ENABLE_EOX_SETTINGS["pre_init_lms_tasks"] %} +{{ task }} +{% endfor %} +{% endif %} From 8407b72e8fb706f890a1cb644703372af009545e Mon Sep 17 00:00:00 2001 From: Juan David Buitrago Date: Tue, 20 Jun 2023 09:26:58 -0500 Subject: [PATCH 5/8] docs: add information about removed default settings from distro --- README.md | 13 ++++++++++++- docs/how_to_add_new_packages.rst | 11 ++++++----- docs/how_to_customize_distro.rst | 8 +++++--- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 2bc2ab2..1a6c118 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ tutor distro repository-validator Distro plugin manages a set of settings that you can configure, to know how to do that check: - [How to custumize distro](./docs/how_to_customize_distro.rst) -- [How to override or add a new package](./docs/how_to_add_new_packages.rst) +- [How to add a new package](./docs/how_to_add_new_packages.rst) # Required tutor settings @@ -64,6 +64,7 @@ These packages will be installed in a default installation. - eox-audit-model (DISTRO_EOX_AUDIT_MODEL_DPKG) - eox-tagging (DISTRO_EOX_TAGGING_DPKG) +:warning: **NOTE**: From Olmo version Distro has not defaulted packages. Now it is necessary to add the packages you want in ``config.yml`` file. See [How to add a new package](./docs/how_to_add_new_packages.rst) ## How to add a new package @@ -118,6 +119,8 @@ You can use the same steps that in **How to add a new package** just set the var - DISTRO_EOX_AUDIT_MODEL_DPKG - DISTRO_EOX_TAGGING_DPKG +:warning: **NOTE**: From Olmo version Distro has not defaulted packages. Now it is necessary to add the packages you want in ``config.yml`` file. See [How to add a new package](./docs/how_to_add_new_packages.rst) + ## Disable packages You can disable any default package following this structure in your config.yml: @@ -130,11 +133,15 @@ Development environment take this changes with _tutor config save_ and restart, > **Warning:** Default packages can have dependencies with other default packages or base application and disable it would break some features. +:warning: **NOTE**: From Olmo version Distro has not defaulted packages. Now it is necessary to add the packages you want in ``config.yml`` file. See [How to add a new package](./docs/how_to_add_new_packages.rst) + # Themes Declare the path of your themes using `tutor config save --set DISTRO_THEMES_ROOT="your_path"`, by default the themes path goes here **/openedx/themes** +:warning: **NOTE**: From Olmo version Distro has not defaulted themes path. Now it is necessary to add the themes path in ``config.yml`` file or running command above. + ## Default themes These themes will be installed in a default installation. @@ -143,6 +150,8 @@ These themes will be installed in a default installation. Defining a DISTRO_DEFAULT_SITE_THEME argument with a color will set a default theme, however, if not specified the default theme will be the first on the DISTRO_THEMES_NAME set of themes. +:warning: **NOTE**: From Olmo version Distro has not defaulted themes. Now it is necessary to add the themes in ``config.yml`` file. See [How to add a theme](https://github.com/eduNEXT/tutor-contrib-edunext-distro#how-to-add-a-theme). + ## How to add a theme You can override the default themes on the config.yml but @@ -190,6 +199,8 @@ tutor distro enable-themes openedx-assets themes --theme-dirs THEME_DIRS --themes THEME_NAMES ``` +:warning: **NOTE**: From Olmo version Distro has not defaulted themes. Now it is necessary to add the themes in ``config.yml`` file. + # Build a new image **requirements:** you should have enabled the distro plugin, also you had have run the commands `tutor distro enable-themes` and `tutor distro enable-private-packages`. diff --git a/docs/how_to_add_new_packages.rst b/docs/how_to_add_new_packages.rst index 3cc633e..1d9c5b7 100644 --- a/docs/how_to_add_new_packages.rst +++ b/docs/how_to_add_new_packages.rst @@ -3,7 +3,7 @@ How to override or add a new package You can add or override a package directly in config.yml file (``$(tutor config printroot)/config.yaml``). -It's possible to install from a repository or by pip but take in mind, the second option couldn't install it as editable. +It's possible to install from a repository or by pip but take in mind, the second option couldn't install it as editable. Follow the next structure: @@ -48,7 +48,7 @@ To override a default package identify its name and set it like ``DISTRO__DPK .. code-block:: yml - + DISTRO__DPKG: None - -If you want to override default packages or add a new one go to the corresponding section: `How to override or add a new package. <./how_to_add_new_packages.rst>`_ \ No newline at end of file + +:warning: **NOTE**: From Olmo version Distro has not defaulted packages. Now it is necessary to add the packages you want in ``config.yml`` file. + +If you want to override default packages or add a new one go to the corresponding section: `How to add a new package. <./how_to_add_new_packages.rst>`_ From 53fc35bd3a00fac5c8f84cea3b44c4cdc91b3308 Mon Sep 17 00:00:00 2001 From: Juan David Buitrago Date: Tue, 20 Jun 2023 10:40:01 -0500 Subject: [PATCH 6/8] docs: add documentation for new settings --- README.md | 37 +++++++++++++++++++++++++++++++ docs/how_to_add_new_packages.rst | 38 ++++++++++++++++++++++++++++++++ docs/how_to_customize_distro.rst | 21 ++++++++++++++++++ 3 files changed, 96 insertions(+) diff --git a/README.md b/README.md index 1a6c118..e129fbe 100644 --- a/README.md +++ b/README.md @@ -262,6 +262,43 @@ DISTRO_EXTRA_MIDDLEWARES: - middleware.test.2 ``` +## How to add extra files requirements + +You should set the variable **INSTALL_EXTRA_FILE_REQUIREMENTS** in your config.yml file if you need to install extra files with. The structure should be like: + +```yaml +INSTALL_EXTRA_FILE_REQUIREMENTS: + path: ./requirements/extra_file/ + files: [ + /edunext/base.txt, + /test/test.txt + ] +``` + +It's important that ``.txt`` files are added in requirements directory, similar to EXTRA PIP REQUIREMENTS from [Tutor](https://docs.tutor.overhang.io/configuration.html#installing-extra-xblocks-and-requirements). + +## How to enable eox settings + +You should set the variable **ENABLE_EOX_SETTINGS** in your config.yml file if you need to enable some eox settings to plugins works as expected. For now the principals settings should be like this: + +```yaml +ENABLE_EOX_SETTINGS: + USE_EOX_TENANT: true + ENABLE_EOX_THEMING_DERIVE_WORKAROUND: true + ENABLE_COMPREHENSIVE_THEMING: true + pre_init_lms_tasks: [ + ./manage.py lms migrate contenttypes, + ./manage.py lms migrate eox_core, + ./manage.py lms migrate eox_tenant, + ./manage.py lms migrate eox_tagging, + ./manage.py lms migrate eox_audit_model + ] +``` + +The list could grow according to the needs that arise at the time of configuring the eox plugins. + +:warning: **Note**: Other Options as ``INSTALL_EXTRA_FILE_REQUIREMENTS`` and ``ENABLE_EOX_SETTINGS`` are included from Olmo version, you can use it from this release. + # License This software is licensed under the terms of the AGPLv3. diff --git a/docs/how_to_add_new_packages.rst b/docs/how_to_add_new_packages.rst index 1d9c5b7..3206bbd 100644 --- a/docs/how_to_add_new_packages.rst +++ b/docs/how_to_add_new_packages.rst @@ -83,7 +83,45 @@ Once you define your private packages in config file you need to enable them wit tutor distro enable-private-packages +Other Options +------------- +* How to add extra files requirements + +You should set the variable **INSTALL_EXTRA_FILE_REQUIREMENTS** in your config.yml file if you need to install extra files with. The structure should be like: + +```yaml +INSTALL_EXTRA_FILE_REQUIREMENTS: + path: ./requirements/extra_file/ + files: [ + /edunext/base.txt, + /test/test.txt + ] +``` + +It's important that ``.txt`` files are added in requirements directory, similar to EXTRA PIP REQUIREMENTS from [Tutor](https://docs.tutor.overhang.io/configuration.html#installing-extra-xblocks-and-requirements). + +* How to enable eox settings + +You should set the variable **ENABLE_EOX_SETTINGS** in your config.yml file if you need to enable some eox settings to plugins works as expected. For now the principals settings should be like this: + +```yaml +ENABLE_EOX_SETTINGS: + USE_EOX_TENANT: true + ENABLE_EOX_THEMING_DERIVE_WORKAROUND: true + ENABLE_COMPREHENSIVE_THEMING: true + pre_init_lms_tasks: [ + ./manage.py lms migrate contenttypes, + ./manage.py lms migrate eox_core, + ./manage.py lms migrate eox_tenant, + ./manage.py lms migrate eox_tagging, + ./manage.py lms migrate eox_audit_model + ] +``` + +The list could grow according to the needs that arise at the time of configuring the eox plugins. + +:warning: **Note**: Other Options as ``INSTALL_EXTRA_FILE_REQUIREMENTS`` and ``ENABLE_EOX_SETTINGS`` are included from Olmo version, you can use it from this release. Use your new packages ---------------------- diff --git a/docs/how_to_customize_distro.rst b/docs/how_to_customize_distro.rst index 5c350af..90a4c3b 100644 --- a/docs/how_to_customize_distro.rst +++ b/docs/how_to_customize_distro.rst @@ -54,10 +54,31 @@ General Settings | | | | Add any middleware to openedx setting MIDDLEWARE | - middleware.test.1 | +-------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ +| **INSTALL_EXTRA_FILE_REQUIREMENTS** |.. code-block:: yml | +| | | +| Add any extra files to aditional requirements | path: ./requirements/extra_file/ | +| | files: [ | +| | /edunext/base.txt, | +| | /test/test.txt | +| | ] | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ +| **ENABLE_EOX_SETTINGS** |.. code-block:: yml | +| | | +| Enable eox settings to configure eox plugins variables | USE_EOX_TENANT: true | +| | ENABLE_EOX_THEMING_DERIVE_WORKAROUND: true | +| | ENABLE_COMPREHENSIVE_THEMING: true | +| | pre_init_lms_tasks: [ | +| | ./manage.py lms migrate contenttypes, | +| | ./manage.py lms migrate eox_core, | +| | ./manage.py lms migrate eox_tenant | +| | ] | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ To override these settings define it on config.yml file (``$(tutor config printroot)/config.yaml``) or use the command ``tutor config save --set GENERAL_SETTING=Value``. +:warning: **Note**: Other Options as ``INSTALL_EXTRA_FILE_REQUIREMENTS`` and ``ENABLE_EOX_SETTINGS`` are included from Olmo version, you can use it from this release. + Plugins or packages ------------------- From 09ad66647f29b8a23242040d6f3dacd546c6b480 Mon Sep 17 00:00:00 2001 From: Juan David Buitrago Date: Wed, 21 Jun 2023 13:47:50 -0500 Subject: [PATCH 7/8] chore: refactor to openedx extra settings --- tutordistro/patches/cms-env | 15 ++++++++++----- tutordistro/patches/lms-env | 16 +++++++++------- .../patches/openedx-cms-production-settings | 10 ++++++---- .../patches/openedx-common-assets-settings | 6 +++--- tutordistro/patches/openedx-development-settings | 14 ++++++++------ .../patches/openedx-lms-production-settings | 16 +++++++++------- tutordistro/templates/distro/tasks/lms/pre-init | 2 +- 7 files changed, 46 insertions(+), 33 deletions(-) diff --git a/tutordistro/patches/cms-env b/tutordistro/patches/cms-env index 4184290..b1a8077 100644 --- a/tutordistro/patches/cms-env +++ b/tutordistro/patches/cms-env @@ -1,6 +1,11 @@ -{% if ENABLE_EOX_SETTINGS["USE_EOX_TENANT"] is defined %} -USE_EOX_TENANT: {{ ENABLE_EOX_SETTINGS["USE_EOX_TENANT"] }} -{% endif %} -{% if DISTRO_DEFAULT_SITE_THEME is defined or DISTRO_THEMES_NAME is defined %} +{% if OPENEDX_EXTRA_SETTINGS is defined and OPENEDX_EXTRA_SETTINGS["cms_env"] is defined %} +############### extra cms-env settings ############# +{%- for setting in OPENEDX_EXTRA_SETTINGS["cms_env"] %} +{%- for key, value in setting.items() %} +{{ key }}: {{ value }} +{%- endfor %} +{%- endfor %} +{%- endif %} +{%- if DISTRO_DEFAULT_SITE_THEME is defined or DISTRO_THEMES_NAME is defined %} DEFAULT_SITE_THEME: "{{ DISTRO_DEFAULT_SITE_THEME | default(DISTRO_THEMES_NAME[0]) }}" -{%- endif -%} +{% endif %} diff --git a/tutordistro/patches/lms-env b/tutordistro/patches/lms-env index 3e69693..1d62c82 100644 --- a/tutordistro/patches/lms-env +++ b/tutordistro/patches/lms-env @@ -1,10 +1,12 @@ -{% if ENABLE_EOX_SETTINGS["USE_EOX_TENANT"] is defined %} -USE_EOX_TENANT: {{ ENABLE_EOX_SETTINGS["USE_EOX_TENANT"] }} -{% endif %} -{% if DISTRO_DEFAULT_SITE_THEME is defined or DISTRO_THEMES_NAME is defined %} +{% if OPENEDX_EXTRA_SETTINGS is defined and OPENEDX_EXTRA_SETTINGS["lms_env"] is defined %} +############### extra cms-env settings ############# +{%- for setting in OPENEDX_EXTRA_SETTINGS["lms_env"] %} +{%- for key, value in setting.items() %} +{{ key }}: {{ value }} +{%- endfor %} +{%- endfor %} +{%- endif %} +{%- if DISTRO_DEFAULT_SITE_THEME is defined or DISTRO_THEMES_NAME is defined %} DEFAULT_SITE_THEME: "{{ DISTRO_DEFAULT_SITE_THEME | default(DISTRO_THEMES_NAME[0]) }}" -{%- endif -%} -{% if ENABLE_EOX_SETTINGS["ENABLE_EOX_THEMING_DERIVE_WORKAROUND"] is defined %} -ENABLE_EOX_THEMING_DERIVE_WORKAROUND: {{ ENABLE_EOX_SETTINGS["ENABLE_EOX_THEMING_DERIVE_WORKAROUND"] }} {% endif %} SESSION_COOKIE_DOMAIN: ".{{ LMS_HOST|common_domain(CMS_HOST) }}" diff --git a/tutordistro/patches/openedx-cms-production-settings b/tutordistro/patches/openedx-cms-production-settings index ecaa6a8..1b6779b 100644 --- a/tutordistro/patches/openedx-cms-production-settings +++ b/tutordistro/patches/openedx-cms-production-settings @@ -1,5 +1,5 @@ {% for pkg in iter_values_named(suffix="_DPKG") %} -{%- if pkg != 'None' -%} +{%- if pkg != 'None' and pkg["variables"] is defined %} # Start {{ pkg["name"] }} settings {%- if "variables" in pkg and "production" in pkg["variables"] -%} {%- for key, value in pkg["variables"]["production"].items() %} @@ -10,16 +10,18 @@ {%- endif -%} {% endfor %} +{% if DISTRO_THEME_DIRS is defined -%} COMPREHENSIVE_THEME_DIRS.remove('/openedx/themes') -{%- if DISTRO_THEME_DIRS is defined %} COMPREHENSIVE_THEME_DIRS.extend({{ DISTRO_THEME_DIRS }}) {%- endif %} +{%- for pkg in iter_values_named(suffix="_DPKG") %} +{%- if pkg["name"] == 'eox-theming' %} ################## EOX_THEMING ################## -{%- if ENABLE_EOX_SETTINGS["ENABLE_COMPREHENSIVE_THEMING"] is defined %} from lms.envs.common import _make_mako_template_dirs # pylint: disable=import-error -ENABLE_COMPREHENSIVE_THEMING = {{ ENABLE_EOX_SETTINGS["ENABLE_COMPREHENSIVE_THEMING"] }} +ENABLE_COMPREHENSIVE_THEMING = True TEMPLATES[1]["DIRS"] = _make_mako_template_dirs derive_settings("cms.envs.production") # EOL {%- endif %} +{%- endfor %} diff --git a/tutordistro/patches/openedx-common-assets-settings b/tutordistro/patches/openedx-common-assets-settings index 3da8298..4c0bca7 100644 --- a/tutordistro/patches/openedx-common-assets-settings +++ b/tutordistro/patches/openedx-common-assets-settings @@ -1,16 +1,16 @@ {% for pkg in iter_values_named(suffix="_DPKG") %} -{%- if pkg != 'None' -%} +{%- if pkg != 'None' and pkg["variables"] is defined %} # Start {{ pkg["name"] }} settings {%- if "variables" in pkg and "development" in pkg["variables"] -%} {%- for key, value in pkg["variables"]["development"].items() %} -{{ key }} = {% if value is string %}"{{ value }}"{% else %}{{ value }}{% endif %} +{{ key }} = {% if value is string %}"{{ value }}"{% else %}{{ value }}{% endif %} {%- endfor %} # End {{ pkg["name"] }} settings {%- endif -%} {%- endif -%} {% endfor %} -COMPREHENSIVE_THEME_DIRS.remove('/openedx/themes') {%- if DISTRO_THEME_DIRS is defined %} +COMPREHENSIVE_THEME_DIRS.remove('/openedx/themes') COMPREHENSIVE_THEME_DIRS.extend({{ DISTRO_THEME_DIRS }}) {%- endif %} diff --git a/tutordistro/patches/openedx-development-settings b/tutordistro/patches/openedx-development-settings index af95b65..b845374 100644 --- a/tutordistro/patches/openedx-development-settings +++ b/tutordistro/patches/openedx-development-settings @@ -1,5 +1,5 @@ {% for pkg in iter_values_named(suffix="_DPKG") %} -{%- if pkg != 'None' -%} +{%- if pkg != 'None' and pkg["variables"] is defined %} # Start {{ pkg["name"] }} settings {%- if "variables" in pkg and "development" in pkg["variables"] -%} {%- for key, value in pkg["variables"]["development"].items() %} @@ -10,21 +10,23 @@ {%- endif -%} {% endfor %} +{% if DISTRO_THEME_DIRS is defined -%} COMPREHENSIVE_THEME_DIRS.remove('/openedx/themes') -{%- if DISTRO_THEME_DIRS is defined %} COMPREHENSIVE_THEME_DIRS.extend({{ DISTRO_THEME_DIRS }}) {%- endif %} +{%- for pkg in iter_values_named(suffix="_DPKG") %} +{%- if pkg["name"] == 'eox-theming' %} ################## EOX_THEMING ################## -{%- if ENABLE_EOX_SETTINGS["ENABLE_COMPREHENSIVE_THEMING"] is defined %} if "EOX_THEMING_DEFAULT_THEME_NAME" in locals() and EOX_THEMING_DEFAULT_THEME_NAME: from lms.envs.common import _make_mako_template_dirs # pylint: disable=import-error - ENABLE_COMPREHENSIVE_THEMING = {{ ENABLE_EOX_SETTINGS["ENABLE_COMPREHENSIVE_THEMING"] }} + ENABLE_COMPREHENSIVE_THEMING = True TEMPLATES[1]["DIRS"] = _make_mako_template_dirs derive_settings("lms.envs.devstack") # EOL {%- endif %} +{%- endfor %} -{% if DISTRO_EXTRA_MIDDLEWARES is defined %} +{%- if DISTRO_EXTRA_MIDDLEWARES is defined %} MIDDLEWARE.extend({{ DISTRO_EXTRA_MIDDLEWARES }}) -{%- endif -%} +{% endif %} diff --git a/tutordistro/patches/openedx-lms-production-settings b/tutordistro/patches/openedx-lms-production-settings index 502c645..c3752f3 100644 --- a/tutordistro/patches/openedx-lms-production-settings +++ b/tutordistro/patches/openedx-lms-production-settings @@ -1,30 +1,32 @@ {% for pkg in iter_values_named(suffix="_DPKG") %} -{%- if pkg != 'None' -%} +{%- if pkg != 'None' and pkg["variables"] is defined %} # Start {{ pkg["name"] }} settings {%- if "variables" in pkg and "production" in pkg["variables"] -%} {%- for key, value in pkg["variables"]["production"].items() %} -{{ key }} = {% if value is string %}"{{ value }}"{% else %}{{ value }}{% endif %} +{{ key }} = {% if value is string %}"{{ value }}"{% else %}{{ value }}{% endif %} {%- endfor %} # End {{ pkg["name"] }} settings {%- endif -%} {%- endif -%} {% endfor %} +{% if DISTRO_THEME_DIRS is defined -%} COMPREHENSIVE_THEME_DIRS.remove('/openedx/themes') -{%- if DISTRO_THEME_DIRS is defined %} COMPREHENSIVE_THEME_DIRS.extend({{ DISTRO_THEME_DIRS }}) {%- endif %} +{%- for pkg in iter_values_named(suffix="_DPKG") %} +{%- if pkg["name"] == 'eox-theming' %} ################## EOX_THEMING ################## -{%- if ENABLE_EOX_SETTINGS["ENABLE_COMPREHENSIVE_THEMING"] is defined %} if "EOX_THEMING_DEFAULT_THEME_NAME" in locals() and EOX_THEMING_DEFAULT_THEME_NAME: from lms.envs.common import _make_mako_template_dirs # pylint: disable=import-error - ENABLE_COMPREHENSIVE_THEMING = {{ ENABLE_EOX_SETTINGS["ENABLE_COMPREHENSIVE_THEMING"] }} + ENABLE_COMPREHENSIVE_THEMING = True TEMPLATES[1]["DIRS"] = _make_mako_template_dirs derive_settings("lms.envs.production") # EOL {%- endif %} +{%- endfor %} -{% if DISTRO_EXTRA_MIDDLEWARES is defined %} +{%- if DISTRO_EXTRA_MIDDLEWARES is defined %} MIDDLEWARE.extend({{ DISTRO_EXTRA_MIDDLEWARES }}) -{%- endif %} +{% endif %} diff --git a/tutordistro/templates/distro/tasks/lms/pre-init b/tutordistro/templates/distro/tasks/lms/pre-init index 4981033..754490f 100644 --- a/tutordistro/templates/distro/tasks/lms/pre-init +++ b/tutordistro/templates/distro/tasks/lms/pre-init @@ -1,4 +1,4 @@ -{% if ENABLE_EOX_SETTINGS["pre_init_lms_tasks"] is defined %} +{% if OPENEDX_EXTRA_SETTINGS is defined and OPENEDX_EXTRA_SETTINGS["pre_init_lms_tasks"] is defined %} {% for task in ENABLE_EOX_SETTINGS["pre_init_lms_tasks"] %} {{ task }} {% endfor %} From 7bec999c9010f679a5dba659b5ef299e77c3071a Mon Sep 17 00:00:00 2001 From: Juan David Buitrago Date: Thu, 22 Jun 2023 11:20:33 -0500 Subject: [PATCH 8/8] docs: refactor documents to openedx extra settings --- README.md | 20 ++++++++++++-------- docs/how_to_add_new_packages.rst | 20 ++++++++++++-------- docs/how_to_customize_distro.rst | 14 +++++++++----- 3 files changed, 33 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index e129fbe..10ab745 100644 --- a/README.md +++ b/README.md @@ -277,15 +277,19 @@ INSTALL_EXTRA_FILE_REQUIREMENTS: It's important that ``.txt`` files are added in requirements directory, similar to EXTRA PIP REQUIREMENTS from [Tutor](https://docs.tutor.overhang.io/configuration.html#installing-extra-xblocks-and-requirements). -## How to enable eox settings +## How to enable openedx extra settings -You should set the variable **ENABLE_EOX_SETTINGS** in your config.yml file if you need to enable some eox settings to plugins works as expected. For now the principals settings should be like this: +You should set the variable **OPENEDX_EXTRA_SETTINGS** in your config.yml file if you need to enable ``cms_env``, ``lms_env`` or ``pre_init_lms_task`` settings to plugins works as expected. For now the principals settings should be like this: ```yaml -ENABLE_EOX_SETTINGS: - USE_EOX_TENANT: true - ENABLE_EOX_THEMING_DERIVE_WORKAROUND: true - ENABLE_COMPREHENSIVE_THEMING: true +OPENEDX_EXTRA_SETTINGS: + cms_env: [ + USE_EOX_TENANT: true + ] + lms_env: [ + USE_EOX_TENANT: true, + ENABLE_EOX_THEMING_DERIVE_WORKAROUND: true + ] pre_init_lms_tasks: [ ./manage.py lms migrate contenttypes, ./manage.py lms migrate eox_core, @@ -295,9 +299,9 @@ ENABLE_EOX_SETTINGS: ] ``` -The list could grow according to the needs that arise at the time of configuring the eox plugins. +The list could grow according to the needs that arise at the time of configuring the plugins. -:warning: **Note**: Other Options as ``INSTALL_EXTRA_FILE_REQUIREMENTS`` and ``ENABLE_EOX_SETTINGS`` are included from Olmo version, you can use it from this release. +:warning: **Note**: Other Options as ``INSTALL_EXTRA_FILE_REQUIREMENTS`` and ``OPENEDX_EXTRA_SETTINGS`` are included from Olmo version, you can use it from this release. # License diff --git a/docs/how_to_add_new_packages.rst b/docs/how_to_add_new_packages.rst index 3206bbd..e6c7448 100644 --- a/docs/how_to_add_new_packages.rst +++ b/docs/how_to_add_new_packages.rst @@ -101,15 +101,19 @@ INSTALL_EXTRA_FILE_REQUIREMENTS: It's important that ``.txt`` files are added in requirements directory, similar to EXTRA PIP REQUIREMENTS from [Tutor](https://docs.tutor.overhang.io/configuration.html#installing-extra-xblocks-and-requirements). -* How to enable eox settings +* How to enable openedx extra settings -You should set the variable **ENABLE_EOX_SETTINGS** in your config.yml file if you need to enable some eox settings to plugins works as expected. For now the principals settings should be like this: +You should set the variable **OPENEDX_EXTRA_SETTINGS** in your config.yml file if you need to enable ``cms_env``, ``lms_env`` or ``pre_init_lms_task`` settings to plugins works as expected. For now the principals settings should be like this: ```yaml -ENABLE_EOX_SETTINGS: - USE_EOX_TENANT: true - ENABLE_EOX_THEMING_DERIVE_WORKAROUND: true - ENABLE_COMPREHENSIVE_THEMING: true +OPENEDX_EXTRA_SETTINGS: + cms_env: [ + USE_EOX_TENANT: true + ] + lms_env: [ + USE_EOX_TENANT: true, + ENABLE_EOX_THEMING_DERIVE_WORKAROUND: true + ] pre_init_lms_tasks: [ ./manage.py lms migrate contenttypes, ./manage.py lms migrate eox_core, @@ -119,9 +123,9 @@ ENABLE_EOX_SETTINGS: ] ``` -The list could grow according to the needs that arise at the time of configuring the eox plugins. +The list could grow according to the needs that arise at the time of configuring the plugins. -:warning: **Note**: Other Options as ``INSTALL_EXTRA_FILE_REQUIREMENTS`` and ``ENABLE_EOX_SETTINGS`` are included from Olmo version, you can use it from this release. +:warning: **Note**: Other Options as ``INSTALL_EXTRA_FILE_REQUIREMENTS`` and ``OPENEDX_EXTRA_SETTINGS`` are included from Olmo version, you can use it from this release. Use your new packages ---------------------- diff --git a/docs/how_to_customize_distro.rst b/docs/how_to_customize_distro.rst index 90a4c3b..be36adf 100644 --- a/docs/how_to_customize_distro.rst +++ b/docs/how_to_customize_distro.rst @@ -62,11 +62,15 @@ General Settings | | /test/test.txt | | | ] | +-------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ -| **ENABLE_EOX_SETTINGS** |.. code-block:: yml | +| **OPENEDX_EXTRA_SETTINGS** |.. code-block:: yml | | | | -| Enable eox settings to configure eox plugins variables | USE_EOX_TENANT: true | -| | ENABLE_EOX_THEMING_DERIVE_WORKAROUND: true | -| | ENABLE_COMPREHENSIVE_THEMING: true | +| Enable openedx extra settings to configure cms_env, lms_env or pre_init_lms_tasks variables | cms_env: [ | +| | USE_EOX_TENANT: true | +| | ] | +| | lms_env: [ | +| | USE_EOX_TENANT: true, | +| | ENABLE_EOX_THEMING_DERIVE_WORKAROUND: true | +| | ] | | pre_init_lms_tasks: [ | | | ./manage.py lms migrate contenttypes, | | | ./manage.py lms migrate eox_core, | @@ -77,7 +81,7 @@ General Settings To override these settings define it on config.yml file (``$(tutor config printroot)/config.yaml``) or use the command ``tutor config save --set GENERAL_SETTING=Value``. -:warning: **Note**: Other Options as ``INSTALL_EXTRA_FILE_REQUIREMENTS`` and ``ENABLE_EOX_SETTINGS`` are included from Olmo version, you can use it from this release. +:warning: **Note**: Other Options as ``INSTALL_EXTRA_FILE_REQUIREMENTS`` and ``OPENEDX_EXTRA_SETTINGS`` are included from Olmo version, you can use it from this release. Plugins or packages