Show More
@@ -21,6 +21,7 b' version control systems.' | |||||
21 |
|
21 | |||
22 | Kallithea was forked from RhodeCode in July 2014 and has been heavily modified. |
|
22 | Kallithea was forked from RhodeCode in July 2014 and has been heavily modified. | |
23 |
|
23 | |||
|
24 | ||||
24 | Installation |
|
25 | Installation | |
25 | ------------ |
|
26 | ------------ | |
26 | Kallithea requires Python_ 2.x and it is recommended to install it in a |
|
27 | Kallithea requires Python_ 2.x and it is recommended to install it in a | |
@@ -29,7 +30,7 b' virtualenv_. Official releases of Kallit' | |||||
29 | pip install kallithea |
|
30 | pip install kallithea | |
30 |
|
31 | |||
31 | The development repository is kept very stable and used in production by the |
|
32 | The development repository is kept very stable and used in production by the | |
32 | developers - you can do the same. |
|
33 | developers -- you can do the same. | |
33 |
|
34 | |||
34 | Please visit https://docs.kallithea-scm.org/en/latest/installation.html for |
|
35 | Please visit https://docs.kallithea-scm.org/en/latest/installation.html for | |
35 | more details. |
|
36 | more details. | |
@@ -119,7 +120,7 b' Community' | |||||
119 |
|
120 | |||
120 | Get in touch with the rest of the community: |
|
121 | Get in touch with the rest of the community: | |
121 |
|
122 | |||
122 | - Join the mailing list users and developers - see |
|
123 | - Join the mailing list users and developers -- see | |
123 | http://lists.sfconservancy.org/mailman/listinfo/kallithea-general. |
|
124 | http://lists.sfconservancy.org/mailman/listinfo/kallithea-general. | |
124 |
|
125 | |||
125 | - Use IRC and join #kallithea on FreeNode (irc.freenode.net) or use |
|
126 | - Use IRC and join #kallithea on FreeNode (irc.freenode.net) or use | |
@@ -198,6 +199,7 b' database, using the database string you ' | |||||
198 | If you started out using the branding interoperability approach mentioned |
|
199 | If you started out using the branding interoperability approach mentioned | |
199 | above, watch out for stray brand.pyc after removing brand.py. |
|
200 | above, watch out for stray brand.pyc after removing brand.py. | |
200 |
|
201 | |||
|
202 | ||||
201 | .. _virtualenv: http://pypi.python.org/pypi/virtualenv |
|
203 | .. _virtualenv: http://pypi.python.org/pypi/virtualenv | |
202 | .. _Python: http://www.python.org/ |
|
204 | .. _Python: http://www.python.org/ | |
203 | .. _Sphinx: http://sphinx.pocoo.org/ |
|
205 | .. _Sphinx: http://sphinx.pocoo.org/ |
@@ -7,7 +7,7 b' API' | |||||
7 |
|
7 | |||
8 | Kallithea has a simple JSON RPC API with a single schema for calling all API |
|
8 | Kallithea has a simple JSON RPC API with a single schema for calling all API | |
9 | methods. Everything is available by sending JSON encoded http(s) requests to |
|
9 | methods. Everything is available by sending JSON encoded http(s) requests to | |
10 |
<your_server>/_admin/api |
|
10 | ``<your_server>/_admin/api``. | |
11 |
|
11 | |||
12 |
|
12 | |||
13 | API access for web views |
|
13 | API access for web views | |
@@ -16,12 +16,12 b' API access for web views' | |||||
16 | API access can also be turned on for each web view in Kallithea that is |
|
16 | API access can also be turned on for each web view in Kallithea that is | |
17 | decorated with the ``@LoginRequired`` decorator. Some views use |
|
17 | decorated with the ``@LoginRequired`` decorator. Some views use | |
18 | ``@LoginRequired(api_access=True)`` and are always available. By default only |
|
18 | ``@LoginRequired(api_access=True)`` and are always available. By default only | |
19 |
RSS/A |
|
19 | RSS/Atom feed views are enabled. Other views are | |
20 |
only available if they have been white |
|
20 | only available if they have been whitelisted. Edit the | |
21 | ``api_access_controllers_whitelist`` option in your .ini file and define views |
|
21 | ``api_access_controllers_whitelist`` option in your .ini file and define views | |
22 | that should have API access enabled. |
|
22 | that should have API access enabled. | |
23 |
|
23 | |||
24 | For example, to enable API access to patch/diff raw file and archive:: |
|
24 | For example, to enable API access to patch/diff, raw file and archive:: | |
25 |
|
25 | |||
26 | api_access_controllers_whitelist = |
|
26 | api_access_controllers_whitelist = | |
27 | ChangesetController:changeset_patch, |
|
27 | ChangesetController:changeset_patch, | |
@@ -33,7 +33,7 b' After this change, a Kallithea view can ' | |||||
33 | GET parameter ``?api_key=<api_key>`` to the URL. |
|
33 | GET parameter ``?api_key=<api_key>`` to the URL. | |
34 |
|
34 | |||
35 | Exposing raw diffs is a good way to integrate with |
|
35 | Exposing raw diffs is a good way to integrate with | |
36 |
|
|
36 | third-party services like code review, or build farms that can download archives. | |
37 |
|
37 | |||
38 |
|
38 | |||
39 | API access |
|
39 | API access | |
@@ -50,27 +50,28 b' Clients must send JSON encoded JSON-RPC ' | |||||
50 |
|
50 | |||
51 | For example, to pull to a local "CPython" mirror using curl:: |
|
51 | For example, to pull to a local "CPython" mirror using curl:: | |
52 |
|
52 | |||
53 | curl https://server.com/_admin/api -X POST -H 'content-type:text/plain' --data-binary '{"id":1,"api_key":"xe7cdb2v278e4evbdf5vs04v832v0efvcbcve4a3","method":"pull","args":{"repo":"CPython"}}' |
|
53 | curl https://example.com/_admin/api -X POST -H 'content-type:text/plain' \ | |
|
54 | --data-binary '{"id":1,"api_key":"xe7cdb2v278e4evbdf5vs04v832v0efvcbcve4a3","method":"pull","args":{"repo":"CPython"}}' | |||
54 |
|
|
55 | ||
55 | In general, provide |
|
56 | In general, provide | |
56 | - *id*, a value of any type, can be used to match the response with the request that it is replying to. |
|
57 | - *id*, a value of any type, can be used to match the response with the request that it is replying to. | |
57 | - *api_key*, for authentication and permission validation. |
|
58 | - *api_key*, for authentication and permission validation. | |
58 | - *method*, the name of the method to call - a list of available methods can be found below. |
|
59 | - *method*, the name of the method to call -- a list of available methods can be found below. | |
59 | - *args*, the arguments to pass to the method. |
|
60 | - *args*, the arguments to pass to the method. | |
60 |
|
61 | |||
61 | .. note:: |
|
62 | .. note:: | |
62 |
|
63 | |||
63 | api_key can be found or set on the user account page |
|
64 | api_key can be found or set on the user account page. | |
64 |
|
65 | |||
65 | The response to the JSON-RPC API call will always be a JSON structure:: |
|
66 | The response to the JSON-RPC API call will always be a JSON structure:: | |
66 |
|
67 | |||
67 | { |
|
68 | { | |
68 | "id":<id>, # the id that was used in the request |
|
69 | "id": <id>, # the id that was used in the request | |
69 |
"result": |
|
70 | "result": <result>|null, # JSON formatted result (null on error) | |
70 |
"error": |
|
71 | "error": null|<error_message> # JSON formatted error (null on success) | |
71 | } |
|
72 | } | |
72 |
|
73 | |||
73 |
All responses from API will be ``HTTP/1.0 200 OK``. If |
|
74 | All responses from the API will be ``HTTP/1.0 200 OK``. If an error occurs, | |
74 | the reponse will have a failure description in *error* and |
|
75 | the reponse will have a failure description in *error* and | |
75 | *result* will be null. |
|
76 | *result* will be null. | |
76 |
|
77 | |||
@@ -78,7 +79,7 b' the reponse will have a failure descript' | |||||
78 | API client |
|
79 | API client | |
79 | ++++++++++ |
|
80 | ++++++++++ | |
80 |
|
81 | |||
81 | Kallithea comes with a ``kallithea-api`` command line tool providing a convenient |
|
82 | Kallithea comes with a ``kallithea-api`` command line tool, providing a convenient | |
82 | way to call the JSON-RPC API. |
|
83 | way to call the JSON-RPC API. | |
83 |
|
84 | |||
84 | For example, to call ``get_repo``:: |
|
85 | For example, to call ``get_repo``:: | |
@@ -106,7 +107,7 b' To avoid specifying ``apihost`` and ``ap' | |||||
106 |
|
107 | |||
107 | kallithea-api --save-config --apihost=<your.kallithea.server.url> --apikey=<yourapikey> |
|
108 | kallithea-api --save-config --apihost=<your.kallithea.server.url> --apikey=<yourapikey> | |
108 |
|
109 | |||
109 |
This will create a ``~/.config/kallithea`` with the specified hostname and |
|
110 | This will create a ``~/.config/kallithea`` with the specified hostname and API key | |
110 | so you don't have to specify them every time. |
|
111 | so you don't have to specify them every time. | |
111 |
|
112 | |||
112 |
|
113 | |||
@@ -332,6 +333,8 b' OUTPUT::' | |||||
332 | error: null |
|
333 | error: null | |
333 |
|
334 | |||
334 |
|
335 | |||
|
336 | .. _create-user: | |||
|
337 | ||||
335 | create_user |
|
338 | create_user | |
336 | ----------- |
|
339 | ----------- | |
337 |
|
340 | |||
@@ -375,6 +378,10 b' OUTPUT::' | |||||
375 | } |
|
378 | } | |
376 | error: null |
|
379 | error: null | |
377 |
|
380 | |||
|
381 | Example:: | |||
|
382 | ||||
|
383 | kallithea-api create_user username:bent email:bent@example.com firstname:Bent lastname:Bentsen extern_type:ldap extern_name:uid=bent,dc=example,dc=com | |||
|
384 | ||||
378 |
|
385 | |||
379 | update_user |
|
386 | update_user | |
380 | ----------- |
|
387 | ----------- |
@@ -4,6 +4,6 b'' | |||||
4 | Changelog |
|
4 | Changelog | |
5 | ========= |
|
5 | ========= | |
6 |
|
6 | |||
7 |
Kallithea project doesn't keep its changelog here. We refer you to our Mercurial logs_ |
|
7 | Kallithea project doesn't keep its changelog here. We refer you to our `Mercurial logs`__. | |
8 |
|
8 | |||
9 |
.. _ |
|
9 | .. __: https://kallithea-scm.org/repos/kallithea/changelog |
@@ -88,6 +88,7 b" exclude_patterns = ['_build']" | |||||
88 |
|
88 | |||
89 | # The name of the Pygments (syntax highlighting) style to use. |
|
89 | # The name of the Pygments (syntax highlighting) style to use. | |
90 | pygments_style = 'sphinx' |
|
90 | pygments_style = 'sphinx' | |
|
91 | highlight_language = 'none' | |||
91 |
|
92 | |||
92 | # A list of ignored prefixes for module index sorting. |
|
93 | # A list of ignored prefixes for module index sorting. | |
93 | #modindex_common_prefix = [] |
|
94 | #modindex_common_prefix = [] |
@@ -11,13 +11,13 b' your own itch.' | |||||
11 | Infrastructure |
|
11 | Infrastructure | |
12 | -------------- |
|
12 | -------------- | |
13 |
|
13 | |||
14 |
The main repository is hosted |
|
14 | The main repository is hosted on Our Own Kallithea (aka OOK) at | |
15 |
https://kallithea-scm.org/repos/kallithea/ |
|
15 | https://kallithea-scm.org/repos/kallithea/, our self-hosted instance | |
16 |
of Kallithea |
|
16 | of Kallithea. | |
17 |
|
17 | |||
18 |
For now, we use Bitbucket_ for ` |
|
18 | For now, we use Bitbucket_ for `pull requests`_ and `issue tracking`_. The | |
19 | issue tracker is for tracking bugs, not for support, discussion, or ideas - |
|
19 | issue tracker is for tracking bugs, not for support, discussion, or ideas -- | |
20 | please use the `mailing list`_ to reach the community. |
|
20 | please use the `mailing list`_ or :ref:`IRC <readme>` to reach the community. | |
21 |
|
21 | |||
22 | We use Weblate_ to translate the user interface messages into languages other |
|
22 | We use Weblate_ to translate the user interface messages into languages other | |
23 | than English. Join our project on `Hosted Weblate`_ to help us. |
|
23 | than English. Join our project on `Hosted Weblate`_ to help us. | |
@@ -48,7 +48,7 b' Running tests' | |||||
48 |
|
48 | |||
49 | After finishing your changes make sure all tests pass cleanly. You can run |
|
49 | After finishing your changes make sure all tests pass cleanly. You can run | |
50 | the testsuite running ``nosetests`` from the project root, or if you use tox |
|
50 | the testsuite running ``nosetests`` from the project root, or if you use tox | |
51 |
run ``tox`` for |
|
51 | run ``tox`` for Python 2.6--2.7 with multiple database test. | |
52 |
|
52 | |||
53 | When running tests, Kallithea uses `kallithea/tests/test.ini` and populates the |
|
53 | When running tests, Kallithea uses `kallithea/tests/test.ini` and populates the | |
54 | SQLite database specified there. |
|
54 | SQLite database specified there. | |
@@ -90,22 +90,23 b' to the extent it is feasible, IE8 is not' | |||||
90 |
|
90 | |||
91 | We primarily support Linux and OS X on the server side but Windows should also work. |
|
91 | We primarily support Linux and OS X on the server side but Windows should also work. | |
92 |
|
92 | |||
93 |
H |
|
93 | HTML templates should use 2 spaces for indentation ... but be pragmatic. We | |
94 | should use templates cleverly and avoid duplication. We should use reasonable |
|
94 | should use templates cleverly and avoid duplication. We should use reasonable | |
95 |
semantic markup with classes and |
|
95 | semantic markup with element classes and IDs that can be used for styling and testing. | |
96 | We should only use inline styles in places where it really is semantic (such as |
|
96 | We should only use inline styles in places where it really is semantic (such as | |
97 | display:none). |
|
97 | ``display: none``). | |
98 |
|
98 | |||
99 |
JavaScript must use |
|
99 | JavaScript must use ``;`` between/after statements. Indentation 4 spaces. Inline | |
100 | multiline functions should be indented two levels - one for the () and one for |
|
100 | multiline functions should be indented two levels -- one for the ``()`` and one for | |
101 | {}. jQuery value arrays should have a leading $. |
|
101 | ``{}``. | |
|
102 | Variables holding jQuery objects should be named with a leading ``$``. | |||
102 |
|
103 | |||
103 | Commit messages should have a leading short line summarizing the changes. For |
|
104 | Commit messages should have a leading short line summarizing the changes. For | |
104 |
bug fixes, put |
|
105 | bug fixes, put ``(Issue #123)`` at the end of this line. | |
105 |
|
106 | |||
106 | Contributions will be accepted in most formats - such as pull requests on |
|
107 | Contributions will be accepted in most formats -- such as pull requests on | |
107 | bitbucket, something hosted on your own Kallithea instance, or patches sent by |
|
108 | bitbucket, something hosted on your own Kallithea instance, or patches sent by | |
108 | email to the kallithea-general mailing list. |
|
109 | email to the `kallithea-general`_ mailing list. | |
109 |
|
110 | |||
110 | Make sure to test your changes both manually and with the automatic tests |
|
111 | Make sure to test your changes both manually and with the automatic tests | |
111 | before posting. |
|
112 | before posting. | |
@@ -116,7 +117,7 b' might give feedback that requests polish' | |||||
116 | changes when we apply them. |
|
117 | changes when we apply them. | |
117 |
|
118 | |||
118 | We try to make sure we have consensus on the direction the project is taking. |
|
119 | We try to make sure we have consensus on the direction the project is taking. | |
119 | Everything non-sensitive should be discussed in public - preferably on the |
|
120 | Everything non-sensitive should be discussed in public -- preferably on the | |
120 | mailing list. We aim at having all non-trivial changes reviewed by at least |
|
121 | mailing list. We aim at having all non-trivial changes reviewed by at least | |
121 | one other core developer before pushing. Obvious non-controversial changes will |
|
122 | one other core developer before pushing. Obvious non-controversial changes will | |
122 | be handled more casually. |
|
123 | be handled more casually. | |
@@ -132,7 +133,7 b' elsewhere (for example in a pull request' | |||||
132 | --------- |
|
133 | --------- | |
133 |
|
134 | |||
134 | We do not have a road map but are waiting for your contributions. Refer to the |
|
135 | We do not have a road map but are waiting for your contributions. Refer to the | |
135 | wiki_ for some ideas of places we might want to go - contributions in these |
|
136 | wiki_ for some ideas of places we might want to go -- contributions in these | |
136 | areas are very welcome. |
|
137 | areas are very welcome. | |
137 |
|
138 | |||
138 |
|
139 | |||
@@ -141,9 +142,10 b' Thank you for your contribution!' | |||||
141 |
|
142 | |||
142 |
|
143 | |||
143 | .. _Weblate: http://weblate.org/ |
|
144 | .. _Weblate: http://weblate.org/ | |
144 |
.. _ |
|
145 | .. _issue tracking: https://bitbucket.org/conservancy/kallithea/issues?status=new&status=open | |
145 |
.. _ |
|
146 | .. _pull requests: https://bitbucket.org/conservancy/kallithea/pull-requests | |
146 | .. _bitbucket: http://bitbucket.org/ |
|
147 | .. _bitbucket: http://bitbucket.org/ | |
147 | .. _mailing list: http://lists.sfconservancy.org/mailman/listinfo/kallithea-general |
|
148 | .. _mailing list: http://lists.sfconservancy.org/mailman/listinfo/kallithea-general | |
|
149 | .. _kallithea-general: http://lists.sfconservancy.org/mailman/listinfo/kallithea-general | |||
148 | .. _Hosted Weblate: https://hosted.weblate.org/projects/kallithea/kallithea/ |
|
150 | .. _Hosted Weblate: https://hosted.weblate.org/projects/kallithea/kallithea/ | |
149 | .. _wiki: https://bitbucket.org/conservancy/kallithea/wiki/Home |
|
151 | .. _wiki: https://bitbucket.org/conservancy/kallithea/wiki/Home |
@@ -4,11 +4,12 b'' | |||||
4 | Installation on Unix/Linux |
|
4 | Installation on Unix/Linux | |
5 | ========================== |
|
5 | ========================== | |
6 |
|
6 | |||
7 | Here are more details about 3 ways to install Kallithea: |
|
7 | The following describes three different ways of installing Kallithea: | |
8 |
|
8 | |||
9 | - :ref:`installation-source`: The simplest way to keep the installation |
|
9 | - :ref:`installation-source`: The simplest way to keep the installation | |
10 |
uptodate and |
|
10 | up-to-date and track any local customizations is to run directly from | |
11 |
source in a Kallithea repository clone |
|
11 | source in a Kallithea repository clone, preferably inside a virtualenv | |
|
12 | virtual Python environment. | |||
12 |
|
13 | |||
13 | - :ref:`installation-virtualenv`: If you prefer to only use released versions |
|
14 | - :ref:`installation-virtualenv`: If you prefer to only use released versions | |
14 | of Kallithea, the recommended method is to install Kallithea in a virtual |
|
15 | of Kallithea, the recommended method is to install Kallithea in a virtual | |
@@ -30,7 +31,7 b' Here are more details about 3 ways to in' | |||||
30 | Installation from repository source |
|
31 | Installation from repository source | |
31 | ----------------------------------- |
|
32 | ----------------------------------- | |
32 |
|
33 | |||
33 | To install Kallithea in a virtualenv using the stable branch of the development |
|
34 | To install Kallithea in a virtualenv_ using the stable branch of the development | |
34 | repository, follow the instructions below:: |
|
35 | repository, follow the instructions below:: | |
35 |
|
36 | |||
36 | hg clone https://kallithea-scm.org/repos/kallithea -u stable |
|
37 | hg clone https://kallithea-scm.org/repos/kallithea -u stable |
@@ -21,7 +21,7 b' ISAPI-WSGI bridge module, e.g. isapi-wsg' | |||||
21 | Installation |
|
21 | Installation | |
22 | ------------ |
|
22 | ------------ | |
23 |
|
23 | |||
24 |
The following |
|
24 | The following assumes that your Kallithea is at ``c:\inetpub\kallithea``, and | |
25 | will be served from the root of its own website. The changes to serve it in its |
|
25 | will be served from the root of its own website. The changes to serve it in its | |
26 | own virtual folder will be noted where appropriate. |
|
26 | own virtual folder will be noted where appropriate. | |
27 |
|
27 | |||
@@ -32,15 +32,15 b' Make sure that there is a unique applica' | |||||
32 | with an identity that has read access to the Kallithea distribution. |
|
32 | with an identity that has read access to the Kallithea distribution. | |
33 |
|
33 | |||
34 | The application pool does not need to be able to run any managed code. If you |
|
34 | The application pool does not need to be able to run any managed code. If you | |
35 |
are using a 32-bit Python installation, then you must enable 32 |
|
35 | are using a 32-bit Python installation, then you must enable 32-bit program in | |
36 | the advanced settings for the application pool otherwise Python will not be able |
|
36 | the advanced settings for the application pool; otherwise Python will not be able | |
37 |
to run on the website and |
|
37 | to run on the website and neither will Kallithea. | |
38 |
|
38 | |||
39 | .. note:: |
|
39 | .. note:: | |
40 |
|
40 | |||
41 |
The application pool can be the same as an existing application pool |
|
41 | The application pool can be the same as an existing application pool, | |
42 |
as the requirements |
|
42 | as long as the Kallithea requirements are met by the existing pool. | |
43 | pool. |
|
43 | ||
44 |
|
44 | |||
45 | ISAPI handler |
|
45 | ISAPI handler | |
46 | ............. |
|
46 | ............. |
@@ -7,17 +7,17 b' Installation and upgrade on Windows (XP/' | |||||
7 | First-time install |
|
7 | First-time install | |
8 | :::::::::::::::::: |
|
8 | :::::::::::::::::: | |
9 |
|
9 | |||
10 | Target OS: Windows XP SP3 32bit English (Clean installation) |
|
10 | Target OS: Windows XP SP3 32-bit English (Clean installation) | |
11 | + All Windows Updates until 24-may-2012 |
|
11 | + All Windows Updates until 24-may-2012 | |
12 |
|
12 | |||
13 | .. note:: |
|
13 | .. note:: | |
14 |
|
14 | |||
15 |
This installation is for 32bit systems, for 64 |
|
15 | This installation is for 32-bit systems, for 64-bit Windows you might need | |
16 | to download proper 64bit versions of the different packages(Windows Installer, Win32py extensions) |
|
16 | to download proper 64-bit versions of the different packages (Windows Installer, Win32py extensions) | |
17 | plus some extra tweaks. |
|
17 | plus some extra tweaks. | |
18 | These extra steps haven been marked as "64bit". |
|
18 | These extra steps haven been marked as "64-bit". | |
19 | Tested on Windows Server 2008 R2 SP1, 9-feb-2013. |
|
19 | Tested on Windows Server 2008 R2 SP1, 9-feb-2013. | |
20 | If you run into any 64bit related problems, please check these pages: |
|
20 | If you run into any 64-bit related problems, please check these pages: | |
21 | - http://blog.victorjabur.com/2011/06/05/compiling-python-2-7-modules-on-windows-32-and-64-using-msvc-2008-express/ |
|
21 | - http://blog.victorjabur.com/2011/06/05/compiling-python-2-7-modules-on-windows-32-and-64-using-msvc-2008-express/ | |
22 | - http://bugs.python.org/issue7511 |
|
22 | - http://bugs.python.org/issue7511 | |
23 |
|
23 | |||
@@ -47,34 +47,35 b' choose "Visual C++ 2008 Express" when in' | |||||
47 |
|
47 | |||
48 | .. note:: |
|
48 | .. note:: | |
49 |
|
49 | |||
50 | 64bit: You also need to install the Microsoft Windows SDK for .NET 3.5 SP1 (.NET 4.0 won't work). |
|
50 | 64-bit: You also need to install the Microsoft Windows SDK for .NET 3.5 SP1 (.NET 4.0 won't work). | |
51 | Download from: http://www.microsoft.com/en-us/download/details.aspx?id=3138 |
|
51 | Download from: http://www.microsoft.com/en-us/download/details.aspx?id=3138 | |
52 |
|
52 | |||
53 | .. note:: |
|
53 | .. note:: | |
54 |
|
54 | |||
55 | 64bit: You also need to copy and rename a .bat file to make the Visual C++ compiler work. |
|
55 | 64-bit: You also need to copy and rename a .bat file to make the Visual C++ compiler work. | |
56 | I am not sure why this is not necessary for 32bit. |
|
56 | I am not sure why this is not necessary for 32-bit. | |
57 | Copy C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat to C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\vcvarsamd64.bat |
|
57 | Copy C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat to C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\vcvarsamd64.bat | |
58 |
|
58 | |||
59 |
|
59 | |||
60 | Step 2 - Install Python |
|
60 | Step 2 -- Install Python | |
61 | ----------------------- |
|
61 | ------------------------ | |
62 |
|
62 | |||
63 | Install Python 2.x.y (x = 6 or 7) x86 version (32bit). DO NOT USE A 3.x version. |
|
63 | Install Python 2.x.y (x = 6 or 7) x86 version (32-bit). DO NOT USE A 3.x version. | |
64 | Download Python 2.x.y from: |
|
64 | Download Python 2.x.y from: | |
65 | http://www.python.org/download/ |
|
65 | http://www.python.org/download/ | |
66 |
|
66 | |||
67 | Choose "Windows Installer" (32bit version) not "Windows X86-64 |
|
67 | Choose "Windows Installer" (32-bit version) not "Windows X86-64 | |
68 | Installer". While writing this guide, the latest version was v2.7.3. |
|
68 | Installer". While writing this guide, the latest version was v2.7.3. | |
69 | Remember the specific major and minor version installed, because it will |
|
69 | Remember the specific major and minor version installed, because it will | |
70 | be needed in the next step. In this case, it is "2.7". |
|
70 | be needed in the next step. In this case, it is "2.7". | |
71 |
|
71 | |||
72 | .. note:: |
|
72 | .. note:: | |
73 |
|
73 | |||
74 | 64bit: Just download and install the 64bit version of python. |
|
74 | 64-bit: Just download and install the 64-bit version of python. | |
|
75 | ||||
75 |
|
76 | |||
76 | Step 3 - Install Win32py extensions |
|
77 | Step 3 -- Install Win32py extensions | |
77 | ----------------------------------- |
|
78 | ------------------------------------ | |
78 |
|
79 | |||
79 | Download pywin32 from: |
|
80 | Download pywin32 from: | |
80 | http://sourceforge.net/projects/pywin32/files/ |
|
81 | http://sourceforge.net/projects/pywin32/files/ | |
@@ -88,12 +89,13 b' http://sourceforge.net/projects/pywin32/' | |||||
88 |
|
89 | |||
89 | .. note:: |
|
90 | .. note:: | |
90 |
|
91 | |||
91 | 64bit: Download and install the 64bit version. |
|
92 | 64-bit: Download and install the 64-bit version. | |
92 | At the time of writing you can find this at: |
|
93 | At the time of writing you can find this at: | |
93 | http://sourceforge.net/projects/pywin32/files/pywin32/Build%20218/pywin32-218.win-amd64-py2.7.exe/download |
|
94 | http://sourceforge.net/projects/pywin32/files/pywin32/Build%20218/pywin32-218.win-amd64-py2.7.exe/download | |
94 |
|
95 | |||
95 | Step 4 - Python BIN |
|
96 | ||
96 | ------------------- |
|
97 | Step 4 -- Python BIN | |
|
98 | -------------------- | |||
97 |
|
99 | |||
98 | Add Python BIN folder to the path |
|
100 | Add Python BIN folder to the path | |
99 |
|
101 | |||
@@ -120,8 +122,8 b' that came preinstalled in Vista/7 and ca' | |||||
120 | Typically: C:\\Python27 |
|
122 | Typically: C:\\Python27 | |
121 |
|
123 | |||
122 |
|
124 | |||
123 | Step 5 - Kallithea folder structure |
|
125 | Step 5 -- Kallithea folder structure | |
124 | ----------------------------------- |
|
126 | ------------------------------------ | |
125 |
|
127 | |||
126 | Create a Kallithea folder structure |
|
128 | Create a Kallithea folder structure | |
127 |
|
129 | |||
@@ -138,8 +140,8 b' Create the following folder structure::' | |||||
138 | C:\Kallithea\Repos |
|
140 | C:\Kallithea\Repos | |
139 |
|
141 | |||
140 |
|
142 | |||
141 | Step 6 - Install virtualenv |
|
143 | Step 6 -- Install virtualenv | |
142 | --------------------------- |
|
144 | ---------------------------- | |
143 |
|
145 | |||
144 | Install Virtual Env for Python |
|
146 | Install Virtual Env for Python | |
145 |
|
147 | |||
@@ -159,8 +161,8 b' where you downloaded "virtualenv.py", an' | |||||
159 | to include it) |
|
161 | to include it) | |
160 |
|
162 | |||
161 |
|
163 | |||
162 | Step 7 - Install Kallithea |
|
164 | Step 7 -- Install Kallithea | |
163 | -------------------------- |
|
165 | --------------------------- | |
164 |
|
166 | |||
165 | Finally, install Kallithea |
|
167 | Finally, install Kallithea | |
166 |
|
168 | |||
@@ -171,7 +173,7 b' Command Prompt (**IMPORTANT!!**). To do ' | |||||
171 |
|
173 | |||
172 | .. note:: |
|
174 | .. note:: | |
173 |
|
175 | |||
174 | 64bit: For 64bit you need to modify the shortcut that is used to start the |
|
176 | 64-bit: For 64-bit you need to modify the shortcut that is used to start the | |
175 | Visual Studio 2008 Command Prompt. Use right-mouse click to open properties. |
|
177 | Visual Studio 2008 Command Prompt. Use right-mouse click to open properties. | |
176 |
|
178 | |||
177 | Change commandline from:: |
|
179 | Change commandline from:: | |
@@ -198,9 +200,8 b' The prompt will change into "(Env) C:\\\\K' | |||||
198 | Some warnings will appear, don't worry as they are normal. |
|
200 | Some warnings will appear, don't worry as they are normal. | |
199 |
|
201 | |||
200 |
|
202 | |||
201 | Step 8 - Configuring Kallithea |
|
203 | Step 8 -- Configuring Kallithea | |
202 | ------------------------------ |
|
204 | ------------------------------- | |
203 |
|
||||
204 |
|
205 | |||
205 | steps taken from http://packages.python.org/Kallithea/setup.html |
|
206 | steps taken from http://packages.python.org/Kallithea/setup.html | |
206 |
|
207 | |||
@@ -238,8 +239,8 b' If you make some mistake and the script ' | |||||
238 | it again. |
|
239 | it again. | |
239 |
|
240 | |||
240 |
|
241 | |||
241 | Step 9 - Running Kallithea |
|
242 | Step 9 -- Running Kallithea | |
242 | -------------------------- |
|
243 | --------------------------- | |
243 |
|
244 | |||
244 |
|
245 | |||
245 | In the previous command prompt, being in the C:\\Kallithea\\Bin folder, |
|
246 | In the previous command prompt, being in the C:\\Kallithea\\Bin folder, |
@@ -14,7 +14,7 b' following command to do so::' | |||||
14 | paster make-config Kallithea my.ini |
|
14 | paster make-config Kallithea my.ini | |
15 |
|
15 | |||
16 | This will create the file ``my.ini`` in the current directory. This |
|
16 | This will create the file ``my.ini`` in the current directory. This | |
17 |
configuration file contains the various settings for Kallithea, e.g. |
|
17 | configuration file contains the various settings for Kallithea, e.g. | |
18 | proxy port, email settings, usage of static files, cache, Celery |
|
18 | proxy port, email settings, usage of static files, cache, Celery | |
19 | settings, and logging. |
|
19 | settings, and logging. | |
20 |
|
20 | |||
@@ -34,12 +34,13 b' entering this "root" path ``setup-db`` w' | |||||
34 | and password for the initial admin account which ``setup-db`` sets |
|
34 | and password for the initial admin account which ``setup-db`` sets | |
35 | up for you. |
|
35 | up for you. | |
36 |
|
36 | |||
37 | The setup process can be fully automated, example for lazy:: |
|
37 | The ``setup-db`` values can also be given on the command line. | |
|
38 | Example:: | |||
38 |
|
39 | |||
39 |
paster setup-db my.ini --user=nn --password=secret --email=nn@ |
|
40 | paster setup-db my.ini --user=nn --password=secret --email=nn@example.org --repos=/srv/repos | |
40 |
|
41 | |||
41 |
|
42 | |||
42 |
The ``setup-db`` command will create all |
|
43 | The ``setup-db`` command will create all needed tables and an | |
43 | admin account. When choosing a root path you can either use a new |
|
44 | admin account. When choosing a root path you can either use a new | |
44 | empty location, or a location which already contains existing |
|
45 | empty location, or a location which already contains existing | |
45 | repositories. If you choose a location which contains existing |
|
46 | repositories. If you choose a location which contains existing | |
@@ -58,22 +59,22 b' You are now ready to use Kallithea. To r' | |||||
58 | paster serve my.ini |
|
59 | paster serve my.ini | |
59 |
|
60 | |||
60 | - This command runs the Kallithea server. The web app should be available at |
|
61 | - This command runs the Kallithea server. The web app should be available at | |
61 |
http://127.0.0.1:5000. Th |
|
62 | http://127.0.0.1:5000. The IP address and port is configurable via the | |
62 | file created in previous step |
|
63 | configuration file created in the previous step. | |
63 |
- |
|
64 | - Log in to Kallithea using the admin account created when running ``setup-db``. | |
64 | to login to the web app. |
|
|||
65 | - The default permissions on each repository is read, and the owner is admin. |
|
65 | - The default permissions on each repository is read, and the owner is admin. | |
66 | Remember to update these if needed. |
|
66 | Remember to update these if needed. | |
67 | - In the admin panel you can toggle LDAP, anonymous, and permissions |
|
67 | - In the admin panel you can toggle LDAP, anonymous, and permissions | |
68 | settings, as well as edit more advanced options on users and |
|
68 | settings, as well as edit more advanced options on users and | |
69 | repositories |
|
69 | repositories. | |
70 |
|
70 | |||
71 |
|
71 | |||
72 | Extensions |
|
72 | Extensions | |
73 | ---------- |
|
73 | ---------- | |
74 |
|
74 | |||
75 |
Optionally |
|
75 | Optionally one can create an ``rcextensions`` package that extends Kallithea | |
76 | functionality. To do this simply execute:: |
|
76 | functionality. | |
|
77 | To generate a skeleton extensions package, run:: | |||
77 |
|
78 | |||
78 | paster make-rcext my.ini |
|
79 | paster make-rcext my.ini | |
79 |
|
80 | |||
@@ -123,45 +124,38 b' authentication is fully supported.' | |||||
123 | Setting up Whoosh full text search |
|
124 | Setting up Whoosh full text search | |
124 | ---------------------------------- |
|
125 | ---------------------------------- | |
125 |
|
126 | |||
126 | The whoosh index can be built by using the paster |
|
127 | Kallithea provides full text search of repositories using `Whoosh`__. | |
127 | command ``make-index``. To use ``make-index`` you must specify the configuration |
|
|||
128 | file that stores the location of the index. You may specify the location of the |
|
|||
129 | repositories (``--repo-location``). If not specified, this value is retrieved |
|
|||
130 | from the Kallithea database. |
|
|||
131 | It is also possible to specify a comma separated list of |
|
|||
132 | repositories (``--index-only``) to build index only on chooses repositories |
|
|||
133 | skipping any other found in repos location |
|
|||
134 |
|
128 | |||
135 | You may optionally pass the option ``-f`` to enable a full index rebuild. Without |
|
129 | .. __: https://pythonhosted.org/Whoosh/ | |
136 | the ``-f`` option, indexing will run always in "incremental" mode. |
|
|||
137 |
|
130 | |||
138 |
For an incremental index build |
|
131 | For an incremental index build, run:: | |
139 |
|
132 | |||
140 | paster make-index my.ini |
|
133 | paster make-index my.ini | |
141 |
|
134 | |||
142 |
For a full index rebuild |
|
135 | For a full index rebuild, run:: | |
143 |
|
136 | |||
144 | paster make-index my.ini -f |
|
137 | paster make-index my.ini -f | |
145 |
|
138 | |||
|
139 | The ``--repo-location`` option allows the location of the repositories to be overriden; | |||
|
140 | usually, the location is retrieved from the Kallithea database. | |||
146 |
|
141 | |||
147 | Building an index for just selected repositories is possible with such command:: |
|
142 | The ``--index-only`` option can be used to limit the indexed repositories to a comma-separated list:: | |
148 |
|
143 | |||
149 | paster make-index my.ini --index-only=vcs,kallithea |
|
144 | paster make-index my.ini --index-only=vcs,kallithea | |
150 |
|
145 | |||
151 |
|
146 | |||
152 | In order to do periodic index builds and keep your index always up to |
|
147 | To keep your index up-to-date it is necessary to do periodic index builds; | |
153 |
|
|
148 | for this, it is recommended to use a crontab entry. Example:: | |
154 | might look like this:: |
|
|||
155 |
|
149 | |||
156 |
/path/to/ |
|
150 | 0 3 * * * /path/to/virtualenv/bin/paster make-index /path/to/kallithea/my.ini | |
157 |
|
151 | |||
158 |
When using incremental mode (the default) |
|
152 | When using incremental mode (the default), Whoosh will check the last | |
159 | modification date of each file and add it to be reindexed if a newer file is |
|
153 | modification date of each file and add it to be reindexed if a newer file is | |
160 | available. The indexing daemon checks for any removed files and removes them |
|
154 | available. The indexing daemon checks for any removed files and removes them | |
161 | from index. |
|
155 | from index. | |
162 |
|
156 | |||
163 | If you want to rebuild the index from scratch, you can use the ``-f`` flag as above, |
|
157 | If you want to rebuild the index from scratch, you can use the ``-f`` flag as above, | |
164 |
or in the admin panel you can check the "build from scratch" |
|
158 | or in the admin panel you can check the "build from scratch" checkbox. | |
165 |
|
159 | |||
166 |
|
160 | |||
167 | Setting up LDAP support |
|
161 | Setting up LDAP support | |
@@ -169,7 +163,7 b' Setting up LDAP support' | |||||
169 |
|
163 | |||
170 | Kallithea supports LDAP authentication. In order |
|
164 | Kallithea supports LDAP authentication. In order | |
171 | to use LDAP, you have to install the python-ldap_ package. This package is |
|
165 | to use LDAP, you have to install the python-ldap_ package. This package is | |
172 |
available via |
|
166 | available via PyPI, so you can install it by running:: | |
173 |
|
167 | |||
174 | pip install python-ldap |
|
168 | pip install python-ldap | |
175 |
|
169 | |||
@@ -378,15 +372,16 b' of users to its WSGI container, or to a ' | |||||
378 | clients access the application. |
|
372 | clients access the application. | |
379 |
|
373 | |||
380 | When these authentication methods are enabled in Kallithea, it uses the |
|
374 | When these authentication methods are enabled in Kallithea, it uses the | |
381 |
username that the container/proxy (Apache |
|
375 | username that the container/proxy (Apache or Nginx, etc.) provides and doesn't | |
382 | perform the authentication itself. The authorization, however, is still done by |
|
376 | perform the authentication itself. The authorization, however, is still done by | |
383 | Kallithea according to its settings. |
|
377 | Kallithea according to its settings. | |
384 |
|
378 | |||
385 | When a user logs in for the first time using these authentication methods, |
|
379 | When a user logs in for the first time using these authentication methods, | |
386 | a matching user account is created in Kallithea with default permissions. An |
|
380 | a matching user account is created in Kallithea with default permissions. An | |
387 | administrator can then modify it using Kallithea's admin interface. |
|
381 | administrator can then modify it using Kallithea's admin interface. | |
|
382 | ||||
388 | It's also possible for an administrator to create accounts and configure their |
|
383 | It's also possible for an administrator to create accounts and configure their | |
389 | permissions before the user logs in for the first time. |
|
384 | permissions before the user logs in for the first time, using the :ref:`create-user` API. | |
390 |
|
385 | |||
391 |
|
386 | |||
392 | Container-based authentication |
|
387 | Container-based authentication | |
@@ -395,7 +390,7 b' Container-based authentication' | |||||
395 | In a container-based authentication setup, Kallithea reads the user name from |
|
390 | In a container-based authentication setup, Kallithea reads the user name from | |
396 | the ``REMOTE_USER`` server variable provided by the WSGI container. |
|
391 | the ``REMOTE_USER`` server variable provided by the WSGI container. | |
397 |
|
392 | |||
398 |
After setting up your container (see `Apache |
|
393 | After setting up your container (see `Apache with mod_wsgi`_), you'll need | |
399 | to configure it to require authentication on the location configured for |
|
394 | to configure it to require authentication on the location configured for | |
400 | Kallithea. |
|
395 | Kallithea. | |
401 |
|
396 | |||
@@ -408,22 +403,24 b' from the ``X-Forwarded-User`` request he' | |||||
408 | sent by the reverse-proxy server. |
|
403 | sent by the reverse-proxy server. | |
409 |
|
404 | |||
410 | After setting up your proxy solution (see `Apache virtual host reverse proxy example`_, |
|
405 | After setting up your proxy solution (see `Apache virtual host reverse proxy example`_, | |
411 |
`Apache as subdirectory`_ or `Nginx virtual host example`_), you' |
|
406 | `Apache as subdirectory`_ or `Nginx virtual host example`_), you'll need to | |
412 | configure the authentication and add the username in a request header named |
|
407 | configure the authentication and add the username in a request header named | |
413 | ``X-Forwarded-User``. |
|
408 | ``X-Forwarded-User``. | |
414 |
|
409 | |||
415 | For example, the following config section for Apache sets a subdirectory in a |
|
410 | For example, the following config section for Apache sets a subdirectory in a | |
416 |
reverse-proxy setup with basic auth: |
|
411 | reverse-proxy setup with basic auth: | |
|
412 | ||||
|
413 | .. code-block:: apache | |||
417 |
|
414 | |||
418 |
<Location / |
|
415 | <Location /someprefix> | |
419 |
ProxyPass http://127.0.0.1:5000/ |
|
416 | ProxyPass http://127.0.0.1:5000/someprefix | |
420 |
ProxyPassReverse http://127.0.0.1:5000/ |
|
417 | ProxyPassReverse http://127.0.0.1:5000/someprefix | |
421 | SetEnvIf X-Url-Scheme https HTTPS=1 |
|
418 | SetEnvIf X-Url-Scheme https HTTPS=1 | |
422 |
|
419 | |||
423 | AuthType Basic |
|
420 | AuthType Basic | |
424 | AuthName "Kallithea authentication" |
|
421 | AuthName "Kallithea authentication" | |
425 | AuthUserFile /srv/kallithea/.htpasswd |
|
422 | AuthUserFile /srv/kallithea/.htpasswd | |
426 |
|
|
423 | Require valid-user | |
427 |
|
424 | |||
428 | RequestHeader unset X-Forwarded-User |
|
425 | RequestHeader unset X-Forwarded-User | |
429 |
|
426 | |||
@@ -445,8 +442,8 b' Integration with issue trackers' | |||||
445 | ------------------------------- |
|
442 | ------------------------------- | |
446 |
|
443 | |||
447 | Kallithea provides a simple integration with issue trackers. It's possible |
|
444 | Kallithea provides a simple integration with issue trackers. It's possible | |
448 |
to define a regular expression that will |
|
445 | to define a regular expression that will match an issue ID in commit messages, | |
449 |
|
|
446 | and have that replaced with a URL to the issue. To enable this simply | |
450 | uncomment the following variables in the ini file:: |
|
447 | uncomment the following variables in the ini file:: | |
451 |
|
448 | |||
452 | issue_pat = (?:^#|\s#)(\w+) |
|
449 | issue_pat = (?:^#|\s#)(\w+) | |
@@ -459,12 +456,14 b' parentheses should be used to specify th' | |||||
459 |
|
456 | |||
460 | The default expression matches issues in the format ``#<number>``, e.g., ``#300``. |
|
457 | The default expression matches issues in the format ``#<number>``, e.g., ``#300``. | |
461 |
|
458 | |||
462 |
Matched issues are replaced with the link specified |
|
459 | Matched issue references are replaced with the link specified in | |
463 |
``issue_server_link`` ``{id}`` is replaced with issue |
|
460 | ``issue_server_link``. ``{id}`` is replaced with the issue ID, and | |
464 | ``{repo}`` with the repository name. Since the # is stripped away, |
|
461 | ``{repo}`` with the repository name. Since the # is stripped away, | |
465 | ``issue_prefix`` is prepended to the link text. ``issue_prefix`` doesn't |
|
462 | ``issue_prefix`` is prepended to the link text. ``issue_prefix`` doesn't | |
466 | necessarily need to be ``#``: if you set issue prefix to ``ISSUE-`` this will |
|
463 | necessarily need to be ``#``: if you set issue prefix to ``ISSUE-`` this will | |
467 |
generate a URL in the format: |
|
464 | generate a URL in the format: | |
|
465 | ||||
|
466 | .. code-block:: html | |||
468 |
|
467 | |||
469 | <a href="https://myissueserver.com/example_repo/issue/300">ISSUE-300</a> |
|
468 | <a href="https://myissueserver.com/example_repo/issue/300">ISSUE-300</a> | |
470 |
|
|
469 | ||
@@ -476,7 +475,9 b' the variables. For example::' | |||||
476 | issue_prefix_wiki = WIKI- |
|
475 | issue_prefix_wiki = WIKI- | |
477 |
|
476 | |||
478 | With these settings, wiki pages can be referenced as wiki-some-id, and every |
|
477 | With these settings, wiki pages can be referenced as wiki-some-id, and every | |
479 |
such reference will be transformed into: |
|
478 | such reference will be transformed into: | |
|
479 | ||||
|
480 | .. code-block:: html | |||
480 |
|
481 | |||
481 | <a href="https://mywiki.com/some-id">WIKI-some-id</a> |
|
482 | <a href="https://mywiki.com/some-id">WIKI-some-id</a> | |
482 |
|
|
483 | ||
@@ -488,10 +489,10 b' Hooks can be managed in similar way to t' | |||||
488 | To access hooks setting click `advanced setup` in the `Hooks` section |
|
489 | To access hooks setting click `advanced setup` in the `Hooks` section | |
489 | of Mercurial Settings in Admin. |
|
490 | of Mercurial Settings in Admin. | |
490 |
|
491 | |||
491 | There are four built in hooks that cannot be changed (only enabled/disabled by |
|
492 | The built-in hooks cannot be modified, though they can be enabled or disabled in the *VCS* section. | |
492 | checkboxes in the previous section). |
|
493 | ||
493 |
To add another custom hook simply fill in the first |
|
494 | To add another custom hook simply fill in the first textbox with | |
494 |
``<name>.<hook_type>`` and the second |
|
495 | ``<name>.<hook_type>`` and the second with the hook path. Example hooks | |
495 | can be found in ``kallithea.lib.hooks``. |
|
496 | can be found in ``kallithea.lib.hooks``. | |
496 |
|
497 | |||
497 |
|
498 | |||
@@ -541,6 +542,7 b' To start the Celery process, run::' | |||||
541 | Make sure you run this command from the same virtualenv, and with the same |
|
542 | Make sure you run this command from the same virtualenv, and with the same | |
542 | user that Kallithea runs. |
|
543 | user that Kallithea runs. | |
543 |
|
544 | |||
|
545 | ||||
544 | HTTPS support |
|
546 | HTTPS support | |
545 | ------------- |
|
547 | ------------- | |
546 |
|
548 | |||
@@ -549,15 +551,19 b' Kallithea will by default generate URLs ' | |||||
549 | Alternatively, you can use some special configuration settings to control |
|
551 | Alternatively, you can use some special configuration settings to control | |
550 | directly which scheme/protocol Kallithea will use when generating URLs: |
|
552 | directly which scheme/protocol Kallithea will use when generating URLs: | |
551 |
|
553 | |||
552 |
- With ``https_fixup = true``, the scheme will be taken from the |
|
554 | - With ``https_fixup = true``, the scheme will be taken from the | |
553 | ``HTTP_X_FORWARDED_SCHEME`` or ``HTTP_X_FORWARDED_PROTO HTTP`` header (default ``http``). |
|
555 | ``X-Url-Scheme``, ``X-Forwarded-Scheme`` or ``X-Forwarded-Proto`` HTTP header | |
|
556 | (default ``http``). | |||
554 | - With ``force_https = true`` the default will be ``https``. |
|
557 | - With ``force_https = true`` the default will be ``https``. | |
555 | - With ``use_htsts = true``, it will set ``Strict-Transport-Security`` when using https. |
|
558 | - With ``use_htsts = true``, Kallithea will set ``Strict-Transport-Security`` when using https. | |
|
559 | ||||
556 |
|
560 | |||
557 | Nginx virtual host example |
|
561 | Nginx virtual host example | |
558 | -------------------------- |
|
562 | -------------------------- | |
559 |
|
563 | |||
560 |
Sample config for |
|
564 | Sample config for Nginx using proxy: | |
|
565 | ||||
|
566 | .. code-block:: nginx | |||
561 |
|
567 | |||
562 | upstream kallithea { |
|
568 | upstream kallithea { | |
563 | server 127.0.0.1:5000; |
|
569 | server 127.0.0.1:5000; | |
@@ -643,15 +649,21 b' pushes or large pushes::' | |||||
643 | Apache virtual host reverse proxy example |
|
649 | Apache virtual host reverse proxy example | |
644 | ----------------------------------------- |
|
650 | ----------------------------------------- | |
645 |
|
651 | |||
646 |
Here is a sample configuration file for |
|
652 | Here is a sample configuration file for Apache using proxy: | |
|
653 | ||||
|
654 | .. code-block:: apache | |||
647 |
|
655 | |||
648 | <VirtualHost *:80> |
|
656 | <VirtualHost *:80> | |
649 | ServerName hg.myserver.com |
|
657 | ServerName hg.myserver.com | |
650 | ServerAlias hg.myserver.com |
|
658 | ServerAlias hg.myserver.com | |
651 |
|
659 | |||
652 | <Proxy *> |
|
660 | <Proxy *> | |
653 | Order allow,deny |
|
661 | # For Apache 2.4 and later: | |
654 |
|
|
662 | Require all granted | |
|
663 | ||||
|
664 | # For Apache 2.2 and earlier, instead use: | |||
|
665 | # Order allow,deny | |||
|
666 | # Allow from all | |||
655 | </Proxy> |
|
667 | </Proxy> | |
656 |
|
668 | |||
657 | #important ! |
|
669 | #important ! | |
@@ -664,7 +676,6 b' Here is a sample configuration file for ' | |||||
664 |
|
676 | |||
665 | #to enable https use line below |
|
677 | #to enable https use line below | |
666 | #SetEnvIf X-Url-Scheme https HTTPS=1 |
|
678 | #SetEnvIf X-Url-Scheme https HTTPS=1 | |
667 |
|
||||
668 | </VirtualHost> |
|
679 | </VirtualHost> | |
669 |
|
680 | |||
670 |
|
681 | |||
@@ -675,7 +686,9 b' http://pylonsbook.com/en/1.1/deployment.' | |||||
675 | Apache as subdirectory |
|
686 | Apache as subdirectory | |
676 | ---------------------- |
|
687 | ---------------------- | |
677 |
|
688 | |||
678 |
Apache subdirectory part: |
|
689 | Apache subdirectory part: | |
|
690 | ||||
|
691 | .. code-block:: apache | |||
679 |
|
692 | |||
680 | <Location /<someprefix> > |
|
693 | <Location /<someprefix> > | |
681 | ProxyPass http://127.0.0.1:5000/<someprefix> |
|
694 | ProxyPass http://127.0.0.1:5000/<someprefix> | |
@@ -697,7 +710,7 b' Add the following at the end of the .ini' | |||||
697 |
|
710 | |||
698 | then change ``<someprefix>`` into your chosen prefix |
|
711 | then change ``<someprefix>`` into your chosen prefix | |
699 |
|
712 | |||
700 | Apache's WSGI config |
|
713 | Apache with mod_wsgi | |
701 | -------------------- |
|
714 | -------------------- | |
702 |
|
715 | |||
703 | Alternatively, Kallithea can be set up with Apache under mod_wsgi. For |
|
716 | Alternatively, Kallithea can be set up with Apache under mod_wsgi. For | |
@@ -719,7 +732,10 b" that, you'll need to:" | |||||
719 | as in the following example. Once again, check the paths are |
|
732 | as in the following example. Once again, check the paths are | |
720 | correctly specified. |
|
733 | correctly specified. | |
721 |
|
734 | |||
722 |
Here is a sample excerpt from an Apache Virtual Host configuration file: |
|
735 | Here is a sample excerpt from an Apache Virtual Host configuration file: | |
|
736 | ||||
|
737 | ||||
|
738 | .. code-block:: apache | |||
723 |
|
739 | |||
724 | WSGIDaemonProcess kallithea \ |
|
740 | WSGIDaemonProcess kallithea \ | |
725 | processes=1 threads=4 \ |
|
741 | processes=1 threads=4 \ | |
@@ -727,7 +743,9 b' Here is a sample excerpt from an Apache ' | |||||
727 | WSGIScriptAlias / /srv/kallithea/dispatch.wsgi |
|
743 | WSGIScriptAlias / /srv/kallithea/dispatch.wsgi | |
728 | WSGIPassAuthorization On |
|
744 | WSGIPassAuthorization On | |
729 |
|
745 | |||
730 |
Or if using a dispatcher WSGI script with proper virtualenv activation: |
|
746 | Or if using a dispatcher WSGI script with proper virtualenv activation: | |
|
747 | ||||
|
748 | .. code-block:: apache | |||
731 |
|
749 | |||
732 | WSGIDaemonProcess kallithea processes=1 threads=4 |
|
750 | WSGIDaemonProcess kallithea processes=1 threads=4 | |
733 | WSGIScriptAlias / /srv/kallithea/dispatch.wsgi |
|
751 | WSGIScriptAlias / /srv/kallithea/dispatch.wsgi | |
@@ -744,7 +762,9 b' Or if using a dispatcher WSGI script wit' | |||||
744 | gets it's own cache invalidation key. |
|
762 | gets it's own cache invalidation key. | |
745 |
|
763 | |||
746 |
|
764 | |||
747 |
Example WSGI dispatch script: |
|
765 | Example WSGI dispatch script: | |
|
766 | ||||
|
767 | .. code-block:: python | |||
748 |
|
768 | |||
749 | import os |
|
769 | import os | |
750 | os.environ["HGENCODING"] = "UTF-8" |
|
770 | os.environ["HGENCODING"] = "UTF-8" | |
@@ -762,7 +782,9 b' Example WSGI dispatch script::' | |||||
762 | fileConfig('/srv/kallithea/my.ini') |
|
782 | fileConfig('/srv/kallithea/my.ini') | |
763 | application = loadapp('config:/srv/kallithea/my.ini') |
|
783 | application = loadapp('config:/srv/kallithea/my.ini') | |
764 |
|
784 | |||
765 |
Or using proper virtualenv activation: |
|
785 | Or using proper virtualenv activation: | |
|
786 | ||||
|
787 | .. code-block:: python | |||
766 |
|
788 | |||
767 | activate_this = '/srv/kallithea/venv/bin/activate_this.py' |
|
789 | activate_this = '/srv/kallithea/venv/bin/activate_this.py' | |
768 | execfile(activate_this,dict(__file__=activate_this)) |
|
790 | execfile(activate_this, dict(__file__=activate_this)) | |
@@ -780,8 +802,10 b' Or using proper virtualenv activation::' | |||||
780 | Other configuration files |
|
802 | Other configuration files | |
781 | ------------------------- |
|
803 | ------------------------- | |
782 |
|
804 | |||
783 |
|
|
805 | A number of `example init.d scripts`__ can be found in | |
784 | https://kallithea-scm.org/repos/kallithea/files/tip/init.d/ . |
|
806 | the ``init.d`` directory of the Kallithea source. | |
|
807 | ||||
|
808 | .. __: https://kallithea-scm.org/repos/kallithea/files/tip/init.d/ . | |||
785 |
|
809 | |||
786 | .. _virtualenv: http://pypi.python.org/pypi/virtualenv |
|
810 | .. _virtualenv: http://pypi.python.org/pypi/virtualenv | |
787 | .. _python: http://www.python.org/ |
|
811 | .. _python: http://www.python.org/ |
@@ -5,7 +5,7 b' General Kallithea usage' | |||||
5 | ======================= |
|
5 | ======================= | |
6 |
|
6 | |||
7 |
|
7 | |||
8 |
Repository deletin |
|
8 | Repository deletion | |
9 | ------------------- |
|
9 | ------------------- | |
10 |
|
10 | |||
11 | Currently when an admin or owner deletes a repository, Kallithea does |
|
11 | Currently when an admin or owner deletes a repository, Kallithea does | |
@@ -13,7 +13,7 b' not physically delete said repository fr' | |||||
13 | renames it in a special way so that it is not possible to push, clone |
|
13 | renames it in a special way so that it is not possible to push, clone | |
14 | or access the repository. |
|
14 | or access the repository. | |
15 |
|
15 | |||
16 | There is a special command for cleaning up such archived repos:: |
|
16 | There is a special command for cleaning up such archived repositories:: | |
17 |
|
17 | |||
18 | paster cleanup-repos --older-than=30d my.ini |
|
18 | paster cleanup-repos --older-than=30d my.ini | |
19 |
|
19 | |||
@@ -70,17 +70,18 b' Creating a pull request' | |||||
70 | (and its ancestors) by selecting it and clicking the ``Open new pull request |
|
70 | (and its ancestors) by selecting it and clicking the ``Open new pull request | |
71 | for selected changesets`` button. |
|
71 | for selected changesets`` button. | |
72 |
|
72 | |||
|
73 | ||||
73 | Permanent repository URLs |
|
74 | Permanent repository URLs | |
74 | ------------------------- |
|
75 | ------------------------- | |
75 |
|
76 | |||
76 | Due to the complicated nature of repository grouping, URLs of repositories |
|
77 | Due to the complicated nature of repository grouping, URLs of repositories | |
77 | can often change. For example, a repository originally accessible from:: |
|
78 | can often change. For example, a repository originally accessible from:: | |
78 |
|
79 | |||
79 |
http:// |
|
80 | http://example.com/repo_name | |
80 |
|
81 | |||
81 | would get a new URL after moving it to test_group:: |
|
82 | would get a new URL after moving it to test_group:: | |
82 |
|
83 | |||
83 |
http:// |
|
84 | http://example.com/test_group/repo_name | |
84 |
|
85 | |||
85 | Such moving of a repository to a group can be an issue for build systems and |
|
86 | Such moving of a repository to a group can be an issue for build systems and | |
86 | other scripts where the repository paths are hardcoded. To mitigate this, |
|
87 | other scripts where the repository paths are hardcoded. To mitigate this, | |
@@ -92,15 +93,16 b' such URLs.' | |||||
92 |
|
93 | |||
93 | In the example, the repository could also be accessible as:: |
|
94 | In the example, the repository could also be accessible as:: | |
94 |
|
95 | |||
95 |
http:// |
|
96 | http://example.com/_<ID> | |
96 |
|
97 | |||
97 | The ID of a given repository can be shown from the repository ``Summary`` page, |
|
98 | The ID of a given repository can be shown from the repository ``Summary`` page, | |
98 | by selecting the ``Show by ID`` button next to ``Clone URL``. |
|
99 | by selecting the ``Show by ID`` button next to ``Clone URL``. | |
99 |
|
100 | |||
|
101 | ||||
100 | Email notifications |
|
102 | Email notifications | |
101 | ------------------- |
|
103 | ------------------- | |
102 |
|
104 | |||
103 | When the administrator correctly specified the email settings in the Kallithea |
|
105 | With email settings properly configured in the Kallithea | |
104 | configuration file, Kallithea will send emails on user registration and when |
|
106 | configuration file, Kallithea will send emails on user registration and when | |
105 | errors occur. |
|
107 | errors occur. | |
106 |
|
108 | |||
@@ -151,10 +153,11 b' features that merit further explanation.' | |||||
151 | Repository extra fields |
|
153 | Repository extra fields | |
152 | ~~~~~~~~~~~~~~~~~~~~~~~ |
|
154 | ~~~~~~~~~~~~~~~~~~~~~~~ | |
153 |
|
155 | |||
154 |
In the |
|
156 | In the *Visual* tab, there is an option "Use repository extra | |
155 |
fields |
|
157 | fields", which allows to set custom fields for each repository in the system. | |
156 | Each new field consists of 3 attributes: ``field key``, ``field label``, |
|
158 | ||
157 | ``field description``. |
|
159 | Once enabled site-wide, the custom fields can be edited per-repository under | |
|
160 | *Options* | *Settings* | *Extra Fields*. | |||
158 |
|
161 | |||
159 | Example usage of such fields would be to define company-specific information |
|
162 | Example usage of such fields would be to define company-specific information | |
160 | into repositories, e.g., defining a ``repo_manager`` key that would give info |
|
163 | into repositories, e.g., defining a ``repo_manager`` key that would give info | |
@@ -164,9 +167,9 b' Newly created fields are accessible via ' | |||||
164 | Meta tagging |
|
167 | Meta tagging | |
165 | ~~~~~~~~~~~~ |
|
168 | ~~~~~~~~~~~~ | |
166 |
|
169 | |||
167 |
In the |
|
170 | In the *Visual* tab, option "Stylify recognised meta tags" will cause Kallithea | |
168 |
to turn certain |
|
171 | to turn certain text fragments in repository and repository group | |
169 |
descriptions |
|
172 | descriptions into colored tags. Currently recognised tags are:: | |
170 |
|
173 | |||
171 | [featured] |
|
174 | [featured] | |
172 | [stale] |
|
175 | [stale] |
@@ -4,24 +4,24 b'' | |||||
4 | Repository locking |
|
4 | Repository locking | |
5 | ================== |
|
5 | ================== | |
6 |
|
6 | |||
7 |
Kallithea has a |
|
7 | Kallithea has a *repository locking* feature, disabled by default. When | |
8 | enabled, every initial clone and every pull gives users (with write permission) |
|
8 | enabled, every initial clone and every pull gives users (with write permission) | |
9 | the exclusive right to do a push. |
|
9 | the exclusive right to do a push. | |
10 |
|
10 | |||
11 |
When repository locking is enabled, repositories get a ``locked`` |
|
11 | When repository locking is enabled, repositories get a ``locked`` flag. | |
12 |
|
|
12 | The hg/git commands ``hg/git clone``, ``hg/git pull``, | |
13 | and ``hg/git push`` influence this state: |
|
13 | and ``hg/git push`` influence this state: | |
14 |
|
14 | |||
15 |
- A ``clone`` or ``pull`` action |
|
15 | - A ``clone`` or ``pull`` action locks the target repository | |
16 | if the user has write/admin permissions on this repository. |
|
16 | if the user has write/admin permissions on this repository. | |
17 |
|
17 | |||
18 | - Kallithea will remember the user who locked the repository so only this |
|
18 | - Kallithea will remember the user who locked the repository so only this | |
19 |
specific user can unlock the repo |
|
19 | specific user can unlock the repo by performing a ``push`` | |
20 | command. |
|
20 | command. | |
21 |
|
21 | |||
22 | - Every other command on a locked repository from this user and every command |
|
22 | - Every other command on a locked repository from this user and every command | |
23 | from any other user will result in an HTTP return code 423 (Locked). |
|
23 | from any other user will result in an HTTP return code 423 (Locked). | |
24 |
Additionally, the HTTP error |
|
24 | Additionally, the HTTP error will mention the user that locked the repository | |
25 | (e.g., “repository <repo> locked by user <user>”). |
|
25 | (e.g., “repository <repo> locked by user <user>”). | |
26 |
|
26 | |||
27 | Each repository can be manually unlocked by an administrator from the |
|
27 | Each repository can be manually unlocked by an administrator from the |
@@ -9,12 +9,12 b' performing slower than expected. Because' | |||||
9 | amounts of data from version control systems, here are some tips on how to get |
|
9 | amounts of data from version control systems, here are some tips on how to get | |
10 | the best performance. |
|
10 | the best performance. | |
11 |
|
11 | |||
12 |
* Kallithea |
|
12 | * Kallithea is often I/O bound, and hence a fast disk (SSD/SAN) is | |
13 |
more important t |
|
13 | usually more important than a fast CPU. | |
14 |
|
14 | |||
15 |
* Sl |
|
15 | * Sluggish loading of the front page can easily be fixed by grouping repositories or by | |
16 | increasing cache size (see below). This includes using the lightweight dashboard |
|
16 | increasing cache size (see below). This includes using the lightweight dashboard | |
17 | option and ``vcs_full_cache`` setting in .ini file |
|
17 | option and ``vcs_full_cache`` setting in .ini file. | |
18 |
|
18 | |||
19 |
|
19 | |||
20 | Follow these few steps to improve performance of Kallithea system. |
|
20 | Follow these few steps to improve performance of Kallithea system. | |
@@ -25,18 +25,18 b' 1. Increase cache' | |||||
25 | Tweak beaker cache settings in the ini file. The actual effect of that |
|
25 | Tweak beaker cache settings in the ini file. The actual effect of that | |
26 | is questionable. |
|
26 | is questionable. | |
27 |
|
27 | |||
28 |
2. Switch from |
|
28 | 2. Switch from SQLite to PostgreSQL or MySQL | |
29 |
|
29 | |||
30 |
|
|
30 | SQLite is a good option when having a small load on the system. But due to | |
31 |
locking issues with |
|
31 | locking issues with SQLite, it is not recommended to use it for larger | |
32 |
deployments. Switching to |
|
32 | deployments. Switching to MySQL or PostgreSQL will result in an immediate | |
33 | performance increase. A tool like SQLAlchemyGrate_ can be used for |
|
33 | performance increase. A tool like SQLAlchemyGrate_ can be used for | |
34 | migrating to another database platform. |
|
34 | migrating to another database platform. | |
35 |
|
35 | |||
36 | 3. Scale Kallithea horizontally |
|
36 | 3. Scale Kallithea horizontally | |
37 |
|
37 | |||
38 |
Scaling horizontally can give huge performance |
|
38 | Scaling horizontally can give huge performance benefits when dealing with | |
39 |
large traffic ( |
|
39 | large amounts of traffic (many users, CI servers, etc.). Kallithea can be | |
40 | scaled horizontally on one (recommended) or multiple machines. In order |
|
40 | scaled horizontally on one (recommended) or multiple machines. In order | |
41 | to scale horizontally you need to do the following: |
|
41 | to scale horizontally you need to do the following: | |
42 |
|
42 |
@@ -4,7 +4,7 b'' | |||||
4 | Repository statistics |
|
4 | Repository statistics | |
5 | ===================== |
|
5 | ===================== | |
6 |
|
6 | |||
7 |
Kallithea has a |
|
7 | Kallithea has a *repository statistics* feature, disabled by default. When | |
8 | enabled, the amount of commits per committer is visualized in a timeline. This |
|
8 | enabled, the amount of commits per committer is visualized in a timeline. This | |
9 | feature can be enabled using the ``Enable statistics`` checkbox on the |
|
9 | feature can be enabled using the ``Enable statistics`` checkbox on the | |
10 | repository ``Settings`` page. |
|
10 | repository ``Settings`` page. |
General Comments 0
You need to be logged in to leave comments.
Login now