Show More
@@ -1,17 +1,53 b'' | |||||
1 | ------------------------------------------------ |
|
1 | ||
2 | Pylons based repository management for mercurial |
|
2 | RhodeCode (RhodiumCode) | |
3 | ------------------------------------------------ |
|
3 | ======================= | |
|
4 | ||||
|
5 | ``RhodeCode`` (formerly hg-app) is Pylons based repository management and | |||
|
6 | serving for mercurial_. It's similar to github or bitbucket, but it's suppose to run | |||
|
7 | as standalone app, it's open source and focuses more on restricted access to repositories | |||
|
8 | There's no default free access to RhodeCode You have to create an account in order | |||
|
9 | to use the application. It's powered by vcs_ library that we created to handle | |||
|
10 | many various version control systems. | |||
|
11 | ||||
|
12 | RhodeCode uses `Semantic Versioning <http://semver.org/>`_ | |||
|
13 | ||||
|
14 | ||||
|
15 | RhodeCode demo | |||
|
16 | -------------- | |||
|
17 | ||||
|
18 | http://hg.python-works.com | |||
|
19 | ||||
|
20 | The default access is | |||
4 |
|
21 | |||
5 | **Overview** |
|
22 | - username: demo | |
|
23 | - password: demo | |||
|
24 | ||||
|
25 | Source code | |||
|
26 | ----------- | |||
|
27 | ||||
|
28 | Source code is along with issue tracker is available at | |||
|
29 | http://bitbucket.org/marcinkuzminski/rhodecode | |||
6 |
|
30 | |||
7 | - Has it's own middleware to handle mercurial protocol request. Each request can |
|
31 | Also a source codes can be obtained from demo rhodecode instance | |
|
32 | http://hg.python-works.com/rhodecode/summary | |||
|
33 | ||||
|
34 | Instalation | |||
|
35 | ----------- | |||
|
36 | ||||
|
37 | Please visit http://packages.python.org/rhodecode/installation.html | |||
|
38 | ||||
|
39 | ||||
|
40 | Features | |||
|
41 | -------- | |||
|
42 | ||||
|
43 | - Has it's own middleware to handle mercurial_ protocol request. Each request can | |||
8 | be logged and authenticated. Runs on threads unlikely to hgweb You can make |
|
44 | be logged and authenticated. Runs on threads unlikely to hgweb You can make | |
9 | multiple pulls/pushes simultaneous |
|
45 | multiple pulls/pushes simultaneous | |
10 | - Full permissions and authentication per project private/read/write/admin. |
|
46 | - Full permissions and authentication per project private/read/write/admin. | |
11 | One account for web interface and mercurial push/pull/clone. |
|
47 | One account for web interface and mercurial_ push/pull/clone. | |
12 | - Mako templates let's you customize look and feel of application. |
|
48 | - Mako templates let's you customize look and feel of application. | |
13 | - Beautiful diffs, annotations and source codes all colored by pygments. |
|
49 | - Beautiful diffs, annotations and source codes all colored by pygments. | |
14 | - Mercurial branch graph and yui-flot powered graphs with zooming and statistics |
|
50 | - Mercurial_ branch graph and yui-flot powered graphs with zooming and statistics | |
15 | - Admin interface with user/permission management. User activity journal logs |
|
51 | - Admin interface with user/permission management. User activity journal logs | |
16 | pulls, pushes, forks,registrations. Possible to disable built in hooks |
|
52 | pulls, pushes, forks,registrations. Possible to disable built in hooks | |
17 | - Server side forks, it's possible to fork a project and hack it free without |
|
53 | - Server side forks, it's possible to fork a project and hack it free without | |
@@ -20,7 +56,7 b' Pylons based repository management for m' | |||||
20 | and build in indexing daemons |
|
56 | and build in indexing daemons | |
21 | (no external search servers required all in one application) |
|
57 | (no external search servers required all in one application) | |
22 | - Rss / atom feeds, gravatar support, download sources as zip/tarballs |
|
58 | - Rss / atom feeds, gravatar support, download sources as zip/tarballs | |
23 | - Async tasks for speed and performance using celery (works without them too) |
|
59 | - Async tasks for speed and performance using celery_ (works without them too) | |
24 | - Backup scripts can do backup of whole app and send it over scp to desired |
|
60 | - Backup scripts can do backup of whole app and send it over scp to desired | |
25 | location |
|
61 | location | |
26 | - Setup project descriptions and info inside built in db for easy, non |
|
62 | - Setup project descriptions and info inside built in db for easy, non | |
@@ -29,59 +65,29 b' Pylons based repository management for m' | |||||
29 | always up to date data. |
|
65 | always up to date data. | |
30 | - Based on pylons 1.0 / sqlalchemy 0.6 / sqlite |
|
66 | - Based on pylons 1.0 / sqlalchemy 0.6 / sqlite | |
31 |
|
67 | |||
32 | **Incoming** |
|
|||
33 |
|
68 | |||
34 | - code review based on hg-review (when it's stable) |
|
69 | Incoming | |
35 | - git support (when vcs can handle it - almost there !) |
|
70 | -------- | |
36 | - commit based wikis |
|
|||
37 | - clonning from remote repositories into rhodecode (git/mercurial) |
|
|||
38 | - other cools stuff that i can figure out (or You can help me figure out) |
|
|||
39 |
|
||||
40 | ------------ |
|
|||
41 | Installation |
|
|||
42 | ------------ |
|
|||
43 |
|
71 | |||
44 | **quick setup** |
|
72 | - code review (probably based on hg-review) | |
45 |
|
73 | - git_ support (when vcs_ can handle it - it's almost there !) | ||
46 | - pip install -E rhodecode-venv rhodecode |
|
74 | - commit based build in wiki system | |
47 | - activate virtualenv |
|
75 | - clone points and cloning from remote repositories into rhodecode (git_ and mercurial_) | |
48 | - run `paster make-config RhodeCode production.ini` |
|
76 | - some cache optimizations | |
49 | - run `paster setup-app production.ini` |
|
77 | - other cools stuff that i can figure out (or You can help me figure out) | |
50 | - run `paster runserver production.ini` |
|
|||
51 |
|
||||
52 | You're ready to go. |
|
|||
53 |
|
||||
54 | **MORE DETAILED INSTRUCTIONS** |
|
|||
55 |
|
78 | |||
56 | - I highly recommend to install new virtualenv for rhodecode see |
|
79 | License | |
57 | http://pypi.python.org/pypi/virtualenv for more details. |
|
80 | ------- | |
58 | - Create new virtualenv using `virtualenv --no-site-packages /var/www/rhodecode-venv` |
|
81 | ||
59 | this will install new virtual env into /var/www/rhodecode-venv. |
|
82 | ``rhodecode`` is released under GPL_ license. | |
60 | Activate the virtualenv by running |
|
83 | ||
61 | `source activate /var/www/rhodecode-venv/bin/activate` |
|
84 | ||
62 | - Make a folder for rhodecode somewhere on the filesystem for example /var/www/rhodecode |
|
85 | Documentation | |
63 | - Run easy_install rhodecode |
|
86 | ------------- | |
64 | - Run `paster make-config RhodeCode production.inii` in order to install |
|
87 | ||
65 | the application config. You can play with the app settings later |
|
88 | Online documentation for current version is available at | |
66 | - Run `paster setup-app production.ini` it should create all needed tables |
|
89 | http://packages.python.org/rhodecode/. | |
67 | and an admin account make sure You specify correct path to repositories. |
|
90 | You may also build documentation for yourself - go into ``docs/`` and run:: | |
68 | - Remember that the given path for mercurial repositories must be write |
|
91 | ||
69 | accessible for the application |
|
92 | make html | |
70 | - Run paster serve production.ini - or you can use sample init.d scripts. |
|
93 | ||
71 | the app should be available at the 127.0.0.1:5000 |
|
|||
72 | - Use admin account you created to login. |
|
|||
73 | - Default permissions on each repository is read, and owner is admin. So remember |
|
|||
74 | to update these. |
|
|||
75 | - In order to use full power of async tasks, You must install message broker |
|
|||
76 | preferably rabbitmq and start celeryd daemon together with rhodecode. |
|
|||
77 | The app should gain a lot of speed and become much more responsible. |
|
|||
78 | For installation instructions You can visit: |
|
|||
79 | http://ask.github.com/celery/getting-started/index.html. |
|
|||
80 | - All needed configs are inside rhodecode sources ie. celeryconfig.py, |
|
|||
81 | development.ini, production.ini You can configure the email, ports, loggers, |
|
|||
82 | workers from there. |
|
|||
83 | - For full text search You can either put crontab entry for |
|
|||
84 | `python /var/www/rhodecode/rhodecode/lib/indexers/daemon.py incremental <path_to_repos>` |
|
|||
85 | or run indexer from admin panel. This will scann the repos given in the |
|
|||
86 | application setup or given path for daemon.py and each scann in incremental |
|
|||
87 | mode will scann only changed files. No newline at end of file |
|
@@ -120,7 +120,7 b" html_theme_path = ['theme']" | |||||
120 | # Add any paths that contain custom static files (such as style sheets) here, |
|
120 | # Add any paths that contain custom static files (such as style sheets) here, | |
121 | # relative to this directory. They are copied after the builtin static files, |
|
121 | # relative to this directory. They are copied after the builtin static files, | |
122 | # so a file named "default.css" will overwrite the builtin "default.css". |
|
122 | # so a file named "default.css" will overwrite the builtin "default.css". | |
123 | html_static_path = ['_static'] |
|
123 | #html_static_path = ['_static'] | |
124 |
|
124 | |||
125 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, |
|
125 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, | |
126 | # using the given strftime format. |
|
126 | # using the given strftime format. |
@@ -3,12 +3,18 b'' | |||||
3 | Welcome to RhodeCode (RhodiumCode) documentation! |
|
3 | Welcome to RhodeCode (RhodiumCode) documentation! | |
4 | ================================================= |
|
4 | ================================================= | |
5 |
|
5 | |||
6 |
``RhodeCode`` is Pylons based repository management and |
|
6 | ``RhodeCode`` (formerly hg-app) is Pylons based repository management and | |
7 | It's similar to github or bitbucket, but focuses more on closed access restrictions. |
|
7 | serving for mercurial_. It's similar to github or bitbucket, but it's suppose to run | |
|
8 | as standalone app, it's open source and focuses more on restricted access to repositories | |||
8 | There's no default free access to RhodeCode You have to create an account in order |
|
9 | There's no default free access to RhodeCode You have to create an account in order | |
9 | to use the application. |
|
10 | to use the application. It's powered by vcs_ library that we created to handle | |
|
11 | many various version control systems. | |||
10 |
|
12 | |||
11 | **RhodeCode demo is available at** |
|
13 | RhodeCode uses `Semantic Versioning <http://semver.org/>`_ | |
|
14 | ||||
|
15 | ||||
|
16 | RhodeCode demo | |||
|
17 | -------------- | |||
12 |
|
18 | |||
13 | http://hg.python-works.com |
|
19 | http://hg.python-works.com | |
14 |
|
20 | |||
@@ -17,18 +23,26 b' The default access is' | |||||
17 | - username: demo |
|
23 | - username: demo | |
18 | - password: demo |
|
24 | - password: demo | |
19 |
|
25 | |||
20 | RhodeCode uses `Semantic Versioning <http://semver.org/>`_ |
|
26 | Source code | |
|
27 | ----------- | |||
|
28 | ||||
|
29 | Source code is along with issue tracker is available at | |||
|
30 | http://bitbucket.org/marcinkuzminski/rhodecode | |||
21 |
|
31 | |||
22 | **Features** |
|
32 | Also a source codes can be obtained from demo rhodecode instance | |
|
33 | http://hg.python-works.com/rhodecode/summary | |||
23 |
|
34 | |||
24 | - Has it's own middleware to handle mercurial protocol request. Each request can |
|
35 | Features | |
|
36 | -------- | |||
|
37 | ||||
|
38 | - Has it's own middleware to handle mercurial_ protocol request. Each request can | |||
25 | be logged and authenticated. Runs on threads unlikely to hgweb You can make |
|
39 | be logged and authenticated. Runs on threads unlikely to hgweb You can make | |
26 | multiple pulls/pushes simultaneous |
|
40 | multiple pulls/pushes simultaneous | |
27 | - Full permissions and authentication per project private/read/write/admin. |
|
41 | - Full permissions and authentication per project private/read/write/admin. | |
28 | One account for web interface and mercurial push/pull/clone. |
|
42 | One account for web interface and mercurial_ push/pull/clone. | |
29 | - Mako templates let's you customize look and feel of application. |
|
43 | - Mako templates let's you customize look and feel of application. | |
30 | - Beautiful diffs, annotations and source codes all colored by pygments. |
|
44 | - Beautiful diffs, annotations and source codes all colored by pygments. | |
31 | - Mercurial branch graph and yui-flot powered graphs with zooming and statistics |
|
45 | - Mercurial_ branch graph and yui-flot powered graphs with zooming and statistics | |
32 | - Admin interface with user/permission management. User activity journal logs |
|
46 | - Admin interface with user/permission management. User activity journal logs | |
33 | pulls, pushes, forks,registrations. Possible to disable built in hooks |
|
47 | pulls, pushes, forks,registrations. Possible to disable built in hooks | |
34 | - Server side forks, it's possible to fork a project and hack it free without |
|
48 | - Server side forks, it's possible to fork a project and hack it free without | |
@@ -37,7 +51,7 b' RhodeCode uses `Semantic Versioning <htt' | |||||
37 | and build in indexing daemons |
|
51 | and build in indexing daemons | |
38 | (no external search servers required all in one application) |
|
52 | (no external search servers required all in one application) | |
39 | - Rss / atom feeds, gravatar support, download sources as zip/tarballs |
|
53 | - Rss / atom feeds, gravatar support, download sources as zip/tarballs | |
40 | - Async tasks for speed and performance using celery (works without them too) |
|
54 | - Async tasks for speed and performance using celery_ (works without them too) | |
41 | - Backup scripts can do backup of whole app and send it over scp to desired |
|
55 | - Backup scripts can do backup of whole app and send it over scp to desired | |
42 | location |
|
56 | location | |
43 | - Setup project descriptions and info inside built in db for easy, non |
|
57 | - Setup project descriptions and info inside built in db for easy, non | |
@@ -58,16 +72,24 b' RhodeCode uses `Semantic Versioning <htt' | |||||
58 | Summary page |
|
72 | Summary page | |
59 |
|
73 | |||
60 |
|
74 | |||
61 |
|
|
75 | Incoming | |
|
76 | -------- | |||
62 |
|
77 | |||
63 |
- code review based on hg-review |
|
78 | - code review (probably based on hg-review) | |
64 | - git support (when vcs can handle it - almost there !) |
|
79 | - git_ support (when vcs_ can handle it - it's almost there !) | |
65 | - commit based wikis |
|
80 | - commit based build in wiki system | |
66 |
- clonning from remote repositories into rhodecode (git |
|
81 | - clone points and cloning from remote repositories into rhodecode (git_ and mercurial_) | |
|
82 | - some cache optimizations | |||
67 | - other cools stuff that i can figure out (or You can help me figure out) |
|
83 | - other cools stuff that i can figure out (or You can help me figure out) | |
68 |
|
84 | |||
|
85 | License | |||
|
86 | ------- | |||
|
87 | ||||
|
88 | ``rhodecode`` is released under GPL_ license. | |||
|
89 | ||||
|
90 | ||||
69 | Documentation |
|
91 | Documentation | |
70 | ============= |
|
92 | ------------- | |
71 |
|
93 | |||
72 | **Installation:** |
|
94 | **Installation:** | |
73 |
|
95 | |||
@@ -78,13 +100,18 b' Documentation' | |||||
78 | setup |
|
100 | setup | |
79 |
|
101 | |||
80 | Other topics |
|
102 | Other topics | |
81 | ============ |
|
103 | ------------ | |
82 |
|
104 | |||
83 | * :ref:`genindex` |
|
105 | * :ref:`genindex` | |
84 | * :ref:`search` |
|
106 | * :ref:`search` | |
85 |
|
107 | |||
|
108 | .. _virtualenv: http://pypi.python.org/pypi/virtualenv | |||
86 | .. _python: http://www.python.org/ |
|
109 | .. _python: http://www.python.org/ | |
87 | .. _django: http://www.djangoproject.com/ |
|
110 | .. _django: http://www.djangoproject.com/ | |
88 | .. _mercurial: http://mercurial.selenic.com/ |
|
111 | .. _mercurial: http://mercurial.selenic.com/ | |
89 | .. _subversion: http://subversion.tigris.org/ |
|
112 | .. _subversion: http://subversion.tigris.org/ | |
90 | .. _git: http://git-scm.com/ No newline at end of file |
|
113 | .. _git: http://git-scm.com/ | |
|
114 | .. _celery: http://celeryproject.org/ | |||
|
115 | .. _Sphinx: http://sphinx.pocoo.org/ | |||
|
116 | .. _GPL: http://www.gnu.org/licenses/gpl.html | |||
|
117 | .. _vcs: http://pypi.python.org/pypi/vcs |
@@ -6,12 +6,10 b' Installation' | |||||
6 | ``RhodeCode`` is written entirely in Python, but in order to use it's full |
|
6 | ``RhodeCode`` is written entirely in Python, but in order to use it's full | |
7 | potential there are some third-party requirements. When RhodeCode is used |
|
7 | potential there are some third-party requirements. 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 | For installation instructions You can visit: |
|
|||
11 | http://ask.github.com/celery/getting-started/index.html. |
|
|||
12 |
|
10 | |||
13 | Of course RhodeCode works in sync mode also, then You don't have to install |
|
11 | Of course RhodeCode works in sync mode also, then You don't have to install | |
14 | any third party apps. Celery will give You large speed improvement when using |
|
12 | any third party apps. Celery_ will give You large speed improvement when using | |
15 | many big repositories. If You plan to use it for 2 or 3 small repositories, it |
|
13 | many big repositories. If You plan to use it for 2 or 3 small repositories, it | |
16 | will work just fine without celery running. |
|
14 | will work just fine without celery running. | |
17 |
|
15 | |||
@@ -26,6 +24,9 b' Requirements for Celery' | |||||
26 | - preferred is `RabbitMq <http://www.rabbitmq.com/>`_ |
|
24 | - preferred is `RabbitMq <http://www.rabbitmq.com/>`_ | |
27 | - possible other is `Redis <http://code.google.com/p/redis/>`_ |
|
25 | - possible other is `Redis <http://code.google.com/p/redis/>`_ | |
28 |
|
26 | |||
|
27 | For installation instructions You can visit: | |||
|
28 | http://ask.github.com/celery/getting-started/index.html | |||
|
29 | It's very nice tutorial how to start celery_ with rabbitmq_ | |||
29 |
|
30 | |||
30 | Install from Cheese Shop |
|
31 | Install from Cheese Shop | |
31 | ------------------------ |
|
32 | ------------------------ | |
@@ -36,7 +37,7 b' Easiest way to install ``rhodecode`` is ' | |||||
36 |
|
37 | |||
37 | Or:: |
|
38 | Or:: | |
38 |
|
39 | |||
39 |
|
|
40 | pip install rhodecode | |
40 |
|
41 | |||
41 | If you prefer to install manually simply grab latest release from |
|
42 | If you prefer to install manually simply grab latest release from | |
42 | http://pypi.python.org/pypi/rhodecode, decompres archive and run:: |
|
43 | http://pypi.python.org/pypi/rhodecode, decompres archive and run:: | |
@@ -44,52 +45,45 b' http://pypi.python.org/pypi/rhodecode, d' | |||||
44 | python setup.py install |
|
45 | python setup.py install | |
45 |
|
46 | |||
46 |
|
47 | |||
47 | **Setting up the application** |
|
48 | Step by step installation example | |
48 | I recommend to run the RhodeCode in separate virtualenv. |
|
49 | --------------------------------- | |
49 | See http://pypi.python.org/pypi/virtualenv for more details. |
|
|||
50 |
|
||||
51 | - run `paster make-config RhodeCode production.ini` make specific application |
|
|||
52 | config, |
|
|||
53 | - run `paster setup-app production.ini` makes the database, and propagates it |
|
|||
54 | with default data, In this step You have to provide admin username and repositories |
|
|||
55 | location, it can be a new location or with existing ones in that case RhodeCode |
|
|||
56 | will scann all new found repos and put it into database. |
|
|||
57 | - run `paster runserver production.ini` runs the server. |
|
|||
58 |
|
||||
59 |
|
||||
60 | **STEP BY STEP EXAMPLE INSTRUCTION** |
|
|||
61 |
|
50 | |||
62 |
|
51 | |||
63 |
- Assuming You have |
|
52 | - Assuming You have installed virtualenv_ create one using. The `--no-site-packages` | |
64 | `virtualenv --no-site-packages /var/www/rhodecode-venv` |
|
53 | will make sure non of Your system libs are linked with this virtualenv_ | |
65 | this will install new virtual env into /var/www/rhodecode-venv. |
|
54 | ||
66 | - Activate the virtualenv by running |
|
55 | :: | |
67 | `source activate /var/www/rhodecode-venv/bin/activate` |
|
56 | ||
|
57 | virtualenv --no-site-packages /var/www/rhodecode-venv | |||
|
58 | ||||
|
59 | - this will install new virtualenv_ into `/var/www/rhodecode-venv`. | |||
|
60 | - Activate the virtualenv_ by running | |||
|
61 | ||||
|
62 | :: | |||
|
63 | ||||
|
64 | source activate /var/www/rhodecode-venv/bin/activate | |||
|
65 | ||||
68 | - Make a folder for rhodecode somewhere on the filesystem for example |
|
66 | - Make a folder for rhodecode somewhere on the filesystem for example | |
69 | /var/www/rhodecode |
|
67 | ||
70 | - Run easy_install rhodecode, this will install rhodecode together with pylons |
|
68 | :: | |
|
69 | ||||
|
70 | mkdir /var/www/rhodecode | |||
|
71 | ||||
|
72 | ||||
|
73 | - Run this command to install rhodecode | |||
|
74 | ||||
|
75 | :: | |||
|
76 | ||||
|
77 | easy_install rhodecode | |||
|
78 | ||||
|
79 | - this will install rhodecode together with pylons | |||
71 | and all other required python libraries |
|
80 | and all other required python libraries | |
72 | - Run `paster make-config RhodeCode production.ini` in order to install |
|
81 | ||
73 | the application config. |
|
82 | ||
74 | - Run `paster setup-app production.ini` it should create all needed tables |
|
83 | You can now proceed to :ref:`setup` | |
75 | and an admin account. Also make sure You specify correct path to repositories. |
|
|||
76 | You can either use a new location of one with already exising ones. RhodeCode |
|
|||
77 | will simply add all new found repositories to it's database. |
|
|||
78 | - Remember that the given path for mercurial repositories must be write |
|
|||
79 | accessible for the application. It's very important since RhodeCode web interface |
|
|||
80 | will work even without such an access but, when trying to do a push it's eventually |
|
|||
81 | failed with permission denied. |
|
|||
82 | - Run `paster serve production.ini` |
|
|||
83 | the app should be available at the 127.0.0.1:5000 |
|
|||
84 | - Use admin account you created to login. |
|
|||
85 | - Default permissions on each repository is read, and owner is admin. So remember |
|
|||
86 | to update these. |
|
|||
87 |
|
84 | |||
88 | - All needed configs are inside rhodecode sources ie. celeryconfig.py, |
|
85 | .. _virtualenv: http://pypi.python.org/pypi/virtualenv | |
89 | development.ini, production.ini You can configure the email, ports, loggers, |
|
86 | .. _python: http://www.python.org/ | |
90 | workers from there. |
|
87 | .. _mercurial: http://mercurial.selenic.com/ | |
91 | - For full text search You can either put crontab entry for |
|
88 | .. _celery: http://celeryproject.org/ | |
92 | `python /var/www/rhodecode/rhodecode/lib/indexers/daemon.py incremental <path_to_repos>` |
|
89 | .. _rabbitmq: http://www.rabbitmq.com/ No newline at end of file | |
93 | or run indexer from admin panel. This will scann the repos given in the |
|
|||
94 | application setup or given path for daemon.py and each scann in incremental |
|
|||
95 | mode will scan only changed files. No newline at end of file |
|
@@ -4,13 +4,118 b' Setup' | |||||
4 | ===== |
|
4 | ===== | |
5 |
|
5 | |||
6 |
|
6 | |||
|
7 | Setting up the application | |||
|
8 | -------------------------- | |||
|
9 | ||||
|
10 | :: | |||
|
11 | ||||
|
12 | paster make-config RhodeCode production.ini | |||
|
13 | ||||
|
14 | - This will create `production.ini` config inside the directory | |||
|
15 | this config contain various settings for rhodecode, e.g port, email settings | |||
|
16 | static files, cache and logging. | |||
|
17 | ||||
|
18 | :: | |||
|
19 | ||||
|
20 | paster setup-app production.ini` | |||
|
21 | ||||
|
22 | - This command will create all needed tables and an admin account. | |||
|
23 | When asked for a path You can either use a new location of one with already | |||
|
24 | existing ones. RhodeCode will simply add all new found repositories to | |||
|
25 | it's database. Also make sure You specify correct path to repositories. | |||
|
26 | - Remember that the given path for mercurial_ repositories must be write | |||
|
27 | accessible for the application. It's very important since RhodeCode web interface | |||
|
28 | will work even without such an access but, when trying to do a push it'll | |||
|
29 | eventually faile with permission denied errors. | |||
|
30 | - Run | |||
|
31 | ||||
|
32 | :: | |||
|
33 | ||||
|
34 | paster serve production.ini | |||
|
35 | ||||
|
36 | - This command runs the rhodecode server the app should be available at the | |||
|
37 | 127.0.0.1:5000. This ip and port is configurable via the production.ini | |||
|
38 | file created in previos step | |||
|
39 | - Use admin account you created to login. | |||
|
40 | - Default permissions on each repository is read, and owner is admin. So | |||
|
41 | remember to update these. | |||
|
42 | ||||
7 | - All needed configs are inside rhodecode sources ie. celeryconfig.py, |
|
43 | - All needed configs are inside rhodecode sources ie. celeryconfig.py, | |
8 | development.ini, production.ini You can configure the email, ports, loggers, |
|
44 | development.ini, production.ini You can configure the email, ports, loggers, | |
9 | workers from there. |
|
45 | workers from there. | |
10 | - For full text search You can either put crontab entry for |
|
46 | ||
11 | `python /var/www/rhodecode/rhodecode/lib/indexers/daemon.py incremental <path_to_repos>` |
|
47 | Setting up Whoosh | |
12 | or run indexer from admin panel. This will scann the repos given in the |
|
48 | ----------------- | |
13 | application setup or given path for daemon.py and each scann in incremental |
|
49 | ||
14 | mode will scan only changed files. |
|
50 | - For full text search You can either put crontab entry for | |
|
51 | ||||
|
52 | :: | |||
|
53 | ||||
|
54 | python /var/www/rhodecode/rhodecode/lib/indexers/daemon.py incremental <put_here_path_to_repos> | |||
|
55 | ||||
|
56 | When using incremental mode whoosh will check last modification date of each file | |||
|
57 | and add it to reindex if newer file is available. Also indexing daemon checks | |||
|
58 | for removed files and removes them from index. Sometime You might want to rebuild | |||
|
59 | index from scrach, in admin pannel You can check `build from scratch` flag | |||
|
60 | and in standalone daemon You can pass `full` instead on incremental to build | |||
|
61 | remove previos index and build new one. | |||
|
62 | ||||
|
63 | Nginx virtual host example | |||
|
64 | -------------------------- | |||
|
65 | ||||
|
66 | Sample config for nginx:: | |||
|
67 | ||||
|
68 | server { | |||
|
69 | listen 80; | |||
|
70 | server_name hg.myserver.com; | |||
|
71 | access_log /var/log/nginx/rhodecode.access.log; | |||
|
72 | error_log /var/log/nginx/rhodecode.error.log; | |||
|
73 | location / { | |||
|
74 | root /var/www/rhodecode/rhodecode/public/; | |||
|
75 | if (!-f $request_filename){ | |||
|
76 | proxy_pass http://127.0.0.1:5000; | |||
|
77 | } | |||
|
78 | #this is important for https !!! | |||
|
79 | proxy_set_header X-Url-Scheme $scheme; | |||
|
80 | include /etc/nginx/proxy.conf; | |||
|
81 | } | |||
|
82 | } | |||
15 |
|
|
83 | ||
16 | TODO: write that ! No newline at end of file |
|
84 | Here's the proxy.conf. It's tunned so it'll not timeout on long | |
|
85 | pushes and also on large pushes:: | |||
|
86 | ||||
|
87 | proxy_redirect off; | |||
|
88 | proxy_set_header Host $host; | |||
|
89 | proxy_set_header X-Host $http_host; | |||
|
90 | proxy_set_header X-Real-IP $remote_addr; | |||
|
91 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |||
|
92 | proxy_set_header Proxy-host $proxy_host; | |||
|
93 | client_max_body_size 400m; | |||
|
94 | client_body_buffer_size 128k; | |||
|
95 | proxy_buffering off; | |||
|
96 | proxy_connect_timeout 3600; | |||
|
97 | proxy_send_timeout 3600; | |||
|
98 | proxy_read_timeout 3600; | |||
|
99 | proxy_buffer_size 8k; | |||
|
100 | proxy_buffers 8 32k; | |||
|
101 | proxy_busy_buffers_size 64k; | |||
|
102 | proxy_temp_file_write_size 64k; | |||
|
103 | ||||
|
104 | Also when using root path with nginx You might set the static files to false | |||
|
105 | in production.ini file:: | |||
|
106 | ||||
|
107 | [app:main] | |||
|
108 | use = egg:rhodecode | |||
|
109 | full_stack = true | |||
|
110 | static_files = false | |||
|
111 | lang=en | |||
|
112 | cache_dir = %(here)s/data | |||
|
113 | ||||
|
114 | To not have the statics served by the application. | |||
|
115 | ||||
|
116 | ||||
|
117 | .. _virtualenv: http://pypi.python.org/pypi/virtualenv | |||
|
118 | .. _python: http://www.python.org/ | |||
|
119 | .. _mercurial: http://mercurial.selenic.com/ | |||
|
120 | .. _celery: http://celeryproject.org/ | |||
|
121 | .. _rabbitmq: http://www.rabbitmq.com/ No newline at end of file |
@@ -15,6 +15,14 b' requirements = [' | |||||
15 | "babel", |
|
15 | "babel", | |
16 | ] |
|
16 | ] | |
17 |
|
17 | |||
|
18 | classifiers = ['Development Status :: 4 - Beta', | |||
|
19 | 'Environment :: Web Environment', | |||
|
20 | 'Framework :: Pylons', | |||
|
21 | 'Intended Audience :: Developers', | |||
|
22 | 'License :: OSI Approved :: BSD License', | |||
|
23 | 'Operating System :: OS Independent', | |||
|
24 | 'Programming Language :: Python', ] | |||
|
25 | ||||
18 | if sys.version_info < (2, 6): |
|
26 | if sys.version_info < (2, 6): | |
19 | requirements.append("simplejson") |
|
27 | requirements.append("simplejson") | |
20 | requirements.append("pysqlite") |
|
28 | requirements.append("pysqlite") | |
@@ -51,12 +59,13 b' setup(' | |||||
51 | version=get_version(), |
|
59 | version=get_version(), | |
52 | description=description, |
|
60 | description=description, | |
53 | long_description=long_description, |
|
61 | long_description=long_description, | |
54 | keywords='mercurial web hgwebdir replacement serving hgweb rhodecode', |
|
62 | keywords='rhodiumcode mercurial web hgwebdir replacement serving hgweb rhodecode', | |
55 | license='BSD', |
|
63 | license='BSD', | |
56 | author='Marcin Kuzminski', |
|
64 | author='Marcin Kuzminski', | |
57 | author_email='marcin@python-works.com', |
|
65 | author_email='marcin@python-works.com', | |
58 | url='http://hg.python-works.com', |
|
66 | url='http://hg.python-works.com', | |
59 | install_requires=requirements, |
|
67 | install_requires=requirements, | |
|
68 | classifiers=classifiers, | |||
60 | setup_requires=["PasteScript>=1.6.3"], |
|
69 | setup_requires=["PasteScript>=1.6.3"], | |
61 | data_files=data_files, |
|
70 | data_files=data_files, | |
62 | packages=packages, |
|
71 | packages=packages, |
General Comments 0
You need to be logged in to leave comments.
Login now