On Wednesday, April 4 2013, the Office of Information Technology website underwent an upgrade, both on the surface and behind the scenes. It was a complex process that needed a couple of months of planning, but it all went as smoothly as could be expected. It now sports a more “official” branded NC State theme, bringing the OIT site up to par in terms of look and feel… something that many people have asked for since we missed our self-imposed “3-year upgrade” cycle back in 2011.
If you just want to see the old versus new screenshots, here you go:
What it was…
The OIT site was part of a shared Drupal instance running on a shared database, using a magical collection of symlinks, apache vhost tweaks and pixie dust. This made it very difficult to upgrade, because all the files were in multiple places, and the database hosted many disparate sites (not all needed to be upgraded at the same time).
What it is now…
The OIT site now stands alone, on its own. It has its own database, and its own filespace, for all intents and purposes disconnected from the rest of the world. This makes it exponentially more easy to troubleshoot, maintain, and most importantly keep up to date (drush pm-update anyone? anyone?).
How it happened…
Drupal is best installed via Drush, and even more so, installed using an install profile. The OIT site was not originally installed from a profile, and so one was created to simplify the upgrade and testing process. Of course, all the module versions needed to be matched with what was currently installed, so that the database wouldn’t freak out. Here’s the install profile that was created: 20130403 – OIT Website Install Profile (Drupal). It contains the Make file and the Profile file to enable the initial modules.
After testing, the new website was created in a separate hosting space. The live database was exported, and the live site files (including all modules, themes, and file uploads) were moved to the new location.
The database import and requisite changes to the settings.php file followed (had to match the table prefixes up with the live settings). Once that was done, we had an exact copy of the live website, which could then be upgraded to the new Drupal Core (6.22->6.28)… and of course all the module & themes were upgraded too. A lot of MySQL work and moving files around followed, topped off with a few too many cache-clearings.
All uploaded files also changed paths, as we moved the folder structure from “/sites/oit.ncsu.edu/files/” to “sites/default/files” (this was achieved with just a few mysql queries to update any references to the old locations.
Now it became a front-end configuration project… with a lot of blocks, roles, and permissions to configure. The old website had approximately 170 roles. The new website has 8 roles, proving how muddled the old website had become since its birth 5 years ago.
This upgrade gave us the opportunity to flatten the permissions structure and start trusting our employees more. The old choice was to restrict access to as small a piece of the website pie as possible. The new (and better IMHO) choice is to have a single “Content Author” role, who can add and edit any content on the site (barring the home page and main menus)…. but they just cannot delete anything… they can unpublish things that don’t need to be live anymore. We will have a process that purges unpublished content after it has been idle for a predetermined time. This saves us from accidental deletes, and unnecessary database restores for single nodes or blocks that someone didn’t think were needed.
8 hours of post-upgrade block, menu, and style tweaks later.. and the new site is up and running.
While the site is not as new and cutting edge as we might have wanted, it does achieve a few things that were long overdue:
- Branded look and feel
- Simplified Permissions Structure
- Simplified Content Management Process
- Simplified Back-end for maintenance and future upgrades
The next phase will involve an upgrade to Drupal 7 or 8 (probably 8), and also more theme work as we think about being more responsive.
If you made it through this post and have questions or comments about this upgrade project, please send an email to firstname.lastname@example.org.