4. docs.moodle.org/dev/Multitenant_support
MDL-28946
August 2011
“It should be possible to implement this in 2.2dev…”
January 2012
“This is obviously much much longer and more
complex than originally envisaged”
March 2012
“Multi-tenancy has been dropped in 2.3.
It turned out to be more trouble than it was worth…”
5. Central Instance
Settings
User Management Themes
Modules
Course Management Reports
Code
Local Instance(s)
6.
7. User & Course Management
How is user information stored?
LDAP / MS-AD / database / external system
Are user names unique?
Will courses be managed centrally, locally or both?
Who is allowed to “see” what?
9. Settings
Global vs. local admin settings
“Freeze” values in in config.php
E.g. $CFG->loginhttps=false;
Flavours
10. Modules & Code
Are all instances code-identical?
Changes to the central core code?
Changes to the local core code?
Do all instances require a separate URL?
11. Centralised code
Web server configuration
Separate vhost for each Moodle instance
DocumentRoot identical for all entries
Moodle setup (config.php)
<?php // Moodle configuration file
$moodle_host = $_SERVER['HTTP_HOST'];
require_once(„/etc/moodles/‟.$moodle_host.‟_config.php‟);
Individual config.php‟s in /etc/moodles
$CFG->dirroot same as DocumentRoot
12. Distributed code
Central Local
git fetch
/usr/bin/php admin/cli/maintenance.php --enable
git merge origin/cvshead
/usr/bin/php admin/cli/upgrade.php --non-interactive
/usr/bin/php admin/cli/maintenance.php --disable
14. Checklist
Criteria Options Impact
User Management central / local External Management (LDAP / Web Services)
Usernames unique yes / no Separate instances required
Visibility open / closed Separate instances required
Course management central / local Separate system required
Admin settings central / local / hybrid Control
Modules 1:n / n:n GIT
Code modifications central / local / no GIT
URL central / sub-domain / separate Web server configuration
Themes For each tenant / one-for-all Separate instances required
Reporting local / across sites Separate report generator
… … …