FREE EBOOKS
Free Network Tools

Free ebook "Automating UNIX and Linux Administration" Sample Chapter

Automating UNIX and Linux Admin
Free download Chapter 6: Automatic System Configuration
Download chapter

Wouldn't you like to automate the tedious daily tasks of system administration? Automating UNIX and Linux Administration will show you how, by exploring existing tools and offering real-world examples. Although some of the book is Linux-specific, most of the information applies to any UNIX system, including material on automating tasks across multiple variants of UNIX. Author Kirk Bauer briefly overviews tools and technologies-and assumes preliminary knowledge about editing a configuration file or mounting a file system.

The techniques, methods, and tools in this book will help you manage a single system-but will prove especially powerful across multiple systems. No matter if the systems are desktops, servers, or Beowulf clusters-all of them will benefit from this automation. And managing five to five thousand systems will become a simpler task!

< < prev next > >

Automatic System Configuration

YOU HAVE JUST INSTALLED and configured a fresh copy of an operating system on a new system and you are now ready to automate its configuration. A UNIX system's configuration is usually contained in hundreds, if not thousands, of an individual files. Many of these files contain system level configuration such as network setting, device information, drive mappings, and so on. The rest of the configuration belongs to various applications you have installed on the system, such as web servers and user applications.

A thousand configuration files might seem a bit overwhelming at first. Luckily, most of these files will never need to be modified because the defaults are suitable for most situations. One significant advantage to automating the administration of UNIX systems is that most of the configuration files are text and not binary. In some cases, it doesn't matter because you will use a utility program to create the file for you. In other cases, however, you will have to directly modify the file, and then you will be glad when the file is plain text.

This chapter first explores a custom solution that can be adapted exactly to your needs. The custom solution may be perfect for small groups of systems, stand-alone "network appliances", and situations with very specisif or unique requirements. I expand on the concept of system grouping throughout the custom solution examples. Also, I supply many examples of files that shoul be configured on most systems. For these reasons, even readers who have decided to use cfengine may want to skim through this chapter's custom examples.

The latter half of this chapter provides a comprehensive introduction to the GNU cfengine. This system automation/configuration application is very powerful, flexible, and useful--particulary for larger networks of differing systems. cfengine uses the pull method that allows each system to configure itself independently of other systems. This is more reliable and scalable in most situations than the push method used in the custom example. Regardless of your thoughts on cfengine right now, you should read through the introduction starting in section 6.4, "Configuring Systems with GNU cfengine", which fully describes all of the benefits it can provide.

6.1 What Do I configure?

The configuration on a system can be divided into several categories:

  • Customized files: Files whose contents differ from system to system.
  • Dynamic files: Files that are not the system default and may change several times over the life of a system.
  • Default files: Files whose defaults contents are adequate for your purposes.
  • Static Files: Files that need to be customized only once.
  • Filesystem components: Symbolic links, directories, device files, file permissions and so on (filesystem components).