~/talk

Why is configuration management software written in Ruby?

Talkat Ruby on Ales 2011 · 2011-03-24..03-25· [ruby, devops-and-delivery]
slides:none on file

Puppet, Chef, Capistrano, Rake and MCollective are examined for concrete patterns: Ruby wins for autoloading behavior and blocks, gems and Unix APIs; Puppet’s autoloading and extensive, syslog-tagged logging actually work; Chef’s external-Ruby resources give clearer scoping than Puppet’s internal DSL drawback; Rake and Capistrano show dependency graphs and parallel failure handling; MCollective demonstrates a scalable message-bus fleet execution. Emphasized practices: idempotence, explicit requires and namespacing so small composable tools can be extracted and reused.

AI-written summary · about

  1. 0:00Start
  2. 0:23Why is configuration management software written in Ruby?
  3. 1:19Ruby won out over Python and Perl. The autoloader is the frequently cited reason.
  4. 1:39Puppet autoloader glob for source files. Each one registers itself using an internal DSL.
  5. 3:07Internal DSLs These are questions I shouldn't have to ask: Can I define classes, modules, and/or methods in this scope? What is the fully-qualified name of a constant defined in this scope? Can I return in this scope?
  6. 4:51Seriously, WTF? puppet agent --verbose --debug --trace
  7. 5:02Puppet logging Uses syslog-appropriate levels. Color-coded if logging to a TTY.
  8. 5:41Chef versus Puppet This is not a religious war Functionally similar Philisophically different
  9. 8:13Despite their differences, Puppet and Chef both codify common systems administration tasks That sounds like how people used to use Perl.
  10. 8:29First-class regular expressions like Perl. Backtick operator like Perl and shell. Relaxed parentheses like Perl.
  11. 9:10RubyGems == CPAN No release management or feature freezes. Double-edged sword.
  12. 9:37RubyGems for people on-call Regression testing. Semantic versioning. Slow-and-steady release cycle.
  13. 10:53Ruby Gems for people on-call Stability first No one wants to depend on a moving target.
  14. 11:48Dependency programming Start with a goal. Satisfy its prerequisites first, recursively. If a prerequisite cannot be satisfied, abort.
  15. 12:23Rake Intended for interactive use. Logging isn't as necessary with fail-fast execution.
  16. 12:41Capistrano ssh-in-a-for-loop meets Rake Dependency-oriented but works on multiple hosts in parallel.
  17. 14:40The Marionette Collective General systems administration gone framework.
  18. 15:55From middleware to MCollective Everything starts life as a "script."
  19. 17:19Principle of least surprise. Namespaces. Look for generic solutions. Not too hard, though.
  20. 18:21Data structures programs versus UNIX programs
  21. 18:40UNIX programs Filesystem manipulation. System calls via GNU coreutils.
  22. 19:09Data structures programs Need more than POSIX shell's scalar variables. Need more than Bash's one-dimensional indexed and associative arrays.
  23. 21:01Composable Ruby, too It's still a UNIX system.
  24. 22:43Explicit is better than implicit (Says The Zen of Python.)
  25. 24:03Patterns, anti-patterns, and philosophies
  26. 24:15External DSLs Brevity is a virtue. Require developer restraint.
  27. 24:49Anti-pattern Internal DSLs Obscure the Ruby Ruby scope.
  28. 26:23Philosophy Explicit is better than implicit Reduces coupling. Provides context Promotes reuse.
  29. 26:49Philosophy Look for generic solutions Not too hard, though. Strive to remove special cases.
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.