[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Who's working on centralized management?

On Sat, Apr 17, 1999 at 12:02:50PM -0700, George Bonser wrote:
> I am wondering if it is useful to have one machine dedicated as the master
> and the /var/lib/dpkg/status is distributed to the other machines via
> rdist. Then an apt-get is run on each of the machines at some time after
> the rdist.

	I was thinking something similar, and I agree with the problems you
detail below, however...

> The problem with this is the preinst and postinst scripts that might be
> interactive.  I WISH there was a method to set an environment variable ...
> say AUTOGET or something, and the scripts could behave in some known
> fashion without asking for input if it is set. It might be set to two
> different things ... maybe REPLACE, KEEP, or YES. If it is KEEP, scripts
> would keep existing configurations, REPLACE would cause configurations to
> be replaced with the package config, YES would simply mean that the user
> will defer to the package author's judgement on what should be done. If
> the variable is not set or is set to NO, it will retain the existing
> interactive behavior.
	Debian has still to fix all packages that force interactive
configuration and give a way to either
	a) make it from a configured file (something like an 'expect'
	b) be able to leave all these to later on the installation.

	The way I thought of making what we're thinking about without
breaking current systems is to have the following:

	- A master server where all packages are installed and configured
	- Clients that "mimic" the master server, that is they have the same
packages & configuration as the server save for the configuration that is
machine dependant (like hostname, init.d/netbase, XF86Config and the like).

	Server would do the following:
	- keep a backup of current /etc in, say /var/backup/etc
	- when a package gets installed, through dpkg, apt-get or such
	(maybe a daemon that checks when /var/lib/dpkg/status changes) do:
		* send diff of /etc and /var/backup/etc to client
		machines (maybe through cfengine)
		* rdist /var/lib/dpkg/status to all machines in the network
	The clients would:
	- receive all changes of /etc files
	- when they receive a new /var/lib/dpkg/status do a 
	dpkg --remove --pending && apt-get 

	I hope that doing so all packages that get installed would use
previously installed configuration and not try to use a new one, this would
not work with some postinst scripts (like update-mimes' and such, I presume)

	Well. I will first start by making a script (since everybody
already has used boot floppies I will not try this approach that enables
one to install X machines from a main server when all have been installed
the base disks (with CD) and configured IP's and hostnames... could go 
like this:

Do this only once from the main server:
        mount $machine:/etc /mnt
        diff -rbBq /etc/ /mnt/ --> the idea is to take the list of
		files that differ so they are not overwritten later.
		This list can be edited to remove files that must
		be overwritten. This should preverse machine-dependent


        for machine in (machine list); do
                mount $machine:/ /mnt
                tar -zcf /tmp/$machine.etc.tgz previous_file_list
                cp -a /etc /mnt/etc
                cd /mnt/etc/ && tar -zxf /tmp/$machine.etc.tgz
                cp -a /var /usr /lib /bin /sbin /man /mnt/

This idea is for use in a lab configuration where all machines are
identical: same hardware (mouse, video card...) but only different
hostnames and IP's..

	Regards (y hope I can start coding soon)


Reply to: