promet/drupal_cookbook — pull request #16 by winmillwill (2013-11-18 15:04:15+00:00)
Title: Allow User to Create Drupal Sites with Databags

Way back in the days of yore, I thought shipping a hash of drupal site configs in node attributes made sense.

I don't really believe that anymore. This PR lets us use node attributes to say which databag and which items represent drupal sites for this node. This also makes it easy to keep config for different environments separate because we can override these attributes at the environment level and have another databag and/or items thereof to represent the config for that environment.

There's a little duplication here now, since the plan is to allow the user to configure db servers with the database::master recipe rather than doing it ourselves. Fortunately, it's just json, so it's not like we can't generate the duplicated parts without copy pasting. We may at some time allow another system for supplying the db credentials by themselves so that the db master recipe and our db config for settings.php can use the same items.