An overview of site building in Wedful (Drupal install profiles, Aegir, and features)
This post is just to give an overview of some of the techniques we use to build our Wedful websites product. I'll be discussing most of the things listed here in more detail in later posts as well, but thought this would make a good starting point.
Every single wedding website is a complete Drupal site, they don't share users or any data with any other wedding sites. We wanted to go this route so that each site had complete control over it's theme and domain name among other things. It also allows us to balance our server load by moving very active sites to servers with more resources.
Aegir makes deploying a new Drupal site extremely easy. The catch is that you need to first build an install profile that will build a site to your exact specifications. Also keep in mind that building an install profile for Aegir is not exactly the same as building a standard Drupal install profile. You can't have multiple step forms in Aegir install profiles like you can with standard Drupal install profiles. This is both a blessing and a curse. It's nice, because you don't need to worry about handling multiple steps in your profile, but also a pain for when you /do/ want more user input than Aegir provides by default.
One of my personal goals for this site was to use as little custom code as possible. I've contributed back patches and feature additions to several Drupal modules as well as taking over a few of the modules that are core to our product. Though the time investment up front may be greater, I believe that overall this is a much more sustainable way to run a Drupal site. Even with this route, I still have a huge amount of custom code that I'd like to trim down. The majority of it is just used in customizing the Drupal front end so that it makes more sense in the context that our couples will be using it in.
At this point in time we're using 131 core, contrib, and custom modules (this also includes nine custom features). Once we move out of beta we'll be able to drop about a dozen of those as they're currently used to help debug problems (such as devel and views_ui). As anyone who's built a site in Drupal before knows, configuring that many modules is no small feat. Building an install profile to configure them was a huge effort.
Using the install profile api helped a lot, but there are still a lot of things in Drupal 6 that get seriously messed up when bootstrapping a site. Also, if you're building an install profile with any level of complexity (content types, blocks, etc.) you absolutely /must/ use features. If you don't (as I didn't at the start) you're going to kill several days, if not a couple of weeks, working through various problems handling those things.
Our installation process is made up of the following components:
- A customized Aegir signup form (which also allows users to select a theme and wedding date)
- A highly customized install profile
- A set of comprehensive features. Our features include all of our content types, contexts, user permissions, views, imagecache presets, and required module configuration variables. Using features for as much as is possible will save days in time spend configuring things by hand. Not to mention the fact that upgrading sites could be made almost impossible later down the road.
- Install taxonomy terms and vocabularies (unfortunately I don't believe that features supports this yet).
- Module and site configuration (setting up the required variables)
- Create content input formats
- Create default users
- Install and configure themes (users can select from a variety of themes on Wedful)
- Performance optimizations
- Creates default nodes
- A custom email message to user who created the site once the site is built. Note that this alters the default Aegir setup, as Aegir defaults to sending the info for UID 1. Our users don't get UID 1.
- On the first login a script runs to finalize everything that simply can't be done in install profiles yet. There are also workarounds for a number limitations I encountered when installing sites via Aegir.
All in all I would estimate that I've spent about six full weeks on just configuring the install profile and Aegir so that it does what I need. And I'm hoping that I can put most of what I learned up here so other people with similar goals can save some time.
If you've tried out Wedful.com already and are curious about anything, just ask in the comments or send me an email.