Show More
@@ -0,0 +1,137 b'' | |||||
|
1 | .. _svn-http: | |||
|
2 | ||||
|
3 | |svn| With Write Over HTTP | |||
|
4 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | |||
|
5 | ||||
|
6 | To use |svn| with read/write support over the |svn| HTTP protocol, you have to | |||
|
7 | configure the HTTP |svn| backend. | |||
|
8 | ||||
|
9 | Prerequisites | |||
|
10 | ============= | |||
|
11 | ||||
|
12 | - Enable HTTP support inside the admin VCS settings on your |RCE| instance | |||
|
13 | - You need to install the following tools on the machine that is running an | |||
|
14 | instance of |RCE|: | |||
|
15 | ``Apache HTTP Server`` and ``mod_dav_svn``. | |||
|
16 | ||||
|
17 | ||||
|
18 | Using Ubuntu 14.04 Distribution as an example execute the following: | |||
|
19 | ||||
|
20 | .. code-block:: bash | |||
|
21 | ||||
|
22 | $ sudo apt-get install apache2 libapache2-mod-svn | |||
|
23 | ||||
|
24 | Once installed you need to enable ``dav_svn``: | |||
|
25 | ||||
|
26 | .. code-block:: bash | |||
|
27 | ||||
|
28 | $ sudo a2enmod dav_svn | |||
|
29 | $ sudo a2enmod headers | |||
|
30 | ||||
|
31 | ||||
|
32 | Configuring Apache Setup | |||
|
33 | ======================== | |||
|
34 | ||||
|
35 | .. tip:: | |||
|
36 | ||||
|
37 | It is recommended to run Apache on a port other than 80, due to possible | |||
|
38 | conflicts with other HTTP servers like nginx. To do this, set the | |||
|
39 | ``Listen`` parameter in the ``/etc/apache2/ports.conf`` file, for example | |||
|
40 | ``Listen 8090``. | |||
|
41 | ||||
|
42 | ||||
|
43 | .. warning:: | |||
|
44 | ||||
|
45 | Make sure your Apache instance which runs the mod_dav_svn module is | |||
|
46 | only accessible by |RCE|. Otherwise everyone is able to browse | |||
|
47 | the repositories or run subversion operations (checkout/commit/etc.). | |||
|
48 | ||||
|
49 | It is also recommended to run apache as the same user as |RCE|, otherwise | |||
|
50 | permission issues could occur. To do this edit the ``/etc/apache2/envvars`` | |||
|
51 | ||||
|
52 | .. code-block:: apache | |||
|
53 | ||||
|
54 | export APACHE_RUN_USER=rhodecode | |||
|
55 | export APACHE_RUN_GROUP=rhodecode | |||
|
56 | ||||
|
57 | 1. To configure Apache, create and edit a virtual hosts file, for example | |||
|
58 | :file:`/etc/apache2/sites-available/default.conf`. Below is an example | |||
|
59 | how to use one with auto-generated config ```mod_dav_svn.conf``` | |||
|
60 | from configured |RCE| instance. | |||
|
61 | ||||
|
62 | .. code-block:: apache | |||
|
63 | ||||
|
64 | <VirtualHost *:8090> | |||
|
65 | ServerAdmin rhodecode-admin@localhost | |||
|
66 | DocumentRoot /var/www/html | |||
|
67 | ErrorLog ${'${APACHE_LOG_DIR}'}/error.log | |||
|
68 | CustomLog ${'${APACHE_LOG_DIR}'}/access.log combined | |||
|
69 | Include /home/user/.rccontrol/enterprise-1/mod_dav_svn.conf | |||
|
70 | </VirtualHost> | |||
|
71 | ||||
|
72 | ||||
|
73 | 2. Go to the :menuselection:`Admin --> Settings --> VCS` page, and | |||
|
74 | enable :guilabel:`Proxy Subversion HTTP requests`, and specify the | |||
|
75 | :guilabel:`Subversion HTTP Server URL`. | |||
|
76 | ||||
|
77 | 3. Open the |RCE| configuration file, | |||
|
78 | :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` | |||
|
79 | ||||
|
80 | 4. Add the following configuration option in the ``[app:main]`` | |||
|
81 | section if you don't have it yet. | |||
|
82 | ||||
|
83 | This enables mapping of the created |RCE| repo groups into special | |||
|
84 | |svn| paths. Each time a new repository group is created, the system will | |||
|
85 | update the template file and create new mapping. Apache web server needs to | |||
|
86 | be reloaded to pick up the changes on this file. | |||
|
87 | To do this, simply configure `svn.proxy.reload_cmd` inside the .ini file. | |||
|
88 | Example configuration: | |||
|
89 | ||||
|
90 | ||||
|
91 | .. code-block:: ini | |||
|
92 | ||||
|
93 | ############################################################ | |||
|
94 | ### Subversion proxy support (mod_dav_svn) ### | |||
|
95 | ### Maps RhodeCode repo groups into SVN paths for Apache ### | |||
|
96 | ############################################################ | |||
|
97 | ## Enable or disable the config file generation. | |||
|
98 | svn.proxy.generate_config = true | |||
|
99 | ## Generate config file with `SVNListParentPath` set to `On`. | |||
|
100 | svn.proxy.list_parent_path = true | |||
|
101 | ## Set location and file name of generated config file. | |||
|
102 | svn.proxy.config_file_path = %(here)s/mod_dav_svn.conf | |||
|
103 | ## Used as a prefix to the <Location> block in the generated config file. | |||
|
104 | ## In most cases it should be set to `/`. | |||
|
105 | svn.proxy.location_root = / | |||
|
106 | ## Command to reload the mod dav svn configuration on change. | |||
|
107 | ## Example: `/etc/init.d/apache2 reload` | |||
|
108 | svn.proxy.reload_cmd = /etc/init.d/apache2 reload | |||
|
109 | ## If the timeout expires before the reload command finishes, the command will | |||
|
110 | ## be killed. Setting it to zero means no timeout. Defaults to 10 seconds. | |||
|
111 | #svn.proxy.reload_timeout = 10 | |||
|
112 | ||||
|
113 | ||||
|
114 | This would create a special template file called ```mod_dav_svn.conf```. We | |||
|
115 | used that file path in the apache config above inside the Include statement. | |||
|
116 | It's also possible to generate the config from the | |||
|
117 | :menuselection:`Admin --> Settings --> VCS` page. | |||
|
118 | ||||
|
119 | ||||
|
120 | Using |svn| | |||
|
121 | =========== | |||
|
122 | ||||
|
123 | Once |svn| has been enabled on your instance, you can use it with the | |||
|
124 | following examples. For more |svn| information, see the `Subversion Red Book`_ | |||
|
125 | ||||
|
126 | .. code-block:: bash | |||
|
127 | ||||
|
128 | # To clone a repository | |||
|
129 | svn checkout http://my-svn-server.example.com/my-svn-repo | |||
|
130 | ||||
|
131 | # svn commit | |||
|
132 | svn commit | |||
|
133 | ||||
|
134 | ||||
|
135 | .. _Subversion Red Book: http://svnbook.red-bean.com/en/1.7/svn-book.html#svn.ref.svn | |||
|
136 | ||||
|
137 | .. _Ask Ubuntu: http://askubuntu.com/questions/162391/how-do-i-fix-my-locale-issue No newline at end of file |
@@ -1,29 +1,30 b'' | |||||
1 | .. _rhodecode-admin-ref: |
|
1 | .. _rhodecode-admin-ref: | |
2 |
|
2 | |||
3 | System Administration |
|
3 | System Administration | |
4 | ===================== |
|
4 | ===================== | |
5 |
|
5 | |||
6 | The following are the most common system administration tasks. |
|
6 | The following are the most common system administration tasks. | |
7 |
|
7 | |||
8 | .. only:: latex |
|
8 | .. only:: latex | |
9 |
|
9 | |||
10 | * :ref:`vcs-server` |
|
10 | * :ref:`vcs-server` | |
11 | * :ref:`apache-ws-ref` |
|
11 | * :ref:`apache-ws-ref` | |
12 | * :ref:`nginx-ws-ref` |
|
12 | * :ref:`nginx-ws-ref` | |
13 | * :ref:`rhodecode-tuning-ref` |
|
13 | * :ref:`rhodecode-tuning-ref` | |
14 | * :ref:`indexing-ref` |
|
14 | * :ref:`indexing-ref` | |
15 | * :ref:`rhodecode-reset-ref` |
|
15 | * :ref:`rhodecode-reset-ref` | |
16 |
|
16 | |||
17 | .. toctree:: |
|
17 | .. toctree:: | |
18 |
|
18 | |||
19 | config-files-overview |
|
19 | config-files-overview | |
20 | vcs-server |
|
20 | vcs-server | |
|
21 | svn-http | |||
21 | apache-config |
|
22 | apache-config | |
22 | nginx-config |
|
23 | nginx-config | |
23 | backup-restore |
|
24 | backup-restore | |
24 | tuning-rhodecode |
|
25 | tuning-rhodecode | |
25 | indexing |
|
26 | indexing | |
26 | reset-information |
|
27 | reset-information | |
27 | enable-debug |
|
28 | enable-debug | |
28 | admin-tricks |
|
29 | admin-tricks | |
29 | cleanup-cmds |
|
30 | cleanup-cmds |
@@ -1,432 +1,304 b'' | |||||
1 | .. _vcs-server: |
|
1 | .. _vcs-server: | |
2 |
|
2 | |||
3 | VCS Server Management |
|
3 | VCS Server Management | |
4 | --------------------- |
|
4 | --------------------- | |
5 |
|
5 | |||
6 | The VCS Server handles |RCM| backend functionality. You need to configure |
|
6 | The VCS Server handles |RCM| backend functionality. You need to configure | |
7 | a VCS Server to run with a |RCM| instance. If you do not, you will be missing |
|
7 | a VCS Server to run with a |RCM| instance. If you do not, you will be missing | |
8 | the connection between |RCM| and its |repos|. This will cause error messages |
|
8 | the connection between |RCM| and its |repos|. This will cause error messages | |
9 | on the web interface. You can run your setup in the following configurations, |
|
9 | on the web interface. You can run your setup in the following configurations, | |
10 | currently the best performance is one VCS Server per |RCM| instance: |
|
10 | currently the best performance is one VCS Server per |RCM| instance: | |
11 |
|
11 | |||
12 | * One VCS Server per |RCM| instance. |
|
12 | * One VCS Server per |RCM| instance. | |
13 | * One VCS Server handling multiple instances. |
|
13 | * One VCS Server handling multiple instances. | |
14 |
|
14 | |||
15 | .. important:: |
|
15 | .. important:: | |
16 |
|
16 | |||
17 | If your server locale settings are not correctly configured, |
|
17 | If your server locale settings are not correctly configured, | |
18 | |RCE| and the VCS Server can run into issues. See this `Ask Ubuntu`_ post |
|
18 | |RCE| and the VCS Server can run into issues. See this `Ask Ubuntu`_ post | |
19 | which explains the problem and gives a solution. |
|
19 | which explains the problem and gives a solution. | |
20 |
|
20 | |||
21 | For more information, see the following sections: |
|
21 | For more information, see the following sections: | |
22 |
|
22 | |||
23 | * :ref:`install-vcs` |
|
23 | * :ref:`install-vcs` | |
24 | * :ref:`config-vcs` |
|
24 | * :ref:`config-vcs` | |
25 | * :ref:`vcs-server-options` |
|
25 | * :ref:`vcs-server-options` | |
26 | * :ref:`vcs-server-versions` |
|
26 | * :ref:`vcs-server-versions` | |
27 | * :ref:`vcs-server-maintain` |
|
27 | * :ref:`vcs-server-maintain` | |
28 | * :ref:`vcs-server-config-file` |
|
28 | * :ref:`vcs-server-config-file` | |
29 | * :ref:`svn-http` |
|
29 | * :ref:`svn-http` | |
30 |
|
30 | |||
31 | .. _install-vcs: |
|
31 | .. _install-vcs: | |
32 |
|
32 | |||
33 | VCS Server Installation |
|
33 | VCS Server Installation | |
34 | ^^^^^^^^^^^^^^^^^^^^^^^ |
|
34 | ^^^^^^^^^^^^^^^^^^^^^^^ | |
35 |
|
35 | |||
36 | To install a VCS Server, see |
|
36 | To install a VCS Server, see | |
37 | :ref:`Installing a VCS server <control:install-vcsserver>`. |
|
37 | :ref:`Installing a VCS server <control:install-vcsserver>`. | |
38 |
|
38 | |||
39 | .. _config-vcs: |
|
39 | .. _config-vcs: | |
40 |
|
40 | |||
41 | Hooking |RCE| to its VCS Server |
|
41 | Hooking |RCE| to its VCS Server | |
42 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
42 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
43 |
|
43 | |||
44 | To configure a |RCE| instance to use a VCS server, see |
|
44 | To configure a |RCE| instance to use a VCS server, see | |
45 | :ref:`Configuring the VCS Server connection <control:manually-vcsserver-ini>`. |
|
45 | :ref:`Configuring the VCS Server connection <control:manually-vcsserver-ini>`. | |
46 |
|
46 | |||
47 | .. _vcs-server-options: |
|
47 | .. _vcs-server-options: | |
48 |
|
48 | |||
49 | |RCE| VCS Server Options |
|
49 | |RCE| VCS Server Options | |
50 | ^^^^^^^^^^^^^^^^^^^^^^^^ |
|
50 | ^^^^^^^^^^^^^^^^^^^^^^^^ | |
51 |
|
51 | |||
52 | The following list shows the available options on the |RCM| side of the |
|
52 | The following list shows the available options on the |RCM| side of the | |
53 | connection to the VCS Server. The settings are configured per |
|
53 | connection to the VCS Server. The settings are configured per | |
54 | instance in the |
|
54 | instance in the | |
55 | :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file. |
|
55 | :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file. | |
56 |
|
56 | |||
57 | .. rst-class:: dl-horizontal |
|
57 | .. rst-class:: dl-horizontal | |
58 |
|
58 | |||
59 | \vcs.backends <available-vcs-systems> |
|
59 | \vcs.backends <available-vcs-systems> | |
60 | Set a comma-separated list of the |repo| options available from the |
|
60 | Set a comma-separated list of the |repo| options available from the | |
61 | web interface. The default is ``hg, git, svn``, |
|
61 | web interface. The default is ``hg, git, svn``, | |
62 | which is all |repo| types available. |
|
62 | which is all |repo| types available. | |
63 |
|
63 | |||
64 | \vcs.connection_timeout <seconds> |
|
64 | \vcs.connection_timeout <seconds> | |
65 | Set the length of time in seconds that the VCS Server waits for |
|
65 | Set the length of time in seconds that the VCS Server waits for | |
66 | requests to process. After the timeout expires, |
|
66 | requests to process. After the timeout expires, | |
67 | the request is closed. The default is ``3600``. Set to a higher |
|
67 | the request is closed. The default is ``3600``. Set to a higher | |
68 | number if you experience network latency, or timeout issues with very |
|
68 | number if you experience network latency, or timeout issues with very | |
69 | large push/pull requests. |
|
69 | large push/pull requests. | |
70 |
|
70 | |||
71 | \vcs.server.enable <boolean> |
|
71 | \vcs.server.enable <boolean> | |
72 | Enable or disable the VCS Server. The available options are ``true`` or |
|
72 | Enable or disable the VCS Server. The available options are ``true`` or | |
73 | ``false``. The default is ``true``. |
|
73 | ``false``. The default is ``true``. | |
74 |
|
74 | |||
75 | \vcs.server <host:port> |
|
75 | \vcs.server <host:port> | |
76 | Set the host, either hostname or IP Address, and port of the VCS server |
|
76 | Set the host, either hostname or IP Address, and port of the VCS server | |
77 | you wish to run with your |RCM| instance. |
|
77 | you wish to run with your |RCM| instance. | |
78 |
|
78 | |||
79 | .. code-block:: ini |
|
79 | .. code-block:: ini | |
80 |
|
80 | |||
81 | ################## |
|
81 | ################## | |
82 | ### VCS CONFIG ### |
|
82 | ### VCS CONFIG ### | |
83 | ################## |
|
83 | ################## | |
84 | # set this line to match your VCS Server |
|
84 | # set this line to match your VCS Server | |
85 | vcs.server = 127.0.0.1:10004 |
|
85 | vcs.server = 127.0.0.1:10004 | |
86 | # Set to False to disable the VCS Server |
|
86 | # Set to False to disable the VCS Server | |
87 | vcs.server.enable = True |
|
87 | vcs.server.enable = True | |
88 | vcs.backends = hg, git, svn |
|
88 | vcs.backends = hg, git, svn | |
89 | vcs.connection_timeout = 3600 |
|
89 | vcs.connection_timeout = 3600 | |
90 |
|
90 | |||
91 |
|
91 | |||
92 | .. _vcs-server-versions: |
|
92 | .. _vcs-server-versions: | |
93 |
|
93 | |||
94 | VCS Server Versions |
|
94 | VCS Server Versions | |
95 | ^^^^^^^^^^^^^^^^^^^ |
|
95 | ^^^^^^^^^^^^^^^^^^^ | |
96 |
|
96 | |||
97 | An updated version of the VCS Server is released with each |RCE| version. Use |
|
97 | An updated version of the VCS Server is released with each |RCE| version. Use | |
98 | the VCS Server number that matches with the |RCE| version to pair the |
|
98 | the VCS Server number that matches with the |RCE| version to pair the | |
99 | appropriate ones together. For |RCE| versions pre 3.3.0, |
|
99 | appropriate ones together. For |RCE| versions pre 3.3.0, | |
100 | VCS Server 1.X.Y works with |RCE| 3.X.Y, for example: |
|
100 | VCS Server 1.X.Y works with |RCE| 3.X.Y, for example: | |
101 |
|
101 | |||
102 | * VCS Server 1.0.0 works with |RCE| 3.0.0 |
|
102 | * VCS Server 1.0.0 works with |RCE| 3.0.0 | |
103 | * VCS Server 1.2.2 works with |RCE| 3.2.2 |
|
103 | * VCS Server 1.2.2 works with |RCE| 3.2.2 | |
104 |
|
104 | |||
105 | For |RCE| versions post 3.3.0, the VCS Server and |RCE| version numbers |
|
105 | For |RCE| versions post 3.3.0, the VCS Server and |RCE| version numbers | |
106 | match, for example: |
|
106 | match, for example: | |
107 |
|
107 | |||
108 | * VCS Server |release| works with |RCE| |release| |
|
108 | * VCS Server |release| works with |RCE| |release| | |
109 |
|
109 | |||
110 | .. _vcs-server-maintain: |
|
110 | .. _vcs-server-maintain: | |
111 |
|
111 | |||
112 | VCS Server Memory Optimization |
|
112 | VCS Server Memory Optimization | |
113 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
113 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
114 |
|
114 | |||
115 | To configure the VCS server to manage the cache efficiently, you need to |
|
115 | To configure the VCS server to manage the cache efficiently, you need to | |
116 | configure the following options in the |
|
116 | configure the following options in the | |
117 | :file:`/home/{user}/.rccontrol/{vcsserver-id}/vcsserver.ini` file. Once |
|
117 | :file:`/home/{user}/.rccontrol/{vcsserver-id}/vcsserver.ini` file. Once | |
118 | configured, restart the VCS Server. |
|
118 | configured, restart the VCS Server. | |
119 |
|
119 | |||
120 | .. rst-class:: dl-horizontal |
|
120 | .. rst-class:: dl-horizontal | |
121 |
|
121 | |||
122 | \beaker.cache.repo_object.type = memorylru |
|
122 | \beaker.cache.repo_object.type = memorylru | |
123 | Configures the cache to discard the least recently used items. |
|
123 | Configures the cache to discard the least recently used items. | |
124 | This setting takes the following valid options: |
|
124 | This setting takes the following valid options: | |
125 |
|
125 | |||
126 | * ``memorylru``: The default setting, which removes the least recently |
|
126 | * ``memorylru``: The default setting, which removes the least recently | |
127 | used items from the cache. |
|
127 | used items from the cache. | |
128 | * ``memory``: Runs the VCS Server without clearing the cache. |
|
128 | * ``memory``: Runs the VCS Server without clearing the cache. | |
129 | * ``nocache``: Runs the VCS Server without a cache. This will |
|
129 | * ``nocache``: Runs the VCS Server without a cache. This will | |
130 | dramatically reduce the VCS Server performance. |
|
130 | dramatically reduce the VCS Server performance. | |
131 |
|
131 | |||
132 | \beaker.cache.repo_object.max_items = 100 |
|
132 | \beaker.cache.repo_object.max_items = 100 | |
133 | Sets the maximum number of items stored in the cache, before the cache |
|
133 | Sets the maximum number of items stored in the cache, before the cache | |
134 | starts to be cleared. |
|
134 | starts to be cleared. | |
135 |
|
135 | |||
136 | As a general rule of thumb, running this value at 120 resulted in a |
|
136 | As a general rule of thumb, running this value at 120 resulted in a | |
137 | 5GB cache. Running it at 240 resulted in a 9GB cache. Your results |
|
137 | 5GB cache. Running it at 240 resulted in a 9GB cache. Your results | |
138 | will differ based on usage patterns and |repo| sizes. |
|
138 | will differ based on usage patterns and |repo| sizes. | |
139 |
|
139 | |||
140 | Tweaking this value to run at a fairly constant memory load on your |
|
140 | Tweaking this value to run at a fairly constant memory load on your | |
141 | server will help performance. |
|
141 | server will help performance. | |
142 |
|
142 | |||
143 | To clear the cache completely, you can restart the VCS Server. |
|
143 | To clear the cache completely, you can restart the VCS Server. | |
144 |
|
144 | |||
145 | .. important:: |
|
145 | .. important:: | |
146 |
|
146 | |||
147 | While the VCS Server handles a restart gracefully on the web interface, |
|
147 | While the VCS Server handles a restart gracefully on the web interface, | |
148 | it will drop connections during push/pull requests. So it is recommended |
|
148 | it will drop connections during push/pull requests. So it is recommended | |
149 | you only perform this when there is very little traffic on the instance. |
|
149 | you only perform this when there is very little traffic on the instance. | |
150 |
|
150 | |||
151 | Use the following example to restart your VCS Server, |
|
151 | Use the following example to restart your VCS Server, | |
152 | for full details see the :ref:`RhodeCode Control CLI <control:rcc-cli>`. |
|
152 | for full details see the :ref:`RhodeCode Control CLI <control:rcc-cli>`. | |
153 |
|
153 | |||
154 | .. code-block:: bash |
|
154 | .. code-block:: bash | |
155 |
|
155 | |||
156 | $ rccontrol status |
|
156 | $ rccontrol status | |
157 |
|
157 | |||
158 | .. code-block:: vim |
|
158 | .. code-block:: vim | |
159 |
|
159 | |||
160 | - NAME: vcsserver-1 |
|
160 | - NAME: vcsserver-1 | |
161 | - STATUS: RUNNING |
|
161 | - STATUS: RUNNING | |
162 | - TYPE: VCSServer |
|
162 | - TYPE: VCSServer | |
163 | - VERSION: 1.0.0 |
|
163 | - VERSION: 1.0.0 | |
164 | - URL: http://127.0.0.1:10001 |
|
164 | - URL: http://127.0.0.1:10001 | |
165 |
|
165 | |||
166 | $ rccontrol restart vcsserver-1 |
|
166 | $ rccontrol restart vcsserver-1 | |
167 | Instance "vcsserver-1" successfully stopped. |
|
167 | Instance "vcsserver-1" successfully stopped. | |
168 | Instance "vcsserver-1" successfully started. |
|
168 | Instance "vcsserver-1" successfully started. | |
169 |
|
169 | |||
170 | .. _vcs-server-config-file: |
|
170 | .. _vcs-server-config-file: | |
171 |
|
171 | |||
172 | VCS Server Configuration |
|
172 | VCS Server Configuration | |
173 | ^^^^^^^^^^^^^^^^^^^^^^^^ |
|
173 | ^^^^^^^^^^^^^^^^^^^^^^^^ | |
174 |
|
174 | |||
175 | You can configure settings for multiple VCS Servers on your |
|
175 | You can configure settings for multiple VCS Servers on your | |
176 | system using their individual configuration files. Use the following |
|
176 | system using their individual configuration files. Use the following | |
177 | properties inside the configuration file to set up your system. The default |
|
177 | properties inside the configuration file to set up your system. The default | |
178 | location is :file:`home/{user}/.rccontrol/{vcsserver-id}/vcsserver.ini`. |
|
178 | location is :file:`home/{user}/.rccontrol/{vcsserver-id}/vcsserver.ini`. | |
179 | For a more detailed explanation of the logger levers, see :ref:`debug-mode`. |
|
179 | For a more detailed explanation of the logger levers, see :ref:`debug-mode`. | |
180 |
|
180 | |||
181 | .. rst-class:: dl-horizontal |
|
181 | .. rst-class:: dl-horizontal | |
182 |
|
182 | |||
183 | \host <ip-address> |
|
183 | \host <ip-address> | |
184 | Set the host on which the VCS Server will run. |
|
184 | Set the host on which the VCS Server will run. | |
185 |
|
185 | |||
186 | \port <int> |
|
186 | \port <int> | |
187 | Set the port number on which the VCS Server will be available. |
|
187 | Set the port number on which the VCS Server will be available. | |
188 |
|
188 | |||
189 | \locale <locale_utf> |
|
189 | \locale <locale_utf> | |
190 | Set the locale the VCS Server expects. |
|
190 | Set the locale the VCS Server expects. | |
191 |
|
191 | |||
192 | \threadpool_size <int> |
|
192 | \threadpool_size <int> | |
193 | Set the size of the threadpool used to communicate |
|
193 | Set the size of the threadpool used to communicate | |
194 | with the WSGI workers. This should be at least 6 times the number of |
|
194 | with the WSGI workers. This should be at least 6 times the number of | |
195 | WSGI worker processes. |
|
195 | WSGI worker processes. | |
196 |
|
196 | |||
197 | \timeout <seconds> |
|
197 | \timeout <seconds> | |
198 | Set the timeout for RPC communication in seconds. |
|
198 | Set the timeout for RPC communication in seconds. | |
199 |
|
199 | |||
200 | .. note:: |
|
200 | .. note:: | |
201 |
|
201 | |||
202 | After making changes, you need to restart your VCS Server to pick them up. |
|
202 | After making changes, you need to restart your VCS Server to pick them up. | |
203 |
|
203 | |||
204 | .. code-block:: ini |
|
204 | .. code-block:: ini | |
205 |
|
205 | |||
206 | ################################################################################ |
|
206 | ################################################################################ | |
207 | # RhodeCode VCSServer - configuration # |
|
207 | # RhodeCode VCSServer - configuration # | |
208 | # # |
|
208 | # # | |
209 | ################################################################################ |
|
209 | ################################################################################ | |
210 |
|
210 | |||
211 | [DEFAULT] |
|
211 | [DEFAULT] | |
212 | host = 127.0.0.1 |
|
212 | host = 127.0.0.1 | |
213 | port = 9900 |
|
213 | port = 9900 | |
214 | locale = en_US.UTF-8 |
|
214 | locale = en_US.UTF-8 | |
215 | # number of worker threads, this should be set based on a formula threadpool=N*6 |
|
215 | # number of worker threads, this should be set based on a formula threadpool=N*6 | |
216 | # where N is number of RhodeCode Enterprise workers, eg. running 2 instances |
|
216 | # where N is number of RhodeCode Enterprise workers, eg. running 2 instances | |
217 | # 8 gunicorn workers each would be 2 * 8 * 6 = 96, threadpool_size = 96 |
|
217 | # 8 gunicorn workers each would be 2 * 8 * 6 = 96, threadpool_size = 96 | |
218 | threadpool_size = 16 |
|
218 | threadpool_size = 16 | |
219 | timeout = 0 |
|
219 | timeout = 0 | |
220 |
|
220 | |||
221 | # cache regions, please don't change |
|
221 | # cache regions, please don't change | |
222 | beaker.cache.regions = repo_object |
|
222 | beaker.cache.regions = repo_object | |
223 | beaker.cache.repo_object.type = memorylru |
|
223 | beaker.cache.repo_object.type = memorylru | |
224 | beaker.cache.repo_object.max_items = 1000 |
|
224 | beaker.cache.repo_object.max_items = 1000 | |
225 |
|
225 | |||
226 | # cache auto-expires after N seconds |
|
226 | # cache auto-expires after N seconds | |
227 | beaker.cache.repo_object.expire = 10 |
|
227 | beaker.cache.repo_object.expire = 10 | |
228 | beaker.cache.repo_object.enabled = true |
|
228 | beaker.cache.repo_object.enabled = true | |
229 |
|
229 | |||
230 |
|
230 | |||
231 | ################################ |
|
231 | ################################ | |
232 | ### LOGGING CONFIGURATION #### |
|
232 | ### LOGGING CONFIGURATION #### | |
233 | ################################ |
|
233 | ################################ | |
234 | [loggers] |
|
234 | [loggers] | |
235 | keys = root, vcsserver, pyro4, beaker |
|
235 | keys = root, vcsserver, pyro4, beaker | |
236 |
|
236 | |||
237 | [handlers] |
|
237 | [handlers] | |
238 | keys = console |
|
238 | keys = console | |
239 |
|
239 | |||
240 | [formatters] |
|
240 | [formatters] | |
241 | keys = generic |
|
241 | keys = generic | |
242 |
|
242 | |||
243 | ############# |
|
243 | ############# | |
244 | ## LOGGERS ## |
|
244 | ## LOGGERS ## | |
245 | ############# |
|
245 | ############# | |
246 | [logger_root] |
|
246 | [logger_root] | |
247 | level = NOTSET |
|
247 | level = NOTSET | |
248 | handlers = console |
|
248 | handlers = console | |
249 |
|
249 | |||
250 | [logger_vcsserver] |
|
250 | [logger_vcsserver] | |
251 | level = DEBUG |
|
251 | level = DEBUG | |
252 | handlers = |
|
252 | handlers = | |
253 | qualname = vcsserver |
|
253 | qualname = vcsserver | |
254 | propagate = 1 |
|
254 | propagate = 1 | |
255 |
|
255 | |||
256 | [logger_beaker] |
|
256 | [logger_beaker] | |
257 | level = DEBUG |
|
257 | level = DEBUG | |
258 | handlers = |
|
258 | handlers = | |
259 | qualname = beaker |
|
259 | qualname = beaker | |
260 | propagate = 1 |
|
260 | propagate = 1 | |
261 |
|
261 | |||
262 | [logger_pyro4] |
|
262 | [logger_pyro4] | |
263 | level = DEBUG |
|
263 | level = DEBUG | |
264 | handlers = |
|
264 | handlers = | |
265 | qualname = Pyro4 |
|
265 | qualname = Pyro4 | |
266 | propagate = 1 |
|
266 | propagate = 1 | |
267 |
|
267 | |||
268 |
|
268 | |||
269 | ############## |
|
269 | ############## | |
270 | ## HANDLERS ## |
|
270 | ## HANDLERS ## | |
271 | ############## |
|
271 | ############## | |
272 |
|
272 | |||
273 | [handler_console] |
|
273 | [handler_console] | |
274 | class = StreamHandler |
|
274 | class = StreamHandler | |
275 | args = (sys.stderr,) |
|
275 | args = (sys.stderr,) | |
276 | level = DEBUG |
|
276 | level = DEBUG | |
277 | formatter = generic |
|
277 | formatter = generic | |
278 |
|
278 | |||
279 | [handler_file] |
|
279 | [handler_file] | |
280 | class = FileHandler |
|
280 | class = FileHandler | |
281 | args = ('vcsserver.log', 'a',) |
|
281 | args = ('vcsserver.log', 'a',) | |
282 | level = DEBUG |
|
282 | level = DEBUG | |
283 | formatter = generic |
|
283 | formatter = generic | |
284 |
|
284 | |||
285 | [handler_file_rotating] |
|
285 | [handler_file_rotating] | |
286 | class = logging.handlers.TimedRotatingFileHandler |
|
286 | class = logging.handlers.TimedRotatingFileHandler | |
287 | # 'D', 5 - rotate every 5days |
|
287 | # 'D', 5 - rotate every 5days | |
288 | # you can set 'h', 'midnight' |
|
288 | # you can set 'h', 'midnight' | |
289 | args = ('vcsserver.log', 'D', 5, 10,) |
|
289 | args = ('vcsserver.log', 'D', 5, 10,) | |
290 | level = DEBUG |
|
290 | level = DEBUG | |
291 | formatter = generic |
|
291 | formatter = generic | |
292 |
|
292 | |||
293 | ################ |
|
293 | ################ | |
294 | ## FORMATTERS ## |
|
294 | ## FORMATTERS ## | |
295 | ################ |
|
295 | ################ | |
296 |
|
296 | |||
297 | [formatter_generic] |
|
297 | [formatter_generic] | |
298 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
298 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s | |
299 | datefmt = %Y-%m-%d %H:%M:%S |
|
299 | datefmt = %Y-%m-%d %H:%M:%S | |
300 |
|
300 | |||
301 | .. _svn-http: |
|
|||
302 |
|
||||
303 | |svn| With Write Over HTTP |
|
|||
304 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
|||
305 |
|
||||
306 | To use |svn| with read/write support over the |svn| HTTP protocol, you have to |
|
|||
307 | configure the HTTP |svn| backend. |
|
|||
308 |
|
||||
309 | Prerequisites |
|
|||
310 | ============= |
|
|||
311 |
|
||||
312 | - Enable HTTP support inside the admin VCS settings on your |RCE| instance |
|
|||
313 | - You need to install the following tools on the machine that is running an |
|
|||
314 | instance of |RCE|: |
|
|||
315 | ``Apache HTTP Server`` and |
|
|||
316 | ``mod_dav_svn``. |
|
|||
317 |
|
||||
318 |
|
||||
319 | Using Ubuntu Distribution as an example you can run: |
|
|||
320 |
|
||||
321 | .. code-block:: bash |
|
|||
322 |
|
||||
323 | $ sudo apt-get install apache2 libapache2-mod-svn |
|
|||
324 |
|
||||
325 | Once installed you need to enable ``dav_svn``: |
|
|||
326 |
|
||||
327 | .. code-block:: bash |
|
|||
328 |
|
||||
329 | $ sudo a2enmod dav_svn |
|
|||
330 | $ sudo a2enmod headers |
|
|||
331 |
|
||||
332 |
|
||||
333 | Configuring Apache Setup |
|
|||
334 | ======================== |
|
|||
335 |
|
||||
336 | .. tip:: |
|
|||
337 |
|
||||
338 | It is recommended to run Apache on a port other than 80, due to possible |
|
|||
339 | conflicts with other HTTP servers like nginx. To do this, set the |
|
|||
340 | ``Listen`` parameter in the ``/etc/apache2/ports.conf`` file, for example |
|
|||
341 | ``Listen 8090``. |
|
|||
342 |
|
||||
343 |
|
||||
344 | .. warning:: |
|
|||
345 |
|
||||
346 | Make sure your Apache instance which runs the mod_dav_svn module is |
|
|||
347 | only accessible by RhodeCode. Otherwise everyone is able to browse |
|
|||
348 | the repositories or run subversion operations (checkout/commit/etc.). |
|
|||
349 |
|
||||
350 | It is also recommended to run apache as the same user as |RCE|, otherwise |
|
|||
351 | permission issues could occur. To do this edit the ``/etc/apache2/envvars`` |
|
|||
352 |
|
||||
353 | .. code-block:: apache |
|
|||
354 |
|
||||
355 | export APACHE_RUN_USER=rhodecode |
|
|||
356 | export APACHE_RUN_GROUP=rhodecode |
|
|||
357 |
|
||||
358 | 1. To configure Apache, create and edit a virtual hosts file, for example |
|
|||
359 | :file:`/etc/apache2/sites-available/default.conf`. Below is an example |
|
|||
360 | how to use one with auto-generated config ```mod_dav_svn.conf``` |
|
|||
361 | from configured |RCE| instance. |
|
|||
362 |
|
||||
363 | .. code-block:: apache |
|
|||
364 |
|
||||
365 | <VirtualHost *:8080> |
|
|||
366 | ServerAdmin rhodecode-admin@localhost |
|
|||
367 | DocumentRoot /var/www/html |
|
|||
368 | ErrorLog ${'${APACHE_LOG_DIR}'}/error.log |
|
|||
369 | CustomLog ${'${APACHE_LOG_DIR}'}/access.log combined |
|
|||
370 | Include /home/user/.rccontrol/enterprise-1/mod_dav_svn.conf |
|
|||
371 | </VirtualHost> |
|
|||
372 |
|
||||
373 |
|
||||
374 | 2. Go to the :menuselection:`Admin --> Settings --> VCS` page, and |
|
|||
375 | enable :guilabel:`Proxy Subversion HTTP requests`, and specify the |
|
|||
376 | :guilabel:`Subversion HTTP Server URL`. |
|
|||
377 |
|
||||
378 | 3. Open the |RCE| configuration file, |
|
|||
379 | :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` |
|
|||
380 |
|
||||
381 | 4. Add the following configuration option in the ``[app:main]`` |
|
|||
382 | section if you don't have it yet. |
|
|||
383 |
|
||||
384 | This enables mapping of the created |RCE| repo groups into special |svn| paths. |
|
|||
385 | Each time a new repository group is created, the system will update |
|
|||
386 | the template file and create new mapping. Apache web server needs to be |
|
|||
387 | reloaded to pick up the changes on this file. |
|
|||
388 | It's recommended to add reload into a crontab so the changes can be picked |
|
|||
389 | automatically once someone creates a repository group inside RhodeCode. |
|
|||
390 |
|
||||
391 |
|
||||
392 | .. code-block:: ini |
|
|||
393 |
|
||||
394 | ############################################## |
|
|||
395 | ### Subversion proxy support (mod_dav_svn) ### |
|
|||
396 | ############################################## |
|
|||
397 | ## Enable or disable the config file generation. |
|
|||
398 | svn.proxy.generate_config = true |
|
|||
399 | ## Generate config file with `SVNListParentPath` set to `On`. |
|
|||
400 | svn.proxy.list_parent_path = true |
|
|||
401 | ## Set location and file name of generated config file. |
|
|||
402 | svn.proxy.config_file_path = %(here)s/mod_dav_svn.conf |
|
|||
403 | ## File system path to the directory containing the repositories served by |
|
|||
404 | ## RhodeCode. |
|
|||
405 | svn.proxy.parent_path_root = /path/to/repo_store |
|
|||
406 | ## Used as a prefix to the <Location> block in the generated config file. In |
|
|||
407 | ## most cases it should be set to `/`. |
|
|||
408 | svn.proxy.location_root = / |
|
|||
409 |
|
||||
410 |
|
||||
411 | This would create a special template file called ```mod_dav_svn.conf```. We |
|
|||
412 | used that file path in the apache config above inside the Include statement. |
|
|||
413 |
|
||||
414 |
|
||||
415 | Using |svn| |
|
|||
416 | =========== |
|
|||
417 |
|
||||
418 | Once |svn| has been enabled on your instance, you can use it with the |
|
|||
419 | following examples. For more |svn| information, see the `Subversion Red Book`_ |
|
|||
420 |
|
||||
421 | .. code-block:: bash |
|
|||
422 |
|
||||
423 | # To clone a repository |
|
|||
424 | svn checkout http://my-svn-server.example.com/my-svn-repo |
|
|||
425 |
|
||||
426 | # svn commit |
|
|||
427 | svn commit |
|
|||
428 |
|
301 | |||
429 | .. _Subversion Red Book: http://svnbook.red-bean.com/en/1.7/svn-book.html#svn.ref.svn |
|
302 | .. _Subversion Red Book: http://svnbook.red-bean.com/en/1.7/svn-book.html#svn.ref.svn | |
430 |
|
303 | |||
431 |
|
304 | .. _Ask Ubuntu: http://askubuntu.com/questions/162391/how-do-i-fix-my-locale-issue | ||
432 | .. _Ask Ubuntu: http://askubuntu.com/questions/162391/how-do-i-fix-my-locale-issue No newline at end of file |
|
General Comments 0
You need to be logged in to leave comments.
Login now