An overview of site building in Wedful (Drupal install profiles, Aegir, and features)

7 comments

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.

Peanut Gallery

Custom aegir sign-up form

Scott,

First, let me say that I appreciate this post. Aegir is new enough that it can be hard to find articles that detail what others have done to use it in a practical way.

Second, I am curious about the custom sign-up form. Could you elaborate on that a little bit? Please feel free to send me an email if you do not want to go into details in the comments.

Thanks!

Thanks Sean! I actually plan

Scott Hadfield

Thanks Sean! I actually plan on writing a full post on that stuff, as it was quite complex. However, the way to make custom sign-up forms has changed between alpha8 -> alpha9 and I need to redo my code. After I've done that I'll probably post a new entry on how :).

Looking forward to your detailed post!

Sean, this is wonderful...wedful.com looks great! I can't wait to read your more detailed post, as I'm working on a wedding site this year. Are you sharing the installation profile anywhere on d.o?

No install profile yet

Scott Hadfield

Hey Adelle! At this point we aren't sharing the install profile anywhere for a few reasons. One of the biggest is simply a lack of time to put it together into an organized fashion. Getting the product working well with all of the most important features has taken the most time. Fortunately we're able to give back a lot to the community in terms of patches and new contrib modules at the same time.

The install profile by itself wouldn't actually be useful to anyone. It's tightly coupled with aegir and a few custom pages there as well as some custom features.

At some point I would like to get a simplified wedful style install profile that I can give back to the community, probably bundled with a couple of features. We're a long way from that right now though unfortunately, but since one of the goals of the project is to have as little custom code as possible, this would be a step in the right direction.

super admin problem

Aanchal

Hi.

When we create a site from aegir, the user who creates the site is made the super admin of the site. I do not want that as I don't want him to have all the permissions.

Could you please explain how to achieve that.

Regards,
Aanchal

Hello, What will it cost to

Anonymous

Hello,

What will it cost to have you create us a site similar to wedful but for another site. I am currently evaluating option to create a wedding directory site with option that similar to yours.

Thank you,

Alter the aegir setup to send custom email

Rohit

Hi Scott! I am working on a similar project in which users are allowed to create their own websites using Aegir and Drupal. I was wondering how to customize the email to be sent to the customer on signing up for a website. Since you have already done that, can you provide more information on where and how to actually alter/implement this?