docs: moving svn http docs to vcs server management
This commit is contained in:
parent
1b2b21efe4
commit
d3a03bfbd2
2 changed files with 130 additions and 11 deletions
|
|
@ -29,13 +29,3 @@ use the following instructions:
|
|||
:menuselection:`Admin --> Settings --> labs` page.
|
||||
|
||||
.. image:: ../images/lab-setting.png
|
||||
|
||||
Available Lab Extras
|
||||
--------------------
|
||||
|
||||
Once lab settings are enabled, the following features are available.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
svn-http
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ For more information, see the following sections:
|
|||
* :ref:`vcs-server-versions`
|
||||
* :ref:`vcs-server-maintain`
|
||||
* :ref:`vcs-server-config-file`
|
||||
* :ref:`svn-http`
|
||||
|
||||
.. _install-vcs:
|
||||
|
||||
|
|
@ -297,5 +298,133 @@ For a more detailed explanation of the logger levers, see :ref:`debug-mode`.
|
|||
format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
|
||||
datefmt = %Y-%m-%d %H:%M:%S
|
||||
|
||||
.. _svn-http:
|
||||
|
||||
.. _Ask Ubuntu: http://askubuntu.com/questions/162391/how-do-i-fix-my-locale-issue
|
||||
|svn| With Write Over HTTP
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
To use |svn| with read/write support over the |svn| HTTP protocol, you have to
|
||||
configure the HTTP |svn| backend.
|
||||
|
||||
Prerequisites
|
||||
=============
|
||||
|
||||
- Enable HTTP support inside the admin VCS settings on your |RCE| instance
|
||||
- You need to install the following tools on the machine that is running an
|
||||
instance of |RCE|:
|
||||
``Apache HTTP Server`` and
|
||||
``mod_dav_svn``.
|
||||
|
||||
|
||||
Using Ubuntu Distribution as an example you can run:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ sudo apt-get install apache2 libapache2-mod-svn
|
||||
|
||||
Once installed you need to enable ``dav_svn``:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ sudo a2enmod dav_svn
|
||||
|
||||
Configuring Apache Setup
|
||||
========================
|
||||
|
||||
.. tip::
|
||||
|
||||
It is recommended to run Apache on a port other than 80, due to possible
|
||||
conflicts with other HTTP servers like nginx. To do this, set the
|
||||
``Listen`` parameter in the ``/etc/apache2/ports.conf`` file, for example
|
||||
``Listen 8090``.
|
||||
|
||||
|
||||
.. warning::
|
||||
|
||||
Make sure your Apache instance which runs the mod_dav_svn module is
|
||||
only accessible by RhodeCode. Otherwise everyone is able to browse
|
||||
the repositories or run subversion operations (checkout/commit/etc.).
|
||||
|
||||
It is also recommended to run apache as the same user as |RCE|, otherwise
|
||||
permission issues could occur. To do this edit the ``/etc/apache2/envvars``
|
||||
|
||||
.. code-block:: apache
|
||||
|
||||
export APACHE_RUN_USER=rhodecode
|
||||
export APACHE_RUN_GROUP=rhodecode
|
||||
|
||||
1. To configure Apache, create and edit a virtual hosts file, for example
|
||||
:file:`/etc/apache2/sites-available/default.conf`. Below is an example
|
||||
how to use one with auto-generated config ```mod_dav_svn.conf```
|
||||
from configured |RCE| instance.
|
||||
|
||||
.. code-block:: apache
|
||||
|
||||
<VirtualHost *:8080>
|
||||
ServerAdmin rhodecode-admin@localhost
|
||||
DocumentRoot /var/www/html
|
||||
ErrorLog ${'${APACHE_LOG_DIR}'}/error.log
|
||||
CustomLog ${'${APACHE_LOG_DIR}'}/access.log combined
|
||||
Include /home/user/.rccontrol/enterprise-1/mod_dav_svn.conf
|
||||
</VirtualHost>
|
||||
|
||||
|
||||
2. Go to the :menuselection:`Admin --> Settings --> VCS` page, and
|
||||
enable :guilabel:`Proxy Subversion HTTP requests`, and specify the
|
||||
:guilabel:`Subversion HTTP Server URL`.
|
||||
|
||||
3. Open the |RCE| configuration file,
|
||||
:file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini`
|
||||
|
||||
4. Add the following configuration option in the ``[app:main]``
|
||||
section if you don't have it yet.
|
||||
|
||||
This enables mapping of the created |RCE| repo groups into special |svn| paths.
|
||||
Each time a new repository group is created, the system will update
|
||||
the template file and create new mapping. Apache web server needs to be
|
||||
reloaded to pick up the changes on this file.
|
||||
It's recommended to add reload into a crontab so the changes can be picked
|
||||
automatically once someone creates a repository group inside RhodeCode.
|
||||
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
##############################################
|
||||
### Subversion proxy support (mod_dav_svn) ###
|
||||
##############################################
|
||||
## Enable or disable the config file generation.
|
||||
svn.proxy.generate_config = true
|
||||
## Generate config file with `SVNListParentPath` set to `On`.
|
||||
svn.proxy.list_parent_path = true
|
||||
## Set location and file name of generated config file.
|
||||
svn.proxy.config_file_path = %(here)s/mod_dav_svn.conf
|
||||
## File system path to the directory containing the repositories served by
|
||||
## RhodeCode.
|
||||
svn.proxy.parent_path_root = /path/to/repo_store
|
||||
## Used as a prefix to the <Location> block in the generated config file. In
|
||||
## most cases it should be set to `/`.
|
||||
svn.proxy.location_root = /
|
||||
|
||||
|
||||
This would create a special template file called ```mod_dav_svn.conf```. We
|
||||
used that file path in the apache config above inside the Include statement.
|
||||
|
||||
|
||||
Using |svn|
|
||||
===========
|
||||
|
||||
Once |svn| has been enabled on your instance, you can use it with the
|
||||
following examples. For more |svn| information, see the `Subversion Red Book`_
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# To clone a repository
|
||||
svn checkout http://my-svn-server.example.com/my-svn-repo
|
||||
|
||||
# svn commit
|
||||
svn commit
|
||||
|
||||
.. _Subversion Red Book: http://svnbook.red-bean.com/en/1.7/svn-book.html#svn.ref.svn
|
||||
|
||||
|
||||
.. _Ask Ubuntu: http://askubuntu.com/questions/162391/how-do-i-fix-my-locale-issue
|
||||
Loading…
Add table
Add a link
Reference in a new issue