Mercurial > kallithea
comparison docs/setup.rst @ 1090:de86a0870874
- Further corrections to the setup page.
author | jfh <jason@jasonfharris.com> |
---|---|
date | Sat, 26 Feb 2011 19:55:40 +0100 |
parents | fd4cd3c1d7e9 |
children | e67786cb2afa |
comparison
equal
deleted
inserted
replaced
1089:fd4cd3c1d7e9 | 1090:de86a0870874 |
---|---|
55 well as edit more advanced options on users and repositories | 55 well as edit more advanced options on users and repositories |
56 | 56 |
57 Try copying your own mercurial repository into the "root" directory you are | 57 Try copying your own mercurial repository into the "root" directory you are |
58 using, then from within the RhodeCode web application choose Admin > | 58 using, then from within the RhodeCode web application choose Admin > |
59 repositories. Then choose Add New Repository. Add the repository you copied into | 59 repositories. Then choose Add New Repository. Add the repository you copied into |
60 the root. Test that you can browse your repository from within RhodCode and then | 60 the root. Test that you can browse your repository from within RhodeCode and then |
61 try cloning your repository from RhodeCode with:: | 61 try cloning your repository from RhodeCode with:: |
62 | 62 |
63 hg clone http://127.0.0.1:5000/<repository name> | 63 hg clone http://127.0.0.1:5000/<repository name> |
64 | 64 |
65 where *repository name* is replaced by the name of your repository. | 65 where *repository name* is replaced by the name of your repository. |
66 | 66 |
67 Using RhodeCode with SSH | 67 Using RhodeCode with SSH |
68 ------------------------ | 68 ------------------------ |
69 | 69 |
70 RhodeCode currently only hosts repositories using http and https. (The addition of | |
71 ssh hosting is a planned future feature.) However you can easily use ssh in | |
72 parallel with RhodeCode. (Repository access via ssh is a standard "out of | |
73 the box" feature of mercurial_ and you can use this to access any of the | |
74 repositories that RhodeCode is hosting. See PublishingRepositories_) | |
75 | |
70 RhodeCode repository structures are kept in directories with the same name | 76 RhodeCode repository structures are kept in directories with the same name |
71 as the project, when using repository groups, each group is a subdirectory. | 77 as the project. When using repository groups, each group is a subdirectory. |
72 This will allow you to use ssh for accessing repositories quite easily. There | 78 This allows you to easily use ssh for accessing repositories. |
73 are some exceptions when using ssh for accessing repositories. | 79 |
74 | 80 In order to use ssh you need to make sure that your web-server and the users login |
75 You have to make sure that the web-server as well as the ssh users have unix | 81 accounts have the correct permissions set on the appropriate directories. (Note |
76 permission for the appropriate directories. Secondly, when using ssh rhodecode | 82 that these permissions are independent of any permissions you have set up using |
77 will not authenticate those requests and permissions set by the web interface | 83 the RhodeCode web interface.) |
78 will not work on the repositories accessed via ssh. There is a solution to this | |
79 to use auth hooks, that connects to rhodecode db, and runs check functions for | |
80 permissions. | |
81 | |
82 | 84 |
83 If your main directory (the same as set in RhodeCode settings) is for example | 85 If your main directory (the same as set in RhodeCode settings) is for example |
84 set to **/home/hg** and the repository you are using is named `rhodecode`, then | 86 set to **/home/hg** and the repository you are using is named `rhodecode`, then |
85 to clone via ssh you should run:: | 87 to clone via ssh you should run:: |
86 | 88 |
87 hg clone ssh://user@server.com/home/hg/rhodecode | 89 hg clone ssh://user@server.com/home/hg/rhodecode |
88 | 90 |
89 Using external tools such as mercurial server or using ssh key based | 91 Using other external tools such as mercurial-server_ or using ssh key based |
90 authentication is fully supported. | 92 authentication is fully supported. |
93 | |
94 Note: In an advanced setup, in order for your ssh access to use the same | |
95 permissions as set up via the RhodeCode web interface, you can create an | |
96 authentication hook to connect to the rhodecode db and runs check functions for | |
97 permissions against that. | |
98 | |
99 | |
91 | 100 |
92 Setting up Whoosh full text search | 101 Setting up Whoosh full text search |
93 ---------------------------------- | 102 ---------------------------------- |
94 | 103 |
95 Starting from version 1.1 the whoosh index can be build by using the paster | 104 Starting from version 1.1 the whoosh index can be build by using the paster |
101 the `-f` option, indexing will run always in "incremental" mode. | 110 the `-f` option, indexing will run always in "incremental" mode. |
102 | 111 |
103 For an incremental index build use:: | 112 For an incremental index build use:: |
104 | 113 |
105 paster make-index production.ini --repo-location=<location for repos> | 114 paster make-index production.ini --repo-location=<location for repos> |
106 | |
107 | 115 |
108 For a full index rebuild use:: | 116 For a full index rebuild use:: |
109 | 117 |
110 paster make-index production.ini -f --repo-location=<location for repos> | 118 paster make-index production.ini -f --repo-location=<location for repos> |
111 | 119 |
128 | 136 |
129 Setting up LDAP support | 137 Setting up LDAP support |
130 ----------------------- | 138 ----------------------- |
131 | 139 |
132 RhodeCode starting from version 1.1 supports ldap authentication. In order | 140 RhodeCode starting from version 1.1 supports ldap authentication. In order |
133 to use LDAP, you have to install python-ldap_ package. This package is available | 141 to use LDAP, you have to install the python-ldap_ package. This package is available |
134 via pypi, so you can install it by running | 142 via pypi, so you can install it by running |
135 | 143 |
136 :: | 144 :: |
137 | 145 |
138 easy_install python-ldap | 146 easy_install python-ldap |
160 | 168 |
161 `Account` and `Password` are optional, and used for two-phase ldap | 169 `Account` and `Password` are optional, and used for two-phase ldap |
162 authentication so those are credentials to access your ldap, if it doesn't | 170 authentication so those are credentials to access your ldap, if it doesn't |
163 support anonymous search/user lookups. | 171 support anonymous search/user lookups. |
164 | 172 |
165 Base DN must have %(user)s template inside, it's a placer where your uid used | 173 Base DN must have the %(user)s template inside, it's a place holder where your uid |
166 to login would go, it allows admins to specify not standard schema for uid | 174 used to login would go. It allows admins to specify non-standard schema for the |
167 variable | 175 uid variable. |
168 | 176 |
169 If all data are entered correctly, and `python-ldap` is properly installed | 177 If all of the data is correctly entered, and `python-ldap` is properly |
170 Users should be granted to access RhodeCode wit ldap accounts. When | 178 installed, then users should be granted access to RhodeCode with ldap accounts. |
171 logging at the first time an special ldap account is created inside RhodeCode, | 179 When logging in the first time a special ldap account is created inside |
172 so you can control over permissions even on ldap users. If such user exists | 180 RhodeCode, so you can control the permissions even on ldap users. If such users |
173 already in RhodeCode database ldap user with the same username would be not | 181 already exist in the RhodeCode database, then the ldap user with the same |
174 able to access RhodeCode. | 182 username would be not be able to access RhodeCode. |
175 | 183 |
176 If you have problems with ldap access and believe you entered correct | 184 If you have problems with ldap access and believe you have correctly entered the |
177 information check out the RhodeCode logs,any error messages sent from | 185 required information then proceed by investigating the RhodeCode logs. Any |
178 ldap will be saved there. | 186 error messages sent from ldap will be saved there. |
179 | 187 |
180 | 188 |
181 | 189 |
182 Setting Up Celery | 190 Setting Up Celery |
183 ----------------- | 191 ----------------- |
184 | 192 |
185 Since version 1.1 celery is configured by the rhodecode ini configuration files | 193 Since version 1.1 celery is configured by the rhodecode ini configuration files. |
186 simply set use_celery=true in the ini file then add / change the configuration | 194 Simply set use_celery=true in the ini file then add / change the configuration |
187 variables inside the ini file. | 195 variables inside the ini file. |
188 | 196 |
189 Remember that the ini files uses format with '.' not with '_' like celery | 197 Remember that the ini files use the format with '.' not with '_' like celery. |
190 so for example setting `BROKER_HOST` in celery means setting `broker.host` in | 198 So for example setting `BROKER_HOST` in celery means setting `broker.host` in |
191 the config file. | 199 the config file. |
192 | 200 |
193 In order to make start using celery run:: | 201 In order to start using celery run:: |
194 | 202 |
195 paster celeryd <configfile.ini> | 203 paster celeryd <configfile.ini> |
196 | 204 |
197 | 205 |
198 .. note:: | 206 .. note:: |
199 Make sure you run this command from same virtualenv, and with the same user | 207 Make sure you run this command from the same virtualenv, and with the same user |
200 that rhodecode runs. | 208 that rhodecode runs. |
201 | 209 |
202 HTTPS support | 210 HTTPS support |
203 ------------- | 211 ------------- |
204 | 212 |
205 There are two ways to enable https, first is to set HTTP_X_URL_SCHEME in | 213 There are two ways to enable https: |
206 your http server headers, than rhodecode will recognise this headers and make | 214 |
207 proper https redirections, another way is to set `force_https = true` | 215 - Set HTTP_X_URL_SCHEME in your http server headers, than rhodecode will |
208 in the ini cofiguration to force using https, no headers are needed than to | 216 recognize this headers and make proper https redirections |
209 enable https | 217 - Alternatively, set `force_https = true` in the ini configuration to force using |
218 https, no headers are needed than to enable https | |
210 | 219 |
211 | 220 |
212 Nginx virtual host example | 221 Nginx virtual host example |
213 -------------------------- | 222 -------------------------- |
214 | 223 |
228 proxy_set_header X-Url-Scheme $scheme; | 237 proxy_set_header X-Url-Scheme $scheme; |
229 include /etc/nginx/proxy.conf; | 238 include /etc/nginx/proxy.conf; |
230 } | 239 } |
231 } | 240 } |
232 | 241 |
233 Here's the proxy.conf. It's tuned so it'll not timeout on long | 242 Here's the proxy.conf. It's tuned so it will not timeout on long |
234 pushes and also on large pushes:: | 243 pushes or large pushes:: |
235 | 244 |
236 proxy_redirect off; | 245 proxy_redirect off; |
237 proxy_set_header Host $host; | 246 proxy_set_header Host $host; |
238 proxy_set_header X-Host $http_host; | 247 proxy_set_header X-Host $http_host; |
239 proxy_set_header X-Real-IP $remote_addr; | 248 proxy_set_header X-Real-IP $remote_addr; |
248 proxy_buffer_size 16k; | 257 proxy_buffer_size 16k; |
249 proxy_buffers 4 16k; | 258 proxy_buffers 4 16k; |
250 proxy_busy_buffers_size 64k; | 259 proxy_busy_buffers_size 64k; |
251 proxy_temp_file_write_size 64k; | 260 proxy_temp_file_write_size 64k; |
252 | 261 |
253 Also when using root path with nginx you might set the static files to false | 262 Also, when using root path with nginx you might set the static files to false |
254 in production.ini file:: | 263 in the production.ini file:: |
255 | 264 |
256 [app:main] | 265 [app:main] |
257 use = egg:rhodecode | 266 use = egg:rhodecode |
258 full_stack = true | 267 full_stack = true |
259 static_files = false | 268 static_files = false |
260 lang=en | 269 lang=en |
261 cache_dir = %(here)s/data | 270 cache_dir = %(here)s/data |
262 | 271 |
263 To not have the statics served by the application. And improve speed. | 272 In order to not have the statics served by the application. This improves speed. |
264 | 273 |
265 | 274 |
266 Apache virtual host example | 275 Apache virtual host example |
267 --------------------------- | 276 --------------------------- |
268 | 277 |
269 Sample config for apache using proxy:: | 278 Here is a sample configuration file for apache using proxy:: |
270 | 279 |
271 <VirtualHost *:80> | 280 <VirtualHost *:80> |
272 ServerName hg.myserver.com | 281 ServerName hg.myserver.com |
273 ServerAlias hg.myserver.com | 282 ServerAlias hg.myserver.com |
274 | 283 |
305 ProxyPass http://127.0.0.1:59542/rhodecode | 314 ProxyPass http://127.0.0.1:59542/rhodecode |
306 ProxyPassReverse http://127.0.0.1:59542/rhodecode | 315 ProxyPassReverse http://127.0.0.1:59542/rhodecode |
307 SetEnvIf X-Url-Scheme https HTTPS=1 | 316 SetEnvIf X-Url-Scheme https HTTPS=1 |
308 </Location> | 317 </Location> |
309 | 318 |
310 Besides the regular apache setup you will need to add such part to .ini file:: | 319 Besides the regular apache setup you will need to add the following to your .ini file:: |
311 | 320 |
312 filter-with = proxy-prefix | 321 filter-with = proxy-prefix |
313 | 322 |
314 Add the following at the end of the .ini file:: | 323 Add the following at the end of the .ini file:: |
315 | 324 |
324 TODO ! | 333 TODO ! |
325 | 334 |
326 Other configuration files | 335 Other configuration files |
327 ------------------------- | 336 ------------------------- |
328 | 337 |
329 Some example init.d script can be found here, for debian and gentoo: | 338 Some example init.d scripts can be found here, for debian and gentoo: |
330 | 339 |
331 https://rhodeocode.org/rhodecode/files/tip/init.d | 340 https://rhodeocode.org/rhodecode/files/tip/init.d |
332 | 341 |
333 | 342 |
334 Troubleshooting | 343 Troubleshooting |
335 --------------- | 344 --------------- |
336 | 345 |
337 - missing static files ? | 346 :Q: **Missing static files?** |
338 | 347 :A: Make sure either to set the `static_files = true` in the .ini file or |
339 - make sure either to set the `static_files = true` in the .ini file or | |
340 double check the root path for your http setup. It should point to | 348 double check the root path for your http setup. It should point to |
341 for example: | 349 for example: |
342 /home/my-virtual-python/lib/python2.6/site-packages/rhodecode/public | 350 /home/my-virtual-python/lib/python2.6/site-packages/rhodecode/public |
343 | 351 |
344 - can't install celery/rabbitmq | 352 | |
345 | 353 :Q: **Can't install celery/rabbitmq** |
346 - don't worry RhodeCode works without them too. No extra setup required | 354 :A: Don't worry RhodeCode works without them too. No extra setup is required. |
347 | 355 |
348 - long lasting push timeouts ? | 356 | |
349 | 357 :Q: **Long lasting push timeouts?** |
350 - make sure you set a longer timeouts in your proxy/fcgi settings, timeouts | 358 :A: Make sure you set a longer timeouts in your proxy/fcgi settings, timeouts |
351 are caused by https server and not RhodeCode | 359 are caused by https server and not RhodeCode. |
352 | 360 |
353 - large pushes timeouts ? | 361 | |
354 | 362 :Q: **Large pushes timeouts?** |
355 - make sure you set a proper max_body_size for the http server | 363 :A: Make sure you set a proper max_body_size for the http server. |
356 | 364 |
357 - Apache doesn't pass basicAuth on pull/push ? | 365 | |
358 | 366 :Q: **Apache doesn't pass basicAuth on pull/push?** |
359 - Make sure you added `WSGIPassAuthorization true` | 367 :A: Make sure you added `WSGIPassAuthorization true`. |
368 | |
369 For further questions search the `Issues tracker`_, or post a message in the `google group rhodecode`_ | |
360 | 370 |
361 .. _virtualenv: http://pypi.python.org/pypi/virtualenv | 371 .. _virtualenv: http://pypi.python.org/pypi/virtualenv |
362 .. _python: http://www.python.org/ | 372 .. _python: http://www.python.org/ |
363 .. _mercurial: http://mercurial.selenic.com/ | 373 .. _mercurial: http://mercurial.selenic.com/ |
364 .. _celery: http://celeryproject.org/ | 374 .. _celery: http://celeryproject.org/ |
365 .. _rabbitmq: http://www.rabbitmq.com/ | 375 .. _rabbitmq: http://www.rabbitmq.com/ |
366 .. _python-ldap: http://www.python-ldap.org/ | 376 .. _python-ldap: http://www.python-ldap.org/ |
377 .. _mercurial-server: http://www.lshift.net/mercurial-server.html | |
378 .. _PublishingRepositories: http://mercurial.selenic.com/wiki/PublishingRepositories | |
379 .. _Issues tracker: https://bitbucket.org/marcinkuzminski/rhodecode/issues | |
380 .. _google group rhodecode: http://groups.google.com/group/rhodecode |