7

I've used Python, Perl and Shell for systems administration. Wondering if anyone uses Ruby for systems administration? Any pluses/negatives? I know that this question is subjective and am interested in experiences. Thanks.

Paul
  • 337
  • 3
  • 11

5 Answers5

2

Puppet and Chef are two very popular configuration management tools, that are written in Ruby. I recon their use and popularity will spawn some use of Ruby in the sysadmin field. Python and Perl are so abundantly available however (and installed by default on most *nix flavors) that Ruby is be dwarfed by them. I expect that to be the case for the foreseeable future.

wzzrd
  • 10,269
  • 2
  • 32
  • 47
2

Ruby is an excellent language for sysadmin scripting. Rake is also a great tool for many sysadmin tasks.

I highly recommend the book "Everyday Scripting With Ruby". Also, check out the ruby PLEAC site for some great examples.

HTH!

Tom Purl

Tom Purl
  • 549
  • 1
  • 3
  • 13
1

Ruby is generally regarded as specially good for implementing domain specific languages.

One tool that uses this strength that comes to mind is Puppet, but I'm sure there are others:

http://en.wikipedia.org/wiki/Puppet_(software)

Me in particular - I don't use Ruby for sysadmin tasks directly, but I do use Puppet.

Eduardo Ivanec
  • 14,531
  • 1
  • 35
  • 42
1

As there are books on the topic, and even the IBM/AIX crowd has gotten into the game I would say there are plenty of people doing it. I haven't personally deployed many ruby scripts, but we have written a few service daemons with it, and it's a very nice language, with much of the power of Perl but fewer of the "Write Only" tendencies.

voretaq7
  • 79,345
  • 17
  • 128
  • 213
0

I started using Ruby back at version 1.45 when it wasn't included anywhere. One of the things that drove me to it was the incompatabilities between Perl 4 and Perl 5 - my environment included both but a particular script had to be debugged because of these incompatabilities, which ended up including a test for whether the interpreter was version 4 or version 5.

For me, Ruby was love at first sight: all the expressiveness of Perl and the object-oriented paradigm of Smalltalk. Ruby was also designed from the ground up to be easy to use, and to be easy for Perl programmers (and others) to switch to. Coming from a background that included both Perl and OOP, I found it easy to use.

Ruby has to be one of the only languages that had ease of use as a design goal.

I wrote quite a few system admin tools in Ruby; one of the biggest was a backup system that took an Oracle database, copied it cold to a backup directory on the database host, then coordinated with a backup server to copy the files and keep the last 7 days to a month of database backups (not to mention, all of these - local directory and backup host files - were backed up to tape!).

Mei
  • 4,560
  • 8
  • 44
  • 53