1

My situation is as follows. I have installed Debian Lenny, including Apache, MySQL, etc., on a master machine. Now I would like to be able to perform the same installation over and over again.

I can see 2 solutions:

  • Create a big tar file from the master machine and un-tar it onto the slaves.
  • Use some specialized software for that matter, e.g. Clonezilla.

Are there any drawbacks on using the first method?

P.S. I would like to setup software RAID 1 on the machines. I think that Clonezilla has a hard time to replicate an image to a software RAID partition, so that means plus one point for the tar method.

prekageo
  • 121
  • 4

3 Answers3

4

The third option is to dump cloning and instead use a proper system configuration management tool such as Puppet or Chef. Cloning is a really bad idea for systems that you need to maintain over time, as you need to apply changes to all machines currently in the field, as well as respinning all of your clone masters. If you use a proper management tool, though, you just describe the state you wish a system to be in, and then the tool makes sure that the system is in that state -- whether it just came "factory fresh", or has been in production for several years and just needs to have a config file tweaked.

Basically, your new machine process should be:

  • Use the OS' native automated installation procedure (d-i preseeding works really well) to get a base minimum system installed that is capable of running your automation tool (and nothing else);
  • Run the automation tool to configure the system to your liking.
womble
  • 96,255
  • 29
  • 175
  • 230
  • The tools that you propose seem very powerful and probably are capable of handling my situation easily. But, they seem to have a steep learning curve. Also, the slaves that I want to create are going to be deployed to different places where I won't have access any more, meaning that the installation is a one-shot operation and after that I am not responsible for them. – prekageo Dec 07 '09 at 21:02
  • 1
    Aaah, optimism. I remember when I had some of that. – womble Dec 07 '09 at 21:26
2

tar will not preserve some things - for instance posix ACLs [ although i doubt you use them ]. take a look at debian pre-seeding to orchestrate mass installations.

some time ago i've asked a bit related questions about management and cloning.

pQd
  • 29,981
  • 6
  • 66
  • 109
1

There are many alternatives... You may also consider FAI or Ghost for Unix (G4U) for example.

Your question is "what is best ?"

That's not so easy to answer, because it really depends on what you need or what you like best.

New installations are quick whith netinstall + a proxy. Quick personalisation can be done through custom packaging and/or custom scripts.

Sometimes a tar or rsync copy is great enought (and quick as hell) to duplicate (or move) a full machine.

Personnaly and at work, I used to practice all those three methods.

I suggest using:

  • FAI or Debian preseeding/quickstart when installing a new physical server (partitioning, raid)
  • rsync and/or tar to duplicate or move an old and heavy-tweaked server
  • create your own packages and scripts for customisations
zecrazytux
  • 639
  • 3
  • 7