$30 off During Our Annual Pro Sale. View Details »

Intro to DevOps & Chef

Intro to DevOps & Chef

Lightning talk introducing DevOps and Chef. Originally presented at RailsGirlsDC.

Nathen Harvey

May 15, 2013
Tweet

More Decks by Nathen Harvey

Other Decks in Technology

Transcript

  1. None
  2. DevOps and Chef Nathen Harvey nharvey@opscode.com @nathenharvey

  3. Nathen •Technical Community Manager at Opscode •Co-host of the Food

    Fight Show Podcast •Co-organizer •DevOpsDC - June 11 •MongoDC - tomorrow
  4. DevOps

  5. Development & Operations •Development - Maximize new features •Operations -

    Maximize uptime
  6. DevOps •Maximize business value

  7. DevOps •Culture •Automation •Measurement •Sharing

  8. Culture •Shared ownership •Collaboration

  9. Automation •Remove manual tasks

  10. Measurement •Data > Opinion

  11. Sharing •Knowledge openly shared within an organization •Knowledge openly shared

    with other organizations
  12. DevOps is not... •System Administration •A position (DevOps Engineer) •A

    team (DevOps Team) •A tool
  13. DevOps •Culture •Automation •Measurement •Sharing

  14. DevOps

  15. Overview of Chef What is this thing again?

  16. Chef is an automation platform for developers & systems engineers

    to continuously define, build, and manage infrastructure. CHEF USES: Recipes and Cookbooks that describe Infrastructure as Code. Chef enables people to easily build & manage complex & dynamic applications at massive scale • New model for describing infrastructure that promotes reuse • Programmatically provision and configure • Reconstruct business from code repository, data backup, and bare metal resources “ ” Chef
  17. http://www.flickr.com/photos/steffenz/337700069/ http://www.flickr.com/photos/kky/704056791/ Applications

  18. Infrastructure http://www.flickr.com/photos/sbh/462754460/

  19. Collection of Resources http://www.flickr.com/photos/philliecasablanca/3354734116/ • Networking • Files • Directories

    • Symlinks • Mounts • Routes • Users • Groups • Tasks • Packages • Software • Services • Configuration • Other Stuff
  20. Acting in Concert http://www.flickr.com/photos/glowjangles/4081048126/

  21. To Provide a Service http://www.flickr.com/photos/28309157@N08/3743455858/

  22. And it Evolves http://www.flickr.com/photos/16339684@N00/2681435235/

  23. Application Server See Node

  24. Application Server Application Database See Nodes

  25. Application Server Application Databases See Nodes Grow

  26. Application Servers Application Databases See Nodes Grow

  27. Application Servers Application Databases Load Balancer See Nodes Grow

  28. Application Servers Application Databases Load Balancers See Nodes Grow

  29. Application Servers Application Database Cache Load Balancers Application Databases See

    Nodes Grow
  30. Application Servers Application Database Cache Load Balancers Application Databases Tied

    Together with Configuration
  31. Application Servers Application Database Cache Load Balancers Floating IP? Application

    Databases Infrastructure is a Snowflake
  32. Load Balancers Application Servers NoSQL Database Slaves ApplicationCache Database Cache

    Database Evolving Complexity
  33. DC1 DC3 DC2 •Infrastructure as Code Complexity Grows Quickly

  34. Configuration Management http://www.flickr.com/photos/philliecasablanca/3354734116/

  35. Configuration Desperation http://www.flickr.com/photos/francoforeshock/5716969942/

  36. • But you already guessed that, didn’t you? Chef Solves

    This Problem
  37. http://www.flickr.com/photos/louisb/4555295187/ • Programmatically provision and configure • Treat like any

    other code base • Reconstruct business from code repository, data backup, and bare metal resources. Chef is Infrastructure as Code
  38. http://www.flickr.com/photos/ssoosay/5126146763/ • Chef generates configurations directly on nodes from their

    run list • Reduce management complexity through abstraction • Store the configuration of your programs in version control Programs
  39. •Define Policy •Say what, not how •Pull not Push http://www.flickr.com/photos/bixentro/2591838509/

    Declarative Interface to Resources
  40. package "ntp" do action :install end service "ntpd" do action

    [:enable,:start] end template "/etc/ntpd.conf" do source "ntpd.conf.erb" owner "root" group "root" mode 0644 action :create variables(:time_server => “time.example.com”) notifies :restart, “service[ntpd]” end That Looks Like This
  41. Rails App Memcache Postgres Slaves Postgres Master Nagios Graphite So

    when this...
  42. Rails App Memcache Postgres Slaves Postgres Master Nagios Graphite ...becomes

    this...
  43. Rails App Memcache Postgres Slaves Postgres Master Nagios Graphite ...this

    can happen automatically
  44. Nagios Graphite Rails App Memcache Postgres Slaves • Load balancer

    config • Nagios host ping • Nagios host ssh • Nagios host HTTP • Nagios host app health • Graphite CPU • Graphite Memory • Graphite Disk • Graphite SNMP • Memcache firewall • Postgres firewall • Postgres authZ config • 12+ resource changes for 1 node addition Count the Resources
  45. When Do I need Chef? •After you outgrow Heroku •The

    law of 3
  46. OK, how do I learn more? •Talk to Nathen •@nathenharvey

    •learnchef.com •docs.opscode.com •lists.opscode.com •#chef on Freenode