You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by STF SVN <la...@gmail.com> on 2015/01/17 00:47:23 UTC

How to setup Write-through proxying (aka Replication on-the-fly) in VisualSVN server?

I know this mailing-list has nothing to do with VisualSVN server, but I
really need some help.

I need to set up SVN replication on the fly, aka write-through proxying,
using VisualSVN server.  I know the new version of VisualSVN server
supports replication, but for technical reason, I'm still using old version
2.7.

I have found some articles here and there, eg
http://www.visualsvn.com/support/svnbook/reposadmin/maint/#svn.reposadmin.maint.replication
and
http://svnbook.red-bean.com/en/1.7/svn.serverconfig.httpd.html#svn.serverconfig.httpd.extra.writethruproxy
etc etc and tried to follow them but failed.  Maybe because those
procedures are for Linux-based SVN server?  And how much are those articles
relevant to VisualSVN server, ie Windows-based SVN server?

Has anyone managed to do this?

I could restart the whole setting from zero.  Could someone point me out
the correct procedure to configure VisualSVN Server, ie in Windows, to
support write-through proxying, please?

Thanks a lot

Re: How to setup Write-through proxying (aka Replication on-the-fly) in VisualSVN server?

Posted by STF SVN <la...@gmail.com>.
On 17 January 2015 at 08:10, Pavel Lyalyakin <pa...@visualsvn.com>
wrote:

> Hello,
>
> > On 17 January 2015 at 00:47, STF SVN <la...@gmail.com> wrote:
> >>
> >> I know this mailing-list has nothing to do with VisualSVN server, but I
> >> really need some help.
> >>
> >> I need to set up SVN replication on the fly, aka write-through proxying,
> >> using VisualSVN server.  I know the new version of VisualSVN server
> supports
> >> replication, but for technical reason, I'm still using old version 2.7.
>
> You can't actually call write-through proxy as "replication on the
> fly".


Oh, really?  How do you call the replication method in the image below?
Only "write-through proxy"?
http://s22.postimg.org/aw3j599gh/svn_replication.png


> Its simple replication solution that runs `svnsync` on master
> server *after* each commit by post- hook scripts. Commits always go to
> master in write-through proxy, the "proxy" part is just about
> redirecting all writes to go to master server which then replicates
> them to slaves using `svnsync`. Another note: write-through proxy does
> not work with Integrated Windows Authentication (i.e. AD Single
> Sign-On).
>

We are not using SSO, but we have to provide our credentials which are
Active Directory based, and VisualSVN server checks up credentials in the
Active Directory.  Is this the reason why "write-through proxy" does not
work for us?


>
> BTW, what are the technical reasons that require you to use VisualSVN
> Server 2.7 and don't allow it to be upgraded to 3.2?
>

Political, financial, habit, etc... too long to explain.



>  >> I have found some articles here and there, eg
> >>
> http://www.visualsvn.com/support/svnbook/reposadmin/maint/#svn.reposadmin.maint.replication
> >> and
> >>
> http://svnbook.red-bean.com/en/1.7/svn.serverconfig.httpd.html#svn.serverconfig.httpd.extra.writethruproxy
> >> etc etc and tried to follow them but failed.  Maybe because those
> procedures
> >> are for Linux-based SVN server?  And how much are those articles
> relevant to
> >> VisualSVN server, ie Windows-based SVN server?
> >
> > I've read
> >
> http://www.visualsvn.com/support/svnbook/reposadmin/maint/#svn.reposadmin.maint.replication
> > several times, but I have a doubt.  Does it apply totally?  Can I
> consider
> > VisualSVN Server like a *generic* Apache HTTP server?  Or VisualSVN
> Server
> > has some special modification to Apache such that something wouldn't
> work?
>
> It applies but not totally because sample hook scripts specified in
> SVNBook work on *nix Shell only, so they have to be adjusted to work
> on Windows.
>

When I tried to set up Write-though proxy, since that didn't work as
expected, I tried to look "elsewhere" to get some "inspiration".  As I know
nothing about how hooks work, it's possible that what I was trying to do
does not make sense.



> Here is a sample post-commit hook that will work on Windows (its a
> batch script (.bat))
> [[
> "C:\Program Files (x86)\VisualSVN Server\bin\svnsync.exe" sync
> https://SLAVE/svn/repo file:///C:\Repositories\MASTER
> exit 0
> ]]
>
> and post-revprop-change hook
> [[
> "C:\Program Files (x86)\VisualSVN Server\bin\svnsync.exe"
> copy-revprops https://SLAVE/svn/repo file:///C:\Repositories\MASTER
> exit 0
> ]]
>

