##// END OF EJS Templates
merge docs in beta with those corrected by Jason Harris
marcink -
r1092:8af52e12 beta
parent child Browse files
Show More
@@ -1,17 +1,19 b''
1 .. _contributing:
1 .. _contributing:
2
2
3 Contributing in RhodeCode
3 Contributing to RhodeCode
4 =========================
4 =========================
5
5
6 If You would like to contribute to RhodeCode, please contact me, any help is
6 If you would like to contribute to RhodeCode, please contact me, any help is
7 greatly appreciated.
7 greatly appreciated!
8
8
9 Preferable method Would be to fork RhodeCode repository from bitbucket
9 Could I request that you make your source contributions by first forking the
10 https://bitbucket.org/marcinkuzminski/rhodecode and then open a pull request.
10 RhodeCode repository on bitbucket
11 This way it's easier for me to merge.
11 https://bitbucket.org/marcinkuzminski/rhodecode and then make your changes to
12 your forked repository. Finally, when you are finished making a change, please
13 send me a pull request.
12
14
13 To run RhodeCode in a development version You always need to install tip
15 To run RhodeCode in a development version you always need to install the tip
14 version of RhodeCode and VCS library.
16 version of RhodeCode and the VCS library.
15
17
16
18 | Thank you for any contributions!
17 Thank You.
19 | Marcin
@@ -1,99 +1,105 b''
1 .. _installation:
1 .. _installation:
2
2
3 Installation
3 Installation
4 ============
4 ============
5
5
6 ``RhodeCode`` is written entirely in Python, but in order to use it's full
6 ``RhodeCode`` is written entirely in Python. In order to gain maximum performance
7 potential there are some third-party requirements. When RhodeCode is used
7 there are some third-party you must install. When RhodeCode is used
8 together with celery You have to install some kind of message broker,
8 together with celery you have to install some kind of message broker,
9 recommended one is rabbitmq_ to make the async tasks work.
9 recommended one is rabbitmq_ to make the async tasks work.
10
10
11 Of course RhodeCode works in sync mode also, then You don't have to install
11 Of course RhodeCode works in sync mode also and then you do not have to install
12 any third party apps. Celery_ will give You large speed improvement when using
12 any third party applications. However, using Celery_ will give you a large speed improvement when using
13 many big repositories. If You plan to use it for 7 or 10 small repositories, it
13 many big repositories. If you plan to use RhodeCode for say 7 to 10 small repositories, RhodeCode
14 will work just fine without celery running.
14 will perform perfectly well without celery running.
15
15
16 After You decide to Run it with celery make sure You run celeryd using paster
16 If you make the decision to run RhodeCode with celery make sure you run celeryd using paster
17 and message broker together with the application.
17 and message broker together with the application.
18
18
19 Install from Cheese Shop
19 Installing RhodeCode from Cheese Shop
20 ------------------------
20 -------------------------------------
21 Rhodecode requires python 2.x greater than version 2.5
22
21
23 Easiest way to install ``rhodecode`` is to run::
22 Rhodecode requires python version 2.5 or higher.
23
24 The easiest way to install ``rhodecode`` is to run::
24
25
25 easy_install rhodecode
26 easy_install rhodecode
26
27
27 Or::
28 Or::
28
29
29 pip install rhodecode
30 pip install rhodecode
30
31
31 If you prefer to install manually simply grab latest release from
32 If you prefer to install RhodeCode manually simply grab latest release from
32 http://pypi.python.org/pypi/rhodecode, decompres archive and run::
33 http://pypi.python.org/pypi/rhodecode, decompress the archive and run::
33
34
34 python setup.py install
35 python setup.py install
35
36
36
37
37 Step by step installation example
38 Step by step installation example
38 ---------------------------------
39 ---------------------------------
39
40
40
41
41 - Assuming You have installed virtualenv_ create one using.
42 - Assuming you have installed virtualenv_ create a new virtual environment using virtualenv::
42 The `--no-site-packages` will make sure non of Your system libs are linked
43 with this virtualenv_
44
45 ::
46
43
47 virtualenv --no-site-packages /var/www/rhodecode-venv
44 virtualenv --no-site-packages /var/www/rhodecode-venv
48
45
46
47 .. note:: Using ``--no-site-packages`` when generating your
48 virtualenv is **very important**. This flag provides the necessary
49 isolation for running the set of packages required by
50 RhodeCode. If you do not specify ``--no-site-packages``,
51 it's possible that RhodeCode will not install properly into
52 the virtualenv, or, even if it does, may not run properly,
53 depending on the packages you've already got installed into your
54 Python's "main" site-packages dir.
55
56
49 - this will install new virtualenv_ into `/var/www/rhodecode-venv`.
57 - this will install new virtualenv_ into `/var/www/rhodecode-venv`.
50 - Activate the virtualenv_ by running
58 - Activate the virtualenv_ by running::
51
52 ::
53
59
54 source /var/www/rhodecode-venv/bin/activate
60 source /var/www/rhodecode-venv/bin/activate
55
61
56 - Make a folder for rhodecode somewhere on the filesystem for example
62 .. note:: If you're using UNIX, *do not* use ``sudo`` to run the
63 ``virtualenv`` script. It's perfectly acceptable (and desirable)
64 to create a virtualenv as a normal user.
57
65
58 ::
66 - Make a folder for rhodecode somewhere on the filesystem for example::
59
67
60 mkdir /var/www/rhodecode
68 mkdir /var/www/rhodecode
61
69
62
70
63 - Run this command to install rhodecode
71 - Run this command to install rhodecode::
64
65 ::
66
72
67 easy_install rhodecode
73 easy_install rhodecode
68
74
69 - this will install rhodecode together with pylons
75 - This will install rhodecode together with pylons and all other required python
70 and all other required python libraries
76 libraries
71
77
72 Requirements for Celery (optional)
78 Requirements for Celery (optional)
73 ----------------------------------
79 ----------------------------------
74
80
75 .. note::
81 .. note::
76 Installing message broker and using celery is optional, RhodeCode will
82 Installing message broker and using celery is optional, RhodeCode will
77 work without them perfectly fine.
83 work perfectly fine without them.
78
84
79
85
80 **Message Broker**
86 **Message Broker**
81
87
82 - preferred is `RabbitMq <http://www.rabbitmq.com/>`_
88 - preferred is `RabbitMq <http://www.rabbitmq.com/>`_
83 - possible other is `Redis <http://code.google.com/p/redis/>`_
89 - A possible alternative is `Redis <http://code.google.com/p/redis/>`_
84
90
85 For installation instructions You can visit:
91 For installation instructions you can visit:
86 http://ask.github.com/celery/getting-started/index.html
92 http://ask.github.com/celery/getting-started/index.html.
87 It's very nice tutorial how to start celery_ with rabbitmq_
93 This is a very nice tutorial on how to start using celery_ with rabbitmq_
88
94
89
95
90 You can now proceed to :ref:`setup`
96 You can now proceed to :ref:`setup`
91 -----------------------------------
97 -----------------------------------
92
98
93
99
94
100
95 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
101 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
96 .. _python: http://www.python.org/
102 .. _python: http://www.python.org/
97 .. _mercurial: http://mercurial.selenic.com/
103 .. _mercurial: http://mercurial.selenic.com/
98 .. _celery: http://celeryproject.org/
104 .. _celery: http://celeryproject.org/
99 .. _rabbitmq: http://www.rabbitmq.com/ No newline at end of file
105 .. _rabbitmq: http://www.rabbitmq.com/
@@ -1,507 +1,531 b''
1 .. _setup:
1 .. _setup:
2
2
3 Setup
3 Setup
4 =====
4 =====
5
5
6
6
7 Setting up the application
7 Setting up RhodeCode
8 --------------------------
8 --------------------------
9
9
10 First You'll need to create RhodeCode config file. Run the following command
10 First, you will need to create a RhodeCode configuration file. Run the following
11 to do this
11 command to do this::
12
13 ::
14
12
15 paster make-config RhodeCode production.ini
13 paster make-config RhodeCode production.ini
16
14
17 - This will create `production.ini` config inside the directory
15 - This will create the file `production.ini` in the current directory. This
18 this config contains various settings for RhodeCode, e.g proxy port,
16 configuration file contains the various settings for RhodeCode, e.g proxy port,
19 email settings, usage of static files, cache, celery settings and logging.
17 email settings, usage of static files, cache, celery settings and logging.
20
18
21
19
22 Next we need to create the database. I'll recommend to use sqlite (default)
20 Next, you need to create the databases used by RhodeCode. I recommend that you
23 or postgresql. Make sure You properly adjust the db url in the .ini file to use
21 use sqlite (default) or postgresql. If you choose a database other than the
24 other than the default sqlite database
22 default ensure you properly adjust the db url in your production.ini
25
23 configuration file to use this other database. Create the databases by running
26
24 the following command::
27 ::
28
25
29 paster setup-app production.ini
26 paster setup-app production.ini
30
27
31 - This command will create all needed tables and an admin account.
28 This will prompt you for a "root" path. This "root" path is the location where
32 When asked for a path You can either use a new location of one with already
29 RhodeCode will store all of its repositories on the current machine. After
33 existing ones. RhodeCode will simply add all new found repositories to
30 entering this "root" path ``setup-app`` will also prompt you for a username and password
34 it's database. Also make sure You specify correct path to repositories.
31 for the initial admin account which ``setup-app`` sets up for you.
35 - Remember that the given path for mercurial_ repositories must be write
36 accessible for the application. It's very important since RhodeCode web
37 interface will work even without such an access but, when trying to do a
38 push it'll eventually fail with permission denied errors.
39
32
40 You are ready to use RhodeCode, to run it simply execute
33 - The ``setup-app`` command will create all of the needed tables and an admin
34 account. When choosing a root path you can either use a new empty location, or a
35 location which already contains existing repositories. If you choose a location
36 which contains existing repositories RhodeCode will simply add all of the
37 repositories at the chosen location to it's database. (Note: make sure you
38 specify the correct path to the root).
39 - Note: the given path for mercurial_ repositories **must** be write accessible
40 for the application. It's very important since the RhodeCode web interface will
41 work without write access, but when trying to do a push it will eventually fail
42 with permission denied errors unless it has write access.
41
43
42 ::
44 You are now ready to use RhodeCode, to run it simply execute::
43
45
44 paster serve production.ini
46 paster serve production.ini
45
47
46 - This command runs the RhodeCode server the app should be available at the
48 - This command runs the RhodeCode server. The web app should be available at the
47 127.0.0.1:5000. This ip and port is configurable via the production.ini
49 127.0.0.1:5000. This ip and port is configurable via the production.ini
48 file created in previous step
50 file created in previous step
49 - Use admin account you created to login.
51 - Use the admin account you created above when running ``setup-app`` to login to the web app.
50 - Default permissions on each repository is read, and owner is admin. So
52 - The default permissions on each repository is read, and the owner is admin.
51 remember to update these if needed. In the admin panel You can toggle ldap,
53 Remember to update these if needed.
52 anonymous, permissions settings. As well as edit more advanced options on
54 - In the admin panel you can toggle ldap, anonymous, permissions settings. As
53 users and repositories
55 well as edit more advanced options on users and repositories
56
57 Try copying your own mercurial repository into the "root" directory you are
58 using, then from within the RhodeCode web application choose Admin >
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 RhodeCode and then
61 try cloning your repository from RhodeCode with::
62
63 hg clone http://127.0.0.1:5000/<repository name>
64
65 where *repository name* is replaced by the name of your repository.
54
66
55 Using RhodeCode with SSH
67 Using RhodeCode with SSH
56 ------------------------
68 ------------------------
57
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
58 RhodeCode repository structures are kept in directories with the same name
76 RhodeCode repository structures are kept in directories with the same name
59 as the project, when using repository groups, each group is a a subdirectory.
77 as the project. When using repository groups, each group is a subdirectory.
60 This will allow You to use ssh for accessing repositories quite easy. There
78 This allows you to easily use ssh for accessing repositories.
61 are some exceptions when using ssh for accessing repositories.
62
79
63 You have to make sure that the webserver as well as the ssh users have unix
80 In order to use ssh you need to make sure that your web-server and the users login
64 permission for directories. Secondly when using ssh rhodecode will not
81 accounts have the correct permissions set on the appropriate directories. (Note
65 authenticate those requests and permissions set by the web interface will not
82 that these permissions are independent of any permissions you have set up using
66 work on the repositories accessed via ssh. There is a solution to this to use
83 the RhodeCode web interface.)
67 auth hooks, that connects to rhodecode db, and runs check functions for
68 permissions.
69
84
70 TODO: post more info on this !
85 If your main directory (the same as set in RhodeCode settings) is for example
86 set to **/home/hg** and the repository you are using is named `rhodecode`, then
87 to clone via ssh you should run::
71
88
72 if Your main directory (the same as set in RhodeCode settings) is set to
73 for example `\home\hg` and repository You are using is `rhodecode`
74
75 The command runned should look like this::
76 hg clone ssh://user@server.com/home/hg/rhodecode
89 hg clone ssh://user@server.com/home/hg/rhodecode
77
90
78 Using external tools such as mercurial server or using ssh key based auth is
91 Using other external tools such as mercurial-server_ or using ssh key based
79 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.
80
98
81 Setting up Whoosh full text search
99 Setting up Whoosh full text search
82 ----------------------------------
100 ----------------------------------
83
101
84 Starting from version 1.1 whoosh index can be build using paster command.
102 Starting from version 1.1 the whoosh index can be build by using the paster
85 You have to specify the config file that stores location of index, and
103 command ``make-index``. To use ``make-index`` you must specify the configuration
86 location of repositories (`--repo-location`). Starting from version 1.2 it is
104 file that stores the location of the index, and the location of the repositories
105 (`--repo-location`).Starting from version 1.2 it is
87 also possible to specify a comma separated list of repositories (`--index-only`)
106 also possible to specify a comma separated list of repositories (`--index-only`)
88 to build index only on chooses repositories skipping any other found in repos
107 to build index only on chooses repositories skipping any other found in repos
89 location
108 location
90
109
91 There is possible also to pass `-f` to the options
110 You may optionally pass the option `-f` to enable a full index rebuild. Without
92 to enable full index rebuild. Without that indexing will run always in in
111 the `-f` option, indexing will run always in "incremental" mode.
93 incremental mode.
94
112
95 incremental mode::
113 For an incremental index build use::
96
114
97 paster make-index production.ini --repo-location=<location for repos>
115 paster make-index production.ini --repo-location=<location for repos>
98
116
99
117 For a full index rebuild use::
100
101 for full index rebuild You can use::
102
118
103 paster make-index production.ini -f --repo-location=<location for repos>
119 paster make-index production.ini -f --repo-location=<location for repos>
104
120
105
121
106 building index just for chosen repositories is possible with such command::
122 building index just for chosen repositories is possible with such command::
107
123
108 paster make-index production.ini --repo-location=<location for repos> --index-only=vcs,rhodecode
124 paster make-index production.ini --repo-location=<location for repos> --index-only=vcs,rhodecode
109
125
110
126
111 In order to do periodical index builds and keep Your index always up to date.
127 In order to do periodical index builds and keep your index always up to date.
112 It's recommended to do a crontab entry for incremental indexing.
128 It's recommended to do a crontab entry for incremental indexing.
113 An example entry might look like this
129 An example entry might look like this::
114
115 ::
116
130
117 /path/to/python/bin/paster /path/to/rhodecode/production.ini --repo-location=<location for repos>
131 /path/to/python/bin/paster /path/to/rhodecode/production.ini --repo-location=<location for repos>
118
132
119 When using incremental (default) mode whoosh will check last modification date
133 When using incremental mode (the default) whoosh will check the last
120 of each file and add it to reindex if newer file is available. Also indexing
134 modification date of each file and add it to be reindexed if a newer file is
121 daemon checks for removed files and removes them from index.
135 available. The indexing daemon checks for any removed files and removes them
136 from index.
122
137
123 Sometime You might want to rebuild index from scratch. You can do that using
138 If you want to rebuild index from scratch, you can use the `-f` flag as above,
124 the `-f` flag passed to paster command or, in admin panel You can check
139 or in the admin panel you can check `build from scratch` flag.
125 `build from scratch` flag.
126
140
127
141
128 Setting up LDAP support
142 Setting up LDAP support
129 -----------------------
143 -----------------------
130
144
131 RhodeCode starting from version 1.1 supports ldap authentication. In order
145 RhodeCode starting from version 1.1 supports ldap authentication. In order
132 to use LDAP, You have to install python-ldap_ package. This package is available
146 to use LDAP, you have to install the python-ldap_ package. This package is available
133 via pypi, so You can install it by running
147 via pypi, so you can install it by running
134
148
135 ::
149 ::
136
150
137 easy_install python-ldap
151 easy_install python-ldap
138
152
139 ::
153 ::
140
154
141 pip install python-ldap
155 pip install python-ldap
142
156
143 .. note::
157 .. note::
144 python-ldap requires some certain libs on Your system, so before installing
158 python-ldap requires some certain libs on your system, so before installing
145 it check that You have at least `openldap`, and `sasl` libraries.
159 it check that you have at least `openldap`, and `sasl` libraries.
146
160
147 LDAP settings are located in admin->ldap section,
161 LDAP settings are located in admin->ldap section,
148
162
149 This is a typical LDAP setup::
163 Here's a typical ldap setup::
150
164
151 Connection settings
165 Connection settings
152 Enable LDAP = checked
166 Enable LDAP = checked
153 Host = host.example.org
167 Host = host.example.org
154 Port = 389
168 Port = 389
155 Account = <account>
169 Account = <account>
156 Password = <password>
170 Password = <password>
157 Enable LDAPS = checked
171 Enable LDAPS = checked
158 Certificate Checks = DEMAND
172 Certificate Checks = DEMAND
159
173
160 Search settings
174 Search settings
161 Base DN = CN=users,DC=host,DC=example,DC=org
175 Base DN = CN=users,DC=host,DC=example,DC=org
162 LDAP Filter = (&(objectClass=user)(!(objectClass=computer)))
176 LDAP Filter = (&(objectClass=user)(!(objectClass=computer)))
163 LDAP Search Scope = SUBTREE
177 LDAP Search Scope = SUBTREE
164
178
165 Attribute mappings
179 Attribute mappings
166 Login Attribute = uid
180 Login Attribute = uid
167 First Name Attribute = firstName
181 First Name Attribute = firstName
168 Last Name Attribute = lastName
182 Last Name Attribute = lastName
169 E-mail Attribute = mail
183 E-mail Attribute = mail
170
184
171 .. _enable_ldap:
185 .. _enable_ldap:
172
186
173 Enable LDAP : required
187 Enable LDAP : required
174 Whether to use LDAP for authenticating users.
188 Whether to use LDAP for authenticating users.
175
189
176 .. _ldap_host:
190 .. _ldap_host:
177
191
178 Host : required
192 Host : required
179 LDAP server hostname or IP address.
193 LDAP server hostname or IP address.
180
194
181 .. _Port:
195 .. _Port:
182
196
183 Port : required
197 Port : required
184 389 for un-encrypted LDAP, 636 for SSL-encrypted LDAP.
198 389 for un-encrypted LDAP, 636 for SSL-encrypted LDAP.
185
199
186 .. _ldap_account:
200 .. _ldap_account:
187
201
188 Account : optional
202 Account : optional
189 Only required if the LDAP server does not allow anonymous browsing of
203 Only required if the LDAP server does not allow anonymous browsing of
190 records. This should be a special account for record browsing. This
204 records. This should be a special account for record browsing. This
191 will require `LDAP Password`_ below.
205 will require `LDAP Password`_ below.
192
206
193 .. _LDAP Password:
207 .. _LDAP Password:
194
208
195 Password : optional
209 Password : optional
196 Only required if the LDAP server does not allow anonymous browsing of
210 Only required if the LDAP server does not allow anonymous browsing of
197 records.
211 records.
198
212
199 .. _Enable LDAPS:
213 .. _Enable LDAPS:
200
214
201 Enable LDAPS : optional
215 Enable LDAPS : optional
202 Check this if SSL encryption is necessary for communication with the
216 Check this if SSL encryption is necessary for communication with the
203 LDAP server - it will likely require `Port`_ to be set to a different
217 LDAP server - it will likely require `Port`_ to be set to a different
204 value (standard LDAPS port is 636). When LDAPS is enabled then
218 value (standard LDAPS port is 636). When LDAPS is enabled then
205 `Certificate Checks`_ is required.
219 `Certificate Checks`_ is required.
206
220
207 .. _Certificate Checks:
221 .. _Certificate Checks:
208
222
209 Certificate Checks : optional
223 Certificate Checks : optional
210 How SSL certificates verification is handled - this is only useful when
224 How SSL certificates verification is handled - this is only useful when
211 `Enable LDAPS`_ is enabled. Only DEMAND or HARD offer full SSL security while
225 `Enable LDAPS`_ is enabled. Only DEMAND or HARD offer full SSL security while
212 the other options are susceptible to man-in-the-middle attacks. SSL
226 the other options are susceptible to man-in-the-middle attacks. SSL
213 certificates can be installed to /etc/openldap/cacerts so that the
227 certificates can be installed to /etc/openldap/cacerts so that the
214 DEMAND or HARD options can be used with self-signed certificates or
228 DEMAND or HARD options can be used with self-signed certificates or
215 certificates that do not have traceable certificates of authority.
229 certificates that do not have traceable certificates of authority.
216
230
217 NEVER
231 NEVER
218 A serve certificate will never be requested or checked.
232 A serve certificate will never be requested or checked.
219
233
220 ALLOW
234 ALLOW
221 A server certificate is requested. Failure to provide a
235 A server certificate is requested. Failure to provide a
222 certificate or providing a bad certificate will not terminate the
236 certificate or providing a bad certificate will not terminate the
223 session.
237 session.
224
238
225 TRY
239 TRY
226 A server certificate is requested. Failure to provide a
240 A server certificate is requested. Failure to provide a
227 certificate does not halt the session; providing a bad certificate
241 certificate does not halt the session; providing a bad certificate
228 halts the session.
242 halts the session.
229
243
230 DEMAND
244 DEMAND
231 A server certificate is requested and must be provided and
245 A server certificate is requested and must be provided and
232 authenticated for the session to proceed.
246 authenticated for the session to proceed.
233
247
234 HARD
248 HARD
235 The same as DEMAND.
249 The same as DEMAND.
236
250
237 .. _Base DN:
251 .. _Base DN:
238
252
239 Base DN : required
253 Base DN : required
240 The Distinguished Name (DN) where searches for users will be performed.
254 The Distinguished Name (DN) where searches for users will be performed.
241 Searches can be controlled by `LDAP Filter`_ and `LDAP Search Scope`_.
255 Searches can be controlled by `LDAP Filter`_ and `LDAP Search Scope`_.
242
256
243 .. _LDAP Filter:
257 .. _LDAP Filter:
244
258
245 LDAP Filter : optional
259 LDAP Filter : optional
246 A LDAP filter defined by RFC 2254. This is more useful when `LDAP
260 A LDAP filter defined by RFC 2254. This is more useful when `LDAP
247 Search Scope`_ is set to SUBTREE. The filter is useful for limiting
261 Search Scope`_ is set to SUBTREE. The filter is useful for limiting
248 which LDAP objects are identified as representing Users for
262 which LDAP objects are identified as representing Users for
249 authentication. The filter is augmented by `Login Attribute`_ below.
263 authentication. The filter is augmented by `Login Attribute`_ below.
250 This can commonly be left blank.
264 This can commonly be left blank.
251
265
252 .. _LDAP Search Scope:
266 .. _LDAP Search Scope:
253
267
254 LDAP Search Scope : required
268 LDAP Search Scope : required
255 This limits how far LDAP will search for a matching object.
269 This limits how far LDAP will search for a matching object.
256
270
257 BASE
271 BASE
258 Only allows searching of `Base DN`_ and is usually not what you
272 Only allows searching of `Base DN`_ and is usually not what you
259 want.
273 want.
260
274
261 ONELEVEL
275 ONELEVEL
262 Searches all entries under `Base DN`_, but not Base DN itself.
276 Searches all entries under `Base DN`_, but not Base DN itself.
263
277
264 SUBTREE
278 SUBTREE
265 Searches all entries below `Base DN`_, but not Base DN itself.
279 Searches all entries below `Base DN`_, but not Base DN itself.
266 When using SUBTREE `LDAP Filter`_ is useful to limit object
280 When using SUBTREE `LDAP Filter`_ is useful to limit object
267 location.
281 location.
268
282
269 .. _Login Attribute:
283 .. _Login Attribute:
270
284
271 Login Attribute : required
285 Login Attribute : required
272 The LDAP record attribute that will be matched as the USERNAME or
286 The LDAP record attribute that will be matched as the USERNAME or
273 ACCOUNT used to connect to RhodeCode. This will be added to `LDAP
287 ACCOUNT used to connect to RhodeCode. This will be added to `LDAP
274 Filter`_ for locating the User object. If `LDAP Filter`_ is specified as
288 Filter`_ for locating the User object. If `LDAP Filter`_ is specified as
275 "LDAPFILTER", `Login Attribute`_ is specified as "uid" and the user has
289 "LDAPFILTER", `Login Attribute`_ is specified as "uid" and the user has
276 connected as "jsmith" then the `LDAP Filter`_ will be augmented as below
290 connected as "jsmith" then the `LDAP Filter`_ will be augmented as below
277 ::
291 ::
278
292
279 (&(LDAPFILTER)(uid=jsmith))
293 (&(LDAPFILTER)(uid=jsmith))
280
294
281 .. _ldap_attr_firstname:
295 .. _ldap_attr_firstname:
282
296
283 First Name Attribute : required
297 First Name Attribute : required
284 The LDAP record attribute which represents the user's first name.
298 The LDAP record attribute which represents the user's first name.
285
299
286 .. _ldap_attr_lastname:
300 .. _ldap_attr_lastname:
287
301
288 Last Name Attribute : required
302 Last Name Attribute : required
289 The LDAP record attribute which represents the user's last name.
303 The LDAP record attribute which represents the user's last name.
290
304
291 .. _ldap_attr_email:
305 .. _ldap_attr_email:
292
306
293 Email Attribute : required
307 Email Attribute : required
294 The LDAP record attribute which represents the user's email address.
308 The LDAP record attribute which represents the user's email address.
295
309
296 If all data are entered correctly, and python-ldap_ is properly installed
310 If all data are entered correctly, and python-ldap_ is properly installed
297 users should be granted access to RhodeCode with ldap accounts. At this
311 users should be granted access to RhodeCode with ldap accounts. At this
298 time user information is copied from LDAP into the RhodeCode user database.
312 time user information is copied from LDAP into the RhodeCode user database.
299 This means that updates of an LDAP user object may not be reflected as a
313 This means that updates of an LDAP user object may not be reflected as a
300 user update in RhodeCode.
314 user update in RhodeCode.
301
315
302 If You have problems with LDAP access and believe You entered correct
316 If You have problems with LDAP access and believe You entered correct
303 information check out the RhodeCode logs, any error messages sent from LDAP
317 information check out the RhodeCode logs, any error messages sent from LDAP
304 will be saved there.
318 will be saved there.
305
319
306 Active Directory
320 Active Directory
307 ''''''''''''''''
321 ''''''''''''''''
308
322
309 RhodeCode can use Microsoft Active Directory for user authentication. This
323 RhodeCode can use Microsoft Active Directory for user authentication. This
310 is done through an LDAP or LDAPS connection to Active Directory. The
324 is done through an LDAP or LDAPS connection to Active Directory. The
311 following LDAP configuration settings are typical for using Active
325 following LDAP configuration settings are typical for using Active
312 Directory ::
326 Directory ::
313
327
314 Base DN = OU=SBSUsers,OU=Users,OU=MyBusiness,DC=v3sys,DC=local
328 Base DN = OU=SBSUsers,OU=Users,OU=MyBusiness,DC=v3sys,DC=local
315 Login Attribute = sAMAccountName
329 Login Attribute = sAMAccountName
316 First Name Attribute = givenName
330 First Name Attribute = givenName
317 Last Name Attribute = sn
331 Last Name Attribute = sn
318 E-mail Attribute = mail
332 E-mail Attribute = mail
319
333
320 All other LDAP settings will likely be site-specific and should be
334 All other LDAP settings will likely be site-specific and should be
321 appropriately configured.
335 appropriately configured.
322
336
323 Setting Up Celery
337 Setting Up Celery
324 -----------------
338 -----------------
325
339
326 Since version 1.1 celery is configured by the rhodecode ini configuration files
340 Since version 1.1 celery is configured by the rhodecode ini configuration files.
327 simply set use_celery=true in the ini file then add / change the configuration
341 Simply set use_celery=true in the ini file then add / change the configuration
328 variables inside the ini file.
342 variables inside the ini file.
329
343
330 Remember that the ini files uses format with '.' not with '_' like celery
344 Remember that the ini files use the format with '.' not with '_' like celery.
331 so for example setting `BROKER_HOST` in celery means setting `broker.host` in
345 So for example setting `BROKER_HOST` in celery means setting `broker.host` in
332 the config file.
346 the config file.
333
347
334 In order to make start using celery run::
348 In order to start using celery run::
335
349
336 paster celeryd <configfile.ini>
350 paster celeryd <configfile.ini>
337
351
338
352
339 .. note::
353 .. note::
340 Make sure You run this command from same virtualenv, and with the same user
354 Make sure you run this command from the same virtualenv, and with the same user
341 that rhodecode runs.
355 that rhodecode runs.
342
356
343 HTTPS support
357 HTTPS support
344 -------------
358 -------------
345
359
346 There are two ways to enable https, first is to set HTTP_X_URL_SCHEME in
360 There are two ways to enable https:
347 Your http server headers, than rhodecode will recognise this headers and make
361
348 proper https redirections, another way is to set `force_https = true`
362 - Set HTTP_X_URL_SCHEME in your http server headers, than rhodecode will
349 in the ini cofiguration to force using https, no headers are needed than to
363 recognize this headers and make proper https redirections
350 enable https
364 - Alternatively, set `force_https = true` in the ini configuration to force using
365 https, no headers are needed than to enable https
351
366
352
367
353 Nginx virtual host example
368 Nginx virtual host example
354 --------------------------
369 --------------------------
355
370
356 Sample config for nginx using proxy::
371 Sample config for nginx using proxy::
357
372
358 server {
373 server {
359 listen 80;
374 listen 80;
360 server_name hg.myserver.com;
375 server_name hg.myserver.com;
361 access_log /var/log/nginx/rhodecode.access.log;
376 access_log /var/log/nginx/rhodecode.access.log;
362 error_log /var/log/nginx/rhodecode.error.log;
377 error_log /var/log/nginx/rhodecode.error.log;
363 location / {
378 location / {
364 root /var/www/rhodecode/rhodecode/public/;
379 root /var/www/rhodecode/rhodecode/public/;
365 if (!-f $request_filename){
380 if (!-f $request_filename){
366 proxy_pass http://127.0.0.1:5000;
381 proxy_pass http://127.0.0.1:5000;
367 }
382 }
368 #this is important if You want to use https !!!
383 #this is important if you want to use https !!!
369 proxy_set_header X-Url-Scheme $scheme;
384 proxy_set_header X-Url-Scheme $scheme;
370 include /etc/nginx/proxy.conf;
385 include /etc/nginx/proxy.conf;
371 }
386 }
372 }
387 }
373
388
374 Here's the proxy.conf. It's tuned so it'll not timeout on long
389 Here's the proxy.conf. It's tuned so it will not timeout on long
375 pushes and also on large pushes::
390 pushes or large pushes::
376
391
377 proxy_redirect off;
392 proxy_redirect off;
378 proxy_set_header Host $host;
393 proxy_set_header Host $host;
379 proxy_set_header X-Host $http_host;
394 proxy_set_header X-Host $http_host;
380 proxy_set_header X-Real-IP $remote_addr;
395 proxy_set_header X-Real-IP $remote_addr;
381 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
396 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
382 proxy_set_header Proxy-host $proxy_host;
397 proxy_set_header Proxy-host $proxy_host;
383 client_max_body_size 400m;
398 client_max_body_size 400m;
384 client_body_buffer_size 128k;
399 client_body_buffer_size 128k;
385 proxy_buffering off;
400 proxy_buffering off;
386 proxy_connect_timeout 3600;
401 proxy_connect_timeout 3600;
387 proxy_send_timeout 3600;
402 proxy_send_timeout 3600;
388 proxy_read_timeout 3600;
403 proxy_read_timeout 3600;
389 proxy_buffer_size 16k;
404 proxy_buffer_size 16k;
390 proxy_buffers 4 16k;
405 proxy_buffers 4 16k;
391 proxy_busy_buffers_size 64k;
406 proxy_busy_buffers_size 64k;
392 proxy_temp_file_write_size 64k;
407 proxy_temp_file_write_size 64k;
393
408
394 Also when using root path with nginx You might set the static files to false
409 Also, when using root path with nginx you might set the static files to false
395 in production.ini file::
410 in the production.ini file::
396
411
397 [app:main]
412 [app:main]
398 use = egg:rhodecode
413 use = egg:rhodecode
399 full_stack = true
414 full_stack = true
400 static_files = false
415 static_files = false
401 lang=en
416 lang=en
402 cache_dir = %(here)s/data
417 cache_dir = %(here)s/data
403
418
404 To not have the statics served by the application. And improve speed.
419 In order to not have the statics served by the application. This improves speed.
405
420
406
421
407 Apache virtual host example
422 Apache virtual host example
408 ---------------------------
423 ---------------------------
409
424
410 Sample config for apache using proxy::
425 Here is a sample configuration file for apache using proxy::
411
426
412 <VirtualHost *:80>
427 <VirtualHost *:80>
413 ServerName hg.myserver.com
428 ServerName hg.myserver.com
414 ServerAlias hg.myserver.com
429 ServerAlias hg.myserver.com
415
430
416 <Proxy *>
431 <Proxy *>
417 Order allow,deny
432 Order allow,deny
418 Allow from all
433 Allow from all
419 </Proxy>
434 </Proxy>
420
435
421 #important !
436 #important !
422 #Directive to properly generate url (clone url) for pylons
437 #Directive to properly generate url (clone url) for pylons
423 ProxyPreserveHost On
438 ProxyPreserveHost On
424
439
425 #rhodecode instance
440 #rhodecode instance
426 ProxyPass / http://127.0.0.1:5000/
441 ProxyPass / http://127.0.0.1:5000/
427 ProxyPassReverse / http://127.0.0.1:5000/
442 ProxyPassReverse / http://127.0.0.1:5000/
428
443
429 #to enable https use line below
444 #to enable https use line below
430 #SetEnvIf X-Url-Scheme https HTTPS=1
445 #SetEnvIf X-Url-Scheme https HTTPS=1
431
446
432 </VirtualHost>
447 </VirtualHost>
433
448
434
449
435 Additional tutorial
450 Additional tutorial
436 http://wiki.pylonshq.com/display/pylonscookbook/Apache+as+a+reverse+proxy+for+Pylons
451 http://wiki.pylonshq.com/display/pylonscookbook/Apache+as+a+reverse+proxy+for+Pylons
437
452
438
453
439 Apache as subdirectory
454 Apache as subdirectory
440 ----------------------
455 ----------------------
441
456
442
457
443 Apache subdirectory part::
458 Apache subdirectory part::
444
459
445 <Location /rhodecode>
460 <Location /rhodecode>
446 ProxyPass http://127.0.0.1:59542/rhodecode
461 ProxyPass http://127.0.0.1:59542/rhodecode
447 ProxyPassReverse http://127.0.0.1:59542/rhodecode
462 ProxyPassReverse http://127.0.0.1:59542/rhodecode
448 SetEnvIf X-Url-Scheme https HTTPS=1
463 SetEnvIf X-Url-Scheme https HTTPS=1
449 </Location>
464 </Location>
450
465
451 Besides the regular apache setup You'll need to add such part to .ini file::
466 Besides the regular apache setup you will need to add the following to your .ini file::
452
467
453 filter-with = proxy-prefix
468 filter-with = proxy-prefix
454
469
455 Add the following at the end of the .ini file::
470 Add the following at the end of the .ini file::
456
471
457 [filter:proxy-prefix]
472 [filter:proxy-prefix]
458 use = egg:PasteDeploy#prefix
473 use = egg:PasteDeploy#prefix
459 prefix = /<someprefix>
474 prefix = /<someprefix>
460
475
461
476
462 Apache's example FCGI config
477 Apache's example FCGI config
463 ----------------------------
478 ----------------------------
464
479
465 TODO !
480 TODO !
466
481
467 Other configuration files
482 Other configuration files
468 -------------------------
483 -------------------------
469
484
470 Some example init.d script can be found here, for debian and gentoo:
485 Some example init.d scripts can be found here, for debian and gentoo:
471
486
472 https://rhodeocode.org/rhodecode/files/tip/init.d
487 https://rhodeocode.org/rhodecode/files/tip/init.d
473
488
474
489
475 Troubleshooting
490 Troubleshooting
476 ---------------
491 ---------------
477
492
478 - missing static files ?
493 :Q: **Missing static files?**
479
494 :A: Make sure either to set the `static_files = true` in the .ini file or
480 - make sure either to set the `static_files = true` in the .ini file or
495 double check the root path for your http setup. It should point to
481 double check the root path for Your http setup. It should point to
482 for example:
496 for example:
483 /home/my-virtual-python/lib/python2.6/site-packages/rhodecode/public
497 /home/my-virtual-python/lib/python2.6/site-packages/rhodecode/public
484
498
485 - can't install celery/rabbitmq
499 |
500
501 :Q: **Can't install celery/rabbitmq**
502 :A: Don't worry RhodeCode works without them too. No extra setup is required.
486
503
487 - don't worry RhodeCode works without them too. No extra setup required
504 |
488
505
489 - long lasting push timeouts ?
506 :Q: **Long lasting push timeouts?**
507 :A: Make sure you set a longer timeouts in your proxy/fcgi settings, timeouts
508 are caused by https server and not RhodeCode.
490
509
491 - make sure You set a longer timeouts in Your proxy/fcgi settings, timeouts
510 |
492 are caused by https server and not RhodeCode
493
511
494 - large pushes timeouts ?
512 :Q: **Large pushes timeouts?**
513 :A: Make sure you set a proper max_body_size for the http server.
495
514
496 - make sure You set a proper max_body_size for the http server
515 |
497
516
498 - Apache doesn't pass basicAuth on pull/push ?
517 :Q: **Apache doesn't pass basicAuth on pull/push?**
518 :A: Make sure you added `WSGIPassAuthorization true`.
499
519
500 - Make sure You added `WSGIPassAuthorization true`
520 For further questions search the `Issues tracker`_, or post a message in the `google group rhodecode`_
501
521
502 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
522 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
503 .. _python: http://www.python.org/
523 .. _python: http://www.python.org/
504 .. _mercurial: http://mercurial.selenic.com/
524 .. _mercurial: http://mercurial.selenic.com/
505 .. _celery: http://celeryproject.org/
525 .. _celery: http://celeryproject.org/
506 .. _rabbitmq: http://www.rabbitmq.com/
526 .. _rabbitmq: http://www.rabbitmq.com/
507 .. _python-ldap: http://www.python-ldap.org/
527 .. _python-ldap: http://www.python-ldap.org/
528 .. _mercurial-server: http://www.lshift.net/mercurial-server.html
529 .. _PublishingRepositories: http://mercurial.selenic.com/wiki/PublishingRepositories
530 .. _Issues tracker: https://bitbucket.org/marcinkuzminski/rhodecode/issues
531 .. _google group rhodecode: http://groups.google.com/group/rhodecode No newline at end of file
@@ -1,56 +1,51 b''
1 .. _upgrade:
1 .. _upgrade:
2
2
3 Upgrade
3 Upgrade
4 =======
4 =======
5
5
6 Upgrade from Cheese Shop
6 Upgrading from Cheese Shop
7 ------------------------
7 --------------------------
8
8
9 Easiest way to upgrade ``rhodecode`` is to run::
9 .. note::
10 Firstly, it is recommended that you **always** perform a database backup before doing an upgrade.
11
12 The easiest way to upgrade ``rhodecode`` is to run::
10
13
11 easy_install -U rhodecode
14 easy_install -U rhodecode
12
15
13 Or::
16 Or::
14
17
15 pip install --upgrade rhodecode
18 pip install --upgrade rhodecode
16
19
17
20
18 Then make sure You run from the installation directory
21 Then make sure you run the following command from the installation directory::
19
20 ::
21
22
22 paster make-config RhodeCode production.ini
23 paster make-config RhodeCode production.ini
23
24
24 This will display any changes made from new version of RhodeCode To your
25 This will display any changes made by the new version of RhodeCode to your
25 current config. And tries to do an automerge. It's always better to do a backup
26 current configuration. It will try to perform an automerge. It's always better
26 of config file and recheck the content after merge.
27 to make a backup of your configuration file before hand and recheck the content after the automerge.
27
28
28 .. note::
29 .. note::
29 The next steps only apply to upgrading from non bugfix releases eg. from
30 The next steps only apply to upgrading from non bugfix releases eg. from
30 1.1 to 1.2. Bugfix releases (eg. 1.1.2->1.1.3) will not have any database
31 any minor or major releases. Bugfix releases (eg. 1.1.2->1.1.3) will
31 schema changes or whoosh library updates
32 not have any database schema changes or whoosh library updates.
32
33
33 It's also good to rebuild the whoosh index since after upgrading the whoosh
34 It is also recommended that you rebuild the whoosh index after upgrading since the new whoosh
34 version there could be introduced incompatible index changes.
35 version could introduce some incompatible index changes.
35
36
36
37
37 The last step is to upgrade the database. To do this simply run
38 The final step is to upgrade the database. To do this simply run::
38
39 ::
40
39
41 paster upgrade-db production.ini
40 paster upgrade-db production.ini
42
41
43 This will upgrade schema, as well as update some default on the database,
42 This will upgrade the schema and update some of the defaults in the database,
44 always recheck the settings of the application, if there are no new options
43 and will always recheck the settings of the application, if there are no new options
45 that need to be set.
44 that need to be set.
46
45
47 .. note::
48 Always perform a database backup before doing upgrade.
49
50
51
46
52 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
47 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
53 .. _python: http://www.python.org/
48 .. _python: http://www.python.org/
54 .. _mercurial: http://mercurial.selenic.com/
49 .. _mercurial: http://mercurial.selenic.com/
55 .. _celery: http://celeryproject.org/
50 .. _celery: http://celeryproject.org/
56 .. _rabbitmq: http://www.rabbitmq.com/ No newline at end of file
51 .. _rabbitmq: http://www.rabbitmq.com/
@@ -1,21 +1,22 b''
1 .. _enable_git:
1 .. _enable_git:
2
2
3 Enabling GIT support (beta)
3 Enabling GIT support (beta)
4 ===========================
4 ===========================
5
5
6
6
7 Git support in RhodeCode 1.1 was disabled due to some instability issues, but
7 Git support in RhodeCode 1.1 was disabled due to current instability issues. However,
8 If You would like to test it fell free to re-enable it. To enable GIT just
8 if you would like to test git support please feel free to re-enable it. To re-enable GIT support just
9 uncomment git line in rhodecode/__init__.py file
9 uncomment the git line in the file rhodecode/__init__.py
10
10
11 .. code-block:: python
11 .. code-block:: python
12
12
13 BACKENDS = {
13 BACKENDS = {
14 'hg': 'Mercurial repository',
14 'hg': 'Mercurial repository',
15 #'git': 'Git repository',
15 #'git': 'Git repository',
16 }
16 }
17
17
18 .. note::
18 .. note::
19 Please note that it's not fully stable and it might crash (that's why it
19 Please note that the git support provided by RhodeCode is not yet fully
20 was disabled), so be careful about enabling git support. Don't use it in
20 stable and RhodeCode might crash while using git repositories. (That is why
21 production ! No newline at end of file
21 it is currently disabled.) Thus be careful about enabling git support, and
22 certainly don't use it in a production setting!
@@ -1,32 +1,33 b''
1 .. _statistics:
1 .. _statistics:
2
2
3
3
4 Statistics
4 Statistics
5 ==========
5 ==========
6
6
7 RhodeCode statistics system is heavy on resources, so in order to keep a
7 The RhodeCode statistics system makes heavy demands of the server resources, so
8 balance between the usability and performance statistics are cached inside db
8 in order to keep a balance between usability and performance, the statistics are
9 and are gathered incrementally, this is how RhodeCode does this:
9 cached inside db and are gathered incrementally, this is how RhodeCode does
10 this:
10
11
11 With Celery disabled
12 With Celery disabled
12 ++++++++++++++++++++
13 ++++++++++++++++++++
13
14
14 - on each first visit on summary page a set of 250 commits are parsed and
15 - On each first visit to the summary page a set of 250 commits are parsed and
15 updates statistics cache
16 updates statistics cache.
16 - this happens on each single visit of statistics page until all commits are
17 - This happens on each single visit to the statistics page until all commits are
17 fetched. Statistics are kept cached until some more commits are added to
18 fetched. Statistics are kept cached until additional commits are added to the
18 repository, in such case RhodeCode will fetch only the ones added and will
19 repository. In such a case RhodeCode will only fetch the new commits when
19 update it's cache.
20 updating it's cache.
20
21
21
22
22 With Celery enabled
23 With Celery enabled
23 +++++++++++++++++++
24 +++++++++++++++++++
24
25
25 - on first visit on summary page RhodeCode will create task that will execute
26 - On the first visit to the summary page RhodeCode will create tasks that will
26 on celery workers, that will gather all stats until all commits are parsed,
27 execute on celery workers. This task will gather all of the stats until all
27 each task will parse 250 commits, and run next task to parse next 250
28 commits are parsed, each task will parse 250 commits, and run the next task to
28 commits, until all are parsed.
29 parse next 250 commits, until all of the commits are parsed.
29
30
30 .. note::
31 .. note::
31 In any time You can disable statistics on each repository in repository edit
32 At any time you can disable statistics on each repository via the repository
32 form in admin panel, just uncheck the statistics checkbox. No newline at end of file
33 edit form in the admin panel. To do this just uncheck the statistics checkbox.
General Comments 0
You need to be logged in to leave comments. Login now