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

Devops for PHP Developers

Devops for PHP Developers

To paraphrase a quote from http://devopsdays.org/ “Back then we didn't know we were going to change the IT industry. Devops has gone from an underground, to a wide mainstream industry adopted idea.” Devops is a term many PHP Developers will have heard but its not always clearly understood and often misinterpreted. In an industry that changes so rapidly it's important for developers to grasp and understand the core concepts of what Devops is about so that you can take your organisation or development team forward. My talk will dispel some myths, cover fundamental ideas,concepts and tools you can embrace mainly from a developers perspective. The main goal is to educate PHP Developers around exactly what Devops is and what benefits it brings to Development teams. I will break down the four main pillars of Devops and explain the core concepts within each of these over arching pillars.

Jeremy Quinton

September 29, 2017

More Decks by Jeremy Quinton

Other Decks in Technology


  1. • Software Developer • Devops Evangelist • Co-organiser of Cape

    Town PHP Meetup • Sometimes Conference speaker About - Jeremy Quinton Startup
  2. The DEVOPS Reports from 2011 - 2017 Large and comprehensive

    DEVOPS surveys and studies https://www.flickr.com/photos/80497449@N04/10012162166
  3. Key Findings - http://puppetlabs.com/sites/default/files/2014-state-of-devops-report.pdf • Strong IT performance is a

    competitive advantage. • Strong correlation between DEVOPS practices and IT performance.
  4. http://en.wikipedia.org/wiki/Gene_Kim http://en.wikipedia.org/wiki/Gene_Kim#mediaviewer/File:Gene_Kim.jpg Gene Kim “The best just keep getting better

    and accelerating away from the herd.” Co-Author of the Phoenix project A Novel About IT, DevOps, and Helping Your Business Win
  5. Devops is not • A specific tool chain. • The

    job of one person. • Miracle solution for all your organisations problems.
  6. Ideology The set of ideas and beliefs of a group…

  7. Ideas or set of Ideals (New and Old) Which has

    lead to a common set of practices and patterns DEVOPS (at a high level)
  8. Edgar Shein - Company Culture • Group of people working

    in a company will form a different culture from societal culture.
  9. Devops is as much about culture as it is about

    tools and culture is all about people.
  10. Development Developers QA Testers Operations Sys Admins Network Engineers DBA

    Development teams strive for change Operations teams strive for stability misalignment leads to The core, chronic conflict Measured on things like features Measured on things like uptime Silo 1 Silo 2
  11. Pathological - Power-oriented culture • Them vs us culture •

    Finger pointing • Code often does meet customer requirements • Constant firefighting The Westrum organizational typology model: how organizations process information (Source: Ron Westrum, “A typology of organisation culture,” BMJ Quality & Safety 13, no. 2 (2004), d
  12. Devops tries to address pathological culture • DEVOPS movement addresses

    the dysfunction that results from organisations composed of functional silos. • DEVOPS proposes shared responsibilities and incentives across teams. • Ideally no isolated silos exist in the software delivery process.
  13. Bureaucratic Rule-oriented • Reliance on process • Centralised decision-making •

    Relatively predictable results • Employees don’t feel empowered and become frustrated
  14. Generative culture - performance orientated • High Co-operation between dev

    and operations. • Failure leads to enquiry. • The flow of information and feedback is fast because 
 its built into the system. • Improvements and experiments are encouraged. • Open communication, Trust and Respect.
  15. DEVOPS identifies that organisational culture is important and that this

    culture is crucial to whether or not DEVOPS will succeed within any given organisation. Culture - Takeaway
  16. Cycle Time • How long does it take you to

    go from code committed to getting that code running in production? • Asked in another way if you had a critical bug fix and it was one line of code how long does it take you to get that to production.
  17. Some problems dev and ops teams face • Cycle time

    is measured in weeks or months. release • Problems with deployment. • Various bottle necks. Key goals of DEVOPS is to increase flow, reduce cycle time,
 shorten the feedback loop.
  18. Key Goals of Continuous Delivery • Software is always in

    a releasable state throughout its lifecycle. • The only way to categorically prove software is production ready is to deploy it production.
  19. Continuous Integration • Create quality at the source - helps

    build trust • Fix broken builds immediately - don’t block other developers • Keep your builds fast - get feedback sooner
  20. Deployment pipeline Delivery Team Version Control Check in Feedback Build

    & unit tests Trigger Automated Acceptance Tests Trigger Feedback Release Approval
  21. Tools to build deployment pipelines Travis CI Jenkins Testing tools

    PHPunit phpspec Behat BAMBOO Code Standard Quality Tools Continous Integration Servers Phing Build Tools PHP CodeSniffer - https://github.com/squizlabs/PHP_CodeSniffer PHP Mess detector http://phpmd.org/ PHPLoc - https://github.com/sebastianbergmann/phploc PHPCI Codeception PHP Documentor -http://www.phpdoc.org/
  22. • Collaboration • Feedback • Teams can deploy and release

    any version of their software to any environment at will through a fully automated process. Key benefits of Deployment pipeline - Continuous Delivery: Reliable Software Releases Through Build, Test, and Deployment Automation by Jez Humble and David Farley • Quality
  23. Deploying more frequently • Smaller changes make it easier to

    identify problems • Risk of deployment is reduced • The process of fixing problems becomes optimised Devops for developers - Michael Heuttermann
  24. Automated Deployments Think of deployment as a two step process

    • Select environment where we want our software to go. • Push a button to release the software to that environment. Tools Capistrano Rocketeer Deployer - Continuous Delivery: Reliable Software Releases Through Build, Test, and Deployment Automation by Jez Humble and David Farley Containers
  25. Automated acceptance testing “Automated testing turns fear into boredom” -

    Eran messeri google. • Automated acceptance testing of functional and non functional requirements. • RSpec tests for your servers configured by Puppet, Chef or anything else. https://github.com/serverspec/serverspec
  26. Automation summary • Reduce cycle time • Reducing cycle time

    is done with Continuous Delivery • With a deployment pipeline we are using CI, automated testing 
 and deployments • To practice continuous delivery need Deployment pipeline
  27. Increasing collaboration between dev and ops “What is remarkable is

    that even though agile actively seeks collaboration from all its stakeholders, most agile projects did not extend themselves toward the operations people.” - Patrick Debois.
  28. Change your definition of done “At the end of each

    sprint, we must have working and shippable code…” “demonstrated in an environment that resembles production”
  29. Developer Mindset • How are we going to deploy our

    code? • How are we going to monitor the application in a production environment? • Is this code going to work in a multi node environment? 
 e.g. sessions, caching etc • Software is a thing that exists after it has been written
  30. Chef Puppet Ansible Salt Configuration management tools (Infrastructure as code)

    Amazon Rackspace Digital Ocean Azure Cloud providers Practices - configuration management tools
  31. Packer is a tool for creating identical machine images for

    multiple platforms from a single source configuration. Packer https://www.packer.io • Create a common dev, qa, production environment creation process. Practices • Make environments (dev, staging, production) available early in the 
 development process.
  32. Practices Development environments made easy. An open platform for distributed

    applications for developers and sysadmins. OR • Keep dev environments as similar to our productions environments as possible
  33. Monitoring • If you are releasing often you want fast

    feedback. • Adding monitoring to the definition of done for new software features.
  34. Measurement • You can’t improve what you can’t measure. •

    Measurements are shared not only between developers and ops people 
 but with the entire organisation.
  35. Tools Statsd ElasticSearch + Logstash + Kibana Log files from

    production - Measurement and monitoring Collectd Graphite Grafana Cacti Monitoring and Altering Nagios Sensu Ganglia Sentry Graylog Application Metrics Splunk
  36. Sharing - Pain • Developers take more ownership and responsibility

    for their code. • Developers on call for production issues.
  37. • Code and scripts for building the application. Things that

    should be in version control for your application • Code and scripts for testing the application. • Code and scripts for deploying the application. • Code and scripts for building environments for the application.
  38. Summary • Why we need DEVOPS • Breaking down Silos

    • Organisational culture • Increasing Collaboration between Developers and Operations • Cycle Time and Continuous Delivery • Measurement and monitoring • Sharing
  39. Good DEVOPS Resources https://leanpub.com/buildqualityin Attend a DEVOPS day conference http://www.devopsdays.org/

    http://foodfightshow.org/ Podcasts http://devopscafe.org/ http://amzn.to/1vD8gUi http://amzn.to/1zMaAc7 http://amzn.to/1AiZMpy http://amzn.to/1brnEZI https://continuousdelivery.com/