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(nuez): add nuez distro release #34

Merged
merged 8 commits into from
Oct 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ This plugin works with some docker images. These are defined by default
if you have different images that aren't based on these, you can have some problems.

```yaml
DOCKER_IMAGE_OPENEDX: "docker.io/ednxops/distro-edunext-edxapp:mango"
DOCKER_IMAGE_OPENEDX_DEV: "docker.io/ednxops/distro-edunext-edxapp-dev:mango"
DOCKER_IMAGE_OPENEDX: "docker.io/ednxops/distro-edunext-edxapp:nuez"
DOCKER_IMAGE_OPENEDX_DEV: "docker.io/ednxops/distro-edunext-edxapp-dev:nuez"
```

Also, you need an edx-platform version distro compatible.
Expand All @@ -40,12 +40,13 @@ Also, you need an edx-platform version distro compatible.
| ------- | -------- | ----- |
| lilac | limonero | v12 |
| maple | mango | v13 |
| nutmeg | nuez | v14 |

You can find distro releases on https://github.com/edunext/edunext-platform.

```yaml
EDX_PLATFORM_REPOSITORY: "https://github.com/eduNEXT/edunext-platform.git"
EDX_PLATFORM_VERSION: "ednx-release/mango.master"
EDX_PLATFORM_VERSION: "ednx-release/nuez.master"
```

# Packages
Expand All @@ -61,6 +62,7 @@ These packages will be installed in a default installation.
- eox-audit-model (DISTRO_EOX_AUDIT_MODEL_DPKG)
- eox-tagging (DISTRO_EOX_TAGGING_DPKG)


## How to add a new package

In your config.yml you can set any package following this structure:
Expand Down Expand Up @@ -137,6 +139,7 @@ These themes will be installed in a default installation.

