Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Managing a Network of Drupal Sites with Aegir

John Hume
November 07, 2015

Managing a Network of Drupal Sites with Aegir

Presented at DrupalCamp Scotland 2015

John Hume

November 07, 2015
Tweet

More Decks by John Hume

Other Decks in Programming

Transcript

  1. History of Drupal at Dundee 2008 – New Job 2009

    – New CMS 2010 – New Direction
  2. University CLS School of Research Divisions / Centres / Units

    (x13) Labs (~85) School of Teaching Support Services Specialised Scientific Services (~ 16) Administrative & Technical Support Affiliated Sites (e.g. Postdoc, PiCLS, Impact, etc) CASE CASS CMDN
  3. University CLS School of Research Divisions / Centres / Units

    (x13) Labs (~85) School of Teaching Support Services Specialised Scientific Services (~ 16) Administrative & Technical Support Affiliated Sites (e.g. Postdoc, PiCLS, Impact, etc) CASE CASS CMDN 130+ DISTINCT SECTIONS
  4. A Better Way of Doing Things Events News Publications Profiles

    Vacancies Awards Other Site 1 Site 2 Site 3 Site 4 Site 5
  5. Central Content Store CLS Site School Site Div Site Lab

    Site Content Repos Events News Publications (Managed in Pure) Profiles (via Staff DB) Vacancies Awards Other (Contact Info, Directions, Dundee Uni / City info) Taxonomy Unit Subject
  6. Our Approach • The problem • 1 size doesn’t fit

    all • Best tool doesn’t necessarily scale • Our solution • Standardise on a versatile platform (Drupal) • Instance per project • The Benefits • No danger of new functionality or upgrades breaking existing sites • Users can have as much freedom or restriction as they wish. • Agility • Drawbacks • Lots of individual sites to maintain • Content Sharing
  7. Aegir & Drupal Core (e.g. 7.40) profiles sites all modules

    themes libraries sitename modules themes libraries PLATFORM
  8. How Aegir Works • Multi site • Drush • Drupal

    distribution • Contributed modules • Hosting, provision, eldir • Swaps one problem for another…
  9. John Hume Drupal Developer (Contractor) Previously - Web Developer at

    Dundee University https://www.drupal.org/u/littledynamo Twitter: @littledynamo1
  10. Streamline Your Workflow – Drush Make • Build Drupal sites

    on the fly • From predefined list of modules, themes, libraries • Patches Too! Create Site drush make mysite.make <location> Create Make File from existing site drush make-generate mysite.make
  11. Demo • Building a platform using a make file •

    What does a make file look like?
  12. Demo - Upgrading a Site with Drush Make • Update

    the version in the make file • Build new platform • Migrate site
  13. Drupalgeddon – Uh-oh! • Drupalgeddon - SA-CORE-2014-005 • How to

    quickly secure 80 sites? • Surely there has to be a better way!
  14. Automated Upgrade 1. Detect when updates are available 2. Build

    a new Drupal platform 3. Clone site to new Drupal platform 4. Test 5. Push live
  15. 1. Detect When Upgrades are Available • Core Update module

    • Checks status of Core/Modules/Themes • Custom module – Update Trigger Build • http://drupal.org/project/update_trigger_build • Detects when updates are available • Tells Jenkins to build a new Drupal platform
  16. 2. Build a New Drupal Platform • Continuous Integration Build

    Server • Listen for build requests • Initiate the build • Allows us to automate building Drupal platforms • Can detect build success/failures
  17. 2. Build a New Drupal Platform • XML based build

    scripting language • Build Drupal platform on the fly • Runs Aegir Drush commands to create a Platform • Phing Drush Task (https://www.drupal.org/project/phingdrushtask)
  18. 4. Test • Manual process • Visually • Key functionality

    • Further Work - Automate with Behat & SimpleTest
  19. Demo • Automated update process • Update Trigger Build module

     triggers a Jenkins build • Jenkins build  fires Phing script • Phing script  runs Aegir drush commands • Build platform with updated core/modules/themes • Clone site