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

DevOps 
and the 
Front-End Developer

DevOps 
and the 
Front-End Developer

vjwilson

May 30, 2019
Tweet

More Decks by vjwilson

Other Decks in Programming

Transcript

  1. DevOps 
 and the 
 Front-End Developer Van Wilson @vanwilson

    Charlotte Front-End Developers Meetup Thursday, May 30, 2019
  2. DevOps Mobile Responsive Agile Frameworks Pattern Library Data Viz Blockchain

    Machine
 Learning Augmented Reality Microservices
  3. The 1990s: 
 everyone is “full-stack” • designer/developer/server-admin is one

    and the same • aka “Webmaster” • "Deploying your code” means transferring it to the server with an FTP program
  4. The March of Progress • 2005: Ajax, with its poster

    child, Google Maps • JavaScript libraries: Dojo, Prototype, YUI, and jQuery • 2008: GitHub • 2009: Node.js • 2010s: the age of frameworks, both CSS and JS
  5. –Mike Loukides “From an operations standpoint, the big story of

    the web isn’t the evolution toward full-fledged applications that run in the browser; it’s the growth from single servers to tens of servers to hundreds, to thousands, to (in the case of Google or Facebook) millions.”
  6. Goals for this talk 1. Give you an understanding of

    what DevOps is, what it isn’t, and why it matters to you. 2. Help you see the similarities between DevOps practices and common front-end development practices. 3. Prepare you to start, support, and advocate for DevOps in your organization.
  7. –https://en.wikipedia.org/wiki/DevOps “DevOps is a set of software development practices that

    combines software development (Dev) and information technology operations (Ops) to shorten the systems development life cycle while delivering features, fixes, and updates frequently in close alignment with business objectives.” Definition
  8. https://theagileadmin.com/what-is-devops/ “DevOps is the practice of operations and development engineers

    participating together in the entire service lifecycle, from design through the development process to production support.” More Definitionier
  9. The core conflict Goal of Devs:
 
 Respond to rapidly

    changing needs by frequently pushing new features
 Goal of Ops:
 
 Provide a stable, reliable, secure service
  10. Case Study:
 Knight Capital • Largest U.S. equities trader in

    2012 • Had to launch new software on Aug. 1, 2012 to take advantage of new trading rules and maintain industry position • New software, SMARS, built on top of an old program, still deployed but no longer used
  11. Case Study:
 Knight Capital (cont’d.) • Server updates done manually

    • Only 7 of the 8 servers were updated • No one remembered the old software was still on the 8th server • Order commands start going to all 8 servers at 8am on Aug. 1, 2012
  12. Case Study:
 Knight Capital (cont’d.) • Issue not corrected for

    45 minutes • Knight lost $440 million • Stock dropped 33% that day, 75% the next day • Taken over by a rival firm 6 months later
  13. What DevOps Does • DevOps helps Developers get their code

    from their machines and into the hands of users more quickly, more consistently, and more reliably. • DevOps helps Operations people achieve levels of service with more uptime, more reliability, and more predictability.
  14. The Roots of DevOps • Lean Manufacturing • Agile Software

    Development • The Toyota Production System
  15. Example Value Streams in Web Dev Design Develop Test Deploy

    Code Automated Testing Exploratory Testing Production Deploy
  16. DevOps Helps to Answer these
 3 Questions about the Value

    Stream • How do I get the code I write in front of other people quickly? • How do I tell how well my code is working? • How do I learn from those first two experiences?
  17. Making Status Visible • Version control all the things, including

    your infrastructure • Automate your tests • Continuously integrate new work to the main branch • Automate your deployment and releases • Control what users see with “flags”
  18. Version Control: Infrastructure as Code • Every sysadmin has always

    had a stash of scripts • Make all scripts visible to every one • Even database migrations • Use tools as needed: - Config mgt. (Puppet, Chef, Ansible, CFEngine) - Orchestration (Zookeeper, Mesos, Kubernetes) - Virtualization (AWS, Azure, Google Cloud) - Containerization (Vagrant, Docker)
  19. Automated Testing • Unit tests • Integration tests • Functional

    tests • Code quality tests (Code Climate, Rubocop, Lint) • Security tests (Veracode)
  20. Continuous Integration • Have a “build agent” run any automated

    tests • Whenever someone pushes a branch, or opens a PR • Create any build artifacts (compile, combine, minify) • Lots of options: Jenkins, Travis, CircleCI, TeamCity, Azure Pipelines
  21. Automated Releases • The holy grail of DevOps • Good

    first step for your Dev environment • Next step, Test environment (bring QA on board) • Ship it straight to production! (what could go wrong?) • No more than goes wrong the old way, actually
  22. Feature Flags • Checks added to the code where features

    are changing • On/Off status for each feature controlled externally • Business, or automation, can control new features without re-deploy • Tools can help: LaunchDarkly, Split, Rollout
  23. Principles of Feedback • See problems as they occur •

    Swarm and resolves problems quickly (Andon cord) • Keep pushing quality closer to the source • Optimize for downstream work centers
  24. Get Telemetry • Instrument your code • Many levels: business

    logic, application, environment • Tools: New Relic, Sentry, Rollbar, LogRocket, StatsD • You can even gather telemetry on your deployment pipeline
  25. Analyze Telemetry • Don’t just log everything. Interpret. • Apply

    statistics. Means and standard deviations are easy wins. • Try to find the harbingers of problems (example, increased page load times) • Use tools to group problems • Want to see code quality skyrocket? Have devs take turns on call
  26. Hypothesis-Driven Development • Don’t just rely on passive metrics. •

    Akin to “rapid prototyping” for UX research • Run experiments to see how things are working • Integrate A/B testing into the release process
  27. Enable Daily Learning • Take your metrics and testing, and

    apply it to improve • Netflix example: Chaos Monkey • Randomly terminates instances in production, to ensure that engineers implement their services to be resilient to instance failures • “Game days” - days designated to test for failures
  28. Local Discoveries →
 Global Improvements • Chat rooms • Chat

    bots (e.g., GitHub’s Hubot) • Monorepo • Automated tests also serve as documentation
  29. Time for Learning and Improvement • From Toyota: the kaizen

    blitz, a few days to concentrate on a problem area • Hack days, or hackathons • Google’s 20% time • Internal conferences • Internal coaching
  30. Blameless Post Mortems • After an incident, a meeting to

    determine the situations and individual decisions that came together to cause the failure - construct a timeline - everyone relates their role in the situation - anyone who made a mistake is a teacher - propose countermeasures - everyone concerned attends
  31. –Every person, in every industry, about every innovative idea, ever

    “This all sounds fantastic, and it may work for everyone else, but it doesn’t apply to 
 me / my company / our situation.”
  32. Why does this not apply 
 to you? 1. I’m

    a freelancer. I work alone. 2. I work for a big enterprise company, in a heavily regulated industry. We would never be allowed to do this.
  33. Enterprise companies that “do the DevOps” • Alcoa • Allstate

    • Amazon • Capital One • CSG • Etsy • Facebook • Google • HP • Intuit • LinkedIn • Nationwide • Netflix • Nordstrom • Pivotal Labs • Salesforce • Target • Twitter
  34. –Matt Stratton “The first step of DevOps… is to find

    out how your organization makes money.”
  35. Resources General • “The evolution of DevOps”, Mike Loukides, https://

    medium.com/@mikeloukides/the-evolution-of- devops-9d101124aa2e • “What Is DevOps?”, https://theagileadmin.com/about/ • The DevOps Handbook, Gene Kim, Jez Humble, Patrick DuBois, and John Willis, https://www.goodreads.com/ book/show/26083308-the-devops-handbook
  36. Resources, cont’d Infrastructure as Code • “Infrastructure as Code: Everything

    You Need to Know”, Mark Robinson, https://rollout.io/blog/ infrastructure-as-code/ Continuous Integration • “Continuous Integration”, Martin Fowler, https:// www.goodreads.com/book/show/26083308-the-devops- handbook
  37. Resources, cont’d Feature Flags • “Feature Toggles (aka Feature Flags)”,

    Pete Hodgson, https://rollout.io/blog/infrastructure-as-code/ Culture • Arrested Devops (podcast), Bridget Kromhout, Jessica Kerr, Matt Stratton, Trevor Hess, https:// www.arresteddevops.com/
  38. Resources, cont’d Front-end specific DevOps • “Automating peace of mind

    with Accessibility Testing & Continuous Integration”, Marcy Sutton, https:// marcysutton.github.io/a11y-and-ci/#/