- [bragi](https://github.com/eduNEXT/ednx-saas-themes/tree/edunext/mango.master)


## How to add a theme

You can override the default themes on the config.yml but
Expand Down Expand Up @@ -218,6 +221,16 @@ DISTRO_EXTRA_MIDDLEWARES:
- middleware.test.2
```

## How disable MFE

You can disable MFE default redirections and use the legacy frontend in nuez release adding in config.yml:

```yaml
DISTRO_DISABLE_MFE: true
```

Remember don't install tutor-mfe.

# License

This software is licensed under the terms of the AGPLv3.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 2.3.0
current_version = 3.0.0-rc1
commit = True
tag = True

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def load_about():
packages=find_packages(exclude=["tests*"]),
include_package_data=True,
python_requires=">=3.6",
install_requires=["tutor>=13.0.0, <14", "click"],
install_requires=["tutor>=14.0.5, <15", "click"],
extras_require={
"test": ["behave", "pytest", "pylint"]
},
Expand Down
2 changes: 1 addition & 1 deletion tests/test_distro.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ def test_version():
"""
Tutor distro plugin tests version
"""
assert __version__ == '0.1.0'
assert __version__ == '3.0.0-rc1'
2 changes: 1 addition & 1 deletion tutordistro/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.3.0"
__version__ = "3.0.0"
4 changes: 2 additions & 2 deletions tutordistro/patches/cms-env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"USE_EOX_TENANT": true,
"DEFAULT_SITE_THEME": "bragi"
USE_EOX_TENANT: True
DEFAULT_SITE_THEME: "bragi"
8 changes: 4 additions & 4 deletions tutordistro/patches/lms-env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"USE_EOX_TENANT": true,
"DEFAULT_SITE_THEME": "bragi",
"ENABLE_EOX_THEMING_DERIVE_WORKAROUND": true,
"SESSION_COOKIE_DOMAIN": ".{{ LMS_HOST|common_domain(CMS_HOST) }}"
USE_EOX_TENANT: True
DEFAULT_SITE_THEME: "bragi"
ENABLE_EOX_THEMING_DERIVE_WORKAROUND: True
SESSION_COOKIE_DOMAIN: ".{{ LMS_HOST|common_domain(CMS_HOST) }}"
89 changes: 33 additions & 56 deletions tutordistro/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
"VERSION": __version__,
"EXTRA_MIDDLEWARES": [],
# DISTRO PACKAGES
"EOX_CORE_DPKG": {
"EOX_CORE_DPKG": {
"index": "git",
"name": "eox-core",
"repo": "eox-core",
"version": "v6.1.0",
"version": "v7.0.0",
"domain": "github.com",
"protocol": "https",
"path": "eduNEXT",
Expand Down Expand Up @@ -53,7 +53,7 @@
"index": "git",
"name": "eox-tenant",
"repo": "eox-tenant",
"version": "v6.0.0",
"version": "v6.0.1",
"domain": "github.com",
"protocol": "https",
"path": "eduNEXT",
Expand All @@ -75,96 +75,67 @@
"index": "git",
"name": "eox-theming",
"repo": "eox-theming",
"version": "v3.1.0",
"version": "v4.0.1",
"domain": "github.com",
"protocol": "https",
"path": "eduNEXT",
"variables": {
"development": {
"GET_BRANDING_API": "eox_tenant.edxapp_wrapper.backends"
".branding_api_l_v1",
},
"production": {
"GET_BRANDING_API": "eox_tenant.edxapp_wrapper.backends"
".branding_api_l_v1",
},
"development": {},
"production": {},
},
"EOX_THEMING_CONFIG_SOURCES":[
"from_eox_tenant_microsite_v2",
"from_django_settings"
],
"private": False,
},
"EOX_AUDIT_MODEL_DPKG": {
"EOX_HOOKS_DPKG": {
"index": "git",
"name": "eox-audit-model",
"repo": "eox-audit-model",
"version": "v0.7.3",
"name": "eox-hooks",
"repo": "eox-hooks",
"version": "v3.0.0",
"domain": "github.com",
"protocol": "https",
"path": "eduNEXT",
"variables": {
"development": {
},
"production": {
},
"development": {},
"production": {},
},
"private": False,
},
"EOX_HOOKS_DPKG": {
"EOX_TAGGING_DPKG": {
"index": "git",
"name": "eox-hooks",
"repo": "eox-hooks",
"version": "v2.0.1",
"name": "eox-tagging",
"repo": "eox-tagging",
"version": "v5.0.0",
"domain": "github.com",
"protocol": "https",
"path": "eduNEXT",
"variables": {
"development": {
"EOX_HOOKS_ENROLLMENTS_BACKEND": "eox_hooks.edxapp_wrapper.backends"
".enrollments_l_v1",
"EOX_HOOKS_COURSES_BACKEND": "eox_hooks.edxapp_wrapper.backends.courses_l_v1",
"EOX_HOOKS_COURSE_MODES_BACKEND": "eox_hooks.edxapp_wrapper.backends"
".course_modes_l_v1",
"EOX_HOOKS_MODELS_BACKEND": "eox_hooks.edxapp_wrapper.backends.models_l_v1",
},
"production": {
"EOX_HOOKS_ENROLLMENTS_BACKEND": "eox_hooks.edxapp_wrapper.backends"
".enrollments_l_v1",
"EOX_HOOKS_COURSES_BACKEND": "eox_hooks.edxapp_wrapper.backends.courses_l_v1",
"EOX_HOOKS_COURSE_MODES_BACKEND": "eox_hooks.edxapp_wrapper.backends"
".course_modes_l_v1",
"EOX_HOOKS_MODELS_BACKEND": "eox_hooks.edxapp_wrapper.backends.models_l_v1",
},
"development": {},
"production": {},
},
"private": False,
},
"EOX_TAGGING_DPKG": {
"EOX_AUDIT_MODEL_DPKG": {
"index": "git",
"name": "eox-tagging",
"repo": "eox-tagging",
"version": "v4.0.0",
"name": "eox-audit-model",
"repo": "eox-audit-model",
"version": "v1.0.0",
"domain": "github.com",
"protocol": "https",
"path": "eduNEXT",
"variables": {
"development": {
"EOX_TAGGING_GET_ENROLLMENT_OBJECT": "eox_tagging"
".edxapp_wrappers"
".backends.enrollment_l_v1",
},
"production": {
"EOX_TAGGING_GET_ENROLLMENT_OBJECT": "eox_tagging"
".edxapp_wrappers"
".backends.enrollment_l_v1",
},
},
"private": False,
},
"THEMES_ROOT": "/openedx/themes",
"THEME_DIRS": [
"/openedx/themes/ednx-saas-themes/edx-platform",
"/openedx/themes/ednx-saas-themes/edx-platform/bragi-children",
"/openedx/themes/ednx-saas-themes/edx-platform/bragi-generator",
],
"THEMES_NAME": [
Expand All @@ -174,26 +145,32 @@
{
"name": "ednx-saas-themes",
"repo": "ednx-saas-themes",
"version": "edunext/mango.master",
"version": "edunext/nuez.master",
"domain": "github.com",
"protocol": "ssh",
"path": "eduNEXT",
},
],
"INSTALL_EDNX_REQUIREMENTS": False,
"DISABLE_MFE": False
},
"unique": {},
"overrides": {
"DOCKER_IMAGE_OPENEDX": "docker.io/ednxops/distro-edunext-edxapp:mango",
"DOCKER_IMAGE_OPENEDX_DEV": "docker.io/ednxops/distro-edunext-edxapp-dev:mango",
"DOCKER_IMAGE_OPENEDX": "docker.io/ednxops/distro-edunext-edxapp:nuez",
"DOCKER_IMAGE_OPENEDX_DEV": "docker.io/ednxops/distro-edunext-edxapp-dev:nuez",
"EDX_PLATFORM_REPOSITORY": "https://github.com/eduNEXT/edunext-platform.git",
"EDX_PLATFORM_VERSION": "ednx-release/mango.master",
"EDX_PLATFORM_VERSION": "ednx-release/nuez.master",
},
}

################# Initialization tasks
# To run the script from templates/distro/tasks/myservice/init, add:

hooks.Filters.COMMANDS_INIT.add_item(
(
"lms",
("distro", "tasks", "lms", "init"),
)
)

# Plugin templates
hooks.Filters.ENV_TEMPLATE_ROOTS.add_item(
Expand Down
8 changes: 8 additions & 0 deletions tutordistro/templates/distro/tasks/lms/init
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{% if DISTRO_DISABLE_MFE %}
(./manage.py lms waffle_flag --list | grep course_home.course_home_use_legacy_frontend) || ./manage.py lms waffle_flag --create --everyone course_home.course_home_use_legacy_frontend
(./manage.py lms waffle_flag --list | grep courseware.use_legacy_frontend) || ./manage.py lms waffle_flag --create --everyone courseware.use_legacy_frontend

{% else %}
./manage.py lms waffle_delete --flags course_home.course_home_use_legacy_frontend
./manage.py lms waffle_delete --flags courseware.use_legacy_frontend
{% endif %}
2 changes: 1 addition & 1 deletion tutordistro/templates/distro/tasks/lms/pre-init
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
./manage.py lms migrate contenttypes
./manage.py lms migrate eox_tenant
./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