Master Joda Icon designed by Artua (http://artua.com)

This project is not covered by Drupal’s security advisory policy.

The module provides utilities for controlling the module status of all modules in the whole installation by a single drush command. The configuration is done by defining "master modules". "Master modules" are (in most cases) custom modules or features, that provide dependencies to all modules that are needed to run the site. In combination with Features and maybe some custom code and scripts the whole site configuration can be managed via that approach.

Master status

drush master-status shows the state of all modules that are "master", required by master modules or are redundant (enabled but not required).

Master execute

drush master-execute ensures all master modules and their requirements by enabling them. It also disables and uninstalls all modules that are not required by the master.

Configuration

Configuration is mainly done in the settings.php by setting the "master_modules" variable. There is also support for different scopes (e.g. stage environments like local, integration, live, ...) by defining additional sets within the "master_modules" array. The default scope is called "base" and any other scope inherits from that scope.

Uninstall blacklist

Do avoid certain modules being uninstalled (e.g. because the database content might be needed at a later time) you also can set a "master_uninstall_blacklist" for each scope.

Example calls
  drush master-status --scope=local
  drush master-status --status=redundant --pipe
  drush master-execute --scope=local
  drush master-execute --scope=local --no-disable --no-uninstall

  // When setting the current scope, --scope can be omitted.
  drush master-set-current-scope local
  drush master-status

Getting started

For using the master module, you have to set a master configuration. With the command drush master-export [--scopes=local,stage,live] you can export an initial configuration, representing the current module state of your installation.

Example configuration

Code like this shall be put in the settings.php:

$conf['master_version'] = 2;
$conf['master_modules'] = array(
  'base' => array(
    'mymasterfeature1',
    'mymasterfeature2',
  ),
  'local' => array(
    'devel',
    'views_ui',
    'field_ui',
  ),
  'live' => array(),
);
$conf['master_uninstall_blacklist'] = array(
  'base' => array(),
  'live' => array('migrate'),
);
$conf['master_allow_base_scope'] = TRUE; // Defaults to FALSE.

Absent and obsolete modules

With the latest release, there are two new functionalities for dealing with absent or obsolete modules. With drush master-removables you can find module folders, that do not hold any active modules anymore, and therefore might be safe to be removed from the project. You should be aware, that you have to uninstall all those modules first from every instance your code-base is running.

With the second command drush master-absent you can identify modules, that have been erased from the project, without proper deactivation or uninstallation, or simply are required by the current Master configuration.

Admin pages

The administrative interface has moved to a separate project: Master UI.

Further reading

Previous version

The previous version (for Drupal 6) was mainly controlled via an admin page. That way one could manage the modules "manually" via the UI. But in the new version the main approach was to better be able to use it in a multi-stage environment and an automated deployment process, so the whole UI stuff (currently) is simply replaced by the drush commands.

You still can download the D6 version, but there is no further development planned for D6.

Development version

We are currently working on a standalone drush command in the 7.x-3.x branch. When it is ready the release will also support Drupal 8 and maybe some different configuration format. Please file any issues for other ideas.

Master Joda Icon: designed by Artua.

Supporting organizations: 

Project information

Releases