Your SlideShare is downloading. ×
Ruby new wheels_condensed
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Ruby new wheels_condensed

347
views

Published on


0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
347
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Leveraging
Ruby
For
System
Administration

  • 2.   10%
System
Administrator
   ??%
“dev‐ops”
   Pure
Developers
   Minimal
take
away

  • 3. Scripting
Languages
(read:
interpreted)
   Perl
   Python
   PHP
   Ruby
 Interpreted
is
the
competition
here.
   Can
anyone
else
compete?

  • 4.   “Instant
gratification”
programming
   Speed
to
implement
   Object
oriented
   Readability
   Maintainability
   Open
convention
   puts "hello world"   puts("hello world");
  • 5. Consider
this:
   Inconceivable!
   Right
tool
for
the
job
   Memory
requirements
   Performance
   Windows

  • 6.   1.8.6
   Most
common
   Most
help
available
   1.8.7
   The
WindowsME
of
Ruby
   Some
1.9
features
if
you’re
not
ready
for
1.9
   1.9.x
   New
kid
on
the
block
   Lots
of
traction
   Vastly
improved
performance

  • 7.   Why
do
we
write
shell
scripts?
   sed/awk
and
their
friends...
   Ruby
goes
above
and
beyond
“pipe‐fitting”
   Glue,
huh,
wazzat?
   Iterative
scripting
   SCM’s
are
your
friend
   Ahh,
I
“git”
it

  • 8.   Ruby
apps
   God
–
Monitoring
   Capistrano
–
Application
Deployment
   Chef/Puppet
–
System
Configuration
   Homebrew
–
OS
X
Package
Manager
   Moonshine
–
for
the
curious,
is
a
Rails
deployment
 tool
that
leverages
Capistrano
and
Puppet
   Roll
Your
OwnTM

  • 9.   Non‐Ruby
apps
   Plug‐ins
   More
glue

  • 10.   Grep‐fu
   http://github.com/Calamitous/grep‐fu

  • 11.   Here’s
grep‐fu…
un‐fu’d
 find ./ -path '*/.svn' -prune -o -path '*/.git' -prune -o -path '*/vendor' -prune -o -path '*/log' -prune -o -path '*/public' -prune -o -path '*/tmp' -prune -o -path '*/coverage' -prune -o ( -size -100000c -type f ) -print0 | xargs -0 grep -ril "fu"
  • 12. #!/usr/bin/env ruby # Thanks for more awesomesauce Eric Budd! VALID_USERS = { 'ebudd' => 'Eric Budd', 'sdate' => 'Shashank Date', 'lpillow' => 'Luke Pillow’, 'smoon' => 'Scotty Moon', 'cdumler' => 'Chad Dumler-Montplaisir', } invalid_names = [] ARGV.each{ |u| invalid_names << u unless VALID_USERS[u] } if invalid_names.any? puts "Didn't recognize requested user(s) '#{invalid_names.join(', ')}'. User should be one of #{VALID_USERS.keys.join(', ')}." exit(0) end names = ARGV.map{ |u| VALID_USERS[u] }.join(' & ') emails = ARGV.map{ |u| "#{u}@zavenetworks.com" }.join(' & ') `git config --global user.name "#{names}"` `git config --global user.email "#{emails}"`
  • 13.   Ruby
   Capistrano
(deployment)
   New
Relic
(monitoring/analysis)
   Nokogiri
(XML/HTML
parsing)
   FasterCSV
   pl_analyzer
‐>
request_log_analyzer
   Lots
Of
Custom
Ruby
scripts
 ▪  Jabber,
system
startup,
reporting,
mail
parsing

  • 14.   Non‐Ruby
   Monit
‐>
Nagios
(alerting/monitoring)
   Munin
(trending)
   bash/sed/awk
   Tsung
(load
testing)
   Vi

  • 15.   Grand
   Unified
   Ruby
   Solution
   For
   System
   Administration

  • 16.   Is
there
a
way
to
unify
all
of
this
mess?
   Would
you
really
want
to?
   Can
you
have
the
best
of
both
worlds?

  • 17. Just
wanted
to
give
a
shout
 http://spkr8.com/t/3764
 out
to
God,
my
family,
 osake.wordpress.com
 Ruby
Midwest
organizers
 osake.posterous.com
 and
you
guys!
 @osake