Skip to main content

Maintainance Status GitHub Actions Workflow Test Status PyPI - Version

Eox-tenant is a plugin for Open edX, and part of the Edunext Open edX Extensions (aka EOX), that replaces the microsites and site_configurations features, offering a more robust multi-tenancy model.

If you are looking for professional development or support with multitenancy or multi-sites in the Open edX platform, you can reach out to sales@edunext.co

Installation

  1. Add this plugin in your Tutor config.yml with the OPENEDX_EXTRA_PIP_REQUIREMENTS setting.

    OPENEDX_EXTRA_PIP_REQUIREMENTS:
       - eox-tenant=={{version}}
  2. Save the configuration with tutor config save.

  3. Build the image and launch your platform with tutor local launch.

Usage

Once your instance is running, you can access the Django admin site and locate the EDUNEXT OPENEDX MULTITENANCY models.

  • Microsites: Store the microsite configuration.

  • Routes: Configure the URL for a tenant.

  • Tenant configs: Store the configuration for each tenant.

  • Tenant organizations: Link each organization with one or multiple tenants.

Add EDNX_USE_SIGNAL = True in each microsite/tenant that wants to use the plugin.

Compatibility Notes

Open edX Release

Version

Ironwood

< 3.0

Juniper

>= 3.0 < 4.0

Koa

>= 4.0 <= 5.1.3

Lilac

>= 4.0 < 6.2

Maple

>= 6.0 < 12.0

Nutmeg

>= 6.2 < 12.0

Olive

>= 8.0 < 12.0

Palm

>= v11.7.0 < 12.0

Quince

>= v11.7.0 < 13.0

Redwood

>= v11.7.0

Sumac

>= v12.1.0

Teak

>= v14.0.0

Ulmo

>= v14.2.0

Verawood

>= v14.4.0

The plugin is configured for the latest release (Teak). The following changes in the plugin settings should be applied to be used for previous releases.

Maple

For version 11.X compatible

EOX_TENANT_EDX_AUTH_BACKEND = "eox_tenant.edxapp_wrapper.backends.edx_auth_i_v1"

Those settings can be changed in eox_tenant/settings/common.py or, for example, in the instance settings.

🚨 If the release you are looking for is not listed, please note:

  • If the Open edX release is compatible with the current eox-tenant version (see Compatibility Notes), the default configuration is sufficient.

  • If incompatible, you can refer to the README from the relevant version tag for configuration details (e.g., v6.2.0 README).

🚨 For version < 10.0.0 you need to enable eox-tenant adding in the LMS configuration:

USE_EOX_TENANT = True

Commands

Synchronize Organizations

This command will synchronize the course_org_filter values in lms_configs(TenantConfig model) or values(Microsite model) with the TenantOrganization registers if the organization does not exist, it will be created, otherwise, it will be added to the organizations model field.

./manage.py lms synchronize_organizations  # only for TenantConfig and Microsite
./manage.py lms synchronize_organizations --model TenantConfig # only for TenantConfig
./manage.py lms synchronize_organizations --model Microsite # only for Microsite

Create/Edit tenant configuration

create_or_update_tenant_config helps to add or edit TenantConfig and linked Routes via command line.

# This command will create/edit an entry in TenantConfig with external_key lacolhost.com and update its JSONField(s) with passed JSON content.
./manage.py lms create_or_update_tenant_config --external-key lacolhost.com --config '{"lms_configs": {"PLATFORM_NAME": "Lacolhost"}, "studio_configs": {"PLATFORM_NAME": "Lacolhost"}}' lacolhost.com studio.lacolhost.com preview.lacolhost.com

# This command will create/edit an entry in TenantConfig with external_key lacolhost.com and update its JSONField(s) with passed JSON config file content.
./manage.py lms create_or_update_tenant_config --external-key lacolhost.com --config-file /tmp/some.json lacolhost.com studio.lacolhost.com preview.lacolhost.com

# Same as above, but it will override configuration instead of updating it.
./manage.py lms create_or_update_tenant_config --external-key lacolhost.com --config-file /tmp/some.json lacolhost.com studio.lacolhost.com preview.lacolhost.com --override

Migration notes

Migrating from 0.* version to 1.0.0

