Package: eox-tenant
EOX tenantEox-tenant is a multi-tenancy django app foredx-platform. It is build as anopenedx pluginso even as a django app it will auto install in the larger edx-platform core code once installed in the same python environment.The code is written and maintained byeduNEXTand it is what we use to support our own multi-tenant services. It was initially created as an extension of themicrositesandsite_configurationsfeatures of the Open edX platform, but it has grown to completely replace them in order to support more robust multi tenancy model.If you are looking for professional development or support with multi tenancy or multi sites in the Open edX platform, you can reach out atsales@edunext.coCompatibility NotesOpen edX ReleaseVersionIronwood< 3.0Juniper>= 3.0 < 4.0Koa>= 4.0 <= 5.1.3Lilac>= 4.0 < 6.2Maple>= 6.0Nutmeg>= 6.2Olive>= 8.0Palm>=v10.0.0Quince>=v11.0.0NOTE: Since 6.2 version, eox-tenant does not support Django 2.2The following changes to the plugin settings are necessary. If the release you are looking for is
not listed, then the accumulation of changes from previous releases is enough.IronwoodGET_BRANDING_API:'eox_tenant.edxapp_wrapper.backends.branding_api_h_v1'GET_CERTIFICATES_MODULE:'eox_tenant.edxapp_wrapper.backends.certificates_module_i_v1'GET_SITE_CONFIGURATION_MODULE:'eox_tenant.edxapp_wrapper.backends.site_configuration_module_i_v1'GET_THEMING_HELPERS:'eox_tenant.edxapp_wrapper.backends.theming_helpers_h_v1'EOX_TENANT_EDX_AUTH_BACKEND:"eox_tenant.edxapp_wrapper.backends.edx_auth_i_v1"EOX_TENANT_USERS_BACKEND:'eox_tenant.edxapp_wrapper.backends.users_i_v1'EDXMAKO_MODULE_BACKEND:'eox_tenant.edxapp_wrapper.backends.edxmako_h_v1'UTILS_MODULE_BACKEND:'eox_tenant.edxapp_wrapper.backends.util_h_v1'JuniperFor version >= 3.4GET_OAUTH_DISPATCH_BACKEND:'eox_tenant.edxapp_wrapper.backends.oauth_dispatch_j_v1'Koa (optional)GET_BRANDING_API:'eox_tenant.edxapp_wrapper.backends.branding_api_l_v1'EOX_TENANT_USERS_BACKEND:'eox_tenant.edxapp_wrapper.backends.users_l_v1'EDXMAKO_MODULE_BACKEND:eox_tenant.edxapp_wrapper.backends.edxmako_l_v1LilacGET_BRANDING_API:'eox_tenant.edxapp_wrapper.backends.branding_api_l_v1'EOX_TENANT_USERS_BACKEND:'eox_tenant.edxapp_wrapper.backends.users_l_v1'EDXMAKO_MODULE_BACKEND:eox_tenant.edxapp_wrapper.backends.edxmako_l_v1MapleGET_BRANDING_API:'eox_tenant.edxapp_wrapper.backends.branding_api_l_v1'EOX_TENANT_USERS_BACKEND:'eox_tenant.edxapp_wrapper.backends.users_l_v1'EDXMAKO_MODULE_BACKEND:eox_tenant.edxapp_wrapper.backends.edxmako_l_v1Those settings can be changed ineox_tenant/settings/common.pyor, for example, in ansible configurations.NOTE: the currentcommon.pyworks with Open edX juniper version.Migration notesMigrating from 0.* version to 1.0.0From version1.0.0, middlewaresRedirectionsMiddlewareandPathRedirectionMiddlewareare not longer supported in this plugin.These middlewares were moved to theeox-corepluginhere. From this, you can have three cases:You have already installed eox-core alongside eox-tenant. In this case you need to:Upgrade eox-core to version2.0.0(previous releases are not compatible with eox-tenant 1.0.0)Run the plugin migrations as indicated below:./manage.pylmsmigrateeox_tenant--settings=<yourappsettings>./manage.pylmsmigrateeox_core--fake-initial--settings=<yourappsettings>You only have installed eox-tenant and you want to keep the functionality that middlewares offer. You need to:Install eox-core version2.0.0as edx-platform requirement. You can useAnsibleto add this plugin as an extra requirement.Run the plugin migrations as indicated below:./manage.pylmsmigrateeox_tenant--settings=<yourappsettings>./manage.pymanage.pylmsmigrateeox_core--fake-initial--settings=<yourappsettings>In the case your are not using the redirection middlewares, and only have eox-tenant installed, you can simply apply the database migrations for the eox-tenant plugin:./manage.pymanage.pylmsmigrateeox_tenant--settings=<yourappsettings>The table corresponding to the Redirection model will not be deleted but it will be discarded from the Django stateCommandsSynchronize OrganizationsThis 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 add to the organizations model field../manage.pylmssynchronize_organizations# only for TenantConfig and Microsite./manage.pylmssynchronize_organizations--modelTenantConfig# only for TenantConfig./manage.pylmssynchronize_organizations--modelMicrosite# only for MicrositeCreate/Edit tenant configurationcreate_or_update_tenant_confighelps to add or editTenantConfigand linkedRoutesvia command line.# this command will create/edit entry in TenantConfig with external_key lacolhost.com and update its JSONField(s) with passed json content../manage.pylmscreate_or_update_tenant_config--external-keylacolhost.com--config'{"lms_configs": {"PLATFORM_NAME": "Lacolhost"}, "studio_configs": {"PLATFORM_NAME": "Lacolhost"}}'lacolhost.comstudio.lacolhost.compreview.lacolhost.com# this command will create/edit entry in TenantConfig with external_key lacolhost.com and update its JSONField(s) with passed json config file content../manage.pylmscreate_or_update_tenant_config--external-keylacolhost.com--config-file/tmp/some.jsonlacolhost.comstudio.lacolhost.compreview.lacolhost.com# Same as above, but it will override configuration instead of updating it../manage.pylmscreate_or_update_tenant_config--external-keylacolhost.com--config-file/tmp/some.jsonlacolhost.comstudio.lacolhost.compreview.lacolhost.com--overrideCaveatsSSO that uses the LMS while authenticating does so with server-to-server communication. Therefore, when theAvailableScreenMiddlewaregets the current domain, it finds thatlms:8000as inSOCIAL_AUTH_EDX_OAUTH2_URL_ROOTwhich does not exist, then raises 404 exception. In order to avoid this error, set in your LMS settings file:SOCIAL_AUTH_EDX_OAUTH2_URL_ROOT=SOCIAL_AUTH_EDX_OAUTH2_PUBLIC_URL_ROOTHow to ContributeContributions are welcome! See ourCONTRIBUTINGfile for more
information – it also contains guidelines for how to maintain high code
quality, which will make your contribution more likely to be accepted.