Version information
This version is compatible with:
- Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x
- Puppet >= 5.0.0 < 9.0.0
- ,
Start using this module
Add this module to your Puppetfile:
mod 'tohuwabohu-drupal', '4.1.0'
Learn more about managing modules with a PuppetfileDocumentation
drupal
Overview
Install and manage different versions of Drupal including modules and sites.
Usage
The module uses Drush and the Drush makefiles to manage a Drupal site
configuration. So everytime any of the Puppet configuration changes, the whole site will be rebuild from ground. To be
able to do this, the site configuration (settings.php
) and files
have to be kept outside of the actual Drupal site.
Furthermore, multi-site configurations are currently not supported.
The structure of the three major properties (modules
, themes
and libraries
) translates directly to the Drush
makefile format. See here for an example of the
possible configuration.
Install Drupal 7 with a bunch of modules, a theme and a library:
drupal::site { 'example.com':
core_version => '7.32',
modules => {
'ctools' => '1.4',
'token' => '1.5',
'pathauto' => '1.2',
'views' => '3.8',
},
themes => {
'omega' => '4.3',
},
libraries => {
'jquery_ui' => {
'download' => {
'type' => 'file',
'url' => 'http://jquery-ui.googlecode.com/files/jquery.ui-1.6.zip',
'md5' => 'c177d38bc7af59d696b2efd7dda5c605',
},
},
},
}
Install Drupal 6:
drupal::site { 'example.com':
core_version => '6.33',
}
Install a module from a custom location:
drupal::site { 'example.com':
modules => {
'cck' => {
'download' => {
'type' => 'file',
'url' => 'http://ftp.drupal.org/files/projects/cck-6.x-2.9.tar.gz',
'md5' => '9e30f22592b7ecf08d020e0c626efc5b',
},
},
},
}
Apply a patch:
drupal::site { 'example.com':
modules => {
'pathauto' => {
'version' => '1.2',
'patch' => [
'https://www.drupal.org/files/pathauto_admin.patch'
],
},
},
}
Install the jquery_ui
library into sites/all/modules/jquery_ui/jquery.ui
as opposed to sites/all/libraries/jquery_ui
.
drupal::site { 'example.com':
libraries => {
'jquery_ui' => {
'download' => {
'type' => 'file',
'url' => 'https://www.dropbox.com/s/kcg4l39c3bqgee1/jquery.ui-1.6.zip',
'md5' => 'c177d38bc7af59d696b2efd7dda5c605',
},
'destination' => 'modules/jquery_ui',
'directory_name' => 'jquery.ui',
},
},
}
Configure the cron job:
drupal::site { 'example.com':
cron_email_address => 'webmaster',
}
Disable the cron job (e.g. if it is managed separately):
drupal::site { 'example.com':
cron_file_ensure => absent,
}
Limitations
Drupal-specific
- No multi-sites support
- No backup configuration
- Drupal site configuration (
settings.xml
) has to be provided
The module has been tested on the following operating systems. Testing and patches for other platforms are welcome.
- Debian 9.0 (Stretch)
- Debian 10.0 (Buster)
- Ubuntu 18.04 (Bionic Beaver)
- Ubuntu 20.04 (Focal Fossa)
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Development
This project uses rspec-puppet and beaker to ensure the module works as expected and to prevent regressions.
gem install bundler
bundle install --path vendor
bundle exec rake spec
bundle exec rake beaker
(note: see Beaker - Supported ENV variables for a list of environment variables to control the default behaviour of Beaker)
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
4.1.0 (2024-04-20)
Changed
- Support Puppet 8
- Remove EOL'ed Puppet 6 from test matrix
4.0.1 (2023-06-24)
This is a maintenance release which updates dependencies and the acceptance tests. No changes were made to the module itself.
Updated
- Drush: 8.0.5 to 8.4.12; this should fix the
Unknown archive format.
error. - Puppet dependencies: puppetlabs/stdlib and puppet/archive
- OS compatibility: remove Debian 9, add Debian 11, remove Ubuntu 18.04, add Ubuntu 22.04
4.0.0 (2021-02-27)
Summary
The only change in this release is the update from the unmaintained camptocamp/archive
to puppet/archive
. This
includes the replacement of the private define archive::download
with recommended public define archive
.
Breaking change
- Replace
camptocamp/archive
withpuppet/archive
which is essentially a drop-in replacement - Replace usage of
archive::download
witharchive
3.3.0 (2021-02-27)
Added
- Puppet data types to
drupal
class anddrupal::site
define; for Puppet 3 users this is a breaking change.
3.2.0 (2021-02-27)
Summary
This version updates the build and test infrastructure to catch up with reality. There have been no changes to the Puppet code itself.
The next major release will replace camptocamp/archive with puppet/archive.
Added
- Mark module compatible with Puppet 6.x and 7.x
- Mark module compatible with latest puppetlabs/stdlib release
Changed
- Migrate from travis-ci.org to Github Actions due to pending shutdown :sob:
- Update coverage of Puppet version in unit tests: [3.x, 4.x, 5.x] to [5.x, 6.x, 7.x]
- Update acceptance tests:
- Replace Debian 6 and 7 with 9 and 10
- Replace Ubuntu 12.04 and 14.04 with 18.04 and 20.04
- Remove outdated Drupal 6 test case
Deprecated
- Dependency camptocamp/archive will be replaced with puppet/archive in the next major release
2017-09-22 - Release 3.1.0
Update test infrastructure and add support for Puppet 5.
2017-09-22 - Release 3.0.2
Bugfix release which fixes a regression introduced in 3.0.1: it causes the database update script to fail due to
missing permissions to write into or create the designated log file. After reviewing the code it was concluded the
log file is not needed as Puppet can capture the log as well. Hence the log redirect was removed and the log_dir
parameter marked as deprecated.
2017-09-08 - Release 3.0.1
Bugfix release fixing an issue whereas database updates where not run as the configured process user but root
instead.
2016-03-23 - Release 3.0.0
Summary
Upgrade Drush from 6.6.0 to 8.0.5 (issue #9). This adds support for Drupal 8.
Breaking change: Drush 8 dropped support for PHP 5.3, please ensure at least PHP 5.4 is installed.
Improvements
Beginning with version 8.x the Drush project started to publish Drush as a phar archive. This archive contains all necessary dependencies in one file and makes the usage of composer redundant. To ensure file integrity the checksum is verified post download.
As a result the dependency on willdurand/composer has been dropped
and code like the cache_dir
parameter has been removed.
On top of that the drush_archive_md5sum
parameter has been replaced with drush_archive_checksum
and
drush_archive_checksum_type
, the default checksum type is now SHA256
.
2016-03-21 - Release 2.0.0
Summary
Breaking change: The module will no longer manage the composer installation. Instead it will rely on the willdurand/composer module.
As a consequence, a couple of parameters have been removed from the drupal
class:
curl_package_name
php_cli_package_name
composer_installer_url
composer_path
If you've used one of the parameters in your Puppet configuration please remove them before upgrading or consider
tweaking the composer
class.
Bugfix
- Installation of composer fails due to missing HOME environment variable (issue #6)
Improvements
- Replace ripienaar/module_data with
params.pp
; the module is unlikly to work with Puppet 4 (see Native Puppet 4 Data in Modules) and in order to not break Puppet 3 support it is easier to just stick with a simpleparams.pp
for the moment
Further more, the test infrastructure has been overhauled:
- Bump gem dependencies to the latest version
- Bump Puppet module dependencies to the latest version
- Update travis test matrix and add support for Puppet 4
- Replace VirtualBox with Docker for acceptance tests
- Remove Debian 6 which is no longer officially supported; Debian 8 has been added instead
2015-11-29 - Release 1.2.1
Summary
Setting up a site from scratch will no longer fail the Puppet run (issue #3). The pending database updates are now only applied if the site has been fully set up.
Puppet-specific limitations caused by the usage of the archive module have been documented as well (issue #4).
2015-05-17 - Release 1.2.0
Summary
- E-mails generated by the drush cron command now contain the correct link to the Drupal site, not just
http://default/
. - Update to Drush 6.6.0
- Update Vagrant boxes (used for acceptance tests only)
2015-02-21 - Release 1.1.0
Summary
- The Drupal site is put into maintenance mode before outstanding database updates are applied
- Workaround suhosin blocking composer execution on Debian 6
- Support Ubuntu 12.04 and 14.04
2015-02-01 - Release 1.0.0
Summary
Initial release.
- Install composer and Drupal drush to do all the heavy-lifting
- Configure a Drupal site based on the configured modules, themes and libraries
- Set up a cron job to run the Drupal cron once an hour
Dependencies
- puppet/archive (>= 1.0.0 < 8.0.0)
- puppetlabs/stdlib (>= 4.0.0 < 10.0.0)