I've been thinking about ways to proceed if I need to set up 5 machines with basically identical software but somewhat variable hardware. A simple approach would be to just set up my golden system and clone the disk, but the hardware differences would probably cause problems.
One approach that appeals to me is to install minimal centos on the first system, add a few rpms after installation, do my desired config file tweaks, then somehow generate an rpm that depends on all the post-install rpms and contains my custom versions of the config files I tweaked. Then, to set up the other 4 systems, I'd use the kickstart file from the first, then yum localinstall my custom rpm, which would install all the dependencies and tweak all the config files. I assume the centos install would deal with the hardware differences. Does this idea make sense? What happens when two different rpms want to provide the same config file?
Are there any other simple alternatives I have overlooked? What is the best practice when setting up identical software on multiple systems with heterogeneous hardware?
mahalo, Dave
On 11/29/2011 12:37 PM, Thomas Burns wrote:
I've been thinking about ways to proceed if I need to set up 5 machines with basically identical software but somewhat variable hardware. A simple approach would be to just set up my golden system and clone the disk, but the hardware differences would probably cause problems.
One approach that appeals to me is to install minimal centos on the first system, add a few rpms after installation, do my desired config file tweaks, then somehow generate an rpm that depends on all the post-install rpms and contains my custom versions of the config files I tweaked. Then, to set up the other 4 systems, I'd use the kickstart file from the first, then yum localinstall my custom rpm, which would install all the dependencies and tweak all the config files. I assume the centos install would deal with the hardware differences. Does this idea make sense? What happens when two different rpms want to provide the same config file?
Are there any other simple alternatives I have overlooked? What is the best practice when setting up identical software on multiple systems with heterogeneous hardware?
If I was doing a thousand machines, i would build an RPM to do it ... otherwise with just 4, I would just use this on the original:
rpm -qa > somefile
rsync somefile to the other machines and then:
yum install $(cat somefile)
I would then rsync the config files from the other machine to the new one.
On Tuesday, November 29, 2011 01:56:59 PM Johnny Hughes wrote:
rpm -qa > somefile
rsync somefile to the other machines and then:
yum install $(cat somefile)
[Note: Johnny's advice is good, and this reply is more addressed to the OP than to Johnny, as he already knows what I'm getting ready to post. The OP may not.]
This will give all the same versions of the packages, which will mostly work, unless a version disappears between the 'rpm -qa' and the 'yum install' invocations. I've had that happen before, so in those instances, I use the helpful
rpm -qa --queryformat "%{NAME}.%{ARCH}\n" > somefile
line so that I get the names and the arches, but no versions (arch only needed if multilib desired, of course). Newlines are cosmetic, of course, and aren't really required by yum install. To get a listing of all the --queryformat variables, use:
rpm --querytags
and see the rpm man page for more information about --queryformat.
I also tend to sort my package names in the pipeline so that somefile is human-readable.... and that helps when duplicating the major packages between versions (I've used that sequence going from one Fedora version to another, for instance).
And a backup of /etc/yum.repos.d along with the gpg keys helps get things in order.
You could setup Cobbler and koan install the other machines from the Cobbler server.
Cobbler uses a nice templating engine (Cheetah) and I've managed to use that within the kickstart file Cobbler serves up to specify packages to install for a given machine. So for example on Machine A, I can have the foo package installed and on Machine B install the bar package...
Cobbler even supports PXE booting clients to get installs started...
On Tue, 29 Nov 2011, Thomas Burns wrote:
I've been thinking about ways to proceed if I need to set up 5 machines with basically identical software but somewhat variable hardware. A simple approach would be to just set up my golden system and clone the disk, but the hardware differences would probably cause problems.
One approach that appeals to me is to install minimal centos on the first system, add a few rpms after installation, do my desired config file tweaks, then somehow generate an rpm that depends on all the post-install rpms and contains my custom versions of the config files I tweaked. Then, to set up the other 4 systems, I'd use the kickstart file from the first, then yum localinstall my custom rpm, which would install all the dependencies and tweak all the config files. I assume the centos install would deal with the hardware differences. Does this idea make sense? What happens when two different rpms want to provide the same config file?
Are there any other simple alternatives I have overlooked? What is the best practice when setting up identical software on multiple systems with heterogeneous hardware?
mahalo, Dave _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Scot P. Floess RHCT (Certificate Number 605010084735240) Chief Architect FlossWare http://sourceforge.net/projects/flossware http://flossware.sourceforge.net https://github.com/organizations/FlossWare
On Tue, Nov 29, 2011 at 1:08 PM, Scot P. Floess sfloess@nc.rr.com wrote:
You could setup Cobbler and koan install the other machines from the Cobbler server.
Cobbler uses a nice templating engine (Cheetah) and I've managed to use that within the kickstart file Cobbler serves up to specify packages to install for a given machine. So for example on Machine A, I can have the foo package installed and on Machine B install the bar package...
Cobbler even supports PXE booting clients to get installs started...
How long does it take to learn the templating language compared to sshing to a few machines in separate windows and pasting in a 'yum install list_of_packages' command?
I don't know - just trying to help. I have 4 machines at home...and I use Cobbler specifically because I want reproducability...well worth the time I spent to learn it. When I lost a harddrive in my laptop, I replaced it...selected the Cobbler system record for it...and my laptop was ready to go reprovisioned and all.
Again, I was just trying to help - sorry, if I over-engineered solution...
On Tue, 29 Nov 2011, Les Mikesell wrote:
On Tue, Nov 29, 2011 at 1:08 PM, Scot P. Floess sfloess@nc.rr.com wrote:
You could setup Cobbler and koan install the other machines from the Cobbler server.
Cobbler uses a nice templating engine (Cheetah) and I've managed to use that within the kickstart file Cobbler serves up to specify packages to install for a given machine. So for example on Machine A, I can have the foo package installed and on Machine B install the bar package...
Cobbler even supports PXE booting clients to get installs started...
How long does it take to learn the templating language compared to sshing to a few machines in separate windows and pasting in a 'yum install list_of_packages' command?
-- Les Mikesell lesmikesell@gmail.com _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Scot P. Floess RHCT (Certificate Number 605010084735240) Chief Architect FlossWare http://sourceforge.net/projects/flossware http://flossware.sourceforge.net https://github.com/organizations/FlossWare
On Tue, Nov 29, 2011 at 9:37 AM, Scot P. Floess sfloess@nc.rr.com wrote:
sorry, if I over-engineered solution...
I was happy to hear about cobbler, hadn't heard of it before. Dave
I seriously recommend it :) Sorry, I wasn't sure if Les' response was overly sarcastic ;)
If you are interested in Cobbler - I'd be more than happy to give you some pointers, as well as the kickstart file I use - it should be reusable for you...especially with CentOS 6.0 and earlier plus Fedora 15 and earlier (some changes to kickstarts with Fedora 16 - notably %package needs a %end)...
Anyway, I do a ton of virtualization work at home (its a hobby), and I use Cobbler for them as well as my four baremetal machines...once you learn it - its a huge time savings...and very reusable...
On Tue, 29 Nov 2011, Thomas Burns wrote:
On Tue, Nov 29, 2011 at 9:37 AM, Scot P. Floess sfloess@nc.rr.com wrote:
sorry, if I over-engineered solution...
I was happy to hear about cobbler, hadn't heard of it before. Dave _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Scot P. Floess RHCT (Certificate Number 605010084735240) Chief Architect FlossWare http://sourceforge.net/projects/flossware http://flossware.sourceforge.net https://github.com/organizations/FlossWare
On Tue, Nov 29, 2011 at 1:54 PM, Scot P. Floess sfloess@nc.rr.com wrote:
I seriously recommend it :) Sorry, I wasn't sure if Les' response was overly sarcastic ;)
No, I was just wondering about the tradeoff in time spent learning yet another system-specific template language vs just executing the commands directly (in windows, in parallel so you don't have to wait...). For 100+ similar machines I'd expect it to be worth it. Not that automation isn't good, but if you have the list of packages you want to install in the first place, it's not all that hard to do it yourself.
Ah OK - sorry if I misunderstood you...
I definitely see your point. I suppose for me if I have to do something more than once, I like automation (like Cobbler). I do a ton of tinkering, trashing machines, spinning up VMs, etc - it just became tedious. Truth be known - initially I spent sooo much time learning Cobbler. But that time has since paid off...
Quite honestly, the way Cobbler is structured - the templating is so very easy to learn...I think I spent one morning reading up on it and I was proficient enough to denote packages for any given machine (really why I responded in the first place)...
On Tue, Nov 29, 2011 at 1:54 PM, Scot P. Floess sfloess@nc.rr.com wrote:
I seriously recommend it :) Sorry, I wasn't sure if Les' response was overly sarcastic ;)
No, I was just wondering about the tradeoff in time spent learning yet another system-specific template language vs just executing the commands directly (in windows, in parallel so you don't have to wait...). For 100+ similar machines I'd expect it to be worth it. Not that automation isn't good, but if you have the list of packages you want to install in the first place, it's not all that hard to do it yourself.
-- Les Mikesell lesmikesell@gmail.com _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Scot P. Floess RHCT (Certificate Number 605010084735240) Chief Architect FlossWare http://sourceforge.net/projects/flossware http://flossware.sourceforge.net https://github.com/organizations/FlossWare
Thomas Burns wrote:
I've been thinking about ways to proceed if I need to set up 5 machines with basically identical software but somewhat variable hardware. A simple approach would be to just set up my golden system and clone the disk, but the hardware differences would probably cause problems.
First question: *how* heterogeneous? Do you have 32-bit systems, and 64-bit systems, and Itaintiums? AMD and Intel? Or are you just talking about peripherals?
One approach that appeals to me is to install minimal centos on the first system, add a few rpms after installation, do my desired config file tweaks, then somehow generate an rpm that depends on all the post-install rpms and contains my custom versions of the config files
<snip> How about building one fully, getting a list of installed packages that does *not* mention the architecture, then, on each machine, yum -y install `cat packagelist`? Yes, I am assuming they're bootable, and have yum, but nothing else - a minimal install.
mark
Thomas Burns wrote:
I've been thinking about ways to proceed if I need to set up 5 machines with basically identical software but somewhat variable hardware. A simple approach would be to just set up my golden system and clone the disk, but the hardware differences would probably cause problems.
Not in my experience. I usually do a quick install on the target machine with a separate /boot partition and then clone everything from the source apart from swap and /boot. This way the target machine will have proper initrd with the required modules, such as storage drivers, at the first boot. Then boot in single mode, reconfig networking, modprobe.conf, fstab, hostname, etc., reboot and that's it. This assumes all machines are on the same arch and you don't use LVM or software RAID - otherwise it's more complicated then that.
Regards, Deyan
On Thu, Dec 1, 2011 at 6:05 AM, Deyan Stoykov dstoykov@uni-ruse.bg wrote:
Thomas Burns wrote:
I've been thinking about ways to proceed if I need to set up 5 machines with basically identical software but somewhat variable hardware. A simple approach would be to just set up my golden system and clone the disk, but the hardware differences would probably cause problems.
Not in my experience. I usually do a quick install on the target machine with a separate /boot partition and then clone everything from the source apart from swap and /boot. This way the target machine will have proper initrd with the required modules, such as storage drivers, at the first boot. Then boot in single mode, reconfig networking, modprobe.conf, fstab, hostname, etc., reboot and that's it. This assumes all machines are on the same arch and you don't use LVM or software RAID
- otherwise it's more complicated then that.
I've done that as part of a restore operation when dropping a tar backup onto somewhat different hardware (which would seem like a common enough operation that there would be a nicer approach...). If you know as much as anaconda does about hardware devices and driver module names you can build a working initrd manually, but it may be easier to just install on that or identical hardware and only keep the /boot contents. And you'll still probably need to know some things about device naming to fix up fstab and your network configs.
On Thu, Dec 1, 2011 at 2:05 AM, Deyan Stoykov dstoykov@uni-ruse.bg wrote:
Then boot in single mode, reconfig networking, modprobe.conf, fstab, hostname, etc., reboot and that's it.
This is the sort of stuff I need to automate, at least with a script. It is fairly repetitious and I am not reliable enough to just do it by hand and not forget something. It would be so much better if I could just install a custom rpm. I guess I need to bite the bullet and learn about cobbler.
This assumes all machines are on the same arch and you don't use LVM
LVM is so cool, but I actually never use any of its cool features, just get bit by the gotchas. I am mostly just setting up simple workstations. I wish the installer made it easier to go back to the old-fashioned way. I guess I should talk to upstream.
Thanks for all the inputs. Dave
On 12/01/11 10:10 AM, Thomas Burns wrote:
I wish the installer made it easier to go back to the old-fashioned way. I guess I should talk to upstream.
specify your partitioning scheme of choice in a kickstart file, thats teh easiest way.