Would it work with "AD-integration"?


>  > I have also found this article:
> >
> http://www.cardinalpath.com/how-to-use-svnsync-to-create-a-mirror-backup-of-your-subversion-repository/
> > but it didn’t talk about putting the SVNMasterURI variable inside HTTPD
> > config on the slave server.  And as a matter of fact, I’ve gone through
> this
> > procedure but I cannot commit to the slave server!
>
> The article is not about write-through proxy, it's about creating a
> backup repository that's always up-to-date. That's why this article
> doesn't cover the proxy part (i.e. SVNMaserURI config on slave
> server).
>

Same reason above, I was desperate when things didn't work out as expected,
so I tried to "workaround" problem, but what I've done might not make sense.

Re: How to setup Write-through proxying (aka Replication on-the-fly) in VisualSVN server?

Posted by Pavel Lyalyakin <pa...@visualsvn.com>.
Hello,

> On 17 January 2015 at 00:47, STF SVN <la...@gmail.com> wrote:
>>
>> I know this mailing-list has nothing to do with VisualSVN server, but I
>> really need some help.
>>
>> I need to set up SVN replication on the fly, aka write-through proxying,
>> using VisualSVN server.  I know the new version of VisualSVN server supports
>> replication, but for technical reason, I'm still using old version 2.7.

You can't actually call write-through proxy as "replication on the
fly". Its simple replication solution that runs `svnsync` on master
server *after* each commit by post- hook scripts. Commits always go to
master in write-through proxy, the "proxy" part is just about
redirecting all writes to go to master server which then replicates
them to slaves using `svnsync`. Another note: write-through proxy does
not work with Integrated Windows Authentication (i.e. AD Single
Sign-On).

BTW, what are the technical reasons that require you to use VisualSVN
Server 2.7 and don't allow it to be upgraded to 3.2?

>> I have found some articles here and there, eg
>> http://www.visualsvn.com/support/svnbook/reposadmin/maint/#svn.reposadmin.maint.replication
>> and
>> http://svnbook.red-bean.com/en/1.7/svn.serverconfig.httpd.html#svn.serverconfig.httpd.extra.writethruproxy
>> etc etc and tried to follow them but failed.  Maybe because those procedures
>> are for Linux-based SVN server?  And how much are those articles relevant to
>> VisualSVN server, ie Windows-based SVN server?
>
> I've read
> http://www.visualsvn.com/support/svnbook/reposadmin/maint/#svn.reposadmin.maint.replication
> several times, but I have a doubt.  Does it apply totally?  Can I consider
> VisualSVN Server like a *generic* Apache HTTP server?  Or VisualSVN Server
> has some special modification to Apache such that something wouldn't work?

It applies but not totally because sample hook scripts specified in
SVNBook work on *nix Shell only, so they have to be adjusted to work
on Windows.

Here is a sample post-commit hook that will work on Windows (its a
batch script (.bat))
[[
"C:\Program Files (x86)\VisualSVN Server\bin\svnsync.exe" sync
https://SLAVE/svn/repo file:///C:\Repositories\MASTER
exit 0
]]

and post-revprop-change hook
[[
"C:\Program Files (x86)\VisualSVN Server\bin\svnsync.exe"
copy-revprops https://SLAVE/svn/repo file:///C:\Repositories\MASTER
exit 0
]]

> I have also found this article:
> http://www.cardinalpath.com/how-to-use-svnsync-to-create-a-mirror-backup-of-your-subversion-repository/
> but it didn’t talk about putting the SVNMasterURI variable inside HTTPD
> config on the slave server.  And as a matter of fact, I’ve gone through this
> procedure but I cannot commit to the slave server!

The article is not about write-through proxy, it's about creating a
backup repository that's always up-to-date. That's why this article
doesn't cover the proxy part (i.e. SVNMaserURI config on slave
server).

--
With best regards,
Pavel Lyalyakin
VisualSVN Team

Re: How to setup Write-through proxying (aka Replication on-the-fly) in VisualSVN server?

Posted by Andreas Stieger <an...@gmx.de>.
Hello,

On 22/01/15 19:04, STF SVN wrote:
> This is the authentication options in my VisualSVN server.  Are they the
> same as yours?
> http://s14.postimg.org/c0y0cehht/STF_Vis_SVN_auth_config.png

Yes this option is known to work with write-through proxying.

Andreas

Re: How to setup Write-through proxying (aka Replication on-the-fly) in VisualSVN server?

