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

RE: Synchronising many machines.



>I am maintaining quite a few machines that run Debian._ I presently only 
>have access to a 56K modem link._ I have some powerpc machines and some 
>intel machines._ I presently try to keep them in sync by doing an 
>"apt-get update ; apt-get upgrade" on one intel machine and one powerpc 
>machine._ I then ftp the .deb files to all the other machines so that 
>the files are not downloaded via the internet when I do an "apt-get 
>upgrade".


<brain dump>
Ok, here goes.

Setup one or two machines as mirrors of the debian archive.  A simply way to do
this is to:

dpkg --get-selections|awk '{if ($2 == "install") print $1}' > installed_files

this reads all packages, then prints the names of the ones you have installed
into install_files. (Run dpkg --get-selections by itself to see the entire list
and understand this command more.)

So now you have a package list.  Using rsync or some other software, mirror
just those files.  This will help minimize traffic.  Your machines can list
your internal mirror and an external mirror so that way if you have to install
a package you don't mirror it will still work.  Remember to update the mirror
list every so often.  Perhaps put the above into a cron job that gets mailed to
a special user account.

Next task is to have automated updates / upgrades.  Easy answer is to run apt
from cron.  Now of course you have a few problems to solve here:

a) some packages have conffiles that may change and ask the user
  solution: dpkg in woody has a force flag to do one of "keep existing, always
take new, or use the packages default".  This will stop the prompting.

b) some apps ask the user to hit enter, answer questions, or other silly stuff.
  solution: these packages need to be ported to debconf.  debconf is a tool
allowing automated installs of debian packages.  debconf answers packaging
questions and ensures they only get asked when needed, not every time.  As an
admin you can give debconf all of the answers upfront, ensuring you never get
questioned.  If you find a package that is not debconf'ed, please submit a
wishlist bug, if you can port it to debconf and submit the patch with your bug.

</dump>

Hope this helps some.



Reply to: