← Home

Our DevOps Approach to Multisite and Drupal 8


A high-level overview

of how we’re using DevOps to

pimp our stack
1 / 21

Kyle Skrinak, I.T. Manager

Web Development and Systems Administration
https://people.duke.edu/~kds38
(nom de cyber: @screenack)


Trinity College of Arts & Sciences at
Duke University

This presentation:

http://bit.ly/DC19-HES

2 / 21

Meet the team


  • Two Drupal website designers and developers
  • Two Symfony custom application developers
  • Three sysadmins, including one Drupal lead
  • Host 380 websites, including 108 Drupal websites
  • Highly normalized platform — branding, features, and content
  • Support third-party developed websites
  • Plus a bevy of other web and sysadmin-related support
  • We maintain an excellent support reputation
3 / 21

Current Infrastructure


  • Duke OIT provided VM’s
  • RHEL7
  • MySQL > MariaDB
  • PHP’s aggressive EoL change
  • Shibboleth SSO
  • Third-party integrations: e.g., Qualtrics forms and Box for storage
  • 108 websites on a clustered server pair
  • A varnish and a pound load balancer.
  • A staging and production server per website
4 / 21

Our Drupal 7 workflow


  • Ansible pulls Drupal core updates from d.o.
  • Three git repos for code
    • Global
      1. Our sites/all (contrib modules, themes, and libraries) repo
      2. Trinity-level theme (Omega-based) repo at sites/all/themes
    • per website
      1. Website repo (theme, modules, libraries) in the
        sites/\<sitename> directory
  • drush, git and ansible to manage our stack cluster
5 / 21

What of Sleeping Dogs?


  • Our mature workflow serves our customers and ourselves well…
  • …but it fails us, moving forward
  • Shifting external requirements continue to mount
    • Web accessibility and responsive design
    • Our security posture
    • Integrate CI/CD and QA
    • Increasingly rapid stack updates
6 / 21

Enter DevOps


What is DevOps?
  • To radically yet seamlessly change our workflow
  • Rethink roles, rules, interactions, expectations
  • Stay current with tool and paradigm shifts
  • Learning from our peers and contributing back
  • Maintain and improve our service reputation
7 / 21

Has DevOps Helped Us?


Yes.

“Achieving extraordinary results
from ordinary people.”

8 / 21

DevOps?


You’re Soaking in It

  • Bi-weekly DevOps meeting
    • New concerns and opportunities
    • New tools
    • Paradigm shifts
    • Changing individual roles
  • Refactor our distribution and workflow
  • Cross-discipline training
  • Presentations on new proposals and tech
9 / 21

Why multisite?


  • Misleading FUD on multisite
  • Stable
  • n-factor reduction in duplicate stack code
  • Faster and inexpensive code updates
10 / 21

Preparing for Drupal 8


11 / 21

How, then?


Distribution reference

  • Maintain a “reference” D8 installation for managing core, based on the Drupal Project composer template
  • Run composer update against the reference
    • If there are updates, this will also update the composer.lock file
  • Commit the composer.lock file updates to the core git repo
12 / 21

Core and Code Deployment


Switch from ansible to GitLab CE CI/CD
  • The value of recent GitLab updates
  • Trigger deployment updates from the GitLab UI.

Oops… NoOps!

13 / 21

Core and Code Deployment


Use a GitLab’s CI/CD to
  • composer install with the updated lock file to distributed D8 cores.
    • Far less expensive than composer update on all cores.
  • Run QA tests as part of a build process
    • (Still in development)
  • Consistently run deployment scripts
  • Deploy website code to our staging and production servers
14 / 21

Core and Website Updates


Run a pipeline on targeted servers
  • For all child sites:
    • Move website to maintenance mode
    • Database and code backup for all child websites
  • Pull composer.lock file
  • Composer install (core only)
  • For all child sites:
    • Drupal database update
    • Cache rebuild
  • Reapply permissions on core or website directories only
15 / 21

GitLab CI/CD Demo


Link

16 / 21

Features and Benefits


  • Eliminates need for manual deployment
  • “True” push-button deployment for our devs
  • Consistent deployment execution
  • Consistent state restoration
  • Easy access to deployment logs by all
17 / 21

Hindsight = 20/20


18 / 21

What’s Next?


  • Library management: big hairy eyeball
  • Implement varnish and pound for D8
  • Build and maintain our own installation profile
  • Trigger deployments with commit tags
  • Improve integration of website-level configuration management
  • Backport what we can to our D7 workflow
19 / 21

Questions?


?

20 / 21

Thank You!


!

21 / 21