Quick links: Content - sections - sub sections

Configurator and installer components

The installation system of Jelix allow to distinct three steps when integrating a module:

  1. The installation of the sources of modules, their main configuration to specify their behavior, and the generic configuration of the framework. This is a step made by the developer. It is not tied to the runtime environment.
  2. The modification of the configuration at the local level, after the application has been copied on the server. During this step, configuration parameters tied to the runtime environment are setting up. It could be database parameters, debug parameters or other services parameters...
  3. Finalization of the installation. It means for example the initialization of data in a database (table creation etc), or data migration for an update of the application.

Note: in Jelix 1.6, these three steps were indistinct.

So for the first and second step, we need to use the configurator of Jelix, and for the third one, we have the installer of Jelix.

The framework system configuration

The first step is executed by the developer of the application. It is independent from the runtime environment. The developer has to integrate and to parameter modules and framework in order to have the wanted behavior.

So he installs the sources of a module, and launches the configurator for this module (command php dev.php module:configure).

At the end, some files from the directory app/, in particularly the configuration files into app/system will be modified, and probably some new files will be created in some directory of the application, like CSS and JS files into www/. It happens only if the module provides a specific class for the configurator. If this class does not exist, probably you will have to install some files and modify the configuration by hand. See the documentation of the module.

Whatever, the configurator of Jelix will modify at least the mainconfig.ini.php file to declare and activate the module.

All new files and modified files should then be saved into your source code repository and should be deployed on servers.

The local configuration

The second step is executed by the person who install the application on a server.

He may be the developer on his local machine, or a system administrator on some production server.

After the installation of the sources of the application, this user should launch the script install/configurator.php of the application, which launches method localConfigure() of configurators of all activated modules.

These methods have to finalize the configuration like asking access parameters to the database, or setting other parameters in other configuration files.

Note that the launch of install/configurator.php is optional, if all expected parameters of files into var/config are already setup by an other configuration system, like a deployment tool (Puppet, Ansible, Docker...).

The installation

This third step is done by the person who install the application on the server (the same person at the step two). This step is the launch of the script install/installer.php.

The installer will execute all installation or migration classes provided by modules. These classes may create tables in a database, initialize some data etc. In fact, they initialize all things that allow the application to be executed correctly in the current runtime environment.

To know more about the configuration/installation system

See the section about the installation of a module which details commands and actions to execute in order to configure and install a 'vendor' module.

See the chapter about the deployment of an application to learn how to use the installer.

And when you will be familiar with the development of a module, you will create some configuration and installation scripts.