local:vmoodle:install
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| local:vmoodle:install [2016/05/11 09:34] – [Adapter le fichier de configuration principal] admin | local:vmoodle:install [2025/12/10 16:16] (Version actuelle) – modification externe 127.0.0.1 | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | ===== Installation ===== | + | ===== VMoodle |
| - | ===== VMoodle ===== | + | |
| - | ''' | ||
| - | La mise en oeuvre et l' | + | < |
| - | Edunao peut fournir du conseil en déploiement et en construction de " | + | ====Introduction==== |
| + | |||
| + | :!: '' | ||
| + | |||
| + | ActiveProlearn can provide full support in helping building, setting up and training exploitation staff to master the architecture. | ||
| ==== Installation ==== | ==== Installation ==== | ||
| - | Pour virtualiser une plate-forme | + | What you basically need to virtualize a Moodle |
| - | | + | |
| - | | + | * Add/Install the VMoodle |
| - | | + | |
| - | | + | |
| - | | + | |
| + | | ||
| - | ==== Installer les composants | + | ==== Components installation==== |
| - | | + | |
| - | | + | |
| - | Après l' | + | After plugins have been installed, your moodle is still NOT capable to answer to virtual domains. Your virtualized installation keeps working a s standard moodle. |
| - | Si vous opérez une version inférieure à 2.8 de Moodle, seul le bloc VMoodle 2.7 doit être installé. Voir l' | + | Note that we DO NOT support any more the pre-28 |
| + | ==== Virtualisation file Configuration ==== | ||
| - | ==== Configurer le fichier de virtualisation ==== | + | This file is located in ''/ |
| - | Ce fichier permet de définir une première connexion à la base de données qui joue le rôle de registre de virtualisation. Dans une installation VMoodle classique, c'est la base de données du premier Moodle installé qui contient le registre (table mdl_block_vmoodle). Cependant, il vous est possible d'externaliser ce registre et de le gérer dans une autre base de données et une autre application (tant que vous respectez son schéma d'attributs). | + | A template file is provided as ''< |
| - | Le fichier de configuration | + | In most case, you will simply have to report your main dbsettigns in this file. |
| + | ==== Update the main configuration | ||
| - | < | + | The virtualisation trap need to be set in the master configuration of Moodle as any entrance page of moodle will call it at startup. |
| - | Copiez ce fichier sous le nom vconfig.php dans ce même répertoire (ou dans n' | + | Updates are needed inorder to: |
| - | ==== Adapter le fichier de configuration | + | * hook the configuration |
| + | * add special conditionnality for CLI script (VMoodle enabled scripts) | ||
| + | * Configure some network related behaviour when using MNET cross-services. | ||
| - | Tout le travail de la virtualisation s' | + | Hooking the vconfig.php will be the point where the current |
| - | Les modifications portent sur : | + | === Hooking the virtual configuration switch === |
| - | * Le déroutage de virtualisation | + | The main point about this hooking is that it MUST be placed before calling the '' |
| - | * La mise en place du déroutage pour les scripts CLI compatibles | + | |
| - | * Des options de comportement de la plate-forme dans le cadre de réseaux de plates-formes. | + | |
| - | le fichier vconfig.php défini précédemment effectue la boucle de reconfiguration virtuelle permettant de changer dynamiquement la base de données et le dossier de fichiers actif. | + | ... {CLI VMoodle Hook} ... |
| - | === Dérouter pour la virtualisation === | + | |
| - | Cette inclusion doit être placée juste après l'appel au "setup.php" de votre fichier de configuration. | + | |
| - | ... {position du déroutage | + | === Adding the CLI hook === |
| - | | + | **What issue it solves:** |
| - | | + | Standard cli script just play the operations loading the standard configuration. VMoodle switches the configuration dynamically analysing the current HTTP required hostname or URL. In CLI mode you do NOT have this information in the execution environment and the admin needs to provide it in some way. |
| - | === Mette en place le déroutage | + | The CLI VMoodle hooking allows the following process to occur: |
| - | Le déroutage des scripts | + | * The CLI script starts and loads an incomplete moodle |
| + | * The script | ||
| + | * The script reloads the full configuration | ||
| - | Ajoutez la séquence suivante avant votre appel à vconfig.ghp : | + | Add the following code to your '' |
| // this fragment will trap the CLI scripts trying to work for a virtual node, and | // this fragment will trap the CLI scripts trying to work for a virtual node, and | ||
| Ligne 72: | Ligne 79: | ||
| } | } | ||
| - | === clefs de configuration techniques ayant un impact sur le fonctionnement de VMoodle === | + | **Important** : Only adapted CLI script will be able to process data in virtual submoodles. Most of the standard admin scripts have been adapted and are provided in the ''/ |
| - | $CFG-> | + | Note : use the '' |
| - | Cette clef permet d' | + | === Routing the instance domains to the single moodle install === |
| - | | + | As the physical install is unique, tou will have to configure your apache or nginx virtual hosts to converge to this single location. The easiest way to do so is: |
| - | Cette clef permet de forcer le bloc [[:Blocks:UserMnetHost|User Mnet Hosts (Mes hôtes du réseau)]] à laisser exceptionnelement passer les administrateurs principaux locaux (compte admin) à travers le réseau. Un exemple courant d'utilisation est après l'appel à vconfig.php : | + | * In apache |
| + | * On nginx : Adding | ||
| - | $CFG->user_mnet_hosts_admin_override | + | If you have one single domain for all your moodles and your web server configuration and DNS supports wildcard, you can wildcard the subdomain as '' |
| + | |||
| + | === Global configuration keys having an influence on the VMoodle behaviour === | ||
| + | |||
| + | $CFG->mainhostprefix = ' | ||
| + | |||
| + | This key allows any instance to know which host matches the master install of moodle. We use this for some features such as f.e. identifying who is the " | ||
| + | |||
| + | | ||
| + | |||
| + | This key will allow to force the [[: | ||
| + | |||
| + | | ||
| if (preg_match('#' | if (preg_match('#' | ||
| - | $CFG->user_mnet_hosts_admin_override | + | $CFG->forced_plugins_settings[' |
| } | } | ||
| - | Dans cette configuration, | + | Using this configuration, |
| | | ||
| - | Cette clef permet de modifier le comportement de la pile MNET en autorisant des comptes externes (réseau) | + | This key allows remote users to become site administrators of the local moodle. This is forbidden by standard Mnet rules but VMoodle implementation propose patchs to override. |
| + | |||
| + | ==== Cron setup in virtualized environements ==== | ||
| + | |||
| + | === Using unitary crons for each nodes === | ||
| + | |||
| + | A Moodle site has a unique cron task that performs a lot of distinct delayed and scheduled processings in moodle. | ||
| + | |||
| + | A standard way of setting up would setup a cron line for each of the virtual moodle an installation contains. | ||
| + | |||
| + | If you use the HTTP method to run crons, f.e. | ||
| + | |||
| + | */10 * * * * wget -O /dev/null -q http:// | ||
| + | |||
| + | then you can register as many '' | ||
| + | |||
| + | / | ||
| + | |||
| + | You will provide the " | ||
| + | |||
| + | === Using the VCron hyper rotator === | ||
| + | |||
| + | The VMoodle implementation provides a vcron scheduler that will be lauched in the master moodle host context, and will automatically rotate and schedule all submoodle crons. VCron scheduler can operate using HTTP calls or command line execs (internally configured) and can itself be invoked through HTTP: | ||
| + | |||
| + | | ||
| + | |||
| + | or in command line | ||
| + | |||
| + | sudo -uwww-data php / | ||
| + | |||
| + | You may internally configure the vcron settings to raise the number of virtual moodle processed per cron run. | ||
| + | |||
| + | the basic calculation for vcron rotation is : | ||
| + | |||
| + | With a "run per turn" of 1 and 20 virtual moodles and a cron period of 1 minute per turn, each vmoodle will be processed once per 20 minutes. Raising the "run per turn" to 2 will divided the effective cron period to 10 minutes per vmoodle instance. | ||
| + | |||
| + | For very large moodle arrays, it may be worth having a separated machine to process the crons for all the moodle instances. Cron processes may ovelap one on each other, but will not pull down theusual user's page distribution too much. | ||
| + | |||
| + | A very advanced feature (undocumented here) allow to distribute the vcron scheduling on several clusters. | ||
| + | |||
| + | ---- | ||
| - | [[: | + | < |
| + | [[: | ||
| + | | ||
| + | < | ||
local/vmoodle/install.1462959290.txt.gz · Dernière modification : (modification externe)
