Development Seed

Blog

Five Minute Feature Server: Share Your Features, Themes, and Custom Modules

Setup a Feature Server fast, then read about what’s coming next

September 6 2009: Just a few days after this post, dmitri committed a change which makes the drush make format the same syntax as Drupal .info files. I've updated the sample makefile below to reflect this change.

In between Open Atrium beta1 and beta2, I took a detour to release the first alpha of Feature Server. Feature Server lets you share releases of your features, themes, and custom modules with the world and provides release notifications to users using the Drupal core Update status module whenever you roll out a new version. We've provided a simple starter theme called Singular to help you get your own feature server branded the way you like.

It's easy to set up a Feature Server. And if you're using drush, it's fast. Really fast.

Want to try this at home? Grab Feature Server off of code.developmentseed.org. The makefile and instructions for manual installation are available as well. Many thanks to Balint Csuthy (Pasqualle) and Dmitri Gaskin (dmitrig01) who both contributed extra polish and backbone to the code.

Say hello to drush make

Say hello to drush make, clear evidence that while some people like to talk about cool things, Dmitri Gaskin prefers to write them. Drush make tracks down and pulls together all the parts of a Drupal site while you get a drink. You provide it with a makefile, which is a code description of the components of your site, where to get them, and other specifications.

core = 6.x

projects[] = cck
projects[] = context
projects[] = features
projects[] = filefield
projects[] = views
projects[fserver][location] = "http://code.developmentseed.org/fserver"
projects[singular][location] = "http://code.developmentseed.org/fserver"
projects[tao][location] = "http://code.developmentseed.org/fserver"

Drush make is an big step toward sustainable Drupal distributions because it doesn't just download packages - it checks each project's Update XML feed for the latest compatible release. This means that a makefile may soon be useful not just for assembling your site, but for updating it, creating packages of installer profiles, and allowing Drupal distros like Open Atrium to be assembled in a distributed fashion, rather than tracked monolithically in a single repository.

In this demo, drush make is pulling Drupal core, modules, features, and themes into a single Drupal site. And it's pulling them off of two sources - Drupal.org and code.developmentseed.org. But why stop at two? A makefile could point at any number of sources allowing Drupal distributions to be as distributed publicly or privately as they need to be.

We love aggregation

Feature Servers and drush make have been made possible by a common format for describing Drupal packages - the project Update XML feed. And since it's a feed, it can be aggregated, parsed, mapped, and stored by FeedAPI. This means that while Feature Servers are distributed, their projects can be aggregated into a master directory. code.developmentseed.org is a working example of this idea - not only does it host some of our features, but it is also a gateway to projects that Development Seed contributes to on Drupal.org. For example, when there is a new release of Internationalization on Drupal.org, code.developmentseed.org shows it and links to the latest download as well.

Distributed vendors, central hubs

Distributed vendors, central hubs

Up until today, we've talked about Feature Servers as a way of hosting and sharing features in a distributed fashion. What's even more exciting is that by leveraging a standard XML format for releases there can also be a central directory - a Drupal Planet for features. Between a central Drupal.org features directory and more targeted distro-specific directories like those for Open Atrium, distinct audiences will have targeted entry points for getting to the features they're looking for. This means more ways in for new users and more distribution channels for the community behind Drupal.

Excited about this future? Here's a review of the parts, and the next steps for each:

  • Update XML providers (e.g. the powerful Project module, Feature Server) will need to better document the Update XML spec and potentially provide a project index format for grabbing the list of projects provided by each server.
  • drush make has a bright future ahead of it. Using it to update a site, package install profiles, and potentially use install profile info files as makefiles are some ideas being tossed around.
  • FeedAPI's new mapper and integration with the data module allow it to eat diverse data sources (like Drupal's custom Update XML feed) and store them far more flexibly than ever before. Stabilizing experimental development on these modules is top priority in the Development Seed office.

why drush make instead on an install profile?

didn’t lullabot recently get a lot of heat for releasing a distro that wasn’t packaged in the standard drupal way? what’s the difference here?

drush make and distro

drush make and distro makefiles are technologies that are meant to compliment install profiles. They essentially do completely different tasks:

  • drush make downloads the latest version of drupal, all the modules and themes that an install profile needs
  • install profiles run during the actual drupal install.php script, enabling modules and setting up configurations in the Drupal database

You can’t replace one with the other and vice versa. Drupal doesn’t provide any way for install profiles to download themselves and the sort of makefile that drush make uses is not meant to actually do any serious heavy lifting in terms of configuring your site.

If you are interested in using an install profile in conjunction with a makefile, you can try using mig5’s feature server install profile after running your drush make.

http://features.mig5.net/project/featureserver

I’ve read a lot about feature

I’ve read a lot about feature servers, but are there any open feature servers available? In particular, are there any other openatrium features released other than the six pre-packaged?

We’ll be posting some of the

We’ll be posting some of the custom features we’ve built for Atrium soon, but you can also check out Ping Vision’s feature server here that includes their Image Gallery and Poll features for Atrium:

http://features.pingv.com

Update with Drush

Hello! Very nice concept. Indeed. A small question. Will it be possible to update the modules and features served through Feature server with the drush update command?

Yep. drush update uses the

Yep. drush update uses the same infrastructure as the Update status module so you should be able to check for updates and pull them down from a Feature Server without a problem.