hosting

$100 Drupal Site Series: Part 2 - Resources and Infrastructure

In my previous post in this series on the $100 Drupal site I outlined a possible target market and set out why I thought very low cost sites could be a viable business model. Today I will cover the resources and infrastructure you'd need to consider to build such a service.

I am not proposing that the business is built on the premise of working for $5 per hour to build new sites for each client. The whole business should be automated. There should be no need for human interaction to close the sale and deploy the site. As soon as a worker is added to the process costs start to rise. At the same time we need some skilled professionals to build the platform and the cookie cutters.

Developers

Building a very basic Drupal site doesn't involve that much skill, it is possible for someone to signup with a web host that uses an automated installer script, such as Fantastico, and then start building a site using stock Drupal core. Building great Drupal sites takes skills and knowledge. In order to build modular Drupal sites that can be used as part of installation profiles and deployed using automated processes, you will need someone who knows Drupal pretty well. The person driving development of the project should be passionate about Drupal as a platform. They are likely to have an opinion on the Drupal specific religious wars - Panels vs Context, CKEditor vs tinyMCE, which Slideshow / Carousel module to use etc.

Most competent PHP developers can be taught how to develop for Drupal. A second, junior, developer can be used to do a lot of the build work. They can start being a "click monkey" developer and as their skills grow they can get their hands dirty writing glue modules and patches. This person should be good at driving the Drupal GUI and working with contrib.

Designer / Themer

Although customers will only be paying $100 for their site, they won't be very impressed if they can only use Garland as their theme. They will expect a choice of themes. The themes should be designed from the ground up to be flexible Drupal themes. The designer should have experience creating designs that will be come Drupal themes. They should understand flexible regions, module themeing and how the Color module can be used to provide control to the user over their theme. Ideally the designer should be able to craft HTML and CSS, and even perform basic Drupal themeing.

System Administrator

Even though the plan is to keep costs low, it doesn't make sense to run the $100 sites on cheap shared hosting. You need to spend money on your own solid hosting infrastructure, and if you have your own hosting infrastructure you'll need someone to manage it. The sys admin will be responsible for keeping everything running, adding new servers, testing backups etc.

You will need a system administrator who has some experience with administering LAMP servers, previous Drupal experience is a big plus. You want someone in this role who hates downtime.

Infrastructure

One of the assumptions for this project is that 95% of the sites will have less than 50 page views per day. At first there will be very little traffic for the sites, so you can start off pretty small, but as the business grows you need to have a plan in place to handle that growth.

I wouldn't recommend spending a lot of money on buying servers outright and putting them in a data centre. Start off with some virtual machines from a cloud hosting provider, such as slicehost, linode, rackspace cloud or amazon AWS (if you don't care about liberty). By using cloud hosting providers you can scale your infrastructure up as you need.

To get started you will probably need 3 production virtual machines, one for serving up content, one for the db and one for search using Apache Solr. Each of the VMs should have 1G of RAM and be located in the same data centre with the same hosting company. When things start to grow you can scale up the VMs as you need and even add more servers. Each time you scale things you will also have to retune your configuration. An opcode cache such as APC or xcache will allow you to serve more requests on the same hardware. You should include some kind of monitoring service such as nagios or zabbix to make sure things are running as you want.

Once you have more than a handful of machines to manage, you will want a centralised configuration management tool. This will allow you to add new servers and have them configured as you want them with no (or very little) human intervention. I would recommend puppet for this job. Given the effort involved in retro fitting puppet in an existing environment, it will be easier to add it from the start. You may want to consider using libcloud to even handle the deployment of the VMs too.

To ensure everything can be tested properly before deployment, you should seriously consider having a replicated testing environment. Instead of having 3 more VMs, you can just run up a Linux box with 4G RAM and a relatively modern CPU and run 3 VMs on it using KVM or Xen.

What's Next?

Now we have the business plan, the market, the team and servers in place, it is time to start looking at some of the tools we'll be using to make all of this possible. The next post in this $100 Drupal site series will cover the tools needed to build a sustainable platform for the business.

Ads don't Belong on your Business Site

Back in the late 90s there was a range of free website hosting options - geocities, angelfire and tripod are the big 3 I remember straight off the top of my head. The business model was pretty simple, you got a free site, albeit with a pretty crappy url, and the host got to inject ads into the page. The first "site" ever I ever built was hosted by tripod and is still up, I have forgotten the login details so it hasn't been updated for 11 years.

Of the 3 stars of this business model, angelfire and tripod are still offering an ad supported version along with ad free, fee for service upgrades, but geocities is dead. Today, the business model has evolved, you can get a free but ad supported blogs (see Blogger.com or wordpress.com), email services (see gMail, Yahoo or Microsoft) or project hosting (see sourceforge, xp-dev or CodePlex) along with many other online services. For personal stuff I think this is fine, and the same goes for small not for profit organisations. On the other hand if you run a business and want to appear professional, profitable and "up with technology", then you don't want your email address to be [email protected], or your website to be acme-inc.freehostingco.com. It could be worse, you could be using an email address or hosting supplied by your ISP such as [email protected] and myisp.com.au/acme-inc. In the case of email, you can use google apps for domains and still look professional.

It is different if you are solely providing free (as in beer) content, such as video, news or a professional blog. This is a clear business model, fund free content via advertising, it has been used by print news, radio and television for decades. I also think it is fine for community based free/open source software projects to use it to get some additional revenue. It is different if you are a profit making business.

