"clone" an example client?

SYSTEMS Oliver Osburg osburg at osburg.org
Thu Dec 8 12:20:19 CET 2011


On 07.12.2011 17:15, Frank Lienhard wrote:
> I have an i386 client, which I installed manually and I'm now 
> wondering how to setup future clients "identical" to that with FAI
>
> at least to have the package selection transfered to the FAI config 
> would save a lot of work, I think
Hi,

I often reconfigure my clients, too. Config Files change, and I also 
would appreciate a way to "automatically" create FAI configs from a 
running Debian Machine. But in a way, this violates the FAI philosophy 
"Do all configurations on the server".

After some thinking, one could conclude that this will never be possible 
to do 'perfectly' But I'm sure one could do nice things which could make 
a Sysadmin's life easier. Here, Machines constantly are updated. The 
following would be useful:

a) check regularly if files deployed by FAI change on a Host in a 
certain class, so the file on the FAI server needs to be updated.
b) check regularly if new packages are installed on the clients. If so 
add these packages to the package lists.
c) check regularly if packages were removed on the clients. If so, 
remove these packages from the package lists on the FAI server.
d) for all packages it needs to be checked if any configuration file is 
changed from the Debian default

I already did some versions of this, I called "fai-conf-update", 
starting with 
http://wiki.fai-project.org/wiki/Helper_scripts#fai-conf-update
In my private "FAI-Lab" I have other scripts, but none of these I 
consider especially useful for other admins not working in my "Lab".

But I still think it should be possible to create a script, which can 
create FAI config files based on the differences of the configuration 
files of a running host compared to the files in the vanilla debian 
repository.

Wouldn't it be neat it we could offer "sample Debian installations" from 
a website some day? E.G. If someone figured out how to setup a special 
kind of Hardware on Debian wheezy, he could share this configs.

I know That this in some way violates the FAI philosophy but I hope that 
I made my point clear: I don't want to change this philosophy (because 
it's good) but I want to make it easier for sysadmins to deal with the 
FAI config space - Even the setup of the config space could be 
automated, I think.

But generally a good idea to start off installing clients with fai is:

a) get the list of installed packages with "dpkg -l"
b) get a list of modified config files with "dpkg-query -W 
-f='${Conffiles}\n' '*' | awk 'OFS="  "{print $2,$1}' | md5sum -c 
2>/dev/null | awk -F': ' '$2 !~ /OK/{print $1}'" or any other method. I 
yet found no way to do this in a really good way. Often important files 
are not listed.
c) use "etckeeper" or any other revision control system. If you check-in 
right after "vanilla install" and compare the ready-configured host 
later, you should get a list of the files you or the system did modify. 
Problem here: Mostly, only some of the listed files are actually 
necessary on the install-server.

If someone reading the list has a helper script roughly like this - 
please share :)


Hth & Regards, Oliver

-- 
Osburg.Systems - UNIX Solutions



More information about the linux-fai mailing list