Share
Embed
Transcript
40 slides
-
Alternate Titles • “Operations Eye for the Dev Person” •
“Operations 101” • “Everything you want to know about Ops but were afraid to ask” • “Foreign Exchange for make benefit of glorious Nation of Operations” • “Care and Feeding of your Ops team” • “Ops is from Venus, Development is from Mars” -
But first a word from our “sponsors” • Hosted or
On-premise cloud management • Abstracts all the Things • Governance • You should ask me about it -
Who the hell am I? • @lusis every-effing-where • Atlanta
Native • DevOps-y kind of guy • Does Ruby (most of the time) • Does Python (other times) • Does Java (well, once like 2 days ago) • #monitoringsucks • Hate Driven Development -
@shitallspawsays “If you care at all about these things, you're
doing Ops” • Metrics collection • PaaS/IaaS evaluation/investigation • Automation (auto-build, auto-recovery) • Fault tolerance • Availability • Monitoring • Performance • Capex and Opex forecasting • Outage response -
@shitallspawsays “If you care at all about these things, you're
doing Ops” • Metrics collection • PaaS/IaaS evaluation/investigation • Automation (auto-build, auto-recovery) • Fault tolerance • Availability • Monitoring • Performance • Capex and Opex forecasting • Outage response -
What is “The Metric” “an analytical measurement intended to quantify
the state of a system” - W. I. Pedia -
Does this look familiar? Started GET "/" for 127.0.0.1 at
2012-03-10 14:28:14 +0100 Processing by HomeController#index as HTML Rendered text template within layouts/application (0.0ms) Rendered layouts/_assets.html.erb (2.0ms) Rendered layouts/_top.html.erb (2.6ms) Rendered layouts/_about.html.erb (0.3ms) Rendered layouts/_google_analytics.html.erb (0.4ms) Completed 200 OK in 79ms (Views: 78.8ms | ActiveRecord: 0.0ms) -
Does this look familiar? Started GET "/" for 127.0.0.1 at
2012-03-10 14:28:14 +0100 Processing by HomeController#index as HTML Rendered text template within layouts/application (0.0ms) Rendered layouts/_assets.html.erb (2.0ms) Rendered layouts/_top.html.erb (2.6ms) Rendered layouts/_about.html.erb (0.3ms) Rendered layouts/_google_analytics.html.erb (0.4ms) Completed 200 OK in 79ms (Views: 78.8ms | ActiveRecord: 0.0ms) -
So that's great for humans but • what if you
want to do this? -
Well you could.... • grep ms | awk | sed
| grep | sort | cry • Performant? • Realistic? • Scalable? • Do you seriously want to do this? -
What about Business Metrics? • Failed Logins • Shopping Cart
Abandon Rates • New Account creations • <insert shit the business cares about here> -
What about Business Metrics? • Failed Logins • Shopping Cart
Abandon Rates • New Account creations • <insert shit the business cares about here> AND DID ANY OF IT GET BETTER OR WORSE WITH A NEW CODE RELEASE? -
Baking operations into your code (easy) • Visibility – Implement
a “ping” page • Low-impact • Exercise the full stack (call DB, perform some safe action, Easy to Parse, Easy to Check) • Please don't expect folks to robot a login session -
Baking operations into your code (awesome) • Visibility – Push
Metrics • StatsD + Graphite (DIY) • Librato, New Relic (aaS) • Read this - http://codeascraft.etsy.com/2011/02/15/measure-an • Watch This - http://pivotallabs.com/talks/139-metrics-metrics-e • Try This - https://github.com/johnewart/ruby-metrics -
Remember This? Started GET "/" for 127.0.0.1 at 2012-03-10 14:28:14
+0100 Processing by HomeController#index as HTML Rendered text template within layouts/application (0.0ms) Rendered layouts/_assets.html.erb (2.0ms) Rendered layouts/_top.html.erb (2.6ms) Rendered layouts/_about.html.erb (0.3ms) Rendered layouts/_google_analytics.html.erb (0.4ms) Completed 200 OK in 79ms (Views: 78.8ms | ActiveRecord: 0.0ms) -
Logstash • Started by @jordansissel and @fetep ~2004 • Inputs
→ Filters → Outputs • Jruby (and increasingly better YARV support) • UNIX pipe with Radioactive Super Powers -
Remember This? Started GET "/" for 127.0.0.1 at 2012-03-10 14:28:14
+0100 Processing by HomeController#index as HTML Rendered text template within layouts/application (0.0ms) Rendered layouts/_assets.html.erb (2.0ms) Rendered layouts/_top.html.erb (2.6ms) Rendered layouts/_about.html.erb (0.3ms) Rendered layouts/_google_analytics.html.erb (0.4ms) Completed 200 OK in 79ms (Views: 78.8ms | ActiveRecord: 0.0ms) -
Remember This? Started GET "/" for 127.0.0.1 at 2012-03-10 14:28:14
+0100 Processing by HomeController#index as HTML Rendered text template within layouts/application (0.0ms) Rendered layouts/_assets.html.erb (2.0ms) Rendered layouts/_top.html.erb (2.6ms) Rendered layouts/_about.html.erb (0.3ms) Rendered layouts/_google_analytics.html.erb (0.4ms) Completed 200 OK in 79ms (Views: 78.8ms | ActiveRecord: 0.0ms) -
Lookie here GET /jobs/833552.json format=json action=jobs#show status=200 duration=58.33 view=40.43 db=15.26
• yes that's a single line! • No more multiline • No more awkward parsing -
Logs need to be readable by humans AND machines •
Single lines are better • JSON is readable by humans and Machines • Every language has JSON support -
Baking operations into your code • Take little effort •
Has great value • Makes everyone happy • Don't forget the non-functional requirements (The “ilities”) • Stop inventing Timestamp formats (ISO8601 is a thing) • Turn Kittens into PopTarts -
Ops AMA time! • Packaging? Artifacts? - FPM • Monitoring?
- Nagios, Sensu, Riemann • Logging? - Loggly, Papertrail, Logstash (woot), Graylog2 • Alerting? - Pagerduty