Show More
@@ -1,41 +1,31 b'' | |||||
1 | .. _lab-settings: |
|
1 | .. _lab-settings: | |
2 |
|
2 | |||
3 | Lab Settings |
|
3 | Lab Settings | |
4 | ============ |
|
4 | ============ | |
5 |
|
5 | |||
6 | |RCE| Lab Settings is for delivering features which may require an additional |
|
6 | |RCE| Lab Settings is for delivering features which may require an additional | |
7 | level of support to optimize for production scenarios. To enable lab settings, |
|
7 | level of support to optimize for production scenarios. To enable lab settings, | |
8 | use the following instructions: |
|
8 | use the following instructions: | |
9 |
|
9 | |||
10 | 1. Open the |RCE| configuration file, |
|
10 | 1. Open the |RCE| configuration file, | |
11 | :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` |
|
11 | :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` | |
12 |
|
12 | |||
13 | 2. Add the following configuration option in the ``[app:main]`` section. |
|
13 | 2. Add the following configuration option in the ``[app:main]`` section. | |
14 |
|
14 | |||
15 | .. code-block:: bash |
|
15 | .. code-block:: bash | |
16 |
|
16 | |||
17 | [app:main] |
|
17 | [app:main] | |
18 |
|
18 | |||
19 | ## Display extended labs settings |
|
19 | ## Display extended labs settings | |
20 | labs_settings_active = true |
|
20 | labs_settings_active = true | |
21 |
|
21 | |||
22 | 3. Restart your |RCE| instance |
|
22 | 3. Restart your |RCE| instance | |
23 |
|
23 | |||
24 | .. code-block:: bash |
|
24 | .. code-block:: bash | |
25 |
|
25 | |||
26 | $ rccontrol restart enterprise-1 |
|
26 | $ rccontrol restart enterprise-1 | |
27 |
|
27 | |||
28 | 4. You will see the labs setting on the |
|
28 | 4. You will see the labs setting on the | |
29 | :menuselection:`Admin --> Settings --> labs` page. |
|
29 | :menuselection:`Admin --> Settings --> labs` page. | |
30 |
|
30 | |||
31 | .. image:: ../images/lab-setting.png |
|
31 | .. image:: ../images/lab-setting.png | |
32 |
|
||||
33 | Available Lab Extras |
|
|||
34 | -------------------- |
|
|||
35 |
|
||||
36 | Once lab settings are enabled, the following features are available. |
|
|||
37 |
|
||||
38 | .. toctree:: |
|
|||
39 | :maxdepth: 1 |
|
|||
40 |
|
||||
41 | svn-http |
|
@@ -1,301 +1,430 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 |
|
30 | |||
30 | .. _install-vcs: |
|
31 | .. _install-vcs: | |
31 |
|
32 | |||
32 | VCS Server Installation |
|
33 | VCS Server Installation | |
33 | ^^^^^^^^^^^^^^^^^^^^^^^ |
|
34 | ^^^^^^^^^^^^^^^^^^^^^^^ | |
34 |
|
35 | |||
35 | To install a VCS Server, see |
|
36 | To install a VCS Server, see | |
36 | :ref:`Installing a VCS server <control:install-vcsserver>`. |
|
37 | :ref:`Installing a VCS server <control:install-vcsserver>`. | |
37 |
|
38 | |||
38 | .. _config-vcs: |
|
39 | .. _config-vcs: | |
39 |
|
40 | |||
40 | Hooking |RCE| to its VCS Server |
|
41 | Hooking |RCE| to its VCS Server | |
41 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
42 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
42 |
|
43 | |||
43 | To configure a |RCE| instance to use a VCS server, see |
|
44 | To configure a |RCE| instance to use a VCS server, see | |
44 | :ref:`Configuring the VCS Server connection <control:manually-vcsserver-ini>`. |
|
45 | :ref:`Configuring the VCS Server connection <control:manually-vcsserver-ini>`. | |
45 |
|
46 | |||
46 | .. _vcs-server-options: |
|
47 | .. _vcs-server-options: | |
47 |
|
48 | |||
48 | |RCE| VCS Server Options |
|
49 | |RCE| VCS Server Options | |
49 | ^^^^^^^^^^^^^^^^^^^^^^^^ |
|
50 | ^^^^^^^^^^^^^^^^^^^^^^^^ | |
50 |
|
51 | |||
51 | 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 | |
52 | connection to the VCS Server. The settings are configured per |
|
53 | connection to the VCS Server. The settings are configured per | |
53 | instance in the |
|
54 | instance in the | |
54 | :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file. |
|
55 | :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file. | |
55 |
|
56 | |||
56 | .. rst-class:: dl-horizontal |
|
57 | .. rst-class:: dl-horizontal | |
57 |
|
58 | |||
58 | \vcs.backends <available-vcs-systems> |
|
59 | \vcs.backends <available-vcs-systems> | |
59 | 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 | |
60 | web interface. The default is ``hg, git, svn``, |
|
61 | web interface. The default is ``hg, git, svn``, | |
61 | which is all |repo| types available. |
|
62 | which is all |repo| types available. | |
62 |
|
63 | |||
63 | \vcs.connection_timeout <seconds> |
|
64 | \vcs.connection_timeout <seconds> | |
64 | 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 | |
65 | requests to process. After the timeout expires, |
|
66 | requests to process. After the timeout expires, | |
66 | 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 | |
67 | number if you experience network latency, or timeout issues with very |
|
68 | number if you experience network latency, or timeout issues with very | |
68 | large push/pull requests. |
|
69 | large push/pull requests. | |
69 |
|
70 | |||
70 | \vcs.server.enable <boolean> |
|
71 | \vcs.server.enable <boolean> | |
71 | 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 | |
72 | ``false``. The default is ``true``. |
|
73 | ``false``. The default is ``true``. | |
73 |
|
74 | |||
74 | \vcs.server <host:port> |
|
75 | \vcs.server <host:port> | |
75 | 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 | |
76 | you wish to run with your |RCM| instance. |
|
77 | you wish to run with your |RCM| instance. | |
77 |
|
78 | |||
78 | .. code-block:: ini |
|
79 | .. code-block:: ini | |
79 |
|
80 | |||
80 | ################## |
|
81 | ################## | |
81 | ### VCS CONFIG ### |
|
82 | ### VCS CONFIG ### | |
82 | ################## |
|
83 | ################## | |
83 | # set this line to match your VCS Server |
|
84 | # set this line to match your VCS Server | |
84 | vcs.server = 127.0.0.1:10004 |
|
85 | vcs.server = 127.0.0.1:10004 | |
85 | # Set to False to disable the VCS Server |
|
86 | # Set to False to disable the VCS Server | |
86 | vcs.server.enable = True |
|
87 | vcs.server.enable = True | |
87 | vcs.backends = hg, git, svn |
|
88 | vcs.backends = hg, git, svn | |
88 | vcs.connection_timeout = 3600 |
|
89 | vcs.connection_timeout = 3600 | |
89 |
|
90 | |||
90 |
|
91 | |||
91 | .. _vcs-server-versions: |
|
92 | .. _vcs-server-versions: | |
92 |
|
93 | |||
93 | VCS Server Versions |
|
94 | VCS Server Versions | |
94 | ^^^^^^^^^^^^^^^^^^^ |
|
95 | ^^^^^^^^^^^^^^^^^^^ | |
95 |
|
96 | |||
96 | 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 | |
97 | 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 | |
98 | appropriate ones together. For |RCE| versions pre 3.3.0, |
|
99 | appropriate ones together. For |RCE| versions pre 3.3.0, | |
99 | 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: | |
100 |
|
101 | |||
101 | * VCS Server 1.0.0 works with |RCE| 3.0.0 |
|
102 | * VCS Server 1.0.0 works with |RCE| 3.0.0 | |
102 | * VCS Server 1.2.2 works with |RCE| 3.2.2 |
|
103 | * VCS Server 1.2.2 works with |RCE| 3.2.2 | |
103 |
|
104 | |||
104 | 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 | |
105 | match, for example: |
|
106 | match, for example: | |
106 |
|
107 | |||
107 | * VCS Server |release| works with |RCE| |release| |
|
108 | * VCS Server |release| works with |RCE| |release| | |
108 |
|
109 | |||
109 | .. _vcs-server-maintain: |
|
110 | .. _vcs-server-maintain: | |
110 |
|
111 | |||
111 | VCS Server Memory Optimization |
|
112 | VCS Server Memory Optimization | |
112 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
113 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
113 |
|
114 | |||
114 | 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 | |
115 | configure the following options in the |
|
116 | configure the following options in the | |
116 | :file:`/home/{user}/.rccontrol/{vcsserver-id}/vcsserver.ini` file. Once |
|
117 | :file:`/home/{user}/.rccontrol/{vcsserver-id}/vcsserver.ini` file. Once | |
117 | configured, restart the VCS Server. |
|
118 | configured, restart the VCS Server. | |
118 |
|
119 | |||
119 | .. rst-class:: dl-horizontal |
|
120 | .. rst-class:: dl-horizontal | |
120 |
|
121 | |||
121 | \beaker.cache.repo_object.type = memorylru |
|
122 | \beaker.cache.repo_object.type = memorylru | |
122 | Configures the cache to discard the least recently used items. |
|
123 | Configures the cache to discard the least recently used items. | |
123 | This setting takes the following valid options: |
|
124 | This setting takes the following valid options: | |
124 |
|
125 | |||
125 | * ``memorylru``: The default setting, which removes the least recently |
|
126 | * ``memorylru``: The default setting, which removes the least recently | |
126 | used items from the cache. |
|
127 | used items from the cache. | |
127 | * ``memory``: Runs the VCS Server without clearing the cache. |
|
128 | * ``memory``: Runs the VCS Server without clearing the cache. | |
128 | * ``nocache``: Runs the VCS Server without a cache. This will |
|
129 | * ``nocache``: Runs the VCS Server without a cache. This will | |
129 | dramatically reduce the VCS Server performance. |
|
130 | dramatically reduce the VCS Server performance. | |
130 |
|
131 | |||
131 | \beaker.cache.repo_object.max_items = 100 |
|
132 | \beaker.cache.repo_object.max_items = 100 | |
132 | 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 | |
133 | starts to be cleared. |
|
134 | starts to be cleared. | |
134 |
|
135 | |||
135 | 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 | |
136 | 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 | |
137 | will differ based on usage patterns and |repo| sizes. |
|
138 | will differ based on usage patterns and |repo| sizes. | |
138 |
|
139 | |||
139 | 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 | |
140 | server will help performance. |
|
141 | server will help performance. | |
141 |
|
142 | |||
142 | To clear the cache completely, you can restart the VCS Server. |
|
143 | To clear the cache completely, you can restart the VCS Server. | |
143 |
|
144 | |||
144 | .. important:: |
|
145 | .. important:: | |
145 |
|
146 | |||
146 | 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, | |
147 | 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 | |
148 | 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. | |
149 |
|
150 | |||
150 | Use the following example to restart your VCS Server, |
|
151 | Use the following example to restart your VCS Server, | |
151 | 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>`. | |
152 |
|
153 | |||
153 | .. code-block:: bash |
|
154 | .. code-block:: bash | |
154 |
|
155 | |||
155 | $ rccontrol status |
|
156 | $ rccontrol status | |
156 |
|
157 | |||
157 | .. code-block:: vim |
|
158 | .. code-block:: vim | |
158 |
|
159 | |||
159 | - NAME: vcsserver-1 |
|
160 | - NAME: vcsserver-1 | |
160 | - STATUS: RUNNING |
|
161 | - STATUS: RUNNING | |
161 | - TYPE: VCSServer |
|
162 | - TYPE: VCSServer | |
162 | - VERSION: 1.0.0 |
|
163 | - VERSION: 1.0.0 | |
163 | - URL: http://127.0.0.1:10001 |
|
164 | - URL: http://127.0.0.1:10001 | |
164 |
|
165 | |||
165 | $ rccontrol restart vcsserver-1 |
|
166 | $ rccontrol restart vcsserver-1 | |
166 | Instance "vcsserver-1" successfully stopped. |
|
167 | Instance "vcsserver-1" successfully stopped. | |
167 | Instance "vcsserver-1" successfully started. |
|
168 | Instance "vcsserver-1" successfully started. | |
168 |
|
169 | |||
169 | .. _vcs-server-config-file: |
|
170 | .. _vcs-server-config-file: | |
170 |
|
171 | |||
171 | VCS Server Configuration |
|
172 | VCS Server Configuration | |
172 | ^^^^^^^^^^^^^^^^^^^^^^^^ |
|
173 | ^^^^^^^^^^^^^^^^^^^^^^^^ | |
173 |
|
174 | |||
174 | You can configure settings for multiple VCS Servers on your |
|
175 | You can configure settings for multiple VCS Servers on your | |
175 | system using their individual configuration files. Use the following |
|
176 | system using their individual configuration files. Use the following | |
176 | 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 | |
177 | location is :file:`home/{user}/.rccontrol/{vcsserver-id}/vcsserver.ini`. |
|
178 | location is :file:`home/{user}/.rccontrol/{vcsserver-id}/vcsserver.ini`. | |
178 | 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`. | |
179 |
|
180 | |||
180 | .. rst-class:: dl-horizontal |
|
181 | .. rst-class:: dl-horizontal | |
181 |
|
182 | |||
182 | \host <ip-address> |
|
183 | \host <ip-address> | |
183 | Set the host on which the VCS Server will run. |
|
184 | Set the host on which the VCS Server will run. | |
184 |
|
185 | |||
185 | \port <int> |
|
186 | \port <int> | |
186 | 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. | |
187 |
|
188 | |||
188 | \locale <locale_utf> |
|
189 | \locale <locale_utf> | |
189 | Set the locale the VCS Server expects. |
|
190 | Set the locale the VCS Server expects. | |
190 |
|
191 | |||
191 | \threadpool_size <int> |
|
192 | \threadpool_size <int> | |
192 | Set the size of the threadpool used to communicate |
|
193 | Set the size of the threadpool used to communicate | |
193 | 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 | |
194 | WSGI worker processes. |
|
195 | WSGI worker processes. | |
195 |
|
196 | |||
196 | \timeout <seconds> |
|
197 | \timeout <seconds> | |
197 | Set the timeout for RPC communication in seconds. |
|
198 | Set the timeout for RPC communication in seconds. | |
198 |
|
199 | |||
199 | .. note:: |
|
200 | .. note:: | |
200 |
|
201 | |||
201 | 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. | |
202 |
|
203 | |||
203 | .. code-block:: ini |
|
204 | .. code-block:: ini | |
204 |
|
205 | |||
205 | ################################################################################ |
|
206 | ################################################################################ | |
206 | # RhodeCode VCSServer - configuration # |
|
207 | # RhodeCode VCSServer - configuration # | |
207 | # # |
|
208 | # # | |
208 | ################################################################################ |
|
209 | ################################################################################ | |
209 |
|
210 | |||
210 | [DEFAULT] |
|
211 | [DEFAULT] | |
211 | host = 127.0.0.1 |
|
212 | host = 127.0.0.1 | |
212 | port = 9900 |
|
213 | port = 9900 | |
213 | locale = en_US.UTF-8 |
|
214 | locale = en_US.UTF-8 | |
214 | # 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 | |
215 | # 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 | |
216 | # 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 | |
217 | threadpool_size = 16 |
|
218 | threadpool_size = 16 | |
218 | timeout = 0 |
|
219 | timeout = 0 | |
219 |
|
220 | |||
220 | # cache regions, please don't change |
|
221 | # cache regions, please don't change | |
221 | beaker.cache.regions = repo_object |
|
222 | beaker.cache.regions = repo_object | |
222 | beaker.cache.repo_object.type = memorylru |
|
223 | beaker.cache.repo_object.type = memorylru | |
223 | beaker.cache.repo_object.max_items = 1000 |
|
224 | beaker.cache.repo_object.max_items = 1000 | |
224 |
|
225 | |||
225 | # cache auto-expires after N seconds |
|
226 | # cache auto-expires after N seconds | |
226 | beaker.cache.repo_object.expire = 10 |
|
227 | beaker.cache.repo_object.expire = 10 | |
227 | beaker.cache.repo_object.enabled = true |
|
228 | beaker.cache.repo_object.enabled = true | |
228 |
|
229 | |||
229 |
|
230 | |||
230 | ################################ |
|
231 | ################################ | |
231 | ### LOGGING CONFIGURATION #### |
|
232 | ### LOGGING CONFIGURATION #### | |
232 | ################################ |
|
233 | ################################ | |
233 | [loggers] |
|
234 | [loggers] | |
234 | keys = root, vcsserver, pyro4, beaker |
|
235 | keys = root, vcsserver, pyro4, beaker | |
235 |
|
236 | |||
236 | [handlers] |
|
237 | [handlers] | |
237 | keys = console |
|
238 | keys = console | |
238 |
|
239 | |||
239 | [formatters] |
|
240 | [formatters] | |
240 | keys = generic |
|
241 | keys = generic | |
241 |
|
242 | |||
242 | ############# |
|
243 | ############# | |
243 | ## LOGGERS ## |
|
244 | ## LOGGERS ## | |
244 | ############# |
|
245 | ############# | |
245 | [logger_root] |
|
246 | [logger_root] | |
246 | level = NOTSET |
|
247 | level = NOTSET | |
247 | handlers = console |
|
248 | handlers = console | |
248 |
|
249 | |||
249 | [logger_vcsserver] |
|
250 | [logger_vcsserver] | |
250 | level = DEBUG |
|
251 | level = DEBUG | |
251 | handlers = |
|
252 | handlers = | |
252 | qualname = vcsserver |
|
253 | qualname = vcsserver | |
253 | propagate = 1 |
|
254 | propagate = 1 | |
254 |
|
255 | |||
255 | [logger_beaker] |
|
256 | [logger_beaker] | |
256 | level = DEBUG |
|
257 | level = DEBUG | |
257 | handlers = |
|
258 | handlers = | |
258 | qualname = beaker |
|
259 | qualname = beaker | |
259 | propagate = 1 |
|
260 | propagate = 1 | |
260 |
|
261 | |||
261 | [logger_pyro4] |
|
262 | [logger_pyro4] | |
262 | level = DEBUG |
|
263 | level = DEBUG | |
263 | handlers = |
|
264 | handlers = | |
264 | qualname = Pyro4 |
|
265 | qualname = Pyro4 | |
265 | propagate = 1 |
|
266 | propagate = 1 | |
266 |
|
267 | |||
267 |
|
268 | |||
268 | ############## |
|
269 | ############## | |
269 | ## HANDLERS ## |
|
270 | ## HANDLERS ## | |
270 | ############## |
|
271 | ############## | |
271 |
|
272 | |||
272 | [handler_console] |
|
273 | [handler_console] | |
273 | class = StreamHandler |
|
274 | class = StreamHandler | |
274 | args = (sys.stderr,) |
|
275 | args = (sys.stderr,) | |
275 | level = DEBUG |
|
276 | level = DEBUG | |
276 | formatter = generic |
|
277 | formatter = generic | |
277 |
|
278 | |||
278 | [handler_file] |
|
279 | [handler_file] | |
279 | class = FileHandler |
|
280 | class = FileHandler | |
280 | args = ('vcsserver.log', 'a',) |
|
281 | args = ('vcsserver.log', 'a',) | |
281 | level = DEBUG |
|
282 | level = DEBUG | |
282 | formatter = generic |
|
283 | formatter = generic | |
283 |
|
284 | |||
284 | [handler_file_rotating] |
|
285 | [handler_file_rotating] | |
285 | class = logging.handlers.TimedRotatingFileHandler |
|
286 | class = logging.handlers.TimedRotatingFileHandler | |
286 | # 'D', 5 - rotate every 5days |
|
287 | # 'D', 5 - rotate every 5days | |
287 | # you can set 'h', 'midnight' |
|
288 | # you can set 'h', 'midnight' | |
288 | args = ('vcsserver.log', 'D', 5, 10,) |
|
289 | args = ('vcsserver.log', 'D', 5, 10,) | |
289 | level = DEBUG |
|
290 | level = DEBUG | |
290 | formatter = generic |
|
291 | formatter = generic | |
291 |
|
292 | |||
292 | ################ |
|
293 | ################ | |
293 | ## FORMATTERS ## |
|
294 | ## FORMATTERS ## | |
294 | ################ |
|
295 | ################ | |
295 |
|
296 | |||
296 | [formatter_generic] |
|
297 | [formatter_generic] | |
297 | 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 | |
298 | datefmt = %Y-%m-%d %H:%M:%S |
|
299 | datefmt = %Y-%m-%d %H:%M:%S | |
299 |
|
300 | |||
|
301 | .. _svn-http: | |||
300 |
|
302 | |||
301 | .. _Ask Ubuntu: http://askubuntu.com/questions/162391/how-do-i-fix-my-locale-issue |
|
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 | ||||
|
331 | Configuring Apache Setup | |||
|
332 | ======================== | |||
|
333 | ||||
|
334 | .. tip:: | |||
|
335 | ||||
|
336 | It is recommended to run Apache on a port other than 80, due to possible | |||
|
337 | conflicts with other HTTP servers like nginx. To do this, set the | |||
|
338 | ``Listen`` parameter in the ``/etc/apache2/ports.conf`` file, for example | |||
|
339 | ``Listen 8090``. | |||
|
340 | ||||
|
341 | ||||
|
342 | .. warning:: | |||
|
343 | ||||
|
344 | Make sure your Apache instance which runs the mod_dav_svn module is | |||
|
345 | only accessible by RhodeCode. Otherwise everyone is able to browse | |||
|
346 | the repositories or run subversion operations (checkout/commit/etc.). | |||
|
347 | ||||
|
348 | It is also recommended to run apache as the same user as |RCE|, otherwise | |||
|
349 | permission issues could occur. To do this edit the ``/etc/apache2/envvars`` | |||
|
350 | ||||
|
351 | .. code-block:: apache | |||
|
352 | ||||
|
353 | export APACHE_RUN_USER=rhodecode | |||
|
354 | export APACHE_RUN_GROUP=rhodecode | |||
|
355 | ||||
|
356 | 1. To configure Apache, create and edit a virtual hosts file, for example | |||
|
357 | :file:`/etc/apache2/sites-available/default.conf`. Below is an example | |||
|
358 | how to use one with auto-generated config ```mod_dav_svn.conf``` | |||
|
359 | from configured |RCE| instance. | |||
|
360 | ||||
|
361 | .. code-block:: apache | |||
|
362 | ||||
|
363 | <VirtualHost *:8080> | |||
|
364 | ServerAdmin rhodecode-admin@localhost | |||
|
365 | DocumentRoot /var/www/html | |||
|
366 | ErrorLog ${'${APACHE_LOG_DIR}'}/error.log | |||
|
367 | CustomLog ${'${APACHE_LOG_DIR}'}/access.log combined | |||
|
368 | Include /home/user/.rccontrol/enterprise-1/mod_dav_svn.conf | |||
|
369 | </VirtualHost> | |||
|
370 | ||||
|
371 | ||||
|
372 | 2. Go to the :menuselection:`Admin --> Settings --> VCS` page, and | |||
|
373 | enable :guilabel:`Proxy Subversion HTTP requests`, and specify the | |||
|
374 | :guilabel:`Subversion HTTP Server URL`. | |||
|
375 | ||||
|
376 | 3. Open the |RCE| configuration file, | |||
|
377 | :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` | |||
|
378 | ||||
|
379 | 4. Add the following configuration option in the ``[app:main]`` | |||
|
380 | section if you don't have it yet. | |||
|
381 | ||||
|
382 | This enables mapping of the created |RCE| repo groups into special |svn| paths. | |||
|
383 | Each time a new repository group is created, the system will update | |||
|
384 | the template file and create new mapping. Apache web server needs to be | |||
|
385 | reloaded to pick up the changes on this file. | |||
|
386 | It's recommended to add reload into a crontab so the changes can be picked | |||
|
387 | automatically once someone creates a repository group inside RhodeCode. | |||
|
388 | ||||
|
389 | ||||
|
390 | .. code-block:: ini | |||
|
391 | ||||
|
392 | ############################################## | |||
|
393 | ### Subversion proxy support (mod_dav_svn) ### | |||
|
394 | ############################################## | |||
|
395 | ## Enable or disable the config file generation. | |||
|
396 | svn.proxy.generate_config = true | |||
|
397 | ## Generate config file with `SVNListParentPath` set to `On`. | |||
|
398 | svn.proxy.list_parent_path = true | |||
|
399 | ## Set location and file name of generated config file. | |||
|
400 | svn.proxy.config_file_path = %(here)s/mod_dav_svn.conf | |||
|
401 | ## File system path to the directory containing the repositories served by | |||
|
402 | ## RhodeCode. | |||
|
403 | svn.proxy.parent_path_root = /path/to/repo_store | |||
|
404 | ## Used as a prefix to the <Location> block in the generated config file. In | |||
|
405 | ## most cases it should be set to `/`. | |||
|
406 | svn.proxy.location_root = / | |||
|
407 | ||||
|
408 | ||||
|
409 | This would create a special template file called ```mod_dav_svn.conf```. We | |||
|
410 | used that file path in the apache config above inside the Include statement. | |||
|
411 | ||||
|
412 | ||||
|
413 | Using |svn| | |||
|
414 | =========== | |||
|
415 | ||||
|
416 | Once |svn| has been enabled on your instance, you can use it with the | |||
|
417 | following examples. For more |svn| information, see the `Subversion Red Book`_ | |||
|
418 | ||||
|
419 | .. code-block:: bash | |||
|
420 | ||||
|
421 | # To clone a repository | |||
|
422 | svn checkout http://my-svn-server.example.com/my-svn-repo | |||
|
423 | ||||
|
424 | # svn commit | |||
|
425 | svn commit | |||
|
426 | ||||
|
427 | .. _Subversion Red Book: http://svnbook.red-bean.com/en/1.7/svn-book.html#svn.ref.svn | |||
|
428 | ||||
|
429 | ||||
|
430 | .. _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