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

Quality software engineering for your data cent...

Quality software engineering for your data centre - RubyConf Brasil 2014

DevOps is the melding of minds between the development/engineering and operations communities to form a super-discipline with the best of the experience of both sides as a force for stability, flexibility, efficiency and agility in the management of large-scale application or service deployments. DevOps is about automating out day-to-day monotony, and then going further to bridge many of the things operations people are used to doing manually with the best-practices developed on the other side of the fence, particularly around automated testing and agility.

Go! But wait a minute! That's not enough for everyone to know what they should be doing, you say. You're right, it's not. There is a wealth of information on specific DevOps issues on the internet, and some good introductory material, but few comprehensive, opinionated overviews of what you *should* do. This talk will solve that problem and have you 100% ready to embark on or fix-up your DevOps journey to blissful nights sleep while rocking regular new features for your users.

We'll talk Puppet & Chef, testing and turbulence, robots and thermo-nuclear weapons. If you've just started with DevOps and need to know what you need to know, or have been muddling for a little while with some Puppets but the show always turns into a fight, then this is for you!

Ben Langfeld

August 28, 2014
Tweet

More Decks by Ben Langfeld

Other Decks in Technology

Transcript

  1. Why operations at RubyConf? It's not just operations. We're talking

    about modern computer systems architecture here.
  2. Why operations at RubyConf? It's not just operations. We're talking

    about modern computer systems architecture here. Rubyists like shiny things.
  3. Why operations at RubyConf? It's not just operations. We're talking

    about modern computer systems architecture here. Rubyists like shiny things. Rubyists typically are looking for simple yet powerful.
  4. Why operations at RubyConf? It's not just operations. We're talking

    about modern computer systems architecture here. Rubyists like shiny things. Rubyists typically are looking for simple yet powerful. Rubyists understand testing.
  5. Why operations at RubyConf? It's not just operations. We're talking

    about modern computer systems architecture here. Rubyists like shiny things. Rubyists typically are looking for simple yet powerful. Rubyists understand testing. Rails people understand convention over configuration.
  6. Why operations at RubyConf? It's not just operations. We're talking

    about modern computer systems architecture here. Rubyists like shiny things. Rubyists typically are looking for simple yet powerful. Rubyists understand testing. Rails people understand convention over configuration. You guys are developers!
  7. But Ops is a dirty word Ops guys work in

    the middle of the night Ops is about putting out fires and helping users who forgot their passwords
  8. But Ops is a dirty word Ops guys work in

    the middle of the night Ops is about putting out fires and helping users who forgot their passwords I only care about beautiful code!
  9. DevOps is simple Not a title Not a department Ruby

    developers didn't invent it Simply refers to the idea of cooperation vs segmentation
  10. Why "do DevOps"? The alternative is segment people on a

    project, set them off in different directions with different goals and hope for the best.
  11. Why "do DevOps"? The alternative is segment people on a

    project, set them off in different directions with different goals and hope for the best.
  12. Why "do DevOps"? The alternative is segment people on a

    project, set them off in different directions with different goals and hope for the best. Loucura!
  13. Let’s automate this! CFEngine (1993) Puppet (2005) Chef (2009) Salt

    (2011) Ansible (2012) BOSH (2010) Configuration Management
  14. Let’s automate this! CFEngine (1993) Puppet (2005) Chef (2009) Salt

    (2011) Ansible (2012) BOSH (2010) Configuration Management Install software
  15. Let’s automate this! CFEngine (1993) Puppet (2005) Chef (2009) Salt

    (2011) Ansible (2012) BOSH (2010) Configuration Management Install software Set config
  16. Let’s automate this! CFEngine (1993) Puppet (2005) Chef (2009) Salt

    (2011) Ansible (2012) BOSH (2010) Configuration Management Install software Set config Ensure services are running
  17. Let’s automate this! CFEngine (1993) Puppet (2005) Chef (2009) Salt

    (2011) Ansible (2012) BOSH (2010) Configuration Management Install software Set config Ensure services are running Managing users
  18. Let’s automate this! CFEngine (1993) Puppet (2005) Chef (2009) Salt

    (2011) Ansible (2012) BOSH (2010) Configuration Management Install software Set config Ensure services are running Managing users Introspect cluster layout
  19. Let’s automate this! CFEngine (1993) Puppet (2005) Chef (2009) Salt

    (2011) Ansible (2012) BOSH (2010) Configuration Management Install software Set config Ensure services are running Managing users Introspect cluster layout Prevent configuration drift
  20. Let’s automate this! CFEngine (1993) Puppet (2005) Chef (2009) Salt

    (2011) Ansible (2012) BOSH (2010) Configuration Management Install software Set config Ensure services are running Managing users Introspect cluster layout Prevent configuration drift Monitor changes
  21. Setting config file '/etc/apache2/apache2.conf' do content 'some_apache_config' owner 'www-data' group

    'www-data' mode 550 end ifconfig '192.168.0.1' do device 'eth0' end
  22. Managing users user 'random' do uid 1234 gid 'users' password

    '$1$JJsvHslV$szsCjVEroftprNn4JHtDi.' end
  23. Infrastructure as Code require 'spec_helper' ! describe package('apache2') do it

    { should be_installed } end ! describe service('apache2') do it { should be_enabled } it { should be_running } end ! describe port(80) do it { should be_listening } end ---! driver_plugin: vagrant! driver_config:! require_chef_omnibus: true! ! platforms:! - name: ubuntu-14.04! ! suites:! - name: default! run_list:! - recipe[apache]
  24. Building Clusters AWS OpenStack CloudStack VMWare vSphere Eucalyptus etc… Facility

    Compute & Storage Network Hypervisor VM OS Solutions / Services App GUI / API
  25. Building Clusters AWS OpenStack CloudStack VMWare vSphere Eucalyptus etc… Chef

    Metal The Foreman libvirt Fog (Ruby) Libcloud (Python) etc… Facility Compute & Storage Network Hypervisor VM OS Solutions / Services App GUI / API
  26. Now we’re (auto-)scaling Config management / orchestration can dynamically reconfigure

    load balancers etc Layers on top of this to determine required instance count are now (relatively) easy to build
  27. Now we’re (auto-)scaling Config management / orchestration can dynamically reconfigure

    load balancers etc Layers on top of this to determine required instance count are now (relatively) easy to build Combined with performance monitoring can put the auto in auto-scaling
  28. Fault-tolerance Horizontal scaling and fault tolerance have many of the

    same requirements Care in locating state Multiple homogenous instances
  29. Fault-tolerance Horizontal scaling and fault tolerance have many of the

    same requirements Care in locating state Multiple homogenous instances Tiered architecture
  30. Fault-tolerance Horizontal scaling and fault tolerance have many of the

    same requirements Care in locating state Multiple homogenous instances Tiered architecture Get the app right and deploy the right number of instances and you’re 90% of the way to a fault tolerant architecture
  31. Fault-tolerance Horizontal scaling and fault tolerance have many of the

    same requirements Care in locating state Multiple homogenous instances Tiered architecture Get the app right and deploy the right number of instances and you’re 90% of the way to a fault tolerant architecture Now blow it up on purpose!
  32. Test everything Testing should not be constrained to development pipeline

    Test production Test the good and the bad. Go on, try and hurt it!
  33. Focus on services Facility Compute & Storage Network Hypervisor VM

    OS Solutions / Services App GUI / API Servers become a cluster of (potentially unidentifiable) task runners
  34. Focus on services Facility Compute & Storage Network Hypervisor VM

    OS Solutions / Services App GUI / API Servers become a cluster of (potentially unidentifiable) task runners Abstract further the interface to the execution environment
  35. Focus on services Facility Compute & Storage Network Hypervisor VM

    OS Solutions / Services App GUI / API Servers become a cluster of (potentially unidentifiable) task runners This is akin to Grid Computing or Utility Computing Abstract further the interface to the execution environment
  36. Focus on services Facility Compute & Storage Network Hypervisor VM

    OS Solutions / Services App GUI / API Servers become a cluster of (potentially unidentifiable) task runners This is akin to Grid Computing or Utility Computing Abstract further the interface to the execution environment In the web world we call this PaaS
  37. Immutability Once a deployment is made it cannot be altered

    No editing of config files No installation of extra software
  38. Immutability Once a deployment is made it cannot be altered

    No editing of config files No installation of extra software No adding or removing system users
  39. Homogeneity All apps follow a set of strict rules or

    standards Every app is executed in the same way
  40. Homogeneity All apps follow a set of strict rules or

    standards Every app is executed in the same way Every app behaves similarly
  41. VII. Port binding Export services via port binding VIII. Concurrency

    Scale out via the process model IX. Disposability Maximize robustness with fast startup and graceful shutdown X. Dev/prod parity Keep development, staging, and production as similar as possible XI. Logs Treat logs as event streams XII. Admin processes Run admin/management tasks as one-off processes Twelve-Factor Apps I. Codebase One codebase tracked in revision control, many deploys II. Dependencies Explicitly declare and isolate dependencies III. Config Store config in the environment IV. Backing Services Treat backing services as attached resources V. Build, release, run Strictly separate build and run stages VI. Processes Execute the app as one or more stateless processes
  42. How does a PaaS work? Addressable Volatile Stateful Build App

    source code App image Store Build scripts
  43. How does a PaaS work? Addressable Volatile Stateful Build App

    source code App image Store Build scripts Execution request
  44. How does a PaaS work? Addressable Volatile Stateful Build App

    source code App image Store Build scripts Execution request
  45. How does a PaaS work? Addressable Volatile Stateful Build App

    source code App image Store Build scripts Execution container Execution request
  46. How does a PaaS work? Addressable Volatile Stateful Build App

    source code App image Store Build scripts Execution container Execution request Platform addressable layer
  47. How does a PaaS work? Addressable Volatile Stateful Build App

    source code App image Store Build scripts Execution container Execution request Platform addressable layer
  48. How does a PaaS work? Addressable Volatile Stateful Build App

    source code App image Store Build scripts Execution container Execution request Platform addressable layer
  49. How does a PaaS work? Addressable Volatile Stateful Build App

    source code App image Store Build scripts Execution container Execution request Platform stateful layer Platform addressable layer
  50. What parts do I need for a PaaS? Scheduler Image

    store Image builder Execution agents Stateful services Addressable services Health monitor Log aggregator Config store API Server
  51. I want to build a PaaS! Don't! CoreOS Docker etcd

    Heroku buildpacks Heroku logplex
  52. I want to build a PaaS! Don't! CoreOS Docker etcd

    Heroku buildpacks Heroku logplex Custom scheduler, API server, health monitor and services implementations
  53. Key ideas Learn from experienced sysadmins and standards Create abstractions

    Use automation Test everything Move fast Prioritise organisational refinement over tool adoption
  54. What should I do? I promised to tell you what

    you should do. This presentation is the start of the message, not the end.
  55. Utopian Computing is a project with the aim of clearly

    defining what an ideal computer system would look like.
  56. Utopian Computing is a project with the aim of clearly

    defining what an ideal computer system would look like. This vision intends to take into account the present-day reality, but to guide from it rather than be constrained by it.