Book Review: Practical Ruby for System Administration

book sleeve for Practical Ruby for System AdministrationIf you’ve encountered Ruby primarily through Rails and know it chiefly as an elegant tool for writing web applications it’s easy to miss its longer history as a tool for systems administration. Before Rails made Ruby the language-du-jour sysadmins bore much of the responsibility for keeping it alive, with the result that it has a suite of libraries helpful for server monitoring and a range of other administrative tasks.

Author AndrĂ© Ben Hamou is clear that his book is not an exhaustive guide to using Ruby for systems administration. Rather than try to cover every possible context he provides an introduction to the language and some of its key libraries intended to give a feel for how it might be used and why it leads to succinct and expressive solutions. A number of the more important libraries for working with network protocols and files are covered, and there’s a good introduction to rubygems and how they can be used and created.

Having not done much work with Ruby on the command line I found the first couple of chapters, which cover command-line switches that can help with one-liners for file processing, particularly informative, though I suspect I’ll be referring back to them for a while until the different options take hold. As with the book as a whole those chapters are clear and to-the-point, helped by a presumption that the reader has a good understanding of the problem space and some experience with using scripting languages to simplify their life.

Don’t go into this book expecting to come away ready to work as a sysadmin. That’s not its intention. Nor is it a comprehensive guide to ruby, and you’ll probably still want a good language reference to go with it. But it provides a number of helpful hints and a good sense of how robust scripts can be built quickly and simply with ruby, and there are likely to be a few helpful tricks for most readers.

Disclaimer: I was sent a copy of this book for review by the publisher. You can find it at apress, amazon US, amazon UK and all sorts of other places.

Tags: , , , ,

1 comment

  1. Hello, I am an occasional ruby user and a Systems Administrator. I had high hopes for this book, however I can sum up my review (FWIW) in one word:

    DISAPPOINTING !!

    Yes, that is right. No one expects you to teach us systems administration, and only a doofus would buy this book to learn about Ruby.

    The audience, as misleading implied by the title, is system administrations and developers who would like to use Ruby for more than just development tasks.

    It is a great travesty that this book has been written, thus filling a niche which will cause others to not publish a proper book on the use of Ruby vis-a-viz systems administration tasks.

    We need a Ruby book which helps systems administrators with sysadmin tasks, which include, but are not limited to:

    1. File management
    2. User/Account/Disk management
    3. Password sync and environment refreshes from Production to Dev environments
    4. automation of daily admin and (also DBA tasks)

    These types of things are SHAMEFULLY missing from this book which claims to be on that very subject.

    Sorry. This gets a BIG F.A.I.L from me.