Configuring Nagios with Chef              Bryan McLellan              Technical Program Manager, Open Source              ...
Overview                 •      Who am I?                 •      Why automation                 •      Introduction to Che...
Who am I?        •      Chef               Early developer, user, pundit        •      10+ years in Systems Administration...
How did we get here?                     Bare Metal DeploymentTuesday, September 25, 12
How did we get here?                     Bare Metal Deployment                       •    PurchasingTuesday, September 25,...
How did we get here?                     Bare Metal Deployment                       •    Purchasing                      ...
How did we get here?                     Bare Metal Deployment                       •    Purchasing                      ...
How did we get here?                     Bare Metal Deployment                       •    Purchasing                      ...
How did we get here?                     Bare Metal Deployment                       •    Purchasing                      ...
How did we get here?                     Bare Metal Deployment                       •    Purchasing                      ...
How did we get here?                     Bare Metal Deployment                       •    Purchasing                      ...
How did we get here?                     Cloud Deployment                       •    Purchasing                       •   ...
How did we get here?                     Cloud Deployment                       •    Purchasing                       •   ...
Why automate?              Good Reasons:       •      More agility and faster scalability       •      Improved infrastruc...
Why automate?              Good Reasons:       •      More agility and faster scalability       •      Improved infrastruc...
Chef PrinciplesTuesday, September 25, 12
Chef Principles                 • IdempotentTuesday, September 25, 12
Chef Principles                 • Idempotent                 • ReasonableTuesday, September 25, 12
Chef Principles                 • Idempotent                 • Reasonable                 • PrimitivesTuesday, September 2...
Chef Principles                 • Idempotent                 • Reasonable                 • Primitives                 • S...
Chef Principles                 • Idempotent                 • Reasonable                 • Primitives                 • S...
Chef Principles                 • Idempotent                 • Reasonable                 • Primitives                 • S...
What is Chef?                 •      Configuration management language                 •      Systems integration framewor...
Application Programming Interface                            The Meatcloud Manifesto                      Give me an API o...
Chef Basics           Chef manages NodesTuesday, September 25, 12
Chef Basics           Chef manages Nodes           Nodes have AttributesTuesday, September 25, 12
Chef Basics           Chef manages Nodes           Nodes have Attributes           Users and Nodes authenticate as Clients...
Chef Basics           Chef manages Nodes           Nodes have Attributes           Users and Nodes authenticate as Clients...
Chef Basics           Chef manages Nodes           Nodes have Attributes           Users and Nodes authenticate as Clients...
Chef Basics           Chef manages Nodes           Nodes have Attributes           Users and Nodes authenticate as Clients...
Chef Basics           Chef manages Nodes           Nodes have Attributes           Users and Nodes authenticate as Clients...
Chef Basics           Chef manages Nodes           Nodes have Attributes           Users and Nodes authenticate as Clients...
Chef Basics           Chef manages Nodes           Nodes have Attributes           Users and Nodes authenticate as Clients...
Chef Basics           Chef manages Nodes           Nodes have Attributes           Users and Nodes authenticate as Clients...
Chef Basics Visualized                client: srv01               client: srv02                    client: srv03          ...
Chef Stacks        chef-client         knife     chef-shell      chef-solo                                    API         ...
Chef 10 Open Source Architecture                             Chef ExpanderTuesday, September 25, 12
Resources                 •      A Resource is something you manage                        service, package, file, user, e...
Resources                 •      A Resource is something you manage                        service, package, file, user, e...
Resources                 •      A Resource is something you manage                        service, package, file, user, e...
Providers                 •      A Provider performs the actions specified by the resourceTuesday, September 25, 12
Providers                 •      A Provider performs the actions specified by the resource                 •      Each Res...
Providers                 •      A Provider performs the actions specified by the resource                 •      Each Res...
A basic recipe                            package “apache2” do                              action :install               ...
A basic recipe                            package “apache2” do                              action :install               ...
A basic recipe                            package “apache2” do                              action :install               ...
A basic recipe                            package “apache2” do                              action :install               ...
A basic recipe                            package “apache2” do                              action :install               ...
Nagios Demo                            • Download server cookbooks                            • Install server            ...
Questions?                               There is lots more to                               learn about Chef at          ...
Upcoming SlideShare
Loading in …5
×

Nagios Conference 2012 - Bryan McLellan - Using Nagios With Chef

952 views
851 views

Published on

