Drupal Distributions with Drush Make


5 min read

Last week we released Managing News, a news and data aggregation engine that’s built on Drupal. This is the second Drupal-based product we’ve released, and we did something different with this one — we used Drush Make. When you release a product, there are a few things that you do differently than when you launch a one-off website, and the biggest differences are in the final step. For a product this last step is packaging — pulling together all the bits of your application into a single easy to download, easy to install file. When launching a product like Managing News or Open Atrium that’s based on other open source projects which all have their own repositories, you really need a good way to collect all these projects from across the web and package them up quickly and easily. This is what Drush Make does.

Managing News is made up of over 30 different open source projects. Most of these are Drupal modules from the contributed repository, but it also uses javascript libraries, several Feature modules hosted on GitHub, and of course Drupal core itself. Assembling all these components manually is a tedious process and one that requires you to know a good bit about Drupal’s terminology and file structure. It’s also a process that is repetitive and predictable, which makes it a great target for automation.

If you’ve looked at the install profiles on Drupal.org before and then looked at the Managing News install profile, you may have noticed something new. The Managing News install profile is the first to include a .make file. This file describes all the components of Managing News, where to get them, how to get them, and even what patches to apply to them. The .make file contains all the details you need to download and assemble the install profile and its dependencies. This is exactly the information Drush Make needs to do it for you.

For Open Atrium we don’t have this packaging system set up. We host Open Atrium’s install profile along with all the code it needs together in one repository on GitHub. Before we started using Drush Make, this seemed like the only way to track what was in the Open Atrium distribution. However, we are now forced to manually download and commit every new release of these modules back to the Open Atrium GitHub repository. We’re using the GitHub repository to track what versions of modules are part of the Open Atrium distribution. Because of this we’ve ended up with some parts of this GitHub repository that are only okay to make changes in when (or if) those changes have been committed and made parts of releases upstream wherever the tracked module actually lives. This has resulted in an overly complex set of rules that you need to know about before you can help work on Open Atrium. You can see this in the confusion that ensues when issues are marked ‘upstream’ in the project’s issue tracker.

Avoiding this kind of confusion for would-be contributors and keeping the experience easy for end users is why we’ve switched to Drush Make as the packaging tool for Managing News. While it’s great that this tool exists, it would be even better if Drupal.org offered something like this for all install profiles. As with any new functionality like this on a big community site, there are some contentious decisions that need to be made, but we’ve got agreement around the idea and even developers lined up to do the work. This is happening!

At Development Seed there is one other install profile that we think about a lot — Hostmaster. Hostmaster is the install profile for the Aegir Drupal distribution. What has long been an issue for new users wanting to test Aegir is the installation process. Often these people are systems administrators who are familiar with the details of their Linux systems but not with the intricacies of assembling a complex Drupal installation like Aegir. Until now the process of configuring a Linux box to work with Aegir and actually installing the Drupal distribution have been tied together in a single script that works on only some Linux systems. However, very recently Aegir has switched to using Drush Make to simplify the install process. Now the Hostmaster install profile’s .make file describes all the information about the Drupal part of the install process. Hopefully this will let sysadmins spend a little less time downloading modules and learning where Drupal keeps modules and where modules keep their javascript libraries, and more time seeing what Aegir can do.

Giving users more time to spend with the application they want to use and less time figuring out how to set it up is why the improved packaging workflow that Drush Make gives us is so important to projects like those Development Seed works on, and for Drupal in general. Tools like this give our end users access to Drupal distributions they can get running more quickly, and lets us developers spend more time making them even better.

What we're doing.