From version 1.0.0, RedirectionsMiddleware and PathRedirectionMiddleware are no longer supported in this plugin. These middleware were moved to the eox-core plugin here. From this, you can have three cases:

  1. You have already installed eox-core alongside eox-tenant. In this case, you need to:

    • Upgrade eox-core to version 2.0.0 (previous releases are not compatible with eox-tenant 1.0.0)

    • Run the plugin migrations as indicated below:

    ./manage.py lms migrate eox_tenant --settings=<your app settings>
    ./manage.py lms migrate eox_core --fake-initial --settings=<your app settings>
  2. You only have installed eox-tenant and you want to keep the functionality that middleware offer. You need to:

    • Install eox-core version 2.0.0 as edx-platform requirement. You can use Ansible to add this plugin as an extra requirement.

    • Run the plugin migrations as indicated below:

    ./manage.py lms migrate eox_tenant --settings=<your app settings>
    ./manage.py manage.py lms migrate eox_core --fake-initial --settings=<your app settings>
  3. In the case you are not using the redirection middleware, and only have eox-tenant installed, you can simply apply the database migrations for the eox-tenant plugin:

    ./manage.py manage.py lms migrate eox_tenant --settings=<your app settings>

    The table corresponding to the Redirection model will not be deleted but it will be discarded from the Django state

Caveats

  • SSO that uses the LMS while authenticating does so with server-to-server communication. Therefore, when the AvailableScreenMiddleware gets the current domain, it finds that lms:8000 as in SOCIAL_AUTH_EDX_OAUTH2_URL_ROOT which does not exist, then raises a 404 exception. To avoid this error, set in your LMS settings file:

SOCIAL_AUTH_EDX_OAUTH2_URL_ROOT = SOCIAL_AUTH_EDX_OAUTH2_PUBLIC_URL_ROOT

How to Contribute

Contributions are welcome! See our CONTRIBUTING file for more information – it also contains guidelines for how to maintain high code quality, which will make your contribution more likely to be accepted.

License

This project is licensed under the AGPL-3.0 License. See the LICENSE file for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eox_tenant-14.4.0.tar.gz (74.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eox_tenant-14.4.0-py3-none-any.whl (104.5 kB view details)

Uploaded Python 3

File details

Details for the file eox_tenant-14.4.0.tar.gz.

File metadata

  • Download URL: eox_tenant-14.4.0.tar.gz
  • Upload date:
  • Size: 74.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for eox_tenant-14.4.0.tar.gz
Algorithm Hash digest
SHA256 2fc7e78482979aaf5692faa19509519250ed1e7ff8b5101b35c2fffbda68a74b
MD5 d9500651b6abcab6b2c6c5adc741af76
BLAKE2b-256 5c7fe26d48e78d977b4941a839efb2de5fb1d5d587a55099b1d0978e0f7f05d6

See more details on using hashes here.

File details

Details for the file eox_tenant-14.4.0-py3-none-any.whl.

File metadata

  • Download URL: eox_tenant-14.4.0-py3-none-any.whl
  • Upload date:
  • Size: 104.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for eox_tenant-14.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4876b67a3ef76d1fb2194ee3b2f0b88fb367cc854f1dc12fd9ba50c7a6422546
MD5 1c1235b93eb40db5ed27b39414ad7e08
BLAKE2b-256 6a95a0652387a510acffc1040c4de6df5ed89bf04a9b479c06a1c40d6ce8fa00

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

14.4.0 This release

2 files

14.3.0

2 files

14.2.1

2 files

14.2.0

2 files

14.1.1

2 files

14.1.0

2 files

14.0.0

2 files

13.1.0

2 files

13.0.0

2 files

12.1.0

2 files

12.0.0

2 files

11.7.0

2 files

11.6.0

2 files

11.5.0

2 files

11.4.0

2 files

11.3.0

2 files

11.2.0

2 files

11.1.1

2 files

11.0.2

2 files

11.0.1

2 files

11.0.0

2 files

10.0.0

2 files

9.2.1

2 files

9.2.0

2 files

9.1.1

2 files

9.1.0

2 files

9.0.0

2 files

8.0.0

2 files

7.0.0

2 files

6.3.0

2 files

6.2.0

2 files

6.0.0

2 files

5.1.3

2 files

5.1.2

2 files

5.1.1

2 files

5.1.0

2 files

5.0.1

2 files

5.0.0

2 files

4.1.0

2 files

4.0.0

2 files

3.6.0

2 files

3.5.0

2 files

3.4.1

2 files

3.4.0

2 files

3.3.7

2 files

3.3.6

2 files

3.3.5

2 files

3.3.4

2 files

3.3.3

2 files

3.3.2

2 files

3.3.0

2 files

3.2.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page