Posted by STF SVN <la...@gmail.com>.
On 22 January 2015 at 17:13, Andreas Stieger <an...@gmx.de> wrote:

> Hello,
>
> On 21/01/15 20:56, STF SVN wrote:
> > OTOH, another mail said that if replication for VisualSVN does not work
> > if Windows Authentication.  Do you use Windows Authentication?
>
> I can confirm that write-through proxying and svnsyc replication works
> with VisualSVN Standard Edition, with authenticating of users/groups
> against the Windows domain / Active Directory, with the "HTTP basic
> auth" option. I cannot speak about the "integrated authentication"
> (single sign-on) exclusive to the paid version, but due to the nature of
> the protocol would expect that not to work.
>
> Andreas
>


This is the authentication options in my VisualSVN server.  Are they the
same as yours?
http://s14.postimg.org/c0y0cehht/STF_Vis_SVN_auth_config.png

If yes, could you give me a detailed procedure how you managed to make
write-through proxying work, please?  Or at least tell me what procedure
(webpage) you are based on, and at what steps you deviated from the written
procedure?

Thanks a lot in advance.

Re: How to setup Write-through proxying (aka Replication on-the-fly) in VisualSVN server?

Posted by Andreas Stieger <an...@gmx.de>.
Hello,

On 21/01/15 20:56, STF SVN wrote:
> OTOH, another mail said that if replication for VisualSVN does not work
> if Windows Authentication.  Do you use Windows Authentication?

I can confirm that write-through proxying and svnsyc replication works
with VisualSVN Standard Edition, with authenticating of users/groups
against the Windows domain / Active Directory, with the "HTTP basic
auth" option. I cannot speak about the "integrated authentication"
(single sign-on) exclusive to the paid version, but due to the nature of
the protocol would expect that not to work.

Andreas

Re: How to setup Write-through proxying (aka Replication on-the-fly) in VisualSVN server?

Posted by STF SVN <la...@gmail.com>.
Hi Andreas, thanks for your reply.

Your details (replicating hooks, httpd config, etc) are too vague for
someone like me who knows very very little SVN server internals.  Would it
be possible to have the procedure in written form?

OTOH, another mail said that if replication for VisualSVN does not work if
Windows Authentication.  Do you use Windows Authentication?

Thanks

On 17 January 2015 at 01:14, Andreas Stieger <an...@gmx.de> wrote:

> Hi,
>
> A replicating setup with write-through proxies is possible with VisualSVN
> Server standard and standard tools, I had this in production for years. Set
> up the replicating hooks.
> On slaves, adjust the custom httpd config to load the required modules
> (proxy, http) and add a receiving location for the sync.
>
> Andreas
>
> Am 17.01.2015 um 00:55 schrieb STF SVN <la...@gmail.com>:
>
> I forgot some important questions:
>
> On 17 January 2015 at 00:47, STF SVN <la...@gmail.com> wrote:
>
>> I know this mailing-list has nothing to do with VisualSVN server, but I
>> really need some help.
>>
>> I need to set up SVN replication on the fly, aka write-through proxying,
>> using VisualSVN server.  I know the new version of VisualSVN server
>> supports replication, but for technical reason, I'm still using old version
>> 2.7.
>>
>> I have found some articles here and there, eg
>> http://www.visualsvn.com/support/svnbook/reposadmin/maint/#svn.reposadmin.maint.replication
>> and
>> http://svnbook.red-bean.com/en/1.7/svn.serverconfig.httpd.html#svn.serverconfig.httpd.extra.writethruproxy
>> etc etc and tried to follow them but failed.  Maybe because those
>> procedures are for Linux-based SVN server?  And how much are those articles
>> relevant to VisualSVN server, ie Windows-based SVN server?
>>
>
> I've read
> http://www.visualsvn.com/support/svnbook/reposadmin/maint/#svn.reposadmin.maint.replication
> several times, but I have a doubt.  Does it apply totally?  Can I consider
> VisualSVN Server like a *generic* Apache HTTP server?  Or VisualSVN Server
> has some special modification to Apache such that something wouldn't work?
>
> I have also found this article:
>
> http://www.cardinalpath.com/how-to-use-svnsync-to-create-a-mirror-backup-of-your-subversion-repository/
> but it didn’t talk about putting the SVNMasterURI variable inside HTTPD
> config on the slave server.  And as a matter of fact, I’ve gone through
> this procedure but I cannot commit to the slave server!
>
>
>> Has anyone managed to do this (ie Write-through proxying with VisualSVN
>> Server)?
>>
>> I could restart the whole setting from zero.  Could someone point me out
>> the correct procedure to configure VisualSVN Server, ie in Windows, to
>> support write-through proxying, please?
>>
>> Thanks a lot
>>
>
>