Bryan McLellan's presentation on using Nagios with chef.
The presentation was given during the Nagios World Conference North America held Sept 25-28th, 2012 in Saint Paul, MN. For more information on the conference (including photos and videos), visit: http://go.nagios.com/nwcna

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
952
On SlideShare
0
From Embeds
0
Number of Embeds
45
Actions
Shares
0
Downloads
17
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Nagios Conference 2012 - Bryan McLellan - Using Nagios With Chef

  1. 1. Configuring Nagios with Chef Bryan McLellan Technical Program Manager, Open Source btm@opscode.com / @btmspoxTuesday, September 25, 12
  2. 2. Overview • Who am I? • Why automation • Introduction to Chef • Nagios Demo • QuestionsTuesday, September 25, 12
  3. 3. Who am I? • Chef Early developer, user, pundit • 10+ years in Systems Administration Computer repair, ISPs, Corporate IT, Web operations • Event Logistics Volunteer Traffic Control, Parking, Communications, Networking, Emergency Management • Hacker-Operator Trucks, Bikes, Radios, TractorsTuesday, September 25, 12
  4. 4. How did we get here? Bare Metal DeploymentTuesday, September 25, 12
  5. 5. How did we get here? Bare Metal Deployment • PurchasingTuesday, September 25, 12
  6. 6. How did we get here? Bare Metal Deployment • Purchasing • Vendor buildTuesday, September 25, 12
  7. 7. How did we get here? Bare Metal Deployment • Purchasing • Vendor build • DeliveryTuesday, September 25, 12
  8. 8. How did we get here? Bare Metal Deployment • Purchasing • Vendor build • Delivery • InstallationTuesday, September 25, 12
  9. 9. How did we get here? Bare Metal Deployment • Purchasing • Vendor build • Delivery • Installation • OS deploymentTuesday, September 25, 12
  10. 10. How did we get here? Bare Metal Deployment • Purchasing • Vendor build • Delivery • Installation • OS deployment • Application deploymentTuesday, September 25, 12
  11. 11. How did we get here? Bare Metal Deployment • Purchasing • Vendor build • Delivery Weeks? • Installation • OS deployment • Application deploymentTuesday, September 25, 12
  12. 12. How did we get here? Cloud Deployment • Purchasing • Vendor build • Delivery Nearly immediate • Installation • OS deployment • Application deploymentTuesday, September 25, 12
  13. 13. How did we get here? Cloud Deployment • Purchasing • Vendor build • Delivery Nearly immediate • Installation • OS deployment • Application deployment Must be fastTuesday, September 25, 12
  14. 14. Why automate? Good Reasons: • More agility and faster scalability • Improved infrastructure documentation • Better disaster recoveryTuesday, September 25, 12
  15. 15. Why automate? Good Reasons: • More agility and faster scalability • Improved infrastructure documentation • Better disaster recovery Really Good Reasons: • Spend less time on monotonous tasks • Spend more time solving interesting problemsTuesday, September 25, 12
  16. 16. Chef PrinciplesTuesday, September 25, 12
  17. 17. Chef Principles • IdempotentTuesday, September 25, 12
  18. 18. Chef Principles • Idempotent • ReasonableTuesday, September 25, 12
  19. 19. Chef Principles • Idempotent • Reasonable • PrimitivesTuesday, September 25, 12
  20. 20. Chef Principles • Idempotent • Reasonable • Primitives • ScalableTuesday, September 25, 12
  21. 21. Chef Principles • Idempotent • Reasonable • Primitives • Scalable • HackableTuesday, September 25, 12
  22. 22. Chef Principles • Idempotent • Reasonable • Primitives • Scalable • Hackable • ShareableTuesday, September 25, 12
  23. 23. What is Chef? • Configuration management language • Systems integration framework • API for your infrastructure http://www.flickr.com/photos/morville/3220961040/Tuesday, September 25, 12
  24. 24. Application Programming Interface The Meatcloud Manifesto Give me an API or give me death. -- Andrew Clay Shafer (@littleidea)Tuesday, September 25, 12
  25. 25. Chef Basics Chef manages NodesTuesday, September 25, 12
  26. 26. Chef Basics Chef manages Nodes Nodes have AttributesTuesday, September 25, 12
  27. 27. Chef Basics Chef manages Nodes Nodes have Attributes Users and Nodes authenticate as ClientsTuesday, September 25, 12
  28. 28. Chef Basics Chef manages Nodes Nodes have Attributes Users and Nodes authenticate as Clients Cookbooks contain RecipesTuesday, September 25, 12
  29. 29. Chef Basics Chef manages Nodes Nodes have Attributes Users and Nodes authenticate as Clients Cookbooks contain Recipes Each node has a Run ListTuesday, September 25, 12
  30. 30. Chef Basics Chef manages Nodes Nodes have Attributes Users and Nodes authenticate as Clients Cookbooks contain Recipes Each node has a Run List A Run List is a list of Recipes to runTuesday, September 25, 12
  31. 31. Chef Basics Chef manages Nodes Nodes have Attributes Users and Nodes authenticate as Clients Cookbooks contain Recipes Each node has a Run List A Run List is a list of Recipes to run Recipes can be grouped in a RoleTuesday, September 25, 12
  32. 32. Chef Basics Chef manages Nodes Nodes have Attributes Users and Nodes authenticate as Clients Cookbooks contain Recipes Each node has a Run List A Run List is a list of Recipes to run Recipes can be grouped in a Role Roles can also be added to a Run ListTuesday, September 25, 12
  33. 33. Chef Basics Chef manages Nodes Nodes have Attributes Users and Nodes authenticate as Clients Cookbooks contain Recipes Each node has a Run List A Run List is a list of Recipes to run Recipes can be grouped in a Role Roles can also be added to a Run List Nodes can be in EnvironmentsTuesday, September 25, 12
  34. 34. Chef Basics Chef manages Nodes Nodes have Attributes Users and Nodes authenticate as Clients Cookbooks contain Recipes Each node has a Run List A Run List is a list of Recipes to run Recipes can be grouped in a Role Roles can also be added to a Run List Nodes can be in Environments Data bags are... bags of data.Tuesday, September 25, 12
  35. 35. Chef Basics Visualized client: srv01 client: srv02 client: srv03 node: srv01 node: srv02 node: srv03 run_list: “role[web_server]” run_list: “role[web_server]” run_list: “role[db_server]” role: web_server role: db_server run_list: [“recipe[apache2]”, “recipe[php]” ] run_list: [ “recipe[mysql]”, “recipe[nfs]” ]Tuesday, September 25, 12
  36. 36. Chef Stacks chef-client knife chef-shell chef-solo API Open Source Hosted Chef Private ChefTuesday, September 25, 12
  37. 37. Chef 10 Open Source Architecture Chef ExpanderTuesday, September 25, 12
  38. 38. Resources • A Resource is something you manage service, package, file, user, execute, gitTuesday, September 25, 12
  39. 39. Resources • A Resource is something you manage service, package, file, user, execute, git • Resources have actions start, install, create, deploy • Resources can notify of other resourcesTuesday, September 25, 12
  40. 40. Resources • A Resource is something you manage service, package, file, user, execute, git • Resources have actions start, install, create, deploy • Resources can notify of other resources cookbook_file “/etc/apache2/apache2.conf” do source “apache2.conf” owner “root” group “root” mode 0644 notifies :restart, “service[apache2]” endTuesday, September 25, 12
  41. 41. Providers • A Provider performs the actions specified by the resourceTuesday, September 25, 12
  42. 42. Providers • A Provider performs the actions specified by the resource • Each Resource can have multiple providers package: apt, yum, macports... service: upstart, windows, systemd...Tuesday, September 25, 12
  43. 43. Providers • A Provider performs the actions specified by the resource • Each Resource can have multiple providers package: apt, yum, macports... service: upstart, windows, systemd... • Each platform (OS) has default Providers that can be overridden package “sudo” do provider Chef::Provider::Package::Yum action :install endTuesday, September 25, 12
  44. 44. A basic recipe package “apache2” do action :install endTuesday, September 25, 12
  45. 45. A basic recipe package “apache2” do action :install end service “apache2” do action :enable endTuesday, September 25, 12
  46. 46. A basic recipe package “apache2” do action :install end service “apache2” do action :enable end cookbook_file “/etc/apache2/apache2.conf” do source “apache2.conf” owner “root” group “root” mode 0644 endTuesday, September 25, 12
  47. 47. A basic recipe package “apache2” do action :install end service “apache2” do action :enable end cookbook_file “/etc/apache2/apache2.conf” do source “apache2.conf” owner “root” group “root” mode 0644 end service “apache2” do action :start endTuesday, September 25, 12
  48. 48. A basic recipe package “apache2” do action :install end service “apache2” do action :enable supports [ :restart, :reload, :status ] end cookbook_file “/etc/apache2/apache2.conf” do source “apache2.conf” owner “root” group “root” mode 0644 notifies :restart, “service[apache2]” end service “apache2” do action :start endTuesday, September 25, 12
  49. 49. Nagios Demo • Download server cookbooks • Install server • Create fake nodes • Update serverTuesday, September 25, 12
  50. 50. Questions? There is lots more to learn about Chef at http://wiki.opscode.comTuesday, September 25, 12

×