Drupal

Upgrade complete

Sorry for the reposting on the RSS feed, I was migrating to a new server, upgrading to Drupal 7, and getting Varnish setup.  Things seem to be running well now.  This blog is not dead -- stay tuned for some new content.

Drupal on Heroku

Heroku has been around for awhile now, but has been primarily a rails host.  Well, until recently anway.  With the announcement of their Facebook integration, many others have noted that *any* PHP app can at least parse on Heroku's cedar stack.  I'll be honest, it took me longer to get ruby+rails setup on my Macbook than it did to get a proof-of-concept installation of Drupal up and running.  Here's what I did:

Case Study in Migrating XML to Drupal using Migrate

Sorry for the lack of posts as of late -- a massive upgrade operation at $DAYJOB has had me out of commission for a few weeks. Also, I've had the great fortune to be able to be part of a migration to Drupal which exposed me to migrate and friends. Yes, I said "great fortune" in the same sentence with "migration" without using a negative - that's just how awesome this module is.

My first impression when looking at the documentation for migrate was that it didn't seem complete. While it's true that the documentation could be better (what module couldn't use better documentation?), the problem is that no two migrations are alike.  Because of this, the best documentation is not going to be written by the module authors, it will be written by the module users - they are the ones that come up with the recipies to fill the cookbook.  There are several good reasons why there aren't many recipes available:

  • Developers don't like doing migrations.  It can be painful, and often takes quite a bit of time.
  • Users don't like migrations.  They see a migration of data as something easily done, and they often get sticker shock when presented with estimates for a large migration.
  • Migration code is written in a flurry before the site is active.  Right before launch, development crescendos, and then is often never used again (because no two migrations are the same).

This being my first migration, I vowed that I would document my experience, because I learned so much from it.  In this particular migration, we had to migrate a huge XML file into about 2,200 nodes in 3 content types.  Read on for my contribution to the cookbook!

My Thoughts and Ramblings on DrupalConSF 2010

I had the great pleasure of attending my first DrupalCon this week.  Held in downtown San Francisco at the Moscone Center, it was my opinion that this was Drupal's "homecoming".  While Drupal wasn't "born" in San Francisco, it seems to be the city that has the strongest following.  The attendance numbers didn't lie - I'm pretty sure they broke 3,000 geeks attendees.  I made this trip solo -- I only knew three people that were going, and those three were only acquaintances I'd met via email/IM a few months before.  When I left, I didn't come home with "leads" or "contacts", I came home with friends and role models, many of whom I plan on staying in touch with.  I met most of the authors of the Drupal books I've read, associated faces to the podcasts and RSS feeds I subscribe to, and I even had the opportunity to quickly say thanks to Dries and shake his hand.

For those who didn't know, archive.org has made the sessions available for download, so be sure to check those out.  Read on for my "takeaways" from DCSF2010.

New Linode StackScript: Pantheon Mercury (High Performance Drupal in 10 Minutes or Less)

For those who might not know, Pantheon Mercury is:

... a drop-in replacement for your Drupal website hosting service that delivers break-through performance. Mercury can serve two-hundred times more pages per second and generate pages three times faster than standard hosting services.

Tracking Drupal's Outbound HTTP Requests using tcpdump

While working on tweaking performance for a client, I was able to shave 7 seconds of PHP execution time time off the homepage load. The cause was eventually tracked down to calls out to TinyURL for every node being rendered. The core problem came from the service links module. We were able to fix it by disabling short URL's in the module, but the problem has been addressed in the current pre-release 2.x branch by using caching.

Drupal StackScript for RH Derivatives on Linode (Instant Drupal!)

StackScripts are a relatively new offering from Linode that allow users to build their own installation script by "stacking" previously existing scripts together to build the machine you want. You can keep your StackScript to yourself, or publish it for the world to use.

Assign Different Values to Different Nodes via One Action in Views Bulk Operations

The Views Bulk Operations module (a.k.a. VBO), is a godsend for busy Drupal site administrators. Don't just take my word for it - Lullabot wrote a chapter about it in O'Reilly's Using Drupal, it's included in the Open Atrium Drupal distribution, and it's even used on Drupal.org! Out of the box, VBO does a lot to streamline the things you do everyday, so that you spend less time doing them. A perfect example is bulk content moderation - with a few clicks of the mouse, you can mark a huge amount of comments as spam. You can even enable batch processing with a single click of a mouse so that you can literally do thousands of these without timing out.

VBO was attractive enough that we decided to offload the bulk/batch operations of Node Gallery to VBO. Integration for the most part was surprisingly easy - VBO "speaks" in Drupal Actions, so by writing actions, we were writing integration with VBO.

There's one undocumented case where VBO can be used that was critical for us. Most VBO actions you will find perform one action to a set of nodes, one at a time. Often times, that one action is to set a value of some sort on said nodes. In the case of Node Gallery, we wanted to be able to assign different weight values (used for sorting) to a bunch of nodes. The key here is that we aren't assigning a value of '2' to all selected node's weight, we want to assign a weight of 2 to node #1, 3 to node #2, 8 to node #3, and so on. While not straightforward, it's definitely achievable.

Pages

Subscribe to SysAdmin's Journey RSS