tetre2 - Template Tree II 

Info 

Template Tree 2 is a software system for efficiently managing the configuration of large and heterogeneous Unix installations.

Source 

http://tobi.oetiker.ch/ http://isg.ee.ethz.ch/tools/tetre2/

Related Urls 

Presented paper on TeTre2 at LISA 2001
http://isg.ee.ethz.ch/tool/tetre2/pub

Situation/Problem 

Setting up a Unix machine in an enterprise environment requires not only the installation of the OS distribution, but also a great deal of customization to integrate the machine into the local environment.

This integration process requires the replacement of some parts of the operating system with customized configuration files or even the integration of whole new features. Files like /etc/services, /etc/inetd.conf, /etc/mail/sendmail.cf come to mind but also third party software like AFS (Andrew File System), SSH (Secure Shell) or Postfix.

These changes have to be performed during the initial installation of the machine but may also be necessary after changes to the local environment and if updates or security fixes have to be integrated.

At the simplest level this customization is done by hand on an individual, per machine basis. This has unacceptable disadvantages in an enterprise setup:

  • Progress is slow due to the interactive nature of the work
  • Cost is high because highly skilled personnel is required to perform repetitive and tedious tasks.
  • Documentation of the customization is often poor because it is at best in the form of an installation log. Clickable interfaces are the worst when it comes to documenting what has been done.
  • The approach scales linearly or worse if the growing likely hood of inconsistencies is taken into account.

In other words automation of the post install process is imperative for large installations.

An simple approach taken by many is to write a special customization script which is run on a machine after its installation. While this script can do everything necessary and is also fast it does not solve the scalability issue on another level:

  • Not every machine is the same this means many special cases have to be handled by the script.
  • Customization itself can be a complex venture. With an all dancing all singing customization script the script itself becomes huge and unmanageable.

Solution/Description 

Template Tree 2 resolves these issues. It uses a centrally configurable, modularized approach to the problem.

  1. The different aspects of a computers post install customization are grouped into features. One feature could be SSH support another one the local printer setup. Each feature consists of a set of files and a META file describing how the feature is to be applied to a machine.
  2. A single central configuration file pulls all the features together and defines which feature should be used on which host. The syntax of this configuration file has been designed to allow highly flexible configuration without sacrificing legibility.

Comments 

The teTre2 program is basically a preprocessor. It converts the configuration information contained in the tetre configuration files and in the feature tree into a number of target formats.

At the moment there are two target formats available. First there is cfengine which generates a cfengine configuration file. You can then run this file with cfengine to update the local machine. Second there is a pod mode which produces comprehensive documentation of all features available in the local feature repository.

documented on: 2007.08.03