2

I need to replicate an Ubuntu server setup on 10-15 servers. I have a fresh Natty 64-bit server installed on a machine with all the extra required packages installed (no user data, system hasn't been used). What I need to do is to clone this machine to other servers in the easiest way possible.

I was thinking of using the remastersys tool to create an ISO image from the setup and install it on the machines. Is there a way that can help me automate this installation as much as possible, i.e. how can one install an ISO image to a large number of servers easily.

Thanks!

4 Answers4

2

The usual answer to this sort of problem is to get a basic system installed as quickly as possible with as little manual intervention, then run the same apt-get install ... commands on all machines to get the packages synchronized on all of them. A local package mirror is an excellent way to improve installation speed on the other machines, and provides an easy place to store / distribution site-local packages.

But this only helps initial set up; you might wish to look into managing your configuration with puppet or chef. This lets you deploy and re-deploy servers or desktops with given configurations over and over again without much extra effort.

An excellent (if potentially dated, at this point) introduction to managing multiple machines is hosted by our friends at infrastructures.org.

sarnold
  • 1,211
  • 7
  • 9
1

Alternative:

dpkg --get-selections

and its opposite number

dpkg --set-selections

To set up the another machine with the same packages.

From the man page:

   --get-selections [package-name-pattern...]
          Get list of package selections, and write it to stdout.  Without
          a  pattern,  non-installed  packages (i.e. those which have been
          previously purged) will not be shown.

  --set-selections
          Set package selections using file read  from  stdin.  This  file
          should  be in the format '<package> <state>', where state is one
          of install, hold, deinstall or purge. Blank  lines  and  comment
          lines beginning with '#' are also permitted.
YXD
  • 111
  • 2
0

You can also use Mondo Rescue to clone your installation. It will create a bootable CD/clone of your installation and you can use that to install ther servers using it. I have used it and it works very well. Here's a howto:

http://www.mondorescue.org/docs/mondorescue-howto.html

freethinker
  • 336
  • 1
  • 8
0

If this is a long term thing, where you might need to install more computer or perhaps re-installed computer, you should maybe think about using the debian/ubuntu preseeding capabilities. This will give you the option to recreate the same configuration time and time again, with no need to run through any installation steps.

katriel
  • 4,477
  • 23
  • 20