Automating Unix and Linux Administration 167
Automating Unix and Linux Administration | |
author | Kirk Bauer |
pages | 547 |
publisher | Apress Inc. |
rating | 8.0 |
reviewer | Nick Downey |
ISBN | 1590592123 |
summary | Tools and methods for automating *nix administration for a couple (or a few thousand) computers. |
From the outset, Bauer takes a straightforward and principled approach to problem analysis. Usually starting with anecdotal example scenarios (many of which will have you saying "been there before") and progressing through ideals, goals and consequences, he examines many of the common issues facing system administrators with candor and realism. Almost nowhere in the book does the author assume an authoritarian stance; he questions his own decision making process and encourages the reader to come up with exceptions to his rules. Fundamentally Bauer has one goal -- to develop a comprehensive system for reliably automating the tedious but important tasks that all system administrators face on a recurring basis.
Admittedly, it would be a fallacy for any book to claim complete and comprehensive coverage of all things related to system administration and Bauer does no such thing. When the author touches on topics that obviously require more depth than a single chapter can afford, he is certain to include at least one reference (and in many instances more) to alternate publications without bias to any particular publisher or author. Having said that, the book's scope and depth of topic coverage is impressive. Starting with an exhaustive examination of SSH and progressing through cfengine, NFS, LDAP, RPM and Tripwire (just to name a few) Bauer provides carefully detailed instruction on how to automate tasks ranging from simple network management and software packaging to security, monitoring and backups. The author even goes so far as to suggest methods for efficiently front-ending automation systems for the less technical of users.
Although not expressly stated in the text, the overall theme of the book is walk on the shoulders of giants. Starting with simple example scripts (in both Bash and Perl) and many single-line commands, Bauer builds on the content of each previous chapter as the book progresses. Examples shown in early chapters are incorporated into more complex systems one step at a time. Following along is easy, each script or command is detailed on a line-by-line basis, and because of Bauer's principle-based approach the reader is rarely left wondering why the author has chosen a particular tool or implementation. More often than not the elegance of how Bauer pieces together methods and procedures will excite you about the possibilities for automation of your own systems.
Although Bauer explicitly states that readers are presumed to have more than a modicum of experience in system administration, even the novice administrator, as well as those that are responsible for only a handful of machines, will find this book invaluable. Also included are three appendices which provide an easy introduction to basic shell tools, creating your own RedHat distribution and how to package software as RPMs. These portions of the book alone justify the less than $40 price tag, but for those who run clusters or data centers, this book stands to save you countless hours of repetitive headaches. Published by apress and boasting nearly 600 pages, this lively read has made itself a permanent addition to at least one reference library.
You can purchase Automating Unix and Linux Administration from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
Re:Amazon Link (Score:2)
(From the link you posted): Boycott Amazon!
Why would I want to? It has given me great service for many years, should I care if they fill in stupid patents? I'd rather they didn't, but it won't stop me shopping there.
Re:Amazon Link (Score:1)
Re:Amazon Link (Score:1)
Smae thing here. They are the first I turn to when there's something I'm looking for. I was also first in line for an Admin gig with them a few years back (the Delaware office). The only reason I didn't take the gig was I had my Son's birth pending not a month after they wanted me to start (their hours are a bit... weird... and don't really fit in well with a brand new parent's schedule...).
I don't get why so many people are so down o
Re:Amazon Link (Score:1)
My question to you is: why are you so obsessed with Amazon? Is it really that hard for your GNU-soul to accept that companies make products fundamentally to make money - not to "serve the public" or whatever.
If you have a complaint, direct it at the USPTO - not to a company who's just using the legal loophole.
Re:Amazon Link (Score:3)
My question to you is: why are you so obsessed with Amazon? Is it really that hard for your GNU-soul to accept that companies make products fundamentally to make money - not to "serve the public" or whatever.
If you have a complaint, direct it at the USPTO - not to a company who's just using the legal loophole.
I couldn't have put it better myself.
Re:Amazon Link (Score:2)
I couldn't have put it better myself.
Re:Amazon Link (Score:2)
I couldn't have put it better myself.
I couldn't have put it better myself.
Re:Amazon Link (Score:2)
The idea is that if enough people become aware of how bad software patents are, they can use their right as consumers to choose, and make an impression on the companies who are trying to win their favor.
Democracy works a lot better when people educate themselves about things, and I think that the parent w
Re:Amazon Link (Score:1)
Who has more patents, Amazon or IBM?
Who are we supporting this week, Amazon or IBM?
Non-Referral Amazon Link (Score:2)
here
I wish you would stop posting amazon links to make referral money. It's not like you're actually contributing anything to the discussion of the book. you're just abusing the fact you got to post early on a book review.
I'll tell you why: (Score:2)
Then he can post an Amazon link and get it clicked on like all the links in all his other posts. The effect is further amplified as it's highly visible, near the top as he's posting at +2 because of said karma-whoring.
Basically, it's because it's Sir Haxalot doing it, and he's taking adva
Re:I'll tell you why: (Score:1)
Then he can post an Amazon link and get it clicked on like all the links in all his other posts. The effect is further amplified as it's highly visible, near the top as he's posting at +2 because of said karma-whoring.
Basically, it's because it's Sir Haxalot doing it, and he's taking ad
Re:$5 cheaper and free shipping (Score:2)
are now out of stock. Must be the
Re:$5 cheaper and free shipping (Score:1)
Re:$5 cheaper and free shipping (Score:1)
If you have a complaint against the USPTO, get to the source. Don't whine about the companies who just take advantage of the existing loopholes like any company would.
Re:$5 cheaper and free shipping (Score:1)
If you spot a loophole in a law, it's perfectly OK to take advantage of it until it's closed.
Re:$5 cheaper and free shipping (Score:1)
Re:$5 cheaper and free shipping (Score:1)
Re:$5 cheaper and free shipping (Score:1)
Jury nullifcation isn't the same as a loophole.
A loophole is a technically valid interpretation of the law.
Jury nullification is just ignoring an inconvienent law.
Re:Alternative Review (Score:2)
That's not a review, that's the book description off Amazon. A description isn't a review, especially when it looks like it was written by the publisher. (The description was presumably written before the book's release, thus explaining the cryptic references to what the book will do instead of what the book does.)
Furthermore, why copy something instead of just linking to the original [amazon.com]?
Re:Alternative Review (Score:1)
This is right up there with that fucker that rewords the same paragraph and FPs it on every review. Haven't seen that yet this round.
Book reviews on slashdot (Score:4, Insightful)
Have book reviews on slashdot become about who can get the earliest links to their amazon.com partner site?
This books looks interesting (to me) and I might actually take a trip to the book store to check it out. But the comments (so far) aren't about the book.
Re:Book reviews on slashdot (Score:2)
No - it's about mis-representing a advertisement for Barnes & Noble as 'news' instead of as a paid commercial.
& to add to that... (Score:1)
... but, this is slashdot ... (Score:1)
But the comments (so far) aren't about the book.
This is slashdot. Nobody reads the articles before posting. Do you really expect them to read a whole BOOK before posting?
;)
puncuation nazi (Score:2)
i'd think this book is about working for dummies....instead of "Making Management Think You're Actually Working, for Dummies"
unless you really do mean "working for Dummies", in which case, if you make management think that...you might not be working for the dummies anymore.
Re:puncuation nazi (Score:2)
Another goodie in this area (Score:3, Informative)
Perl for System Administration [amazon.com].
Re:Another goodie in this area (Score:1)
A lot of the concepts are still very relevant, even if the implementation details have changed some. Any competent admin could pick it up, glean the new ideas and implement them in whatever form is comfortable.
Just wait until YOU have a mortgage, jr! (Score:4, Funny)
Re:Just wait until YOU have a mortgage, jr! (Score:1)
Lazy ? (Score:1)
Here's how I learned it (Score:5, Insightful)
2. Do everything by hand
3. Fuck up once too often
4. Decide that automating is necessary
Don't know about the rest of you.
Re:Here's how I learned it (Score:1)
5. Screw up the automation process
6. Restore from tape
7. Scramble for two months of data
8. Debug scripts
Moral of the story boys and girls, If you're an idiot, buy a book!
Re:Here's how I learned it (Score:4, Funny)
2. Decide that this task could be replaced by a
shell script.
3. Spend the afternoon perfecting and documenting
the 400 shell/perl/expect/... script so that I
can save 30 seconds a day for the next few
months.
4. Find a better solution on sourceforge
Little rants.. (Score:3, Interesting)
Re:Little rants.. (Score:1)
Ha! (Score:2)
Humour beyond Beowulf cluser "jokes" is wasted on this site.
Re:Little rants.. (Score:1)
Autocrash (Score:3, Insightful)
Re:Autocrash (Score:2)
Books such as this one (and others, both about administration and tools, such as "Perl for System Administration", and about the unix tools themselves, such as "Mastering
Re:Autocrash (Score:5, Insightful)
Patching
Fixing user passwords (unless you have a help desk)
Working on upgrades and installs.
Planning for future growth
Work on your disaster recovery plan
Possible Machine Room moves
etc
etc
Sysadmins do more then watch over a system. We need to realize that automation is NOT a panacea, but yet another tool in the sysadmin bag. Besides....if everything was supposed to be done by hand why was cron created??
I bought the book (Score:5, Interesting)
Definitely not for the newbie system administrator (nor does it pretend to be). But it is a great resource if you're looking to administer more boxes with less bodies.
Re:I bought the book (Score:1)
Well, duh... You've got to know how to do something before you can automate it, right?
Unix/Linux ratio?? (Score:3, Insightful)
I'd like to think that most of this stuff is fairly transportable, but when I hear about "bash scripts," I wonder if it's the reviewer or the book that's pushing Linux-centricisms. (and yes, I know that bash is available everywhere, blah blah blah. It still doesn't make it a valid replacement for
Re:Unix/Linux ratio?? (Score:2, Informative)
Re:Unix/Linux ratio?? (Score:2, Interesting)
On my FreeBSD boxes I just use 'make package' off of the box that keeps the source tree in sync. Then uses rsync to push them to the other servers where cron picks up the updates and installs them. I could just as easily replace that with
Re:Unix/Linux ratio?? (Score:3, Interesting)
Very little of the book is only applicable to Linux, and even less is only appicable to Red Hat Linux. Basically, one appendix is on Red Hat Linux. RPM is covered more than other package managers (but RPM is also the most common package manager to use across different Unix variants). Solaris patches are also covered to some degree. Everything else is pretty generic.
Re:Unix/Linux ratio?? (Score:4, Informative)
The book is aimed towards all Unix variants (as is Cfengine, which is a big part of the book). But I prefer Linux and use Linux for many of the examples... but all that usually means is it begins with #!/bin/bash at the top instead of #!/usr/local/bin/bash or #!/bin/sh.
One appendix is on RPMs (which is used on other systems besides Linux) and another is on Red Hat Linux specifically.
Re:Unix/Linux ratio?? (Score:2)
I have yet to encounter a Unix platform that bash wouldn't run on. I also have yet to encounter one that I didn't choose to install bash on anyway. So bash scripts are perfectly transportable.
I'd say that bash has certainly been around long enough to be considered standard issue.
Re:Unix/Linux ratio?? (Score:1)
Re:Unix/Linux ratio?? (Score:2)
Its not really a question of if it runs on it, its a question of if its installed.
Since the book is for admins, presumably if they want it, it will be installed! I have seen csh and ksh more often than tcsh (until recently that is). In the end, you just have to pick one and be sure it's available for all or at least most platforms. I can't really think of any complete combination of tools that is guaranteed to be installed on any Unix platform, especially if you count platforms where the tool exists but
Re:Unix/Linux ratio?? (Score:1)
But, if for some reason you don't want to use bash, none of the examples are so complicated that they couldn't be converted to any other language.
Nothing new here (Score:4, Interesting)
Re:Nothing new here (Score:1)
OT: Does anyone actually like Disk Druid? If you do, did you use it only for a single-boot box without a pre-existing installation of any other OS?
Disk Druid Verses fdisk (Score:1)
Likewise, when they switched to grub, I was whizzed. I spent all this time learning lilo, just to have grub dropped on me, which I have gotten used to and now prefer :)
I have no intention of "getting used to" disk druid though, as long as fdisk is still around, I'll use that.
Re:Nothing new here (Score:2)
> windmills: not only are they here to stay, there
> will be more of them. Too many people like them.
I'm not arguing against them. I'm simply arguing that they tend to get in the way of admins learning to use the full power of a Unix system.
> However, I don't understand why the fuzzy widget
> systems need to be so incompatible with the old
> ways.
They aren't necessarily incompatible. However, most Unix GUI config tools do a very poor job of doin
Use Knoppix. No maintenace, no problem. (Score:2)
Yeah, you need to make a few little scripts to automate your rebuilding process, but once you've done that it's about as maintenance free as you can possibly imagine.
Of course a
Re:Use Knoppix. No maintenace, no problem. (Score:1, Troll)
If RPM weren't such a mess ... (Score:1, Troll)
If RPM weren't such a mess, it might be more convenient to make RPMs of the packages you build from source but want to install the same exact binary on all the other machines. I just make Slackware style tarballs, so it's real easy; no spec file needed.
Re:If RPM weren't such a mess ... (Score:1)
It is a user-hostile, old-skool *nix horror, but it's a hell of an improvement on HP-UX's dreaded "depot" system.
Re:If RPM weren't such a mess ... (Score:1)
Which is why I don't use it. I compile all the critical software, and a lot of other software, on my systems from the original source. Some packages even have local source mods (patches). The reason to use a binary packaging system in this case is that it forms a convenient way to compile once, and install on many systems. Unless doing a source compile on each machine, this ensures each machine has a checksum verifiable identical copy of every file. I don't need the dependency tracking for the purpose
Re:If RPM weren't such a mess ... (Score:1)
Re:If RPM weren't such a mess ... (Score:1)
RPM is not the only packaging system to do that. Debian, Slackware, and Solaris have their own packaging systems that do it. Been there, done that (at least with the latter two).
just what I need right now, another Book! (Score:1)
i get most of my stuff from reading periodicals while sipping chai at Borders. and websites like the Linux Documentation Project.
http://www.tldp.org
Re:just what I need right now, another Book! (Score:1)
while sipping chai at Borders
and you're concerned about wasting money on a book?
fathers & mothers (Score:1, Funny)
and necessity is the mother of invention, does this mean laziness and necessity get together and have nasty sex before inventing something
entire contents of the book: (Score:4, Funny)
Re:entire contents of the book: (Score:1)
CRON(8)
NAME
cron - daemon to execute scheduled commands (Vixie Cron)
SYNOPSIS
cron
DESCRIPTION
Cron should be started from
Cron searches
Re:entire contents of the book: (Score:3, Funny)
Re:entire contents of the book: (Score:1)
Re:entire contents of the book: (Score:2)
automation is easy... (Score:3, Funny)
"Brian, go overto server X and do such-and-such"
Re:automation is easy... (Score:2)
brian@X: such-and-such
-bash: such-and-such: command not found
Man, I feel sorry for Brian, he must spend so much of the day being confused..
Multiple Machines (Score:5, Interesting)
On solaris, we run a script called "shout" that does a for/next loop that ssh's into each box and runs a command for us. We also have one called "Scream" which does some root privilege ssh enabled commands.
Nortel has a nice program called CLIManager (use to be called CLImax), that allows you telnet into multiple passports and run commands. Same idea, but the program formats data to display. Say you wanted to display "ipconfig" on 50 machines, this would format it, so you have columns of data, easy to read and put in reports.
Also, has a "Watch" command that will repeat a command, and format the data. Say you want to display counters.
I have not seen an opensource program that does the same as "CliManager" but its has to be one of the best idea's that should be implemented in opensource. Basically, it logs into multiple machines, parses and displays data, and outputs all errors on another window to keep your main screen clean.
Think of logging into 10 machines, and doing a tail -f on an active log file. Then the program would parse the data, display it in a table, and all updates would be highlighted.
I havnt spoken to the author of CliManager, but I guess he also hated logging into multiple machines, and running the same command. This program has been updated over the years, and is now the standard interface to the nodes. It just uses telnet and a command line, but you can log into 100's of nodes at once.
Wish I could post pics and the tgz file, maybe someone from Nortel can comment. (Runs on Solaris, NT and linux)
Re:Multiple Machines (Score:2)
thank heck the final word wasn't one beginning with "T"....
Re:Multiple Machines (Score:2)
> to be called CLImax), that allows you telnet into
> multiple passports and run commands.
Fermilab has available a tool called rgang that does (minus the output formatting) something like this:
http://fermitools.fnal.gov/abstracts/rgang/abst r ac t.html
We use it regularily on a cluster of 176 machines. It's biggest flaw is it tends to hang when one of the machines it encounters is down.
But it is free so I won't complain.
Multiple Machines in Parallel (Score:1)
While the serial approach of looping through machines is a huge improvement over making changes by hand, for large scale environments, you need to use a parallel approach,
Re:Multiple Machines (Score:2)
Generate ssh key file.
Put pub key file in $HOME/.ssh/authorized_keys2 on the remote machines.
Have a text file with a list of all the names the machines resolve to.
for i in `cat machinelist.txt`; do echo "running blah on $i"; ssh user@$i 'some command I want to run on all machines'; echo " "; done
It comes in handy for stuff like checking the mail queues or doing a tail -50 on a log file. Mundane stuff like that. Everyone once in a while I'll do basically the same
Re:Multiple Machines (Score:2)
Learn to script (Score:4, Interesting)
But I say to those that call themselves sys.admins, Learn how to script!!!
I work at a large bankrupt telcom
Maybe this is just a corporate thing. They were raised, in a sense, in a setting where all they had to do was add users and replace disks. Maybe they never learned how to do anything else.
Back in '83 I took manuals home and poured over every page, every weekend for months. That didn't make me a good admin but it gave me a good foundation. From there I had to just halfway use my head (imagination?) and start writing scripts. Ugly? Sure. Did they get better? Of course!
Now I play admin on 110+ machines, and I stay bored. Why? Because I've written a response engine in Expect that handles most of my everyday problems. I call it AGE, Automated Gruntwork Eliminator.
There's no way I could have done this if I had just sat back and floated, not put in a bit of effort to learn new things.
T.
Re:Learn to script (Score:1)
Boredom is good. Boredom means nothing bad is happening. If you want to not be bored, do something stupid.
I have been interested in learning how to write scripts in Bash. Any recomendations?
Re:Learn to script (Score:2)
Re:Learn to script (Score:2)
http://www.oreilly.com/catalog/bash2/
In addition, Debian has a new package called abs-guide that I haven't checked out yet.
http://packages.debian.org/unstable/doc/abs-gui d e. html
--I've written a bunch of helpful bash scripts to help me with everyday stuff, as well as aliases and functions. If you want, email me - kingneutron at yahoo NOSPAM dot com and put "Request for bash scripts" in the subject line, and I'll send you a tarball.
Re:Learn to script (Score:1)
Re:Learn to script (Score:1)
BTW, is rocket science more difficult than Quantum Electro Dynamics?
Re:Learn to script (Score:2)
It's in the mindset (Score:3, Insightful)
Once you've got the mindset change sorted, 10, 100, 1000 systems it makes no difference, it's just as simple to manage. You aren't managing individual computers, you're managing an infrastructure.
Course, you actually have to be competent as well... Obviously.
It looks like a worthwhile purchase. (Score:3, Insightful)
It is definately on my list of Expensive Books (50. Am I cheap?)to Buy.
=============
Might be useful... (Score:2)
This might very well be a book I'll pick up sometime. I'm always looking for more ideas.
I maintain about ~170 remote Linux boxes (in our company's retail stores and warehouses), as well as our ~30 or so inhouse servers.
I went through a lot of work to enable our rollout and conversion to go more smoothly. The network and methodology for users, printers, etc. is extremely simplified and patterened.
For each of the 3 'models' of PCs we use, I have a master system that I produced. I used Mondo Rescue [mondorescue.com] to
More info from the publisher (Score:2)
I see the
Ade_
/
Doing the same with *gasp*Windows*gasp* (Score:1)
Do any of you have recommendations for books/URLs on how to effectively manage a large Windows cluster using automated methods?
Thanks in advance for any useful information.
Re:Doing the same with *gasp*Windows*gasp* (Score:1)
Personally, I really feel for anybody who has to manage more than two windows machines. But I do think there are methods that Microsoft will be sure to sell you.
Re:Doing the same with *gasp*Windows*gasp* (Score:1)
As far as a large cluster, I had a dozen racks full of 1u and 2u machines, does that count as large?