[opensuse] Keeping 2 or more machines up-to-date, without wasting bandwidth
Hello list, This question has puzzled my quite some time. I have 2 machines, both running openSUSE (10.2) They have different purposes, and therefore are quite different in amount/selection of installed packages. I use (and is a big fan of) smart to keep both machines up to date. They both have the same repositories added. Even though the machines have different selection of packages, there are a lot of overlaps, for example KDE and Gnome are installed on both. That means, when I do a 'smart upgrade', I will use 2x the bandwidth for the packages that the machines have in common. It's not enough to just upgrade one, and snatch the packages from smart's cache to upgrade the other, since PC1 might not have gotten all the upgrades that would be available to PC2 as well. Can anyone come up with a good solution to this problem ? It's not a big deal for 2 PC's, but I could see it be useful, if I added a couple of more PC's to my lan. I was thinking something like a third machine (or one of the already connected PC's), gathering a list of needed updates from all of the PC's, then download the packages needed, and serve them (over nfs for example) to the other PC's to grab as needed. I could do this with a bit of scripting, would it be a feasible solution, or can anyone come up with something better ? Best regards Sylvester Lykkehus -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tuesday 25 September 2007 06:24, Sylvester Lykkehus wrote:
I was thinking something like a third machine (or one of the already connected PC's), gathering a list of needed updates from all of the PC's, then download the packages needed, and serve them (over nfs for example) to the other PC's to grab as needed.
I could do this with a bit of scripting, would it be a feasible solution, or can anyone come up with something better ?
Fmirror will mirror the whole FTP sites. It wastes more bandwidth then just grabbing what you need but you only need to grab the stuff once. Then point to your local mirror. Nick -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Nick Zentena wrote:
On Tuesday 25 September 2007 06:24, Sylvester Lykkehus wrote:
I was thinking something like a third machine (or one of the already connected PC's), gathering a list of needed updates from all of the PC's, then download the packages needed, and serve them (over nfs for example) to the other PC's to grab as needed.
I could do this with a bit of scripting, would it be a feasible solution, or can anyone come up with something better ?
Fmirror will mirror the whole FTP sites. It wastes more bandwidth then just grabbing what you need but you only need to grab the stuff once. Then point to your local mirror.
Nick
Yes, I thought about that too, but as you point out, it's a bit too overkill to mirror all the repositories (I use quite a few from the build service as well) Best regards Sylvester -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Hello list,
This question has puzzled my quite some time. I have 2 machines, both running openSUSE (10.2) They have different purposes, and therefore are quite different in amount/selection of installed packages.
I use (and is a big fan of) smart to keep both machines up to date. They both have the same repositories added. Even though the machines have different selection of packages, there are a lot of overlaps, for example KDE and Gnome are installed on both. That means, when I do a 'smart upgrade', I will use 2x the bandwidth for the packages that the machines have in common.
It's not enough to just upgrade one, and snatch the packages from smart's cache to upgrade the other, since PC1 might not have gotten all the upgrades that would be available to PC2 as well.
Can anyone come up with a good solution to this problem ? It's not a big deal for 2 PC's, but I could see it be useful, if I added a couple of more PC's to my lan.
I was thinking something like a third machine (or one of the already connected PC's), gathering a list of needed updates from all of the PC's, then download the packages needed, and serve them (over nfs for example) to the other PC's to grab as needed.
I could do this with a bit of scripting, would it be a feasible solution, or can anyone come up with something better ?
Best regards Sylvester Lykkehus What I recently did is sharing (NFS) the whole smart data-directory on one machine and point the other machine(s) to that shared directory. As long as you don't try to update at the same time on different machines I
Sylvester Lykkehus schreef: think this should work. Of course you have to configure smart to not delete the rpm's. -- Met vriendelijke groeten, Koenraad Lelong -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
It's ugly, but it works for now: /smart-update is exported as NFS on the local machine, and mounted on /smart-update on the remote User has access to smart with NOPASSWD in sudoer's on both. #!/bin/bash DUMP_L="/smart-update/updates_local.txt" DUMP_R="/smart-update/updates_remote.txt" PKGDIR="/smart-update/packages" # Get local list sudo smart upgrade --update --dump 2> $DUMP_L # Get remote list ssh 10.0.0.2 sudo smart upgrade --update --dump 2> $DUMP_R # Download packages smart download --target=$PKGDIR $(tr '\n' ' ' < $DUMP_L) $(tr '\n' ' ' < $DUMP_R) # Upgrade local packages cd $PKGDIR;sudo smart install -y $(tr '@' '.' < $DUMP_L | xargs -i echo {}.rpm | tr '\n' ' ') # Upgrade remote packages ssh 10.0.0.2 "cd $PKGDIR;sudo smart install -y $(tr '@' '.' < $DUMP_R | xargs -i echo {}.rpm | tr '\n' ' ')" Not very glamorous, but it does what I want it to do. And I know the text processing of package names is not optimal, feel free to post better ways to do it :) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tue, 2007-09-25 at 15:40 +0200, Sylvester Lykkehus wrote:
It's ugly, but it works for now: /smart-update is exported as NFS on the local machine, and mounted on /smart-update on the remote User has access to smart with NOPASSWD in sudoer's on both.
#!/bin/bash DUMP_L="/smart-update/updates_local.txt" DUMP_R="/smart-update/updates_remote.txt" PKGDIR="/smart-update/packages" # Get local list sudo smart upgrade --update --dump 2> $DUMP_L # Get remote list ssh 10.0.0.2 sudo smart upgrade --update --dump 2> $DUMP_R # Download packages smart download --target=$PKGDIR $(tr '\n' ' ' < $DUMP_L) $(tr '\n' ' ' < $DUMP_R) # Upgrade local packages cd $PKGDIR;sudo smart install -y $(tr '@' '.' < $DUMP_L | xargs -i echo {}.rpm | tr '\n' ' ') # Upgrade remote packages ssh 10.0.0.2 "cd $PKGDIR;sudo smart install -y $(tr '@' '.' < $DUMP_R | xargs -i echo {}.rpm | tr '\n' ' ')"
Not very glamorous, but it does what I want it to do. And I know the text processing of package names is not optimal, feel free to post better ways to do it :)
I know you can add a local path (shared NFS path) as a channel in Smart. Maybe that can help you simplify things? Hans E-Mail disclaimer: http://www.sunspace.co.za/emaildisclaimer.htm -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tue, 2007-09-25 at 14:15 +0000, Hans van der Merwe wrote:
On Tue, 2007-09-25 at 15:40 +0200, Sylvester Lykkehus wrote:
It's ugly, but it works for now: /smart-update is exported as NFS on the local machine, and mounted on /smart-update on the remote User has access to smart with NOPASSWD in sudoer's on both.
#!/bin/bash DUMP_L="/smart-update/updates_local.txt" DUMP_R="/smart-update/updates_remote.txt" PKGDIR="/smart-update/packages" # Get local list sudo smart upgrade --update --dump 2> $DUMP_L # Get remote list ssh 10.0.0.2 sudo smart upgrade --update --dump 2> $DUMP_R # Download packages smart download --target=$PKGDIR $(tr '\n' ' ' < $DUMP_L) $(tr '\n' ' ' < $DUMP_R) # Upgrade local packages cd $PKGDIR;sudo smart install -y $(tr '@' '.' < $DUMP_L | xargs -i echo {}.rpm | tr '\n' ' ') # Upgrade remote packages ssh 10.0.0.2 "cd $PKGDIR;sudo smart install -y $(tr '@' '.' < $DUMP_R | xargs -i echo {}.rpm | tr '\n' ' ')"
Not very glamorous, but it does what I want it to do. And I know the text processing of package names is not optimal, feel free to post better ways to do it :)
I know you can add a local path (shared NFS path) as a channel in Smart. Maybe that can help you simplify things?
Hans
Scratch that, try this instead (havent done this myself yet):
Do the following on all the machines:
1. execute> sudo smart config --set remove-packages=false (this will
keep the downloaded packages in /var/lib/smart/packages)
2. have all the machines point to one /var/lib/smart/packages share
(NFS, SMB etc)
Now update the machines one after the other - because the next PC will
see the already downloaded packages in the
shared /var/lib/smart/packages dir it will not download it again.
Downside is that
Hans van der Merwe wrote:
On Tue, 2007-09-25 at 14:15 +0000, Hans van der Merwe wrote:
On Tue, 2007-09-25 at 15:40 +0200, Sylvester Lykkehus wrote:
<snip> I know you can add a local path (shared NFS path) as a channel in Smart. Maybe that can help you simplify things?
Hans
Scratch that, try this instead (havent done this myself yet):
Do the following on all the machines: 1. execute> sudo smart config --set remove-packages=false (this will keep the downloaded packages in /var/lib/smart/packages) 2. have all the machines point to one /var/lib/smart/packages share (NFS, SMB etc)
Now update the machines one after the other - because the next PC will see the already downloaded packages in the shared /var/lib/smart/packages dir it will not download it again. Downside is that
will keep ALL packages, so you'll will end up with multiple versions of packages after a while. Can this work?
Hans
I will try this one out. Thanks for the input to all of you Best regards Sylvester -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Sylvester Lykkehus wrote:
Hans van der Merwe wrote:
<snip> Scratch that, try this instead (havent done this myself yet):
Do the following on all the machines: 1. execute> sudo smart config --set remove-packages=false (this will keep the downloaded packages in /var/lib/smart/packages) 2. have all the machines point to one /var/lib/smart/packages share (NFS, SMB etc)
Now update the machines one after the other - because the next PC will see the already downloaded packages in the shared /var/lib/smart/packages dir it will not download it again. Downside is that
will keep ALL packages, so you'll will end up with multiple versions of packages after a while. Can this work?
Hans
I will try this one out.
This is easy to configure, and not much to set up on the "clients". As long as all the machines are same version, and have the same repositories, this is the setup I will go with. Thanks
Thanks for the input to all of you
Best regards Sylvester
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Sylvester Lykkehus schrieb:
Hello list,
This question has puzzled my quite some time. I have 2 machines, both running openSUSE (10.2) They have different purposes, and therefore are quite different in amount/selection of installed packages.
I use (and is a big fan of) smart to keep both machines up to date. They both have the same repositories added. Even though the machines have different selection of packages, there are a lot of overlaps, for example KDE and Gnome are installed on both. That means, when I do a 'smart upgrade', I will use 2x the bandwidth for the packages that the machines have in common.
Isn't all the communication done via http? Then why not set up a proxy like squid and tell it to do caching? Then configure your online update to use the proxy and all the files you download the second time will come from the proxy cache (=hard disk) instead of the internet. Regards nordi -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
nordi wrote:
Sylvester Lykkehus schrieb:
Hello list,
This question has puzzled my quite some time. I have 2 machines, both running openSUSE (10.2) They have different purposes, and therefore are quite different in amount/selection of installed packages.
I use (and is a big fan of) smart to keep both machines up to date. They both have the same repositories added. Even though the machines have different selection of packages, there are a lot of overlaps, for example KDE and Gnome are installed on both. That means, when I do a 'smart upgrade', I will use 2x the bandwidth for the packages that the machines have in common.
Isn't all the communication done via http? Then why not set up a proxy like squid and tell it to do caching? Then configure your online update to use the proxy and all the files you download the second time will come from the proxy cache (=hard disk) instead of the internet.
Regards nordi
Now thats an interesting approach. Didn't even think of that, but I will definitely try this one out. Best regards Sylvester -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (5)
-
Hans van der Merwe
-
Koenraad Lelong
-
Nick Zentena
-
nordi
-
Sylvester Lykkehus