-1

I have two CentOS platforms. Both run "CentOS release 5.10 (Final)". One is a "real" machine and the other is a VM. Both are 64 bit. Call the real machine Prod and the VM Spare.

When I got this gig I was told that the two machines were identical. Spare is supposed to be a hot spare for Prod. It is now obvious that is not true. The two machines have different yum repo lists. There are duplicate looking install packages from different channels. Prod looks like a server. Spare looks like it had been somebody's desktop with Evolution, OpenOffice and other desktop cruft.

Prod and Spare have similar applications installed but found in different repos so the available yum update levels are different.

I have tried disabling the non-standard repos and uninstalling the non-standard packages. This has led to tears as removing X-Windows, for example, has led to the removal of hundreds of dependant modules that in turn have dependants which, in the end, made Spare deaf, blind and mute. Blessedly we had a copy of the VM.

My latest idea is to migrate both machines to the latest stable CentOS level and basically have a do-over. The downside (I think) is the downtime to the production machine and unknown custom software vs new package level issues.

My basic question is, what is the best way to make the platforms as identical as possible, and minimize (or better yet negate) downtime.

How should we maintain packages and other installs across them into the future? I am aware of Puppet, Chef and CFEngine but have not used them before. Are these the way to go for the future? Something else?

Peter Souter
  • 5,110
  • 1
  • 33
  • 62
7 Reeds
  • 2,419
  • 3
  • 32
  • 64

1 Answers1

1

This is not really a programming related question (You might have better luck at https://serverfault.com/)

Your question is quite broad, but essentially you want two machines that are as identical as possible, one production, one VM, correct?

Two get machines in a consistent state, you'll need a configuration tool of some sort. Ansible is probably the easiest to get setup and get cracking with. At it's most basic setup, is basically nice wrappers around SSH. With this you can create consistent, and easily track changes to servers as they happen.

To have a VM you can easily provision, I recommend reading up on Vagrant and Packer. Vagrant to easily create a VM that accurately reflects your production environment, packer so you can repeatedly create an image in various platforms. In an ideal case, you can take the configuration tool and use it to provision your VM, meaning you can test your production changes on a VM first.

In general, having repeatable automated configuration you can easily test, I'd also recommend reading up on the concept of DevOps

Community
  • 1
  • 1
Peter Souter
  • 5,110
  • 1
  • 33
  • 62