The configuration is fairly simple, and I’ll share some basic steps I implemented on Redwood (note: I’m not sure if there are any differences in Sumac):
-
Install the plugin
pip install eox-tenant==your_version -
Run migrations
./manage.py lms migrateThis will create four models. The ones that matter for our use case are Route and TenantConfig.
-
Create a Route
Go to http://local.overhang.io:8000/admin/eox_tenant/route/ and click Add route.
This model has two fields:-
domain: This should be the tenant domain, e.g.,local.overhang.io(withouthttpor port). -
config: This refers to the ID of the associatedTenantConfig.
When you save the route, it will prompt you to create a
TenantConfig. Simply enter a tenant key and save. -
-
Configure the
TenantConfig
Edit theTenantConfigyou just created and add your custom LMS settings in JSON format. For example:{ "EDNX_USE_SIGNAL": true, "PLATFORM_NAME": "local", "course_org_filter": ["edx"] } -
Repeat for another tenant
You can repeat the above steps for another tenant likehttp://test.local.overhang.io:8000/and provide a different configuration.
With that setup, you now have two sites running locally with different configurations. You can override any setting that is read at runtime. However, settings that are loaded during server startup—like routes in urls.py—cannot be modified this way, since eox-tenant relies on the request object to determine context.