Show More
@@ -1,126 +1,131 b'' | |||
|
1 | 1 | |
|
2 | 2 | ================================================= |
|
3 | 3 | Welcome to RhodeCode (RhodiumCode) documentation! |
|
4 | 4 | ================================================= |
|
5 | 5 | |
|
6 | ``RhodeCode`` (formerly hg-app) is Pylons framework based Mercurial repository | |
|
7 |
browser/management tool with |
|
|
8 |
It works on http/https |
|
|
9 | ability to auth via LDAP. It's similar in some parts to github or bitbucket, | |
|
10 | but it's suppose to run as standalone hosted application, it's open source | |
|
11 | and donation ware and focuses more on providing customized, self administered | |
|
12 | interface for Mercurial(and soon GIT) repositories. It's powered by vcs_ | |
|
13 | library that me and Lukasz Balcerzak created to handle many various version | |
|
6 | ``RhodeCode`` (formerly hg-app) is a Pylons framework based Mercurial repository | |
|
7 | browser/management tool with a built in push/pull server and full text search. | |
|
8 | It works on http/https and has a built in permission/authentication system with | |
|
9 | the ability to authenticate via LDAP. | |
|
10 | ||
|
11 | RhodeCode is similar in some respects to github or bitbucket, | |
|
12 | however RhodeCode can be run as standalone hosted application on your own server. It is open source | |
|
13 | and donation ware and focuses more on providing a customized, self administered | |
|
14 | interface for Mercurial(and soon GIT) repositories. RhodeCode is powered by a vcs_ | |
|
15 | library that Lukasz Balcerzak and I created to handle multiple different version | |
|
14 | 16 | control systems. |
|
15 | 17 | |
|
16 | 18 | RhodeCode uses `Semantic Versioning <http://semver.org/>`_ |
|
17 | 19 | |
|
18 | 20 | RhodeCode demo |
|
19 | 21 | -------------- |
|
20 | 22 | |
|
21 | 23 | http://hg.python-works.com |
|
22 | 24 | |
|
23 |
The default access is anonymous but |
|
|
24 |
using th |
|
|
25 | The default access is anonymous but you can login to an administrative account | |
|
26 | using the following credentials: | |
|
25 | 27 | |
|
26 | 28 | - username: demo |
|
27 | 29 | - password: demo |
|
28 | 30 | |
|
29 | 31 | Source code |
|
30 | 32 | ----------- |
|
31 | 33 | |
|
32 |
The |
|
|
34 | The latest source for RhodeCode can be obtained from my own RhodeCode instance | |
|
33 | 35 | https://rhodecode.org |
|
34 | 36 | |
|
35 | 37 | Rarely updated source code and issue tracker is available at bitbcuket |
|
36 | 38 | http://bitbucket.org/marcinkuzminski/rhodecode |
|
37 | 39 | |
|
38 | 40 | Installation |
|
39 | 41 | ------------ |
|
40 | 42 | |
|
41 |
|
|
|
43 | Please visit http://packages.python.org/RhodeCode/installation.html | |
|
42 | 44 | |
|
43 | 45 | |
|
44 | Features | |
|
45 | -------- | |
|
46 | RhodeCode Features | |
|
47 | ------------------ | |
|
46 | 48 | |
|
47 | - Has it's own middleware to handle mercurial_ protocol request. | |
|
48 |
Each request can be logged and authenticated. |
|
|
49 | hgweb. You can make multiple pulls/pushes simultaneous. Supports http/https | |
|
49 | - Has it's own middleware to handle mercurial_ protocol requests. | |
|
50 | Each request can be logged and authenticated. | |
|
51 | - Runs on threads unlike hgweb. You can make multiple pulls/pushes simultaneous. Supports http/https | |
|
50 | 52 | and LDAP |
|
51 | 53 | - Full permissions (private/read/write/admin) and authentication per project. |
|
52 | 54 | One account for web interface and mercurial_ push/pull/clone operations. |
|
53 | - Mako templates let's you customize look and feel of application. | |
|
54 | - Beautiful diffs, annotations and source codes all colored by pygments. | |
|
55 | - Mako templates let's you customize the look and feel of the application. | |
|
56 | - Beautiful diffs, annotations and source code browsing all colored by pygments. | |
|
55 | 57 | - Mercurial_ branch graph and yui-flot powered graphs with zooming and statistics |
|
56 | 58 | - Admin interface with user/permission management. Admin activity journal, logs |
|
57 | 59 | pulls, pushes, forks, registrations and other actions made by all users. |
|
58 |
- Server side forks |
|
|
60 | - Server side forks. It is possible to fork a project and modify it freely without | |
|
59 | 61 | breaking the main repository. |
|
60 |
- Full text search powered by Whoosh on source |
|
|
62 | - Full text search powered by Whoosh on the source files, and file names. | |
|
61 | 63 | Build in indexing daemons, with optional incremental index build |
|
62 | 64 | (no external search servers required all in one application) |
|
63 | 65 | - Setup project descriptions and info inside built in db for easy, non |
|
64 | 66 | file-system operations |
|
65 | 67 | - Intelligent cache with invalidation after push or project change, provides high |
|
66 |
performance and always up to date data. |
|
|
68 | performance and always up to date data. | |
|
67 | 69 | - Rss / atom feeds, gravatar support, download sources as zip/tar/gz |
|
68 | 70 | - Async tasks for speed and performance using celery_ (works without them too) |
|
69 | 71 | - Backup scripts can do backup of whole app and send it over scp to desired |
|
70 | 72 | location |
|
71 | 73 | - Based on pylons / sqlalchemy / sqlite / whoosh / vcs |
|
72 | 74 | |
|
73 | 75 | |
|
74 | 76 | .. include:: ./docs/screenshots.rst |
|
75 | 77 | |
|
76 | 78 | |
|
77 | 79 | Incoming / Plans |
|
78 | 80 | ---------------- |
|
79 | 81 | |
|
80 |
- |
|
|
82 | - Project grouping | |
|
81 | 83 | - User groups/teams |
|
82 |
- |
|
|
83 |
- |
|
|
84 |
- |
|
|
85 |
- |
|
|
86 |
- |
|
|
87 |
- |
|
|
88 |
- |
|
|
89 |
- |
|
|
90 | - other cools stuff that i can figure out (or You can help me figure out) | |
|
84 | - SSH based authentication with server side key management | |
|
85 | - Code review (probably based on hg-review) | |
|
86 | - Full git_ support, with push/pull server (currently in beta tests) | |
|
87 | - Redmine integration | |
|
88 | - Public accessible activity feeds | |
|
89 | - Commit based built in wiki system | |
|
90 | - Clone points and cloning from remote repositories into RhodeCode | |
|
91 | - More statistics and graph (global annotation + some more statistics) | |
|
92 | - Other advancements as development continues (or you can of course make additions and or requests) | |
|
91 | 93 | |
|
92 | 94 | License |
|
93 | 95 | ------- |
|
94 | 96 | |
|
95 | ``RhodeCode`` is released under GPL_ license. | |
|
97 | ``RhodeCode`` is released under the GPL_ license. | |
|
96 | 98 | |
|
97 | 99 | |
|
98 | 100 | Mailing group Q&A |
|
99 | 101 | ----------------- |
|
100 | 102 | |
|
101 |
|
|
|
103 | Join the `Google group <http://groups.google.com/group/rhodecode>`_ | |
|
102 | 104 | |
|
103 |
|
|
|
105 | Open an issue at `issue tracker <http://bitbucket.org/marcinkuzminski/rhodecode/issues>`_ | |
|
104 | 106 | |
|
105 |
|
|
|
107 | Join #rhodecode on FreeNode (irc.freenode.net) | |
|
106 | 108 | or use http://webchat.freenode.net/?channels=rhodecode for web access to irc. |
|
107 | 109 | |
|
108 | 110 | Online documentation |
|
109 | 111 | -------------------- |
|
110 | 112 | |
|
111 |
|
|
|
112 |
|
|
|
113 |
|
|
|
113 | Online documentation for the current version of RhodeCode is available at | |
|
114 | http://packages.python.org/RhodeCode/. | |
|
115 | You may also build the documentation for yourself - go into ``docs/`` and run:: | |
|
114 | 116 | |
|
115 | 117 | make html |
|
116 | 118 | |
|
119 | (You need to have sphinx installed to build the documentation. If you don't | |
|
120 | have sphinx installed you can install it via the command: ``easy_install sphinx``) | |
|
121 | ||
|
117 | 122 | .. _virtualenv: http://pypi.python.org/pypi/virtualenv |
|
118 | 123 | .. _python: http://www.python.org/ |
|
119 | 124 | .. _django: http://www.djangoproject.com/ |
|
120 | 125 | .. _mercurial: http://mercurial.selenic.com/ |
|
121 | 126 | .. _subversion: http://subversion.tigris.org/ |
|
122 | 127 | .. _git: http://git-scm.com/ |
|
123 | 128 | .. _celery: http://celeryproject.org/ |
|
124 | 129 | .. _Sphinx: http://sphinx.pocoo.org/ |
|
125 | 130 | .. _GPL: http://www.gnu.org/licenses/gpl.html |
|
126 | 131 | .. _vcs: http://pypi.python.org/pypi/vcs No newline at end of file |
@@ -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 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! No newline at end of file |
@@ -1,112 +1,104 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 | |
|
19 | Installing RhodeCode from Cheese Shop | |
|
20 | 20 | ------------------------ |
|
21 |
Rhodecode requires python |
|
|
21 | Rhodecode requires python version 2.5 or higher. | |
|
22 | 22 | |
|
23 |
|
|
|
23 | The easiest way to install ``rhodecode`` is to run:: | |
|
24 | 24 | |
|
25 | 25 | easy_install rhodecode |
|
26 | 26 | |
|
27 | 27 | Or:: |
|
28 | 28 | |
|
29 | 29 | pip install rhodecode |
|
30 | 30 | |
|
31 | If you prefer to install manually simply grab latest release from | |
|
32 | http://pypi.python.org/pypi/rhodecode, decompress archive and run:: | |
|
31 | If you prefer to install RhodeCode manually simply grab latest release from | |
|
32 | http://pypi.python.org/pypi/rhodecode, decompress the archive and run:: | |
|
33 | 33 | |
|
34 | 34 | python setup.py install |
|
35 | 35 | |
|
36 | 36 | |
|
37 | 37 | Step by step installation example |
|
38 | 38 | --------------------------------- |
|
39 | 39 | |
|
40 | 40 | |
|
41 |
- Assuming |
|
|
42 | ||
|
43 | :: | |
|
41 | - Assuming you have installed virtualenv_ create a new virtual environment using virtualenv:: | |
|
44 | 42 | |
|
45 | 43 | virtualenv --no-site-packages /var/www/rhodecode-venv |
|
46 | 44 | |
|
47 | 45 | |
|
48 | 46 | .. note:: Using ``--no-site-packages`` when generating your |
|
49 | virtualenv is *very important*. This flag provides the necessary | |
|
47 | virtualenv is **very important**. This flag provides the necessary | |
|
50 | 48 | isolation for running the set of packages required by |
|
51 | 49 | RhodeCode. If you do not specify ``--no-site-packages``, |
|
52 | 50 | it's possible that RhodeCode will not install properly into |
|
53 | 51 | the virtualenv, or, even if it does, may not run properly, |
|
54 | 52 | depending on the packages you've already got installed into your |
|
55 | 53 | Python's "main" site-packages dir. |
|
56 | 54 | |
|
57 | 55 | |
|
58 | 56 | - this will install new virtualenv_ into `/var/www/rhodecode-venv`. |
|
59 |
- Activate the virtualenv_ by running |
|
|
60 | ||
|
61 | :: | |
|
57 | - Activate the virtualenv_ by running:: | |
|
62 | 58 | |
|
63 | 59 | source /var/www/rhodecode-venv/bin/activate |
|
64 | 60 | |
|
65 |
.. note:: If you're |
|
|
61 | .. note:: If you're using UNIX, *do not* use ``sudo`` to run the | |
|
66 | 62 | ``virtualenv`` script. It's perfectly acceptable (and desirable) |
|
67 | 63 | to create a virtualenv as a normal user. |
|
68 | 64 | |
|
69 |
- Make a folder for rhodecode somewhere on the filesystem for example |
|
|
70 | ||
|
71 | :: | |
|
65 | - Make a folder for rhodecode somewhere on the filesystem for example:: | |
|
72 | 66 | |
|
73 | 67 | mkdir /var/www/rhodecode |
|
74 | 68 | |
|
75 | 69 | |
|
76 | - Run this command to install rhodecode | |
|
77 | ||
|
78 | :: | |
|
70 | - Run this command to install rhodecode:: | |
|
79 | 71 | |
|
80 | 72 | easy_install rhodecode |
|
81 | 73 | |
|
82 |
- |
|
|
83 | and all other required python libraries | |
|
74 | - This will install rhodecode together with pylons and all other required python | |
|
75 | libraries | |
|
84 | 76 | |
|
85 | 77 | Requirements for Celery (optional) |
|
86 | 78 | ---------------------------------- |
|
87 | 79 | |
|
88 | 80 | .. note:: |
|
89 | 81 | Installing message broker and using celery is optional, RhodeCode will |
|
90 |
work |
|
|
82 | work perfectly fine without them. | |
|
91 | 83 | |
|
92 | 84 | |
|
93 | 85 | **Message Broker** |
|
94 | 86 | |
|
95 | 87 | - preferred is `RabbitMq <http://www.rabbitmq.com/>`_ |
|
96 |
- possible |
|
|
88 | - A possible alternative is `Redis <http://code.google.com/p/redis/>`_ | |
|
97 | 89 | |
|
98 |
For installation instructions |
|
|
99 | http://ask.github.com/celery/getting-started/index.html | |
|
100 |
|
|
|
90 | For installation instructions you can visit: | |
|
91 | http://ask.github.com/celery/getting-started/index.html. | |
|
92 | This is a very nice tutorial on how to start using celery_ with rabbitmq_ | |
|
101 | 93 | |
|
102 | 94 | |
|
103 | 95 | You can now proceed to :ref:`setup` |
|
104 | 96 | ----------------------------------- |
|
105 | 97 | |
|
106 | 98 | |
|
107 | 99 | |
|
108 | 100 | .. _virtualenv: http://pypi.python.org/pypi/virtualenv |
|
109 | 101 | .. _python: http://www.python.org/ |
|
110 | 102 | .. _mercurial: http://mercurial.selenic.com/ |
|
111 | 103 | .. _celery: http://celeryproject.org/ |
|
112 | 104 | .. _rabbitmq: http://www.rabbitmq.com/ No newline at end of file |
@@ -1,380 +1,380 b'' | |||
|
1 | 1 | .. _setup: |
|
2 | 2 | |
|
3 | 3 | Setup |
|
4 | 4 | ===== |
|
5 | 5 | |
|
6 | 6 | |
|
7 | 7 | Setting up RhodeCode |
|
8 | 8 | -------------------------- |
|
9 | 9 | |
|
10 | 10 | First, you will need to create a RhodeCode configuration file. Run the following |
|
11 | 11 | command to do this:: |
|
12 | 12 | |
|
13 | 13 | paster make-config RhodeCode production.ini |
|
14 | 14 | |
|
15 | 15 | - This will create the file `production.ini` in the current directory. This |
|
16 | 16 | configuration file contains the various settings for RhodeCode, e.g proxy port, |
|
17 | 17 | email settings, usage of static files, cache, celery settings and logging. |
|
18 | 18 | |
|
19 | 19 | |
|
20 | 20 | Next, you need to create the databases used by RhodeCode. I recommend that you |
|
21 | 21 | use sqlite (default) or postgresql. If you choose a database other than the |
|
22 | 22 | default ensure you properly adjust the db url in your production.ini |
|
23 | 23 | configuration file to use this other database. Create the databases by running |
|
24 | 24 | the following command:: |
|
25 | 25 | |
|
26 | 26 | paster setup-app production.ini |
|
27 | 27 | |
|
28 | 28 | This will prompt you for a "root" path. This "root" path is the location where |
|
29 | 29 | RhodeCode will store all of its repositories on the current machine. After |
|
30 | 30 | entering this "root" path ``setup-app`` will also prompt you for a username and password |
|
31 | 31 | for the initial admin account which ``setup-app`` sets up for you. |
|
32 | 32 | |
|
33 | 33 | - The ``setup-app`` command will create all of the needed tables and an admin |
|
34 |
account. When choosing a root path |
|
|
34 | account. When choosing a root path you can either use a new empty location, or a | |
|
35 | 35 | location which already contains existing repositories. If you choose a location |
|
36 | 36 | which contains existing repositories RhodeCode will simply add all of the |
|
37 | 37 | repositories at the chosen location to it's database. (Note: make sure you |
|
38 | 38 | specify the correct path to the root). |
|
39 | 39 | - Note: the given path for mercurial_ repositories **must** be write accessible |
|
40 | 40 | for the application. It's very important since the RhodeCode web interface will |
|
41 | 41 | work without write access, but when trying to do a push it will eventually fail |
|
42 | 42 | with permission denied errors unless it has write access. |
|
43 | 43 | |
|
44 | 44 | You are now ready to use RhodeCode, to run it simply execute:: |
|
45 | 45 | |
|
46 | 46 | paster serve production.ini |
|
47 | 47 | |
|
48 | 48 | - This command runs the RhodeCode server. The web app should be available at the |
|
49 | 49 | 127.0.0.1:5000. This ip and port is configurable via the production.ini |
|
50 | 50 | file created in previous step |
|
51 | 51 | - Use the admin account you created above when running ``setup-app`` to login to the web app. |
|
52 | 52 | - The default permissions on each repository is read, and the owner is admin. |
|
53 | 53 | Remember to update these if needed. |
|
54 |
- In the admin panel |
|
|
54 | - In the admin panel you can toggle ldap, anonymous, permissions settings. As | |
|
55 | 55 | well as edit more advanced options on users and repositories |
|
56 | 56 | |
|
57 | 57 | Try copying your own mercurial repository into the "root" directory you are |
|
58 | 58 | using, then from within the RhodeCode web application choose Admin > |
|
59 | 59 | repositories. Then choose Add New Repository. Add the repository you copied into |
|
60 | 60 | the root. Test that you can browse your repository from within RhodeCode and then |
|
61 | 61 | try cloning your repository from RhodeCode with:: |
|
62 | 62 | |
|
63 | 63 | hg clone http://127.0.0.1:5000/<repository name> |
|
64 | 64 | |
|
65 | 65 | where *repository name* is replaced by the name of your repository. |
|
66 | 66 | |
|
67 | 67 | Using RhodeCode with SSH |
|
68 | 68 | ------------------------ |
|
69 | 69 | |
|
70 | 70 | RhodeCode currently only hosts repositories using http and https. (The addition of |
|
71 | 71 | ssh hosting is a planned future feature.) However you can easily use ssh in |
|
72 | 72 | parallel with RhodeCode. (Repository access via ssh is a standard "out of |
|
73 | 73 | the box" feature of mercurial_ and you can use this to access any of the |
|
74 | 74 | repositories that RhodeCode is hosting. See PublishingRepositories_) |
|
75 | 75 | |
|
76 | 76 | RhodeCode repository structures are kept in directories with the same name |
|
77 | 77 | as the project. When using repository groups, each group is a subdirectory. |
|
78 | 78 | This allows you to easily use ssh for accessing repositories. |
|
79 | 79 | |
|
80 | 80 | In order to use ssh you need to make sure that your web-server and the users login |
|
81 | 81 | accounts have the correct permissions set on the appropriate directories. (Note |
|
82 | 82 | that these permissions are independent of any permissions you have set up using |
|
83 | 83 | the RhodeCode web interface.) |
|
84 | 84 | |
|
85 | 85 | If your main directory (the same as set in RhodeCode settings) is for example |
|
86 | 86 | set to **/home/hg** and the repository you are using is named `rhodecode`, then |
|
87 | 87 | to clone via ssh you should run:: |
|
88 | 88 | |
|
89 | 89 | hg clone ssh://user@server.com/home/hg/rhodecode |
|
90 | 90 | |
|
91 | 91 | Using other external tools such as mercurial-server_ or using ssh key based |
|
92 | 92 | authentication is fully supported. |
|
93 | 93 | |
|
94 | 94 | Note: In an advanced setup, in order for your ssh access to use the same |
|
95 | 95 | permissions as set up via the RhodeCode web interface, you can create an |
|
96 | 96 | authentication hook to connect to the rhodecode db and runs check functions for |
|
97 | 97 | permissions against that. |
|
98 | 98 | |
|
99 | 99 | |
|
100 | 100 | |
|
101 | 101 | Setting up Whoosh full text search |
|
102 | 102 | ---------------------------------- |
|
103 | 103 | |
|
104 | 104 | Starting from version 1.1 the whoosh index can be build by using the paster |
|
105 |
command ``make-index``. To use ``make-index`` |
|
|
105 | command ``make-index``. To use ``make-index`` you must specify the configuration | |
|
106 | 106 | file that stores the location of the index, and the location of the repositories |
|
107 | 107 | (`--repo-location`). |
|
108 | 108 | |
|
109 | 109 | You may optionally pass the option `-f` to enable a full index rebuild. Without |
|
110 | 110 | the `-f` option, indexing will run always in "incremental" mode. |
|
111 | 111 | |
|
112 | 112 | For an incremental index build use:: |
|
113 | 113 | |
|
114 | 114 | paster make-index production.ini --repo-location=<location for repos> |
|
115 | 115 | |
|
116 | 116 | For a full index rebuild use:: |
|
117 | 117 | |
|
118 | 118 | paster make-index production.ini -f --repo-location=<location for repos> |
|
119 | 119 | |
|
120 | 120 | - For full text search you can either put crontab entry for |
|
121 | 121 | |
|
122 | 122 | In order to do periodical index builds and keep your index always up to date. |
|
123 | 123 | It's recommended to do a crontab entry for incremental indexing. |
|
124 | 124 | An example entry might look like this:: |
|
125 | 125 | |
|
126 | 126 | /path/to/python/bin/paster /path/to/rhodecode/production.ini --repo-location=<location for repos> |
|
127 | 127 | |
|
128 | 128 | When using incremental mode (the default) whoosh will check the last |
|
129 | 129 | modification date of each file and add it to be reindexed if a newer file is |
|
130 | 130 | available. The indexing daemon checks for any removed files and removes them |
|
131 | 131 | from index. |
|
132 | 132 | |
|
133 | 133 | If you want to rebuild index from scratch, you can use the `-f` flag as above, |
|
134 | 134 | or in the admin panel you can check `build from scratch` flag. |
|
135 | 135 | |
|
136 | 136 | |
|
137 | 137 | Setting up LDAP support |
|
138 | 138 | ----------------------- |
|
139 | 139 | |
|
140 | 140 | RhodeCode starting from version 1.1 supports ldap authentication. In order |
|
141 | 141 | to use LDAP, you have to install the python-ldap_ package. This package is available |
|
142 | 142 | via pypi, so you can install it by running |
|
143 | 143 | |
|
144 | 144 | :: |
|
145 | 145 | |
|
146 | 146 | easy_install python-ldap |
|
147 | 147 | |
|
148 | 148 | :: |
|
149 | 149 | |
|
150 | 150 | pip install python-ldap |
|
151 | 151 | |
|
152 | 152 | .. note:: |
|
153 | 153 | python-ldap requires some certain libs on your system, so before installing |
|
154 | 154 | it check that you have at least `openldap`, and `sasl` libraries. |
|
155 | 155 | |
|
156 | 156 | ldap settings are located in admin->ldap section, |
|
157 | 157 | |
|
158 | 158 | Here's a typical ldap setup:: |
|
159 | 159 | |
|
160 | 160 | Enable ldap = checked #controls if ldap access is enabled |
|
161 | 161 | Host = host.domain.org #actual ldap server to connect |
|
162 | 162 | Port = 389 or 689 for ldaps #ldap server ports |
|
163 | 163 | Enable LDAPS = unchecked #enable disable ldaps |
|
164 | 164 | Account = <account> #access for ldap server(if required) |
|
165 | 165 | Password = <password> #password for ldap server(if required) |
|
166 | 166 | Base DN = uid=%(user)s,CN=users,DC=host,DC=domain,DC=org |
|
167 | 167 | |
|
168 | 168 | |
|
169 | 169 | `Account` and `Password` are optional, and used for two-phase ldap |
|
170 | 170 | authentication so those are credentials to access your ldap, if it doesn't |
|
171 | 171 | support anonymous search/user lookups. |
|
172 | 172 | |
|
173 | 173 | Base DN must have the %(user)s template inside, it's a place holder where your uid |
|
174 | 174 | used to login would go. It allows admins to specify non-standard schema for the |
|
175 | 175 | uid variable. |
|
176 | 176 | |
|
177 | 177 | If all of the data is correctly entered, and `python-ldap` is properly |
|
178 | 178 | installed, then users should be granted access to RhodeCode with ldap accounts. |
|
179 | 179 | When logging in the first time a special ldap account is created inside |
|
180 | 180 | RhodeCode, so you can control the permissions even on ldap users. If such users |
|
181 | 181 | already exist in the RhodeCode database, then the ldap user with the same |
|
182 | 182 | username would be not be able to access RhodeCode. |
|
183 | 183 | |
|
184 | 184 | If you have problems with ldap access and believe you have correctly entered the |
|
185 | 185 | required information then proceed by investigating the RhodeCode logs. Any |
|
186 | 186 | error messages sent from ldap will be saved there. |
|
187 | 187 | |
|
188 | 188 | |
|
189 | 189 | |
|
190 | 190 | Setting Up Celery |
|
191 | 191 | ----------------- |
|
192 | 192 | |
|
193 | 193 | Since version 1.1 celery is configured by the rhodecode ini configuration files. |
|
194 | 194 | Simply set use_celery=true in the ini file then add / change the configuration |
|
195 | 195 | variables inside the ini file. |
|
196 | 196 | |
|
197 | 197 | Remember that the ini files use the format with '.' not with '_' like celery. |
|
198 | 198 | So for example setting `BROKER_HOST` in celery means setting `broker.host` in |
|
199 | 199 | the config file. |
|
200 | 200 | |
|
201 | 201 | In order to start using celery run:: |
|
202 | 202 | |
|
203 | 203 | paster celeryd <configfile.ini> |
|
204 | 204 | |
|
205 | 205 | |
|
206 | 206 | .. note:: |
|
207 | 207 | Make sure you run this command from the same virtualenv, and with the same user |
|
208 | 208 | that rhodecode runs. |
|
209 | 209 | |
|
210 | 210 | HTTPS support |
|
211 | 211 | ------------- |
|
212 | 212 | |
|
213 | 213 | There are two ways to enable https: |
|
214 | 214 | |
|
215 | 215 | - Set HTTP_X_URL_SCHEME in your http server headers, than rhodecode will |
|
216 | 216 | recognize this headers and make proper https redirections |
|
217 | 217 | - Alternatively, set `force_https = true` in the ini configuration to force using |
|
218 | 218 | https, no headers are needed than to enable https |
|
219 | 219 | |
|
220 | 220 | |
|
221 | 221 | Nginx virtual host example |
|
222 | 222 | -------------------------- |
|
223 | 223 | |
|
224 | 224 | Sample config for nginx using proxy:: |
|
225 | 225 | |
|
226 | 226 | server { |
|
227 | 227 | listen 80; |
|
228 | 228 | server_name hg.myserver.com; |
|
229 | 229 | access_log /var/log/nginx/rhodecode.access.log; |
|
230 | 230 | error_log /var/log/nginx/rhodecode.error.log; |
|
231 | 231 | location / { |
|
232 | 232 | root /var/www/rhodecode/rhodecode/public/; |
|
233 | 233 | if (!-f $request_filename){ |
|
234 | 234 | proxy_pass http://127.0.0.1:5000; |
|
235 | 235 | } |
|
236 | 236 | #this is important if you want to use https !!! |
|
237 | 237 | proxy_set_header X-Url-Scheme $scheme; |
|
238 | 238 | include /etc/nginx/proxy.conf; |
|
239 | 239 | } |
|
240 | 240 | } |
|
241 | 241 | |
|
242 | 242 | Here's the proxy.conf. It's tuned so it will not timeout on long |
|
243 | 243 | pushes or large pushes:: |
|
244 | 244 | |
|
245 | 245 | proxy_redirect off; |
|
246 | 246 | proxy_set_header Host $host; |
|
247 | 247 | proxy_set_header X-Host $http_host; |
|
248 | 248 | proxy_set_header X-Real-IP $remote_addr; |
|
249 | 249 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|
250 | 250 | proxy_set_header Proxy-host $proxy_host; |
|
251 | 251 | client_max_body_size 400m; |
|
252 | 252 | client_body_buffer_size 128k; |
|
253 | 253 | proxy_buffering off; |
|
254 | 254 | proxy_connect_timeout 3600; |
|
255 | 255 | proxy_send_timeout 3600; |
|
256 | 256 | proxy_read_timeout 3600; |
|
257 | 257 | proxy_buffer_size 16k; |
|
258 | 258 | proxy_buffers 4 16k; |
|
259 | 259 | proxy_busy_buffers_size 64k; |
|
260 | 260 | proxy_temp_file_write_size 64k; |
|
261 | 261 | |
|
262 | 262 | Also, when using root path with nginx you might set the static files to false |
|
263 | 263 | in the production.ini file:: |
|
264 | 264 | |
|
265 | 265 | [app:main] |
|
266 | 266 | use = egg:rhodecode |
|
267 | 267 | full_stack = true |
|
268 | 268 | static_files = false |
|
269 | 269 | lang=en |
|
270 | 270 | cache_dir = %(here)s/data |
|
271 | 271 | |
|
272 | 272 | In order to not have the statics served by the application. This improves speed. |
|
273 | 273 | |
|
274 | 274 | |
|
275 | 275 | Apache virtual host example |
|
276 | 276 | --------------------------- |
|
277 | 277 | |
|
278 | 278 | Here is a sample configuration file for apache using proxy:: |
|
279 | 279 | |
|
280 | 280 | <VirtualHost *:80> |
|
281 | 281 | ServerName hg.myserver.com |
|
282 | 282 | ServerAlias hg.myserver.com |
|
283 | 283 | |
|
284 | 284 | <Proxy *> |
|
285 | 285 | Order allow,deny |
|
286 | 286 | Allow from all |
|
287 | 287 | </Proxy> |
|
288 | 288 | |
|
289 | 289 | #important ! |
|
290 | 290 | #Directive to properly generate url (clone url) for pylons |
|
291 | 291 | ProxyPreserveHost On |
|
292 | 292 | |
|
293 | 293 | #rhodecode instance |
|
294 | 294 | ProxyPass / http://127.0.0.1:5000/ |
|
295 | 295 | ProxyPassReverse / http://127.0.0.1:5000/ |
|
296 | 296 | |
|
297 | 297 | #to enable https use line below |
|
298 | 298 | #SetEnvIf X-Url-Scheme https HTTPS=1 |
|
299 | 299 | |
|
300 | 300 | </VirtualHost> |
|
301 | 301 | |
|
302 | 302 | |
|
303 | 303 | Additional tutorial |
|
304 | 304 | http://wiki.pylonshq.com/display/pylonscookbook/Apache+as+a+reverse+proxy+for+Pylons |
|
305 | 305 | |
|
306 | 306 | |
|
307 | 307 | Apache as subdirectory |
|
308 | 308 | ---------------------- |
|
309 | 309 | |
|
310 | 310 | |
|
311 | 311 | Apache subdirectory part:: |
|
312 | 312 | |
|
313 | 313 | <Location /rhodecode> |
|
314 | 314 | ProxyPass http://127.0.0.1:59542/rhodecode |
|
315 | 315 | ProxyPassReverse http://127.0.0.1:59542/rhodecode |
|
316 | 316 | SetEnvIf X-Url-Scheme https HTTPS=1 |
|
317 | 317 | </Location> |
|
318 | 318 | |
|
319 | 319 | Besides the regular apache setup you will need to add the following to your .ini file:: |
|
320 | 320 | |
|
321 | 321 | filter-with = proxy-prefix |
|
322 | 322 | |
|
323 | 323 | Add the following at the end of the .ini file:: |
|
324 | 324 | |
|
325 | 325 | [filter:proxy-prefix] |
|
326 | 326 | use = egg:PasteDeploy#prefix |
|
327 | 327 | prefix = /<someprefix> |
|
328 | 328 | |
|
329 | 329 | |
|
330 | 330 | Apache's example FCGI config |
|
331 | 331 | ---------------------------- |
|
332 | 332 | |
|
333 | 333 | TODO ! |
|
334 | 334 | |
|
335 | 335 | Other configuration files |
|
336 | 336 | ------------------------- |
|
337 | 337 | |
|
338 | 338 | Some example init.d scripts can be found here, for debian and gentoo: |
|
339 | 339 | |
|
340 | 340 | https://rhodeocode.org/rhodecode/files/tip/init.d |
|
341 | 341 | |
|
342 | 342 | |
|
343 | 343 | Troubleshooting |
|
344 | 344 | --------------- |
|
345 | 345 | |
|
346 | 346 | :Q: **Missing static files?** |
|
347 | 347 | :A: Make sure either to set the `static_files = true` in the .ini file or |
|
348 | 348 | double check the root path for your http setup. It should point to |
|
349 | 349 | for example: |
|
350 | 350 | /home/my-virtual-python/lib/python2.6/site-packages/rhodecode/public |
|
351 | 351 | |
|
352 | 352 | | |
|
353 | 353 | :Q: **Can't install celery/rabbitmq** |
|
354 | 354 | :A: Don't worry RhodeCode works without them too. No extra setup is required. |
|
355 | 355 | |
|
356 | 356 | | |
|
357 | 357 | :Q: **Long lasting push timeouts?** |
|
358 | 358 | :A: Make sure you set a longer timeouts in your proxy/fcgi settings, timeouts |
|
359 | 359 | are caused by https server and not RhodeCode. |
|
360 | 360 | |
|
361 | 361 | | |
|
362 | 362 | :Q: **Large pushes timeouts?** |
|
363 | 363 | :A: Make sure you set a proper max_body_size for the http server. |
|
364 | 364 | |
|
365 | 365 | | |
|
366 | 366 | :Q: **Apache doesn't pass basicAuth on pull/push?** |
|
367 | 367 | :A: Make sure you added `WSGIPassAuthorization true`. |
|
368 | 368 | |
|
369 | 369 | For further questions search the `Issues tracker`_, or post a message in the `google group rhodecode`_ |
|
370 | 370 | |
|
371 | 371 | .. _virtualenv: http://pypi.python.org/pypi/virtualenv |
|
372 | 372 | .. _python: http://www.python.org/ |
|
373 | 373 | .. _mercurial: http://mercurial.selenic.com/ |
|
374 | 374 | .. _celery: http://celeryproject.org/ |
|
375 | 375 | .. _rabbitmq: http://www.rabbitmq.com/ |
|
376 | 376 | .. _python-ldap: http://www.python-ldap.org/ |
|
377 | 377 | .. _mercurial-server: http://www.lshift.net/mercurial-server.html |
|
378 | 378 | .. _PublishingRepositories: http://mercurial.selenic.com/wiki/PublishingRepositories |
|
379 | 379 | .. _Issues tracker: https://bitbucket.org/marcinkuzminski/rhodecode/issues |
|
380 | 380 | .. _google group rhodecode: http://groups.google.com/group/rhodecode No newline at end of file |
@@ -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. 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 |
|
|
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 | 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 | any minor or major releases. Bugfix releases (eg. 1.1.2->1.1.3) will |
|
31 | not have any database schema changes or whoosh library updates | |
|
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 |
General Comments 0
You need to be logged in to leave comments.
Login now