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 [2018/02/21 12:38] – [Virtualisation file Configuration] admin | local:vmoodle:install [2025/12/10 16:16] (Version actuelle) – modification externe 127.0.0.1 | ||
|---|---|---|---|
| Ligne 36: | Ligne 36: | ||
| In most case, you will simply have to report your main dbsettigns in this file. | In most case, you will simply have to report your main dbsettigns in this file. | ||
| - | ==== Adapter le fichier de configuration | + | ==== Update the main configuration |
| - | Tout le travail de la virtualisation | + | The virtualisation |
| - | Les modifications portent sur : | + | Updates are needed inorder to: |
| - | | + | |
| - | | + | |
| - | | + | |
| - | le fichier | + | Hooking the vconfig.php |
| - | === Dérouter pour la virtualisation | + | === Hooking the virtual configuration switch |
| - | Cette inclusion doit être placée juste après l'appel au "setup.php" de votre fichier de configuration. | + | The main point about this hooking is that it MUST be placed before calling the '' |
| - | ... {position du déroutage | + | ... {CLI VMoodle Hook} ... |
| - | | + | |
| | | ||
| - | === Mette en place le déroutage | + | === Adding the CLI hook === |
| - | Le déroutage des scripts CLI permet de jouer une partie du fichier de configuration, | + | **What issue it solves:** |
| - | Ajoutez la séquence suivante avant votre appel à vconfig.ghp : | + | 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. |
| + | |||
| + | The CLI VMoodle hooking allows the following process to occur: | ||
| + | |||
| + | * The CLI script starts and loads an incomplete moodle configuration (just getting the vmoodle register db description), | ||
| + | * The script receives the command line parameters in which a '' | ||
| + | * The script reloads the full configuration file till the end, activating the virtualistion switch. | ||
| + | |||
| + | 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 71: | 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'expliciter quel est le Moodle principal à tout moment. Ceci est utile pour certains composants associés à la virtualisation qui doivent reconnaître, | + | === 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: | ||
| + | |||
| + | * In apache : Adding | ||
| + | * On nginx : Adding '' | ||
| + | |||
| + | If you have one single domain for all your moodles and your web server | ||
| + | |||
| + | === Global configuration keys having an influence on the VMoodle behaviour === | ||
| + | |||
| + | | ||
| + | |||
| + | 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 " | ||
| | | ||
| - | Cette clef permet de forcer le bloc [[: | + | This key will allow to force the [[: |
| | | ||
| Ligne 86: | Ligne 107: | ||
| } | } | ||
| - | Dans cette configuration, | + | Using this configuration, |
| | | ||
| - | Cette clef permet de modifier le comportement de la pile MNET en autorisant des comptes externes (réseau) a être administrateurs de site localement. | + | This key allows remote users to become |
| - | ==== Mise en oeuvre du cron virtualisé | + | ==== Cron setup in virtualized environements |
| - | === Mise en place à partir de cron simples | + | === Using unitary crons for each nodes === |
| - | Un plate-forme | + | A Moodle |
| - | La mise en oeuvre de plates-formes virtualisées nécessite également de mettre en oeuvre ces tâches pour chacune des instances virtuelles qui sont créées dans la virtualisation. | + | A standard way of setting up would setup a cron line for each of the virtual moodle an installation contains. |
| - | En HTTP, vous pouvez enregistrer vos tâches cron sur les domaines d' | + | If you use the HTTP method to run crons, f.e. |
| - | Pour obtenir un basculement effectif de l'instance de service, utilisez à la place le script : | + | */10 * * * * wget -O /dev/null -q http:// |
| + | |||
| + | then you can register as many '' | ||
| / | / | ||
| - | en précisant explicitement la racine | + | You will provide the " |
| - | === Utilisation de l' | + | === Using the VCron hyper rotator |
| - | VMoodle | + | The VMoodle |
| wget http:// | wget http:// | ||
| - | ou | + | or in command line |
| sudo -uwww-data php / | sudo -uwww-data php / | ||
| - | La fréquence de rotation de l' | + | 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.1519216703.txt.gz · Dernière modification : (modification externe)
