Devops For Drupal


Published on

Deploying your Drupal site, Upgrading your Drupal Site, Scaling, Clustering and Monitoring it ... all topics Developers are often not involved with ...

Devops For Drupal explains the Devops problem, to a Drupal audience .

Devops For Drupal

  1. Devops, Devops, Drupal Dries Vanlerberghe and Kris Buytaert
  2. Kris Buytaert@krisbuytaert● I used to be a Dev, Then Became an Op● Senior Linux and Open Source Consultant● „Infrastructure Architect“● Building Clouds since before the Cloud th● Surviving the 10 floor test● Co-Author of some books● Guest Editor at some sites
  3. Dries Vanlerberghe● I used to be a Dev, and kept it that way!● Open Source Consultant● „Developer“● +10 years Web development● Translating business needs to working applications
  4. Whats this Devops thing about ?
  5. Alternative Titles● Tales from Grumpy old Sysadmin● Devops, Devops, Devops th● Surviving the 10 floor test● Why devs hated ops
  6. ● Devops is a growing movement● We dont have all the answers yet● We are reaching out to different communities● We will point out problems we see.. While we are still working out the solutions
  7. CAMS● Culture● Automation● Measurement● Sharing Damon Edwards and John Willis
  8. Whats the problem ?The community of developers whose work yousee on the Web, who probably don’t know whatADO or UML or JPA even stand for, deploy bettersystems at less cost in less time at lower riskthan we see in the Enterprise. This is true evenwhen you factor in the greater flexibility andvelocity of startups.Tim Bray , on his blog January 2010
  9. How did we get here ?
  10. The Old Days● “Put this Code Live, heres a tarball” NOW!● What dependencies ?● No machines available ?● What database ?● Security ?● High Availability ?● Scalability ?● My computer cant install this ?
  11. Devs vs Ops
  12. 10 days into production● What High Load ? What Memory usage ?● Are these Logs ? Or this is actualy customer data ?● How many users are there , should they launch 100 queries each ?? Oh were having 10K users● Why is debugging enabled ?● Who the fsck wrote this crap ?
  13. 11 days into production
  14. We can solve this ! ● Some people think the Ops work starts on deployment • Ops = both system, app as platform ! ● It starts much earlier ● Get Devs and Ops to talk asap
  15. Talk about Nonfunctional Reqs NOW!● Security● Backups● High Availability● Upgradability● Deployment● Monitoring● Scale
  16. Breaking the SilosDevs Ops Getting Along
  17. NirvanaAn “ecosystem” that supports continuous delivery, frominfrastructure, data and configuration management tobusiness.Through automation of the build, deployment, and testingprocess, and improved collaboration between developers,testers, and operations, delivery teams can get changesreleased in a matter of hours — sometimes even minutes–nomatter what the size of a project or the complexity of its codebase. Continuous Delivery , Jez Humble
  18. How many times a day ?● 10 @ Flickr● Deployments used to be pain● Nobody dared to deploy a site● Practice makes perfect● Knowing you can vs constantly doing it
  19. How do we get there ?
  20. Todays Enviroments For Devs For Ops● Version Control ● Version Control● Automated Build ● Automated Build● Bugtracking ● Bugtracking● Continous integration ● Continous integration● Integrated testing ● Integrated testing● Automated ● Automated deployment deployment
  21. Infrastructure as Code● Automated Deployments● If my computer cant install it , the installer is borken● Reproducable● With configuration mgmtThink : • Cfengine,Puppet, Chef● Put configs under version control
  22. Deploying a Site● Code vs Config● Think: • Capistrano, Controltier, ..● Pulling stuff from version control • Is your repo accessible from production ?● Ops people like stuf packaged • .rpm, .deb, not .tgz , not .war
  23. Why ops like to package● Uniquely identify where files come from • Package or cfg-mgmt● Source repo not always available • Firewall / Cloud etc ..● Weird deployment locations , no easy access● Little overhead when you automate● CONFIG does not belong in a package
  24. Looking for ?“As a system administrator, I can tell when softwarevendors hate me. It shows in their products.”“DONT make the administrative interface a GUI. Systemadministrators need a command-line tool for constructingrepeatable processes. Procedures are best documented byproviding commands that we can copy and paste from theprocedure document to the command line. We cannotachieve the same repeatability when the instructions are:"Checkmark the 3rd and 5th options, but not the 2ndoption, then click OK." Sysadmins do not want a GUI thatrequires 25 clicks for each new user.” Thomas A. Limoncelli in ACM Queue December 2010
  25. Can you please talk about Drupal now ?
  26. Deploying a Drupal Site● Drush_make● Profiles● Features ,strongarm , Custom code • Configuration as Code● What with external apps and libraries? • Lucene – Solr – Tika – BI software● Test before you drive!
  27. Upgrading a site● Drush • pm-updatecode • Updatedb • Features-update● Once again, test before you drive!● But ... what about userdata ?
  28. Challenges● What about the data ?● Content vs Config • Drupal provides no clear distinction● e.g a billing application • Table Creation • Provisioning (e.g. Rates, Call plan types) • Actual Data● D8 ?
  29. Deploying a Drupal Site● Drush_make● Profiles ? • Not reusable for upgrades • Drush site-install profile● Features ,strongarm , Custom code • Configuration as Code● D7 Looks Better
  30. Upgrading a site● Drush • upgrade • Updatedb • Features-update● But ... what about userdata ?
  31. Challenges● What about the data ?● Content vs Config • Drupal provides no clear distinction● e.g a billing application • Table Creation • Provisioning (e.g. Rates, Call plan types) • Actual Data● D8 ?
  32. Going Live
  33. High Availabilty
  34. Scalability
  35. Monitor
  36. Devops a definition● There is no definition● It certainly isnt a person● No strict rules● No strict tools● Its not even new● If you arent doing it already ... .. failure is upon you ...
  37. Surviving the test ! ● After 5+ years of preaching I`m not alone anymore ● Devops, a new Movement ! ● Join the movement ! • • Agile System Adminstration GoogleGroups
  38. Contact :Kris BuytaertKris.Buytaert@inuits.beFurther Reading@krisbuytaert Inuits Esquimaux t Hemeltje Kheops Business Gemeentepark 2 Center 2930 Brasschaat Avenue Georges 891.514.231 Lemaître 54 6041 Gosselies +32 473 441 636 889.780.406 +32 495 698 668
  39. Images: some stuff from my previous devops presentation with@patrickdebois