$30 off During Our Annual Pro Sale. View Details »

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. Managing a Network of
    Drupal Sites with Aegir

    View Slide

  2. Andrew Millar
    Head of Web Services
    University of Dundee
    Email: [email protected]
    Twitter: @millaraj

    View Slide

  3. History of Drupal at Dundee
    2008 – New
    Job
    2009 – New
    CMS
    2010 – New
    Direction

    View Slide

  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

    View Slide

  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

    View Slide

  6. Site 1 Site 2 Site 3 Site 4

    View Slide

  7. A Better Way of Doing Things
    Events News Publications Profiles Vacancies Awards Other
    Site 1 Site 2 Site 3 Site 4 Site 5

    View Slide

  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

    View Slide

  9. Too much complexity!

    View Slide

  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

    View Slide

  11. View Slide

  12. Aegir & Drupal

    View Slide

  13. How Aegir Works
    • Multi site

    View Slide

  14. Aegir & Drupal
    Core (e.g. 7.40)
    profiles
    sites
    all
    modules
    themes
    libraries
    sitename
    modules
    themes
    libraries
    PLATFORM

    View Slide

  15. How Aegir Works
    • Multi site
    • Drush
    • Drupal distribution
    • Contributed modules
    • Hosting, provision, eldir
    • Swaps one problem for another…

    View Slide

  16. Too much complexity!

    View Slide

  17. John Hume
    Drupal Developer (Contractor)
    Previously - Web Developer at
    Dundee University
    https://www.drupal.org/u/littledynamo
    Twitter: @littledynamo1

    View Slide

  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
    Create Make File from existing site
    drush make-generate mysite.make

    View Slide

  19. Streamline Your Workflow – Drush Make
    • Building Platforms with Drush Make

    View Slide

  20. Demo
    • Building a platform using a make file
    • What does a make file look like?

    View Slide

  21. Demo - Upgrading a Site with Drush Make
    • Update the version in the make file
    • Build new platform
    • Migrate site

    View Slide

  22. Drupalgeddon – Uh-oh!
    • Drupalgeddon - SA-CORE-2014-005
    • How to quickly secure 80 sites?
    • Surely there has to be a better way!

    View Slide

  23. Automate all the Things!

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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)

    View Slide

  28. 4. Test
    • Manual process
    • Visually
    • Key functionality
    • Further Work - Automate with Behat & SimpleTest

    View Slide

  29. 5. Push Live
    • Manual process
    • Migrate task in Aegir
    • Delete old platform

    View Slide

  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

    View Slide

  31. Questions?

    View Slide