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

Managing a Network of Drupal Sites with Aegir

Bf686b0e0e13569c1e6fef2b364d3a7a?s=47 John Hume
November 07, 2015

Managing a Network of Drupal Sites with Aegir

Presented at DrupalCamp Scotland 2015

Bf686b0e0e13569c1e6fef2b364d3a7a?s=128

John Hume

November 07, 2015
Tweet

Transcript

  1. Managing a Network of Drupal Sites with Aegir

  2. Andrew Millar Head of Web Services University of Dundee Email:

    a.j.millar@dundee.ac.uk Twitter: @millaraj
  3. History of Drupal at Dundee 2008 – New Job 2009

    – New CMS 2010 – New Direction
  4. 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
  5. 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
  6. Site 1 Site 2 Site 3 Site 4

  7. A Better Way of Doing Things Events News Publications Profiles

    Vacancies Awards Other Site 1 Site 2 Site 3 Site 4 Site 5
  8. 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
  9. Too much complexity!

  10. 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
  11. None
  12. Aegir & Drupal

  13. How Aegir Works • Multi site

  14. Aegir & Drupal Core (e.g. 7.40) profiles sites all modules

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

    distribution • Contributed modules • Hosting, provision, eldir • Swaps one problem for another…
  16. Too much complexity!

  17. John Hume Drupal Developer (Contractor) Previously - Web Developer at

    Dundee University https://www.drupal.org/u/littledynamo Twitter: @littledynamo1
  18. 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
  19. Streamline Your Workflow – Drush Make • Building Platforms with

    Drush Make
  20. Demo • Building a platform using a make file •

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

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

    quickly secure 80 sites? • Surely there has to be a better way!
  23. Automate all the Things!

  24. 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
  25. 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
  26. 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
  27. 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)
  28. 4. Test • Manual process • Visually • Key functionality

    • Further Work - Automate with Behat & SimpleTest
  29. 5. Push Live • Manual process • Migrate task in

    Aegir • Delete old platform
  30. 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
  31. Questions?