Not only does running ads on your site look unprofessional, you could be promoting the competition. Google targets their ads based on the content of the page. For example if you are a small shop and you have a page listing the types of products you offer, Google is likely to serve up ads on that page for those products. Do you really want an ad from a competitor showing up with "Cheap [item], free next day delivery"? How many high volume paying customers will you lose for that extra few dollars a month in Ad Sense revenue?

I find it more shocking on large corporate sites. Yes, they attract a lot of eye balls, but I pay my phone company enough money and they make large enough profits, that I shouldn't have to be subjected to ads on their corporate home page. It makes them look cheap. The same goes for smaller businesses.

In the case of a business blog, it should be part of your business website. If people find your blog and they like what they see, they are likely to click around your site to find out more about you. If you have your blog on blogger they are only likely to find other blog posts, and if you have a link to your business website, they will probably stop clicking once they hit your business site as it is completely different from your blog. If on the other hand it's all nicely integrated, your readers are able to move from your blog posts to your business content seamlessly - and so are more likely to become a customer, rather than another bounced visitor.

What are your options? Many hosts offer one click installers for setting up drupal, wordpress or other content management systems. With a bit of help from an online tutorial or 2 you should be able to get drupal up and running with a basic site and a theme from contrib. Sure it will look a bit cheap, but no worse than something on blogger. If you were to host it with dreamhost it is going to cost you around 120USD/130AUD for one year. Even if you have to pay someone to help you setup your CMS site, it will probably cost you less than 500USD in the first year for a basic setup. A basic setup will allow your business to project a professional image to the world. Add a professionally designed custom theme and site build for another 1850USD/2000AUD or so and you are set for a few years. Of course you will spend more if you want some to help with designing your information architecture, help with SEO, produce or proof content or suggest images etc. The investment is likely to pay for itself over that time in increased sales.

Updating all of your Drupal Sites at Once - aka Lazy Person's Aegir

Aegir is an excellent way to manage multi site drupal instances, but sometimes it can be a bit too heavy. For example if you have a handful of sites, it can be overkill to deploy aegir. If there is an urgent security fix and you have a lot of sites (I am talking 100s if not 1000s) to patch, waiting for aegir to migrate and verify all of your sites can be a little too slow.

For these situations I have a little script which I use to do the heavy lifting. I keep in ~/bin/update-all-sites and it has a single purpose, to update all of my drupal instances with a single command. Just like aegir, my script leverages drush, but unlike aegir there is no parachute, so if something breaks during the upgrade you get to keep all of the pieces. If you use this script, I would recommend always backing up all of your databases first - just in case.

I keep my "platforms" in svn, so before running the script I run a svn switch or svn update depending on how major the update is. If you are using git or bzr, you would do something similar first. If you aren't using any form of version control - I feel sorry for your clients.

So here is the code, it should be pretty self explanatory - if not ask questions via the comments.

#!/bin/sh # Update all drupal sites at once using drush - aka lazy person's aegir # # Written by Dave Hall # Copyright (c) 2009 Dave Hall Consulting http://davehall.com.au # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # Alternatively you may use and/or distribute it under the terms # of the CC-BY-SA license http://creativecommons.org/licenses/by-sa/3.0/ # Change this to point to your instance of drush isn't in your path DRUSH_CMD="drush" if [ $# != 1 ]; then     SCRIPT="`basename $0`"     echo "Usage: $SCRIPT path-to-drupal-install"     exit 1; fi SITES_PATH="$1" PWD=$(pwd) cd "$SITES_PATH/sites"; for site in `find ./ -maxdepth 1 -type d | cut -d/ -f2 | egrep -v '(.git|.bzr|.svn|all|^$)'`; do     if [ -f "${site}/settings.php" ]; then         echo updating $site         $DRUSH_CMD updatedb -y -l $site     fi done # Lets go back to where we started cd "$PWD"

OK, so my script isn't any where as awesome as aegir, but if you are lazy (or in a hurry) it can come in handy. Most of the time you will probably still want to use aegir.

Notes:

Make sure you make the script executable (hint run chmod +x /path/to/update-all-sites)

If you don't have drush in your path, I would recommend you add it, but if you can't then change DRUSH_CMD="drush" to point to your instance of drush - such as DRUSH_CMD="/opt/drush/drush".

Thanks to Peter Lieverdink (aka cafuego) for suggesting the improved regex.

Webarama? Spamarama!

Some businesses have a strange way of promoting their services. Many years ago I used webarama for hosting a small client site. I cancelled the service over 4 years ago as the client no longer needed the site. I didn't really have any problems with them that I can remember, but I won't be recommending them to anyone after they spammed me about a new anti spam service they were offering.
Dear Dave, As part of our ongoing commitment to provide new features to clients we are pleased to announce the launch of our Anti Spam management interface for shared hosting clients, following on from the recent announcement of our free Anti Spam & Anti Virus system. The My-Spam interface allows you to take control of your email, specifying custom spam scores, deletion of spam email and specifying white and blacklisted email addresses. ...
Maybe webarama need to familiarise themselves with the Australian Spam Act 2003 there is a good summary CAUBE.AU's website. I will be emailing webarama a link to this post and will see what they have to say. Stay tuned.