You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Bob Archer <Bo...@amsi.com> on 2013/02/01 00:06:15 UTC
RE: software distribution with subversion
> I am faced with a problem where I need to distribute a directory containing
> about 60 GB worth of software on a Linux file server to about
> 100 systems. The software must be localized on those systems and not shared
> out over NFS. On a regular basis, software may be added or removed from the
> directory, and all the clients should update accordingly in the evening. During
> the update period, some client systems may be off.
>
> I think that Subversion would be a reasonable way to solve this problem which
> isn't quite the type of problem that rsync is intended to handle (because of the
> number of machines). However, for a variety of reasons, I don't want to run
> subversion on the actual file server. Instead, nightly, I'd like to rsync changes in
> the contents of the software directory on the file server to a software
> distribution server which would run its own svnserve. The clients would then
> connect up to the server nightly, and update themselves accordingly. Because
> of the versioning, if a client misses an update, it would be updated the next
> time around, even if its been off for a while.
>
> The inital update between the file server and the software update server would
> require rsyncing the whole 60 GB of software to a "working directory", after
> which, to make subversion see this as a "working directory", I would have to
> commit the entire directory, then check it back out. This process seems like a
> bit of a waste, but it's a one time process, and I don't really see any way around
> it. In the future, I would like to be able to rsync changes between the file
> server and the working directory on the software distribution server, which
> would including using --delete to ensure that software deleted from the file
> server is also deleted from the subversion working idrectory, and including the
> excluding of the .svn directory from the working copy.
> However, after the rsync happens, I now need to run a command that would
> update the repository with the state of the working directory. However, it's not
> exactly clear how this would work? Running an "svn update"
> isn't going to delete directories from the repository that were deleted from the
> working directory. I believe you need to use "svn delete" for this?
>
> Any ideas that anyone might be able to offer?
>
> I'm not on the list, so please ensure that you CC: me in any response.
>
> Thanks for your help!
>
What you need to do could work. I assume this "software" in order to run can build built or whatever during your nightly update on each client?
You keep saying "rsyncing" ... you wouldn't use that. You wouldn't use that of course, you would use the svn client binary.
For you initial load... if the software is on the server where you will house your repository you can just import the data into the repository from that file... there is no need to send the data twice. In other words, you can have both a working copy and a repository on your central server.
> However, after the rsync happens, I now need to run a command that would
> update the repository with the state of the working directory. However, it's not
> exactly clear how this would work? Running an "svn update"
"svn update" brings any changes in the repository to your working copy. "svn commit" does the opposite... it puts any changes in a working directory into the repository.
Hth...
That said, if this is actual software, wouldn't using one of the many package management tools available in Linux be a better fit?
BOb
Re: software distribution with subversion
Posted by Les Mikesell <le...@gmail.com>.
On Thu, Jan 31, 2013 at 8:18 PM, Jason Keltz <ja...@cse.yorku.ca> wrote:
> >
> See my email to Les... If only the rsync server could save a copy of the
> file checksums when it runs, it would probably decrease the sync time by
> half and save a whole lot of disk activity...
If you don't use the --ignore-times option with rsync it will skip the
checksum comparison on files where the timestamp, length, etc. match.
It should only have to read the directory on both sides if nothing
changes between runs. Be sure you are using options that propagate
the timestamp (like -a) for this to work.
--
Les Mikesell
lesmikesell@gmail.com
Re: software distribution with subversion
Posted by Nico Kadel-Garcia <nk...@gmail.com>.
On Thu, Jan 31, 2013 at 9:18 PM, Jason Keltz <ja...@cse.yorku.ca> wrote:
> On 31/01/2013 9:13 PM, Ryan Schmidt wrote:
>> Subversion is not a software distribution tool; it is a document and
>> revision management system. Use a different tool. As someone else said,
>> rsync seems like a good tool for this job; I didn't understand why you think
>> using rsync directly between your file server and your clients won't work.
>>
>
> See my email to Les... If only the rsync server could save a copy of the
> file checksums when it runs, it would probably decrease the sync time by
> half and save a whole lot of disk activity...
This.... sounds like somone wants to use the same screwdriver for all
screws in this birdhouse.
It's theoretically possible to set a canonical Subversion and
auto-propagate changes to it, from the "file server" or from the an
rsynced copy of the fileserver with a local working copy on the
Subversion master. But it's going to be bulky, and slow. If that 60
GBytes has a lot of churn due to rapidly changing binaries or
extensive static database files, it's going to get awkward indeed. And
because the "file server" you're propagating these changes from is
neither a Subversion server, nor a Subversion client, it's much
harder. Moreover, this doesn't seem to be the kind of "rollback the
changes to a well-defined date" that Subversion does so well,a nd the
changes from the master get fed to a trunk and will then have to be
propagated to branches., and each machine will need a different
branch.
This.... gets tricky. One can differentiate among the slightly
different environments by maintaining a trunk and merging the changes
to the branches, but that can get awkward. Is it possible to set up
tags that haven "svn:external" settings that point to sets of software
from the master, and then the individual hosts are configured locally
and have their changes propagated to the branches on the master?
And you know, this sounds like an absolute flipping deployment
disaster I dealt with about 12 years ago. The site architect thought
the clever thing to do was make a complete tarball bundle for all
deployments, and the whole compressed tarball had to be pushed *every
time*, and releases could only happen with the complete tarball.
Various forms of chaos ensued. I taught them to use packages, to
deploy kernels, in particular, as a separate object so they could be
deployed separately and with rollback separate from the rest of the
system. This fixed the ongoing problem that any one component that
failed would stop the *whole* deployment and push back even the
smallest fixes for as much as six months.
So while I've offered some hints, I'm gong to really suggest to Jason
that he think hard about modularizing the components of this set of
packages before he even starts this project.
Re: software distribution with subversion
Posted by Jason Keltz <ja...@cse.yorku.ca>.
On 31/01/2013 9:13 PM, Ryan Schmidt wrote:
> On Jan 31, 2013, at 20:05, Jason Keltz wrote:
>
>> On 31/01/2013 6:06 PM, Bob Archer wrote:
>>> What you need to do could work. I assume this "software" in order to run can build built or whatever during your nightly update on each client?
>>>
>>> You keep saying "rsyncing" ... you wouldn't use that. You wouldn't use that of course, you would use the svn client binary.
>> Actually, maybe I wasn't clear..
>> The software includes various packages like say, Matlab, or Maple, or whatever else, already installed... imagine a directory on the fileserver.. say, /local/software which includes "bin", "lib", etc... I'm not "installing" the software. it's already been installed.. I'm just syncing a directory between machines..
>> As for rsyncing.. I would rsync the software from the "file server" to the "software distribution" server, and then use svn from there to check in all the changes.
>>
>>> For you initial load... if the software is on the server where you will house your repository you can just import the data into the repository from that file... there is no need to send the data twice. In other words, you can have both a working copy and a repository on your central server.
>> Yes. Initially I would do an import, but the problem is... the next day, the software gets updated on the "real" file server... say, new version of Matlab or something... in the evening, I want the process to run that would rsync the data (with all the changes) from the file server to the software distribution server, do something to commit the changes, then the 100 clients would eventually each "svn update". However, to be able to commit the changes, I need to have a working copy on the software distribution server....
>>
>>>> However, after the rsync happens, I now need to run a command that would
>>>> update the repository with the state of the working directory. However, it's not
>>>> exactly clear how this would work? Running an "svn update"
>>> "svn update" brings any changes in the repository to your working copy. "svn commit" does the opposite... it puts any changes in a working directory into the repository.
>> See, this is where I'm confused... I created a few directories including "bin" and "pkg" for a test. All committed fine... erased them from the working copy, did a commit then a status and I see:
>>
>> ! bin
>> ! pkg
>>
>> but when I go into a different directory and check out the current state..
>>
>> A pkg
>> A bin
>> Checked out revision 2.
>>
>> they're still there...
> Correct. Subversion does not track your movements. You must tell Subversion what you are moving and deleting by doing the moves and deletes using "svn mv" and "svn rm", not using regular OS commands.
>
>
>>> Hth...
>>>
>>> That said, if this is actual software, wouldn't using one of the many package management tools available in Linux be a better fit?
>> The thing is, I'm moving around already installed software, and there's nothing that great, as far as I can see, for doing that. The twitter guys are using something they wrote called "murder" which uses torrent to do this kind of thing... excellent idea, but it uses Ruby and several other tools ... and I don't want to get into that at the moment...
> Subversion is not going to be a satisfactory solution for this use case. Besides all the issues you're describing with setting up the server-side infrastructure for this, and as was already mentioned, when you check out a working copy of this on your clients, there will be a "duplicate" pristine copy of everything. So if you have 60GB of software, it'll take up 120GB of space on the client machine.
I'm glad you brought that up :)
> Subversion is not a software distribution tool; it is a document and revision management system. Use a different tool. As someone else said, rsync seems like a good tool for this job; I didn't understand why you think using rsync directly between your file server and your clients won't work.
>
See my email to Les... If only the rsync server could save a copy of
the file checksums when it runs, it would probably decrease the sync
time by half and save a whole lot of disk activity...
--
Jason Keltz
Manager of Development
Department of Computer Science and Engineering
York University, Toronto, Canada
Tel: 416-736-2100 x. 33570
Fax: 416-736-5872
Re: software distribution with subversion
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jan 31, 2013, at 20:05, Jason Keltz wrote:
> On 31/01/2013 6:06 PM, Bob Archer wrote:
>>
>> What you need to do could work. I assume this "software" in order to run can build built or whatever during your nightly update on each client?
>>
>> You keep saying "rsyncing" ... you wouldn't use that. You wouldn't use that of course, you would use the svn client binary.
> Actually, maybe I wasn't clear..
> The software includes various packages like say, Matlab, or Maple, or whatever else, already installed... imagine a directory on the fileserver.. say, /local/software which includes "bin", "lib", etc... I'm not "installing" the software. it's already been installed.. I'm just syncing a directory between machines..
> As for rsyncing.. I would rsync the software from the "file server" to the "software distribution" server, and then use svn from there to check in all the changes.
>
>> For you initial load... if the software is on the server where you will house your repository you can just import the data into the repository from that file... there is no need to send the data twice. In other words, you can have both a working copy and a repository on your central server.
> Yes. Initially I would do an import, but the problem is... the next day, the software gets updated on the "real" file server... say, new version of Matlab or something... in the evening, I want the process to run that would rsync the data (with all the changes) from the file server to the software distribution server, do something to commit the changes, then the 100 clients would eventually each "svn update". However, to be able to commit the changes, I need to have a working copy on the software distribution server....
>
>>> However, after the rsync happens, I now need to run a command that would
>>> update the repository with the state of the working directory. However, it's not
>>> exactly clear how this would work? Running an "svn update"
>> "svn update" brings any changes in the repository to your working copy. "svn commit" does the opposite... it puts any changes in a working directory into the repository.
> See, this is where I'm confused... I created a few directories including "bin" and "pkg" for a test. All committed fine... erased them from the working copy, did a commit then a status and I see:
>
> ! bin
> ! pkg
>
> but when I go into a different directory and check out the current state..
>
> A pkg
> A bin
> Checked out revision 2.
>
> they're still there...
Correct. Subversion does not track your movements. You must tell Subversion what you are moving and deleting by doing the moves and deletes using "svn mv" and "svn rm", not using regular OS commands.
>> Hth...
>>
>> That said, if this is actual software, wouldn't using one of the many package management tools available in Linux be a better fit?
>
> The thing is, I'm moving around already installed software, and there's nothing that great, as far as I can see, for doing that. The twitter guys are using something they wrote called "murder" which uses torrent to do this kind of thing... excellent idea, but it uses Ruby and several other tools ... and I don't want to get into that at the moment...
Subversion is not going to be a satisfactory solution for this use case. Besides all the issues you're describing with setting up the server-side infrastructure for this, and as was already mentioned, when you check out a working copy of this on your clients, there will be a "duplicate" pristine copy of everything. So if you have 60GB of software, it'll take up 120GB of space on the client machine.
Subversion is not a software distribution tool; it is a document and revision management system. Use a different tool. As someone else said, rsync seems like a good tool for this job; I didn't understand why you think using rsync directly between your file server and your clients won't work.
Re: software distribution with subversion
Posted by Jason Keltz <ja...@cse.yorku.ca>.
On 31/01/2013 6:06 PM, Bob Archer wrote:
>> I am faced with a problem where I need to distribute a directory containing
>> about 60 GB worth of software on a Linux file server to about
>> 100 systems. The software must be localized on those systems and not shared
>> out over NFS. On a regular basis, software may be added or removed from the
>> directory, and all the clients should update accordingly in the evening. During
>> the update period, some client systems may be off.
>>
>> I think that Subversion would be a reasonable way to solve this problem which
>> isn't quite the type of problem that rsync is intended to handle (because of the
>> number of machines). However, for a variety of reasons, I don't want to run
>> subversion on the actual file server. Instead, nightly, I'd like to rsync changes in
>> the contents of the software directory on the file server to a software
>> distribution server which would run its own svnserve. The clients would then
>> connect up to the server nightly, and update themselves accordingly. Because
>> of the versioning, if a client misses an update, it would be updated the next
>> time around, even if its been off for a while.
>>
>> The inital update between the file server and the software update server would
>> require rsyncing the whole 60 GB of software to a "working directory", after
>> which, to make subversion see this as a "working directory", I would have to
>> commit the entire directory, then check it back out. This process seems like a
>> bit of a waste, but it's a one time process, and I don't really see any way around
>> it. In the future, I would like to be able to rsync changes between the file
>> server and the working directory on the software distribution server, which
>> would including using --delete to ensure that software deleted from the file
>> server is also deleted from the subversion working idrectory, and including the
>> excluding of the .svn directory from the working copy.
>> However, after the rsync happens, I now need to run a command that would
>> update the repository with the state of the working directory. However, it's not
>> exactly clear how this would work? Running an "svn update"
>> isn't going to delete directories from the repository that were deleted from the
>> working directory. I believe you need to use "svn delete" for this?
>>
>> Any ideas that anyone might be able to offer?
>>
>> I'm not on the list, so please ensure that you CC: me in any response.
>>
>> Thanks for your help!
>>
>
> What you need to do could work. I assume this "software" in order to run can build built or whatever during your nightly update on each client?
>
> You keep saying "rsyncing" ... you wouldn't use that. You wouldn't use that of course, you would use the svn client binary.
Actually, maybe I wasn't clear..
The software includes various packages like say, Matlab, or Maple, or
whatever else, already installed... imagine a directory on the
fileserver.. say, /local/software which includes "bin", "lib", etc...
I'm not "installing" the software. it's already been installed.. I'm
just syncing a directory between machines..
As for rsyncing.. I would rsync the software from the "file server" to
the "software distribution" server, and then use svn from there to check
in all the changes.
> For you initial load... if the software is on the server where you will house your repository you can just import the data into the repository from that file... there is no need to send the data twice. In other words, you can have both a working copy and a repository on your central server.
Yes. Initially I would do an import, but the problem is... the next
day, the software gets updated on the "real" file server... say, new
version of Matlab or something... in the evening, I want the process to
run that would rsync the data (with all the changes) from the file
server to the software distribution server, do something to commit the
changes, then the 100 clients would eventually each "svn update".
However, to be able to commit the changes, I need to have a working copy
on the software distribution server....
>> However, after the rsync happens, I now need to run a command that would
>> update the repository with the state of the working directory. However, it's not
>> exactly clear how this would work? Running an "svn update"
> "svn update" brings any changes in the repository to your working copy. "svn commit" does the opposite... it puts any changes in a working directory into the repository.
See, this is where I'm confused... I created a few directories including
"bin" and "pkg" for a test. All committed fine... erased them from the
working copy, did a commit then a status and I see:
! bin
! pkg
but when I go into a different directory and check out the current state..
A pkg
A bin
Checked out revision 2.
they're still there...
> Hth...
>
> That said, if this is actual software, wouldn't using one of the many package management tools available in Linux be a better fit?
The thing is, I'm moving around already installed software, and there's
nothing that great, as far as I can see, for doing that. The twitter
guys are using something they wrote called "murder" which uses torrent
to do this kind of thing... excellent idea, but it uses Ruby and
several other tools ... and I don't want to get into that at the moment...
Jason.