Open Data Catalog v2.0.0
Updating and Maintaining DKAN

There are several strategies for maintaining your DKAN site. Maintaining a DKAN site does not differ substantially from maintaining other Drupal sites.

Note
DKAN Tools is a project containing commands and tools that CivicActions uses for our own implementations and deployments.

Filesystem Conventions

With Drupal's inheritance model, it should not be necessary to place custom code or modules in the modules/contrib/dkan directory. Additional modules, themes, or libraries, or newer versions of ones already present in modules/contrib/dkan, can be placed in modules/custom, themes/custom, or libraries/custom. This will make maintaining your DKAN site much easier.

If it is necessary or expedient to overwrite files in the modules/contrib/dkan directory, it is recommended to keep a patch of the changes. A patch will make it possible to re-apply changes once a newer version of DKAN is added to the modules/contrib/dkan directory.

Primary Maintenance Tasks

By "maintenance" we mean three specific tasks

  • Upgrading DKAN to receive new features and bug-fixes
  • Adding additional modules or features
  • Overriding current modules or functionally

Getting DKAN Updates

DKAN uses a slightly modified semantic versioning system.

Major.Minor.Patch

  • Major indicates compatibility
  • Minor indicates backwards incompatilble new features or upgrades
  • Patch indicates a release for security updates, bug fixes, and backwards compatible improvements

Please note you can not use drush up with DKAN. This is because DKAN is not packaged on Drupal.org.

Basic Upgrades

If you are maintaining your site with DKAN Tools, upgrading is as simple as running

dktl make --tag=<tag version>

Or update the version number in your compser.json file and run composer update:

"require": {
"getdkan/dkan": "2.0.0"
}

Overriding current DKAN modules or functionality

Drupal has an inheritance model that makes it easy to override modules. Ideally you should keep all of your customizations outside of your docroot and symlink the overrides to the appropriate directory inside docroot.

src/modules/ -> docroot/modules/custom
src/themes/ -> docroot/themes/custom