I'm setting up multiple systems and ideally I want the same package configuration on all of them. So I'm going through yum and rpm queries manually to try and get this done. There must be a better way. Is there a way to use yum or rpm to configure multiple systems with the same packages? If yum or rpm has something native built into it to do this, that would be great. If there's some scripts to simplify some tasks that works too. I've used webmin's 'Cluster Software Package' module, and will probably fall back to it. However I don't think I get the info that yum gives regarding package grouping and what packages are part of what capabilities. Gotta query elsewhere for it. (no disrespect to webmin folks, great tool)
Michael Semcheski
2008-Feb-07 18:26 UTC
[CentOS] package 'synchronization' for multiple systems
On Feb 7, 2008 1:14 PM, Tim Alberts <talberts at msiscales.com> wrote:> I'm setting up multiple systems and ideally I want the same package > configuration on all of them. So I'm going through yum and rpm queries > manually to try and get this done. There must be a better way. Is > there a way to use yum or rpm to configure multiple systems with the > same packages?What I've done (and I'm on the lookout for a better way) is to right a script that uses ssh to run yum on each machine. If there is a way to query yum for the list of installed packages, that might suffice. Query each computer for the list of installed packages, get the union of those lists, and install that on each machine. Unfortunately, I'm not familiar enough with yum to know if this is possible. Mike
Tim Alberts wrote:> I'm setting up multiple systems and ideally I want the same package > configuration on all of them. So I'm going through yum and rpm > queries manually to try and get this done. There must be a better > way. Is there a way to use yum or rpm to configure multiple systems > with the same packages? > > If yum or rpm has something native built into it to do this, that > would be great. If there's some scripts to simplify some tasks that > works too. > > I've used webmin's 'Cluster Software Package' module, and will > probably fall back to it. However I don't think I get the info that > yum gives regarding package grouping and what packages are part of > what capabilities. Gotta query elsewhere for it. (no disrespect to > webmin folks, great tool)what I did was to build a meta-package that depends on the packages I want, and put it on a local yum repository. then used yum on each machine to install the meta-package or to update it (if new software needs to be added). Of course, make sure to test everything before you put it on production machines. In fact, yum is not needed here. you can also setup a script on web server, then on each machine, a small script downloads said script and runs it. wget $your_url/your_script.sh #/path/check_script_safety.sh chmod u+x your_script.sh ./your_script.sh (security controls and error handling left to you...).
On Thu, Feb 07, 2008 at 10:14:28AM -0800, Tim Alberts wrote:> I'm setting up multiple systems and ideally I want the same package > configuration on all of them. So I'm going through yum and rpm queries > manually to try and get this done. There must be a better way. Is > there a way to use yum or rpm to configure multiple systems with the > same packages? > > If yum or rpm has something native built into it to do this, that would > be great. If there's some scripts to simplify some tasks that works too. > > I've used webmin's 'Cluster Software Package' module, and will probably > fall back to it. However I don't think I get the info that yum gives > regarding package grouping and what packages are part of what > capabilities. Gotta query elsewhere for it. (no disrespect to webmin > folks, great tool)When you say 'same package configuration', do you mean you just want the same set of packages (latest versions), or that you want to specify both packages and version numbers? I've been investigating doing both. For the former, I've written a little tool here: http://www.openfusion.com.au/labs/xsync/ that lets you assert what packages and services should and should not be installed and/or running e.g. # Ensure some packages are removed touch /etc/xsync/rpm-remove.d/{nfs,nfslock,portmap,ypbind} # Ensure some other packages are installed, up to date, and running touch /etc/xsync/yum-install.d/{httpd,mod_perl,openssh-server} touch /etc/xsync/chkconfig-on.d/{httpd,sshd} # Check those changes look okay xsync -n # Update the system xsync Typically you do this somewhere central, and then push out the (one or more) /etc/xsync trees to your target boxes. Cheers, Gavin -- Gavin Carr - http://www.openfusion.com.au - Linux, Perl, and Web Consulting - http://www.openfusion.net - Hackery, the Blog * Fashion is a variable, but style is a constant - Programming Perl