13.07.2015 Views

Linux System Administration Recipes A Problem-Solution Approach

Linux System Administration Recipes A Problem-Solution Approach

Linux System Administration Recipes A Problem-Solution Approach

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 3 ■ MONITORING AND UPDATING■ Note You need the quotes surrounding the diff command in line 7 because if the files are different, diffreturns a multiword string. Without the quotes, bash gets confused by this.3-11. Setting Up PuppetOne of the biggest sysadmin centralization problems is getting your configuration set up the same wayacross all your machines. Even if you have centralized install set up, configuration is changed over time,and eventually you end up with some machines working and some not, and you have little real idea whythe difference is and where to look for a cause.Puppet is a centralized configuration management system, which helps you avoid this and othersimilar problems. A central Puppet server—the puppetmaster—keeps track of the configuration files andoptions for all its client machines in a cross-platform language. On the client, you run a daemon thatchecks in with the puppetmaster at intervals and copies over any changes to the client.■ Note Remember that if you’re using Puppet and you make a change manually on a client machine, the nexttime the daemon checks in with the puppetmaster, the change will be reverted. To make the change permanent,you need to remember to make the changes centrally every time. If you need to test a change locally first, you caneither set up a “testing” machine configuration within Puppet or just turn off the Puppet daemon on the clientmachine when you’re testing. Remember to turn it back on when you’re done! Setting up a testing sandbox isprobably the more correct option, and if you have your Puppet files checked into Subversion, you have anautomatic backup you can revert to, but it is more time-consuming when bug fixing.Anything Puppet will manage is called a resource, and resources are categorized into the followingtypes:• Files (ownership, mode, content, and existence can all be managed)• Users and groups• Packages• Services• Commands and scripts (Puppet can execute these under particular conditions)• Crontabs• MountsPuppet is under very active development, and people are regularly adding more types—or you cancreate your own.79Download at WoweBook.Com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!