introduction to FAI
FAI is divided into tasks, and each task performs something, like defining classes, defining variables, installing packages, running configuration scripts, save logfiles. There are more than 10 tasks, though I just named the important ones for us.
Then, each system can belong to many classes. (More on how to define that, later). Each class can define variables, define packages to be installed or removed and run scripts.
These classes have priorities, which define in which order the scripts are executed and which of the config files is copied. (Say you have a apache.conf for the WEBSERVER class and a apache.conf for the SPECIFICWEBSERVER class. Then, if the system belongs to WEBSERVER and SPECIFICWEBSERVER the latter is taken (later (defined in FAI) means higher priority), if the system only belongs to WEBSERVER, than that config file is taken.)
FAI basically uses two kind of scripts: shell and cfengine. But it can also use perl or python scripts. And if you do not know cfengine, do have a look. It really rocks.
FAI contains the fcopy command, which can be used in scripts, to copy configuration file templates based on classes. (See the above apache.conf example.)
And then there are hooks. hooks are class based (so a hook belongs to a class) and with hooks its possible to modify fai-tasks. Easy example (though not fitting for our usecase): the hook partition.DISKLESS is a no-op, which therefore skips the partitioning task if the system has the DISKLESS class defined. (We don't do installation with fai, so this is just a hopefully not confusing example.)
The OLPC FAI config space is stored in git.
 get fai
If you install a schoolserver with the live-installer, fai is already installed.
To create a fai-client.rpm on a debian system:
$ svn co svn://svn.debian.org/svn/fai/people/h01ger/softupdate-git-rpm fai $ cd fai $ dpkg-buildpackage -rfakeroot $ cd .. $ fakeroot alien -r fai-client*deb
 get fai configspace
$ git clone git://dev.laptop.org/projects/fai-config
Then have a look at fai-config/class/40-olpc-classes and at the fai-config/packages/ and fai-config/scripts/
 run fai
# fai -N softupdate" # as root
Logfiles will be availablein /var/log/fai/
 fai classes
Each system can belong to many classes. each class defines packages which get installed for that class, scripts that get run and other stuff.
The classes have priorities, the class which gets defined first, has the lowest priority, the class which gets defined, last, the highest. The lowest is always DEFAULT, the second-highest is the hostname and the highest is always LAST.
The priorities define the order in which fai-config/scripts/ is executed and which template (from fai-config/files/) is used for fcopy.
basic class for rpm system, fedora7 for now
class for xs developers, adds them to wheel group
Currently those are wad, danjared, cjb and holger
class to setup a fedora mirror, updated via cron
class to setup a xs-live-installer, build via cron
class to setup XSs
reside in /var/log/fai and on a logserver, not yet setup