Re: How to setup Write-through proxying (aka Replication on-the-fly) in VisualSVN server?

Posted by Andreas Stieger <an...@gmx.de>.
Hi,

A replicating setup with write-through proxies is possible with VisualSVN Server standard and standard tools, I had this in production for years. Set up the replicating hooks.
On slaves, adjust the custom httpd config to load the required modules (proxy, http) and add a receiving location for the sync.

Andreas

Am 17.01.2015 um 00:55 schrieb STF SVN <la...@gmail.com>:

> I forgot some important questions:
> 
> On 17 January 2015 at 00:47, STF SVN <la...@gmail.com> wrote:
>> I know this mailing-list has nothing to do with VisualSVN server, but I really need some help.
>> 
>> I need to set up SVN replication on the fly, aka write-through proxying, using VisualSVN server.  I know the new version of VisualSVN server supports replication, but for technical reason, I'm still using old version 2.7.
>> 
>> I have found some articles here and there, eg http://www.visualsvn.com/support/svnbook/reposadmin/maint/#svn.reposadmin.maint.replication and http://svnbook.red-bean.com/en/1.7/svn.serverconfig.httpd.html#svn.serverconfig.httpd.extra.writethruproxy etc etc and tried to follow them but failed.  Maybe because those procedures are for Linux-based SVN server?  And how much are those articles relevant to VisualSVN server, ie Windows-based SVN server?
> 
> I've read http://www.visualsvn.com/support/svnbook/reposadmin/maint/#svn.reposadmin.maint.replication several times, but I have a doubt.  Does it apply totally?  Can I consider VisualSVN Server like a *generic* Apache HTTP server?  Or VisualSVN Server has some special modification to Apache such that something wouldn't work?
> 
> I have also found this article:
> http://www.cardinalpath.com/how-to-use-svnsync-to-create-a-mirror-backup-of-your-subversion-repository/
> but it didn’t talk about putting the SVNMasterURI variable inside HTTPD config on the slave server.  And as a matter of fact, I’ve gone through this procedure but I cannot commit to the slave server!
>  
>> Has anyone managed to do this (ie Write-through proxying with VisualSVN Server)?
>> 
>> I could restart the whole setting from zero.  Could someone point me out the correct procedure to configure VisualSVN Server, ie in Windows, to support write-through proxying, please?
>> 
>> Thanks a lot
> 

Re: How to setup Write-through proxying (aka Replication on-the-fly) in VisualSVN server?

Posted by STF SVN <la...@gmail.com>.
I forgot some important questions:

On 17 January 2015 at 00:47, STF SVN <la...@gmail.com> wrote:

> I know this mailing-list has nothing to do with VisualSVN server, but I
> really need some help.
>
> I need to set up SVN replication on the fly, aka write-through proxying,
> using VisualSVN server.  I know the new version of VisualSVN server
> supports replication, but for technical reason, I'm still using old version
> 2.7.
>
> I have found some articles here and there, eg
> http://www.visualsvn.com/support/svnbook/reposadmin/maint/#svn.reposadmin.maint.replication
> and
> http://svnbook.red-bean.com/en/1.7/svn.serverconfig.httpd.html#svn.serverconfig.httpd.extra.writethruproxy
> etc etc and tried to follow them but failed.  Maybe because those
> procedures are for Linux-based SVN server?  And how much are those articles
> relevant to VisualSVN server, ie Windows-based SVN server?
>

I've read
http://www.visualsvn.com/support/svnbook/reposadmin/maint/#svn.reposadmin.maint.replication
several times, but I have a doubt.  Does it apply totally?  Can I consider
VisualSVN Server like a *generic* Apache HTTP server?  Or VisualSVN Server
has some special modification to Apache such that something wouldn't work?

I have also found this article:
http://www.cardinalpath.com/how-to-use-svnsync-to-create-a-mirror-backup-of-your-subversion-repository/
but it didn’t talk about putting the SVNMasterURI variable inside HTTPD
config on the slave server.  And as a matter of fact, I’ve gone through
this procedure but I cannot commit to the slave server!


> Has anyone managed to do this (ie Write-through proxying with VisualSVN
> Server)?
>
> I could restart the whole setting from zero.  Could someone point me out
> the correct procedure to configure VisualSVN Server, ie in Windows, to
> support write-through proxying, please?
>
> Thanks a lot
>