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