Dev ops

1,615 views

Published on

DevOps intro, Puppet intro, Monitoring/metrics/logging

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,615
On SlideShare
0
From Embeds
0
Number of Embeds
24
Actions
Shares
0
Downloads
77
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Dev ops

  1. 1. DevOps IntroductionOps job is NOT to keep the site stable and fast  Ops job is to enable the business (this is devs job too)
  2. 2. Who am i ?Systems Administrator @ DevOpsInfrastructure as a code ”Puppet”Cloud Computing…          @EslamElHusseiny
  3. 3. Dev or Ops ? 6 days after a successful deployment, server experiences troubles ”high load, resources leak” 
  4. 4. Dev or Ops ?There is an issue with build server. Code isnt building.
  5. 5. Dev or Ops ?Software is deployed to the test environment. You cant login to application.
  6. 6. Dev vs. Ops
  7. 7. Dev says ...
  8. 8. Ops replies ...”Its not my server, its your code”
  9. 9. Role of Devs and Ops
  10. 10. Role of Devs and OpsDev Create changes Add  / modify featuresOps Maintain stability Create / enhance services
  11. 11. Role of Devs and OpsDev Create changes Add  / modify featuresOps Maintain stability Create / enhance services
  12. 12. So ?The problem  Disconnect between groups Devs dont deploy consistent software Ops motivated to resist changes Devolpment process is Agile Operations process is Static
  13. 13. Our GoalWe are all here to ENABLE business
  14. 14. changeIs required for businessDoesnt mean outageShould be exploited and not fearedShouldnt mean fire fighting
  15. 15. RescueDevOps To The Rescue !
  16. 16. What is DevOps then ?”DevOps is an approach to bridge the gap between  agile software development and operations” ­  agileweboperations.comCollaborative mindset of Devs and OpsC.A.M.S
  17. 17. Culture
  18. 18. CultureRelationships Engage early, engage often Be open Eradicate ”last­mile syndrome”
  19. 19. CultureCommunication Talk is cheap (get out of your chair) Involve each other in core proccesses and decisions Ask Questions  Dont say ”No”
  20. 20. Automation
  21. 21. AutomationWhat ca be automated ? Builds  Deployments Testing Monitoring Self­healing System configuration
  22. 22. Metrics
  23. 23. MetricsCapture, learn, improve.Assist in: Capacity planning  Trend analysis Fault finding
  24. 24. Metrics
  25. 25. Sharing
  26. 26. SharingShare ideasShare metricsOps : Give devs shell accessDevs : see what technology ca be leveraged
  27. 27. DevOps life cycle
  28. 28. BeforeTalk about functional requirementsTalk about non­functional requirements Security  Backups  Availability  Upgradeability  Configuration management  Monitoring / Metrics  Logging 
  29. 29. DuringCommunicationSource controlAutomate buildsAutomate testsAutomate deployments (Dev, Test, and Prod)Collate App and System metrics
  30. 30. AfterRelease  Continue to run tests Monitor application and systemIssues (might happen) Post meetings
  31. 31. What are we doing ?
  32. 32. Puppet
  33. 33. PuppetConfiguration management toolOpen Source Infrastructure as a code
  34. 34. Puppet
  35. 35. Puppet
  36. 36. node default { include ssh include sudo include ntp}node product.dev inherits default { include nginx include tomcat5}node product.test inherits default{ include nginx include tomcat6}
  37. 37. class sudo { package {sudo: ensure => latest, } file {/etc/sudoers: owner => root, group => root, mode => 0440, source => puppet:///files/sudo/sudoers, require => Package[sudo], }}
  38. 38. Puppet
  39. 39. Lets get hands on Its deploymnt time
  40. 40. Monitoring
  41. 41. Monitoring
  42. 42. Problem ?No one noticedNo one got alertedNo automatic recovery
  43. 43. Probelm ?what is your application doing right now?do you know when it fails?failure means customers lose trustfailure means customers go elsewherefailure means you lose moneyapplication = providing value
  44. 44. SolutionMonitoringMetricsLogging
  45. 45. Monitoring means Is the application available?
  46. 46. Examples
  47. 47. Monitoring is this service currently providing value?is this service consuming too many resources?
  48. 48. Examples
  49. 49. Monitcheck process unicorn  with pidfile /var/run/unicorn/unicorn.pid  start program = "/etc/init.d/unicorn start"  stop program = "/etc/init.d/unicorn stop"  if mem is greater than 300.0 MB for 1 cycles then  restart  if cpu is greater than 50% for 2 cycles then alert  if cpu is greater than 80% for 3 cycles then restart  group unicorn
  50. 50. Metricsmeasurementshistorical datagraphs
  51. 51. Metrics how many customers are on my site?how many customers were on my site yesterday?
  52. 52. Metrics how slow is paypals api?how slow was paypals api yesterday?
  53. 53. Metrics how much memory is available on my servers?how much has memory usage grown over four weeks?
  54. 54. Metricsnumber of open database connections number of redis commands number of 500 errors rate of HTTP requests number of HTTP connections
  55. 55. Metrics median response time number of failed resque jobs number of twitter followers99th percentile github api response time 95th percentile mysql query time
  56. 56. Examples
  57. 57. Munin
  58. 58. Graphite
  59. 59. Metrics as a service
  60. 60. Logging
  61. 61. Logstash log inputs process outputs
  62. 62. Graylog2
  63. 63. Graylog2
  64. 64. Summary own your monitoring own your metrics own your loggingnone of them is optional

×