##// END OF EJS Templates
setup: explicitly use python2 in examples in the documentation
Mads Kiilerich -
r5502:ae9ab4c9 stable
parent child Browse files
Show More
@@ -1,248 +1,248 b''
1 ================
1 ================
2 Kallithea README
2 Kallithea README
3 ================
3 ================
4
4
5
5
6 About
6 About
7 -----
7 -----
8
8
9 **Kallithea** is a fast and powerful management tool for Mercurial_ and Git_
9 **Kallithea** is a fast and powerful management tool for Mercurial_ and Git_
10 with a built-in push/pull server, full text search and code-review. It works on
10 with a built-in push/pull server, full text search and code-review. It works on
11 http/https and has a built in permission/authentication system with the ability
11 http/https and has a built in permission/authentication system with the ability
12 to authenticate via LDAP or ActiveDirectory. Kallithea also provides simple API
12 to authenticate via LDAP or ActiveDirectory. Kallithea also provides simple API
13 so it's easy to integrate with existing external systems.
13 so it's easy to integrate with existing external systems.
14
14
15 Kallithea is similar in some respects to GitHub_ or Bitbucket_, however
15 Kallithea is similar in some respects to GitHub_ or Bitbucket_, however
16 Kallithea can be run as standalone hosted application on your own server. It is
16 Kallithea can be run as standalone hosted application on your own server. It is
17 open-source donationware and focuses more on providing a customised,
17 open-source donationware and focuses more on providing a customised,
18 self-administered interface for Mercurial_ and Git_ repositories. Kallithea
18 self-administered interface for Mercurial_ and Git_ repositories. Kallithea
19 works on Unix-like systems and Windows, and is powered by the vcs_ library
19 works on Unix-like systems and Windows, and is powered by the vcs_ library
20 created by Łukasz Balcerzak and Marcin KuΕΊmiΕ„ski to uniformly handle multiple
20 created by Łukasz Balcerzak and Marcin KuΕΊmiΕ„ski to uniformly handle multiple
21 version control systems.
21 version control systems.
22
22
23 Kallithea was forked from RhodeCode in July 2014 and has been heavily modified.
23 Kallithea was forked from RhodeCode in July 2014 and has been heavily modified.
24
24
25
25
26 Installation
26 Installation
27 ------------
27 ------------
28
28
29 Kallithea requires Python_ 2.x and it is recommended to install it in a
29 Kallithea requires Python_ 2.x and it is recommended to install it in a
30 virtualenv_. Official releases of Kallithea can be installed with::
30 virtualenv_. Official releases of Kallithea can be installed with::
31
31
32 pip install kallithea
32 pip install kallithea
33
33
34 The development repository is kept very stable and used in production by the
34 The development repository is kept very stable and used in production by the
35 developers -- you can do the same.
35 developers -- you can do the same.
36
36
37 Please visit https://docs.kallithea-scm.org/en/latest/installation.html for
37 Please visit https://docs.kallithea-scm.org/en/latest/installation.html for
38 more details.
38 more details.
39
39
40 There is also an experimental `Puppet module`_ for installing and setting up
40 There is also an experimental `Puppet module`_ for installing and setting up
41 Kallithea. Currently, only basic functionality is provided, but it is still
41 Kallithea. Currently, only basic functionality is provided, but it is still
42 enough to get up and running quickly, especially for people without Python
42 enough to get up and running quickly, especially for people without Python
43 background. See
43 background. See
44 https://docs.kallithea-scm.org/en/latest/installation_puppet.html for further
44 https://docs.kallithea-scm.org/en/latest/installation_puppet.html for further
45 information.
45 information.
46
46
47
47
48 Source code
48 Source code
49 -----------
49 -----------
50
50
51 The latest sources can be obtained from
51 The latest sources can be obtained from
52 https://kallithea-scm.org/repos/kallithea.
52 https://kallithea-scm.org/repos/kallithea.
53
53
54 The issue tracker and a repository mirror can be found at Bitbucket_ on
54 The issue tracker and a repository mirror can be found at Bitbucket_ on
55 https://bitbucket.org/conservancy/kallithea.
55 https://bitbucket.org/conservancy/kallithea.
56
56
57
57
58 Kallithea features
58 Kallithea features
59 ------------------
59 ------------------
60
60
61 - Has its own middleware to handle Mercurial_ and Git_ protocol requests. Each
61 - Has its own middleware to handle Mercurial_ and Git_ protocol requests. Each
62 request is authenticated and logged together with IP address.
62 request is authenticated and logged together with IP address.
63 - Built for speed and performance. You can make multiple pulls/pushes
63 - Built for speed and performance. You can make multiple pulls/pushes
64 simultaneously. Proven to work with thousands of repositories and users.
64 simultaneously. Proven to work with thousands of repositories and users.
65 - Supports http/https, LDAP, AD, proxy-pass authentication.
65 - Supports http/https, LDAP, AD, proxy-pass authentication.
66 - Full permissions (private/read/write/admin) together with IP restrictions for
66 - Full permissions (private/read/write/admin) together with IP restrictions for
67 each repository, additional explicit forking, repositories group and
67 each repository, additional explicit forking, repositories group and
68 repository creation permissions.
68 repository creation permissions.
69 - User groups for easier permission management.
69 - User groups for easier permission management.
70 - Repository groups let you group repos and manage them easier. They come with
70 - Repository groups let you group repos and manage them easier. They come with
71 permission delegation features, so you can delegate groups management.
71 permission delegation features, so you can delegate groups management.
72 - Users can fork other users repos, and compare them at any time.
72 - Users can fork other users repos, and compare them at any time.
73 - Built-in versioned paste functionality (Gist) for sharing code snippets.
73 - Built-in versioned paste functionality (Gist) for sharing code snippets.
74 - Integrates easily with other systems, with custom created mappers you can
74 - Integrates easily with other systems, with custom created mappers you can
75 connect it to almost any issue tracker, and with a JSON-RPC API you can make
75 connect it to almost any issue tracker, and with a JSON-RPC API you can make
76 much more.
76 much more.
77 - Built-in commit API lets you add, edit and commit files right from Kallithea
77 - Built-in commit API lets you add, edit and commit files right from Kallithea
78 web interface using simple editor or upload binary files using simple form.
78 web interface using simple editor or upload binary files using simple form.
79 - Powerful pull request driven review system with inline commenting, changeset
79 - Powerful pull request driven review system with inline commenting, changeset
80 statuses, and notification system.
80 statuses, and notification system.
81 - Importing and syncing repositories from remote locations for Git_, Mercurial_
81 - Importing and syncing repositories from remote locations for Git_, Mercurial_
82 and Subversion.
82 and Subversion.
83 - Mako templates let you customize the look and feel of the application.
83 - Mako templates let you customize the look and feel of the application.
84 - Beautiful diffs, annotations and source code browsing all colored by
84 - Beautiful diffs, annotations and source code browsing all colored by
85 pygments. Raw diffs are made in Git-diff format for both VCS systems,
85 pygments. Raw diffs are made in Git-diff format for both VCS systems,
86 including Git_ binary-patches.
86 including Git_ binary-patches.
87 - Mercurial_ and Git_ DAG graphs and Flot-powered graphs with zooming and
87 - Mercurial_ and Git_ DAG graphs and Flot-powered graphs with zooming and
88 statistics to track activity for repositories.
88 statistics to track activity for repositories.
89 - Admin interface with user/permission management. Admin activity journal, logs
89 - Admin interface with user/permission management. Admin activity journal, logs
90 pulls, pushes, forks, registrations and other actions made by all users.
90 pulls, pushes, forks, registrations and other actions made by all users.
91 - Server side forks. It is possible to fork a project and modify it freely
91 - Server side forks. It is possible to fork a project and modify it freely
92 without breaking the main repository.
92 without breaking the main repository.
93 - reST and Markdown README support for repositories.
93 - reST and Markdown README support for repositories.
94 - Full text search powered by Whoosh on the source files, commit messages, and
94 - Full text search powered by Whoosh on the source files, commit messages, and
95 file names. Built-in indexing daemons, with optional incremental index build
95 file names. Built-in indexing daemons, with optional incremental index build
96 (no external search servers required all in one application).
96 (no external search servers required all in one application).
97 - Setup project descriptions/tags and info inside built in DB for easy,
97 - Setup project descriptions/tags and info inside built in DB for easy,
98 non-filesystem operations.
98 non-filesystem operations.
99 - Intelligent cache with invalidation after push or project change, provides
99 - Intelligent cache with invalidation after push or project change, provides
100 high performance and always up to date data.
100 high performance and always up to date data.
101 - RSS/Atom feeds, Gravatar support, downloadable sources as zip/tar/gz.
101 - RSS/Atom feeds, Gravatar support, downloadable sources as zip/tar/gz.
102 - Optional async tasks for speed and performance using Celery_.
102 - Optional async tasks for speed and performance using Celery_.
103 - Backup scripts can do backup of whole app and send it over scp to desired
103 - Backup scripts can do backup of whole app and send it over scp to desired
104 location.
104 location.
105 - Based on Pylons, SQLAlchemy, SQLite, Whoosh, vcs.
105 - Based on Pylons, SQLAlchemy, SQLite, Whoosh, vcs.
106
106
107
107
108 License
108 License
109 -------
109 -------
110
110
111 **Kallithea** is released under the GPLv3 license. Kallithea is a `Software
111 **Kallithea** is released under the GPLv3 license. Kallithea is a `Software
112 Freedom Conservancy`_ project and thus controlled by a non-profit organization.
112 Freedom Conservancy`_ project and thus controlled by a non-profit organization.
113 No commercial entity can take ownership of the project and change the
113 No commercial entity can take ownership of the project and change the
114 direction.
114 direction.
115
115
116 Kallithea started out as an effort to make sure the existing GPLv3 codebase
116 Kallithea started out as an effort to make sure the existing GPLv3 codebase
117 would stay available under a legal license. Kallithea thus has to stay GPLv3
117 would stay available under a legal license. Kallithea thus has to stay GPLv3
118 compatible ... but we are also happy it is GPLv3 and happy to keep it that way.
118 compatible ... but we are also happy it is GPLv3 and happy to keep it that way.
119 A different license (such as AGPL) could perhaps help attract a different
119 A different license (such as AGPL) could perhaps help attract a different
120 community with a different mix of Free Software people and companies but we are
120 community with a different mix of Free Software people and companies but we are
121 happy with the current focus.
121 happy with the current focus.
122
122
123
123
124 Community
124 Community
125 ---------
125 ---------
126
126
127 **Kallithea** is maintained by its users who contribute the fixes they would
127 **Kallithea** is maintained by its users who contribute the fixes they would
128 like to see.
128 like to see.
129
129
130 Get in touch with the rest of the community:
130 Get in touch with the rest of the community:
131
131
132 - Join the mailing list users and developers -- see
132 - Join the mailing list users and developers -- see
133 http://lists.sfconservancy.org/mailman/listinfo/kallithea-general.
133 http://lists.sfconservancy.org/mailman/listinfo/kallithea-general.
134
134
135 - Use IRC and join #kallithea on FreeNode (irc.freenode.net) or use
135 - Use IRC and join #kallithea on FreeNode (irc.freenode.net) or use
136 http://webchat.freenode.net/?channels=kallithea.
136 http://webchat.freenode.net/?channels=kallithea.
137
137
138 - Follow Kallithea on Twitter, **@KallitheaSCM**.
138 - Follow Kallithea on Twitter, **@KallitheaSCM**.
139
139
140 - Issues can be reported at `issue tracker
140 - Issues can be reported at `issue tracker
141 <https://bitbucket.org/conservancy/kallithea/issues>`_.
141 <https://bitbucket.org/conservancy/kallithea/issues>`_.
142
142
143 .. note::
143 .. note::
144
144
145 Please try to read the documentation before posting any issues,
145 Please try to read the documentation before posting any issues,
146 especially the **troubleshooting section**
146 especially the **troubleshooting section**
147
147
148
148
149 Online documentation
149 Online documentation
150 --------------------
150 --------------------
151
151
152 Online documentation for the current version of Kallithea is available at
152 Online documentation for the current version of Kallithea is available at
153 https://pythonhosted.org/Kallithea/. Documentation for the current development
153 https://pythonhosted.org/Kallithea/. Documentation for the current development
154 version can be found on https://docs.kallithea-scm.org/.
154 version can be found on https://docs.kallithea-scm.org/.
155
155
156 You can also build the documentation locally: go to ``docs/`` and run::
156 You can also build the documentation locally: go to ``docs/`` and run::
157
157
158 make html
158 make html
159
159
160 .. note:: You need to have Sphinx_ installed to build the
160 .. note:: You need to have Sphinx_ installed to build the
161 documentation. If you don't have Sphinx_ installed you can
161 documentation. If you don't have Sphinx_ installed you can
162 install it via the command: ``pip install sphinx`` .
162 install it via the command: ``pip install sphinx`` .
163
163
164
164
165 Converting from RhodeCode
165 Converting from RhodeCode
166 -------------------------
166 -------------------------
167
167
168 Currently, you have two options for working with an existing RhodeCode
168 Currently, you have two options for working with an existing RhodeCode
169 database:
169 database:
170
170
171 - keep the database unconverted (intended for testing and evaluation)
171 - keep the database unconverted (intended for testing and evaluation)
172 - convert the database in a one-time step
172 - convert the database in a one-time step
173
173
174 Maintaining interoperability
174 Maintaining interoperability
175 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
175 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
176
176
177 Interoperability with RhodeCode 2.2.X installations is provided so you don't
177 Interoperability with RhodeCode 2.2.X installations is provided so you don't
178 have to immediately commit to switching to Kallithea. This option will most
178 have to immediately commit to switching to Kallithea. This option will most
179 likely go away once the two projects have diverged significantly.
179 likely go away once the two projects have diverged significantly.
180
180
181 To run Kallithea on a RhodeCode database, run::
181 To run Kallithea on a RhodeCode database, run::
182
182
183 echo "BRAND = 'rhodecode'" > kallithea/brand.py
183 echo "BRAND = 'rhodecode'" > kallithea/brand.py
184
184
185 This location will depend on where you installed Kallithea. If you installed
185 This location will depend on where you installed Kallithea. If you installed
186 via::
186 via::
187
187
188 python setup.py install
188 python2 setup.py install
189
189
190 then you will find this location at
190 then you will find this location at
191 ``$VIRTUAL_ENV/lib/python2.7/site-packages/Kallithea-0.1-py2.7.egg/kallithea``.
191 ``$VIRTUAL_ENV/lib/python2.7/site-packages/Kallithea-0.1-py2.7.egg/kallithea``.
192
192
193 One-time conversion
193 One-time conversion
194 ~~~~~~~~~~~~~~~~~~~
194 ~~~~~~~~~~~~~~~~~~~
195
195
196 Alternatively, if you would like to convert the database for good, you can use
196 Alternatively, if you would like to convert the database for good, you can use
197 a helper script provided by Kallithea. This script will operate directly on the
197 a helper script provided by Kallithea. This script will operate directly on the
198 database, using the database string you can find in your ``production.ini`` (or
198 database, using the database string you can find in your ``production.ini`` (or
199 ``development.ini``) file. For example, if using SQLite::
199 ``development.ini``) file. For example, if using SQLite::
200
200
201 cd /path/to/kallithea
201 cd /path/to/kallithea
202 cp /path/to/rhodecode/rhodecode.db kallithea.db
202 cp /path/to/rhodecode/rhodecode.db kallithea.db
203 pip install sqlalchemy-migrate
203 pip install sqlalchemy-migrate
204 python kallithea/bin/rebranddb.py sqlite:///kallithea.db
204 python2 kallithea/bin/rebranddb.py sqlite:///kallithea.db
205
205
206 .. Note::
206 .. Note::
207
207
208 If you started out using the branding interoperability approach mentioned
208 If you started out using the branding interoperability approach mentioned
209 above, watch out for stray brand.pyc after removing brand.py.
209 above, watch out for stray brand.pyc after removing brand.py.
210
210
211 Git hooks
211 Git hooks
212 ~~~~~~~~~
212 ~~~~~~~~~
213
213
214 After switching to Kallithea, it will be necessary to update the Git_ hooks in
214 After switching to Kallithea, it will be necessary to update the Git_ hooks in
215 your repositories. If not, the Git_ hooks from RhodeCode will still be called,
215 your repositories. If not, the Git_ hooks from RhodeCode will still be called,
216 which will cause ``git push`` to fail every time.
216 which will cause ``git push`` to fail every time.
217
217
218 If you do not have any custom Git_ hooks deployed, perform the following steps
218 If you do not have any custom Git_ hooks deployed, perform the following steps
219 (this may take some time depending on the number and size of repositories you
219 (this may take some time depending on the number and size of repositories you
220 have):
220 have):
221
221
222 1. Log-in as an administrator.
222 1. Log-in as an administrator.
223
223
224 2. Open page *Admin > Settings > Remap and Rescan*.
224 2. Open page *Admin > Settings > Remap and Rescan*.
225
225
226 3. Turn on the option **Install Git Hooks**.
226 3. Turn on the option **Install Git Hooks**.
227
227
228 4. Turn on the option **Overwrite existing Git hooks**.
228 4. Turn on the option **Overwrite existing Git hooks**.
229
229
230 5. Click on the button **Rescan Repositories**.
230 5. Click on the button **Rescan Repositories**.
231
231
232 If you do have custom hooks, you will need to merge those changes manually. In
232 If you do have custom hooks, you will need to merge those changes manually. In
233 order to get sample hooks from Kallithea, the easiest way is to create a new Git_
233 order to get sample hooks from Kallithea, the easiest way is to create a new Git_
234 repository, and have a look at the hooks deployed there.
234 repository, and have a look at the hooks deployed there.
235
235
236
236
237 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
237 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
238 .. _Python: http://www.python.org/
238 .. _Python: http://www.python.org/
239 .. _Sphinx: http://sphinx.pocoo.org/
239 .. _Sphinx: http://sphinx.pocoo.org/
240 .. _Mercurial: http://mercurial.selenic.com/
240 .. _Mercurial: http://mercurial.selenic.com/
241 .. _Bitbucket: http://bitbucket.org/
241 .. _Bitbucket: http://bitbucket.org/
242 .. _GitHub: http://github.com/
242 .. _GitHub: http://github.com/
243 .. _Subversion: http://subversion.tigris.org/
243 .. _Subversion: http://subversion.tigris.org/
244 .. _Git: http://git-scm.com/
244 .. _Git: http://git-scm.com/
245 .. _Celery: http://celeryproject.org/
245 .. _Celery: http://celeryproject.org/
246 .. _vcs: http://pypi.python.org/pypi/vcs
246 .. _vcs: http://pypi.python.org/pypi/vcs
247 .. _Software Freedom Conservancy: http://sfconservancy.org/
247 .. _Software Freedom Conservancy: http://sfconservancy.org/
248 .. _Puppet module: https://forge.puppetlabs.com/rauch/kallithea
248 .. _Puppet module: https://forge.puppetlabs.com/rauch/kallithea
@@ -1,159 +1,159 b''
1 .. _contributing:
1 .. _contributing:
2
2
3 =========================
3 =========================
4 Contributing to Kallithea
4 Contributing to Kallithea
5 =========================
5 =========================
6
6
7 Kallithea is developed and maintained by its users. Please join us and scratch
7 Kallithea is developed and maintained by its users. Please join us and scratch
8 your own itch.
8 your own itch.
9
9
10
10
11 Infrastructure
11 Infrastructure
12 --------------
12 --------------
13
13
14 The main repository is hosted on Our Own Kallithea (aka OOK) at
14 The main repository is hosted on Our Own Kallithea (aka OOK) at
15 https://kallithea-scm.org/repos/kallithea/, our self-hosted instance
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 `pull requests`_ and `issue tracking`_. The
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`_ or :ref:`IRC <readme>` 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.
24 To register, you can use your Bitbucket or GitHub account. See :ref:`translations`
24 To register, you can use your Bitbucket or GitHub account. See :ref:`translations`
25 for more details.
25 for more details.
26
26
27
27
28 Getting started
28 Getting started
29 ---------------
29 ---------------
30
30
31 To get started with development::
31 To get started with development::
32
32
33 hg clone https://kallithea-scm.org/repos/kallithea
33 hg clone https://kallithea-scm.org/repos/kallithea
34 cd kallithea
34 cd kallithea
35 virtualenv ../kallithea-venv
35 virtualenv ../kallithea-venv
36 source ../kallithea-venv/bin/activate
36 source ../kallithea-venv/bin/activate
37 python setup.py develop
37 python2 setup.py develop
38 paster make-config Kallithea my.ini
38 paster make-config Kallithea my.ini
39 paster setup-db my.ini --user=user --email=user@example.com --password=password --repos=/tmp
39 paster setup-db my.ini --user=user --email=user@example.com --password=password --repos=/tmp
40 paster serve my.ini --reload &
40 paster serve my.ini --reload &
41 firefox http://127.0.0.1:5000/
41 firefox http://127.0.0.1:5000/
42
42
43 You can also start out by forking https://bitbucket.org/conservancy/kallithea
43 You can also start out by forking https://bitbucket.org/conservancy/kallithea
44 on Bitbucket_ and create a local clone of your own fork.
44 on Bitbucket_ and create a local clone of your own fork.
45
45
46
46
47 Running tests
47 Running tests
48 -------------
48 -------------
49
49
50 After finishing your changes make sure all tests pass cleanly. You can run
50 After finishing your changes make sure all tests pass cleanly. You can run
51 the testsuite running ``nosetests`` from the project root, or if you use tox
51 the testsuite running ``nosetests`` from the project root, or if you use tox
52 run ``tox`` for Python 2.6--2.7 with multiple database test.
52 run ``tox`` for Python 2.6--2.7 with multiple database test.
53
53
54 When running tests, Kallithea uses `kallithea/tests/test.ini` and populates the
54 When running tests, Kallithea uses `kallithea/tests/test.ini` and populates the
55 SQLite database specified there.
55 SQLite database specified there.
56
56
57 It is possible to avoid recreating the full test database on each invocation of
57 It is possible to avoid recreating the full test database on each invocation of
58 the tests, thus eliminating the initial delay. To achieve this, run the tests as::
58 the tests, thus eliminating the initial delay. To achieve this, run the tests as::
59
59
60 paster serve kallithea/tests/test.ini --pid-file=test.pid --daemon
60 paster serve kallithea/tests/test.ini --pid-file=test.pid --daemon
61 KALLITHEA_WHOOSH_TEST_DISABLE=1 KALLITHEA_NO_TMP_PATH=1 nosetests
61 KALLITHEA_WHOOSH_TEST_DISABLE=1 KALLITHEA_NO_TMP_PATH=1 nosetests
62 kill -9 $(cat test.pid)
62 kill -9 $(cat test.pid)
63
63
64 You can run individual tests by specifying their path as argument to nosetests.
64 You can run individual tests by specifying their path as argument to nosetests.
65 nosetests also has many more options, see `nosetests -h`. Some useful options
65 nosetests also has many more options, see `nosetests -h`. Some useful options
66 are::
66 are::
67
67
68 -x, --stop Stop running tests after the first error or failure
68 -x, --stop Stop running tests after the first error or failure
69 -s, --nocapture Don't capture stdout (any stdout output will be
69 -s, --nocapture Don't capture stdout (any stdout output will be
70 printed immediately) [NOSE_NOCAPTURE]
70 printed immediately) [NOSE_NOCAPTURE]
71 --failed Run the tests that failed in the last test run.
71 --failed Run the tests that failed in the last test run.
72
72
73
73
74 Coding/contribution guidelines
74 Coding/contribution guidelines
75 ------------------------------
75 ------------------------------
76
76
77 Kallithea is GPLv3 and we assume all contributions are made by the
77 Kallithea is GPLv3 and we assume all contributions are made by the
78 committer/contributor and under GPLv3 unless explicitly stated. We do care a
78 committer/contributor and under GPLv3 unless explicitly stated. We do care a
79 lot about preservation of copyright and license information for existing code
79 lot about preservation of copyright and license information for existing code
80 that is brought into the project.
80 that is brought into the project.
81
81
82 We don't have a formal coding/formatting standard. We are currently using a mix
82 We don't have a formal coding/formatting standard. We are currently using a mix
83 of Mercurial (http://mercurial.selenic.com/wiki/CodingStyle), pep8, and
83 of Mercurial (http://mercurial.selenic.com/wiki/CodingStyle), pep8, and
84 consistency with existing code. Run whitespacecleanup.sh to avoid stupid
84 consistency with existing code. Run whitespacecleanup.sh to avoid stupid
85 whitespace noise in your patches.
85 whitespace noise in your patches.
86
86
87 We support both Python 2.6.x and 2.7.x and nothing else. For now we don't care
87 We support both Python 2.6.x and 2.7.x and nothing else. For now we don't care
88 about Python 3 compatibility.
88 about Python 3 compatibility.
89
89
90 We try to support the most common modern web browsers. IE9 is still supported
90 We try to support the most common modern web browsers. IE9 is still supported
91 to the extent it is feasible, IE8 is not.
91 to the extent it is feasible, IE8 is not.
92
92
93 We primarily support Linux and OS X on the server side but Windows should also work.
93 We primarily support Linux and OS X on the server side but Windows should also work.
94
94
95 HTML templates should use 2 spaces for indentation ... but be pragmatic. We
95 HTML templates should use 2 spaces for indentation ... but be pragmatic. We
96 should use templates cleverly and avoid duplication. We should use reasonable
96 should use templates cleverly and avoid duplication. We should use reasonable
97 semantic markup with element classes and IDs that can be used for styling and testing.
97 semantic markup with element classes and IDs that can be used for styling and testing.
98 We should only use inline styles in places where it really is semantic (such as
98 We should only use inline styles in places where it really is semantic (such as
99 ``display: none``).
99 ``display: none``).
100
100
101 JavaScript must use ``;`` between/after statements. Indentation 4 spaces. Inline
101 JavaScript must use ``;`` between/after statements. Indentation 4 spaces. Inline
102 multiline functions should be indented two levels -- one for the ``()`` and one for
102 multiline functions should be indented two levels -- one for the ``()`` and one for
103 ``{}``.
103 ``{}``.
104 Variables holding jQuery objects should be named with a leading ``$``.
104 Variables holding jQuery objects should be named with a leading ``$``.
105
105
106 Commit messages should have a leading short line summarizing the changes. For
106 Commit messages should have a leading short line summarizing the changes. For
107 bug fixes, put ``(Issue #123)`` at the end of this line.
107 bug fixes, put ``(Issue #123)`` at the end of this line.
108
108
109 Use American English grammar and spelling overall. Use `English title case`_ for
109 Use American English grammar and spelling overall. Use `English title case`_ for
110 page titles, button labels, headers, and 'labels' for fields in forms.
110 page titles, button labels, headers, and 'labels' for fields in forms.
111
111
112 .. _English title case: https://en.wikipedia.org/wiki/Capitalization#Title_case
112 .. _English title case: https://en.wikipedia.org/wiki/Capitalization#Title_case
113
113
114 Contributions will be accepted in most formats -- such as pull requests on
114 Contributions will be accepted in most formats -- such as pull requests on
115 bitbucket, something hosted on your own Kallithea instance, or patches sent by
115 bitbucket, something hosted on your own Kallithea instance, or patches sent by
116 email to the `kallithea-general`_ mailing list.
116 email to the `kallithea-general`_ mailing list.
117
117
118 Make sure to test your changes both manually and with the automatic tests
118 Make sure to test your changes both manually and with the automatic tests
119 before posting.
119 before posting.
120
120
121 We care about quality and review and keeping a clean repository history. We
121 We care about quality and review and keeping a clean repository history. We
122 might give feedback that requests polishing contributions until they are
122 might give feedback that requests polishing contributions until they are
123 "perfect". We might also rebase and collapse and make minor adjustments to your
123 "perfect". We might also rebase and collapse and make minor adjustments to your
124 changes when we apply them.
124 changes when we apply them.
125
125
126 We try to make sure we have consensus on the direction the project is taking.
126 We try to make sure we have consensus on the direction the project is taking.
127 Everything non-sensitive should be discussed in public -- preferably on the
127 Everything non-sensitive should be discussed in public -- preferably on the
128 mailing list. We aim at having all non-trivial changes reviewed by at least
128 mailing list. We aim at having all non-trivial changes reviewed by at least
129 one other core developer before pushing. Obvious non-controversial changes will
129 one other core developer before pushing. Obvious non-controversial changes will
130 be handled more casually.
130 be handled more casually.
131
131
132 For now we just have one official branch ("default") and will keep it so stable
132 For now we just have one official branch ("default") and will keep it so stable
133 that it can be (and is) used in production. Experimental changes should live
133 that it can be (and is) used in production. Experimental changes should live
134 elsewhere (for example in a pull request) until they are ready.
134 elsewhere (for example in a pull request) until they are ready.
135
135
136 .. _translations:
136 .. _translations:
137 .. include:: ./../kallithea/i18n/how_to
137 .. include:: ./../kallithea/i18n/how_to
138
138
139
139
140 "Roadmap"
140 "Roadmap"
141 ---------
141 ---------
142
142
143 We do not have a road map but are waiting for your contributions. Refer to the
143 We do not have a road map but are waiting for your contributions. Refer to the
144 wiki_ for some ideas of places we might want to go -- contributions in these
144 wiki_ for some ideas of places we might want to go -- contributions in these
145 areas are very welcome.
145 areas are very welcome.
146
146
147
147
148 Thank you for your contribution!
148 Thank you for your contribution!
149 --------------------------------
149 --------------------------------
150
150
151
151
152 .. _Weblate: http://weblate.org/
152 .. _Weblate: http://weblate.org/
153 .. _issue tracking: https://bitbucket.org/conservancy/kallithea/issues?status=new&status=open
153 .. _issue tracking: https://bitbucket.org/conservancy/kallithea/issues?status=new&status=open
154 .. _pull requests: https://bitbucket.org/conservancy/kallithea/pull-requests
154 .. _pull requests: https://bitbucket.org/conservancy/kallithea/pull-requests
155 .. _bitbucket: http://bitbucket.org/
155 .. _bitbucket: http://bitbucket.org/
156 .. _mailing list: http://lists.sfconservancy.org/mailman/listinfo/kallithea-general
156 .. _mailing list: http://lists.sfconservancy.org/mailman/listinfo/kallithea-general
157 .. _kallithea-general: http://lists.sfconservancy.org/mailman/listinfo/kallithea-general
157 .. _kallithea-general: http://lists.sfconservancy.org/mailman/listinfo/kallithea-general
158 .. _Hosted Weblate: https://hosted.weblate.org/projects/kallithea/kallithea/
158 .. _Hosted Weblate: https://hosted.weblate.org/projects/kallithea/kallithea/
159 .. _wiki: https://bitbucket.org/conservancy/kallithea/wiki/Home
159 .. _wiki: https://bitbucket.org/conservancy/kallithea/wiki/Home
@@ -1,200 +1,200 b''
1 .. _installation:
1 .. _installation:
2
2
3 ==========================
3 ==========================
4 Installation on Unix/Linux
4 Installation on Unix/Linux
5 ==========================
5 ==========================
6
6
7 The following describes three different ways of installing 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 up-to-date and track any local customizations is to run directly from
10 up-to-date and track any local customizations is to run directly from
11 source in a Kallithea repository clone, preferably inside a virtualenv
11 source in a Kallithea repository clone, preferably inside a virtualenv
12 virtual Python environment.
12 virtual Python environment.
13
13
14 - :ref:`installation-virtualenv`: If you prefer to only use released versions
14 - :ref:`installation-virtualenv`: If you prefer to only use released versions
15 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
16 Python environment using `virtualenv`. The advantages of this method over
16 Python environment using `virtualenv`. The advantages of this method over
17 direct installation is that Kallithea and its dependencies are completely
17 direct installation is that Kallithea and its dependencies are completely
18 contained inside the virtualenv (which also means you can have multiple
18 contained inside the virtualenv (which also means you can have multiple
19 installations side by side or remove it entirely by just removing the
19 installations side by side or remove it entirely by just removing the
20 virtualenv directory) and does not require root privileges.
20 virtualenv directory) and does not require root privileges.
21
21
22 - :ref:`installation-without-virtualenv`: The alternative method of installing
22 - :ref:`installation-without-virtualenv`: The alternative method of installing
23 a Kallithea release is using standard pip. The package will be installed in
23 a Kallithea release is using standard pip. The package will be installed in
24 the same location as all other Python packages you have ever installed. As a
24 the same location as all other Python packages you have ever installed. As a
25 result, removing it is not as straightforward as with a virtualenv, as you'd
25 result, removing it is not as straightforward as with a virtualenv, as you'd
26 have to remove its dependencies manually and make sure that they are not
26 have to remove its dependencies manually and make sure that they are not
27 needed by other packages.
27 needed by other packages.
28
28
29 .. _installation-source:
29 .. _installation-source:
30
30
31
31
32 Installation from repository source
32 Installation from repository source
33 -----------------------------------
33 -----------------------------------
34
34
35 To install Kallithea in a virtualenv_ using the stable branch of the development
35 To install Kallithea in a virtualenv_ using the stable branch of the development
36 repository, follow the instructions below::
36 repository, follow the instructions below::
37
37
38 hg clone https://kallithea-scm.org/repos/kallithea -u stable
38 hg clone https://kallithea-scm.org/repos/kallithea -u stable
39 cd kallithea
39 cd kallithea
40 virtualenv ../kallithea-venv
40 virtualenv ../kallithea-venv
41 source ../kallithea-venv/bin/activate
41 source ../kallithea-venv/bin/activate
42 python setup.py develop
42 python2 setup.py develop
43 python setup.py compile_catalog # for translation of the UI
43 python2 setup.py compile_catalog # for translation of the UI
44
44
45 You can now proceed to :ref:`setup`.
45 You can now proceed to :ref:`setup`.
46
46
47 To upgrade, simply update the repository with ``hg pull -u`` and restart the
47 To upgrade, simply update the repository with ``hg pull -u`` and restart the
48 server.
48 server.
49
49
50 .. _installation-virtualenv:
50 .. _installation-virtualenv:
51
51
52
52
53 Installing a released version in a virtualenv
53 Installing a released version in a virtualenv
54 ---------------------------------------------
54 ---------------------------------------------
55
55
56 It is highly recommended to use a separate virtualenv_ for installing Kallithea.
56 It is highly recommended to use a separate virtualenv_ for installing Kallithea.
57 This way, all libraries required by Kallithea will be installed separately from your
57 This way, all libraries required by Kallithea will be installed separately from your
58 main Python installation and other applications and things will be less
58 main Python installation and other applications and things will be less
59 problematic when upgrading the system or Kallithea.
59 problematic when upgrading the system or Kallithea.
60 An additional benefit of virtualenv_ is that it doesn't require root privileges.
60 An additional benefit of virtualenv_ is that it doesn't require root privileges.
61
61
62 - Assuming you have installed virtualenv_, create a new virtual environment
62 - Assuming you have installed virtualenv_, create a new virtual environment
63 for example, in `/srv/kallithea/venv`, using the virtualenv command::
63 for example, in `/srv/kallithea/venv`, using the virtualenv command::
64
64
65 virtualenv /srv/kallithea/venv
65 virtualenv /srv/kallithea/venv
66
66
67 - Activate the virtualenv_ in your current shell session by running::
67 - Activate the virtualenv_ in your current shell session by running::
68
68
69 source /srv/kallithea/venv/bin/activate
69 source /srv/kallithea/venv/bin/activate
70
70
71 .. note:: You can't use UNIX ``sudo`` to source the ``virtualenv`` script; it
71 .. note:: You can't use UNIX ``sudo`` to source the ``virtualenv`` script; it
72 will "activate" a shell that terminates immediately. It is also perfectly
72 will "activate" a shell that terminates immediately. It is also perfectly
73 acceptable (and desirable) to create a virtualenv as a normal user.
73 acceptable (and desirable) to create a virtualenv as a normal user.
74
74
75 - Make a folder for Kallithea data files, and configuration somewhere on the
75 - Make a folder for Kallithea data files, and configuration somewhere on the
76 filesystem. For example::
76 filesystem. For example::
77
77
78 mkdir /srv/kallithea
78 mkdir /srv/kallithea
79
79
80 - Go into the created directory and run this command to install Kallithea::
80 - Go into the created directory and run this command to install Kallithea::
81
81
82 pip install kallithea
82 pip install kallithea
83
83
84 Alternatively, download a .tar.gz from http://pypi.python.org/pypi/Kallithea,
84 Alternatively, download a .tar.gz from http://pypi.python.org/pypi/Kallithea,
85 extract it and run::
85 extract it and run::
86
86
87 python setup.py install
87 python2 setup.py install
88
88
89 - This will install Kallithea together with pylons_ and all other required
89 - This will install Kallithea together with pylons_ and all other required
90 python libraries into the activated virtualenv.
90 python libraries into the activated virtualenv.
91
91
92 You can now proceed to :ref:`setup`.
92 You can now proceed to :ref:`setup`.
93
93
94 .. _installation-without-virtualenv:
94 .. _installation-without-virtualenv:
95
95
96
96
97 Installing a released version without virtualenv
97 Installing a released version without virtualenv
98 ------------------------------------------------
98 ------------------------------------------------
99
99
100 For installation without virtualenv, 'just' use::
100 For installation without virtualenv, 'just' use::
101
101
102 pip install kallithea
102 pip install kallithea
103
103
104 Note that this method requires root privileges and will install packages
104 Note that this method requires root privileges and will install packages
105 globally without using the system's package manager.
105 globally without using the system's package manager.
106
106
107 To install as a regular user in ``~/.local``, you can use::
107 To install as a regular user in ``~/.local``, you can use::
108
108
109 pip install --user kallithea
109 pip install --user kallithea
110
110
111 You can now proceed to :ref:`setup`.
111 You can now proceed to :ref:`setup`.
112
112
113
113
114 Upgrading Kallithea from Python Package Index (PyPI)
114 Upgrading Kallithea from Python Package Index (PyPI)
115 ----------------------------------------------------
115 ----------------------------------------------------
116
116
117 .. note::
117 .. note::
118 It is strongly recommended that you **always** perform a database and
118 It is strongly recommended that you **always** perform a database and
119 configuration backup before doing an upgrade.
119 configuration backup before doing an upgrade.
120
120
121 These directions will use '{version}' to note that this is the version of
121 These directions will use '{version}' to note that this is the version of
122 Kallithea that these files were used with. If backing up your Kallithea
122 Kallithea that these files were used with. If backing up your Kallithea
123 instance from version 0.1 to 0.2, the ``my.ini`` file could be
123 instance from version 0.1 to 0.2, the ``my.ini`` file could be
124 backed up to ``my.ini.0-1``.
124 backed up to ``my.ini.0-1``.
125
125
126 If using a SQLite database, stop the Kallithea process/daemon/service, and
126 If using a SQLite database, stop the Kallithea process/daemon/service, and
127 then make a copy of the database file::
127 then make a copy of the database file::
128
128
129 service kallithea stop
129 service kallithea stop
130 cp kallithea.db kallithea.db.{version}
130 cp kallithea.db kallithea.db.{version}
131
131
132 Back up your configuration file::
132 Back up your configuration file::
133
133
134 cp my.ini my.ini.{version}
134 cp my.ini my.ini.{version}
135
135
136 Ensure that you are using the Python virtual environment that you originally
136 Ensure that you are using the Python virtual environment that you originally
137 installed Kallithea in by running::
137 installed Kallithea in by running::
138
138
139 pip freeze
139 pip freeze
140
140
141 This will list all packages installed in the current environment. If
141 This will list all packages installed in the current environment. If
142 Kallithea isn't listed, activate the correct virtual environment::
142 Kallithea isn't listed, activate the correct virtual environment::
143
143
144 source /srv/kallithea/venv/bin/activate
144 source /srv/kallithea/venv/bin/activate
145
145
146 Once you have verified the environment you can upgrade Kallithea with::
146 Once you have verified the environment you can upgrade Kallithea with::
147
147
148 pip install --upgrade kallithea
148 pip install --upgrade kallithea
149
149
150 Then run the following command from the installation directory::
150 Then run the following command from the installation directory::
151
151
152 paster make-config Kallithea my.ini
152 paster make-config Kallithea my.ini
153
153
154 This will display any changes made by the new version of Kallithea to your
154 This will display any changes made by the new version of Kallithea to your
155 current configuration. It will try to perform an automerge. It is recommended
155 current configuration. It will try to perform an automerge. It is recommended
156 that you recheck the content after the automerge.
156 that you recheck the content after the automerge.
157
157
158 .. note::
158 .. note::
159 Please always make sure your .ini files are up to date. Errors can
159 Please always make sure your .ini files are up to date. Errors can
160 often be caused by missing parameters added in new versions.
160 often be caused by missing parameters added in new versions.
161
161
162 It is also recommended that you rebuild the whoosh index after upgrading since
162 It is also recommended that you rebuild the whoosh index after upgrading since
163 the new whoosh version could introduce some incompatible index changes. Please
163 the new whoosh version could introduce some incompatible index changes. Please
164 read the changelog to see if there were any changes to whoosh.
164 read the changelog to see if there were any changes to whoosh.
165
165
166 The final step is to upgrade the database. To do this simply run::
166 The final step is to upgrade the database. To do this simply run::
167
167
168 paster upgrade-db my.ini
168 paster upgrade-db my.ini
169
169
170 This will upgrade the schema and update some of the defaults in the database,
170 This will upgrade the schema and update some of the defaults in the database,
171 and will always recheck the settings of the application, if there are no new
171 and will always recheck the settings of the application, if there are no new
172 options that need to be set.
172 options that need to be set.
173
173
174 .. note::
174 .. note::
175 The DB schema upgrade library has some limitations and can sometimes fail if you try to
175 The DB schema upgrade library has some limitations and can sometimes fail if you try to
176 upgrade from older major releases. In such a case simply run upgrades sequentially, e.g.,
176 upgrade from older major releases. In such a case simply run upgrades sequentially, e.g.,
177 upgrading from 0.1.X to 0.3.X should be done like this: 0.1.X. > 0.2.X > 0.3.X
177 upgrading from 0.1.X to 0.3.X should be done like this: 0.1.X. > 0.2.X > 0.3.X
178 You can always specify what version of Kallithea you want to install for example in pip
178 You can always specify what version of Kallithea you want to install for example in pip
179 `pip install Kallithea==0.2`
179 `pip install Kallithea==0.2`
180
180
181 You may find it helpful to clear out your log file so that new errors are
181 You may find it helpful to clear out your log file so that new errors are
182 readily apparent::
182 readily apparent::
183
183
184 echo > kallithea.log
184 echo > kallithea.log
185
185
186 Once that is complete, you may now start your upgraded Kallithea Instance::
186 Once that is complete, you may now start your upgraded Kallithea Instance::
187
187
188 service kallithea start
188 service kallithea start
189
189
190 Or::
190 Or::
191
191
192 paster serve /srv/kallithea/my.ini
192 paster serve /srv/kallithea/my.ini
193
193
194 .. note::
194 .. note::
195 If you're using Celery, make sure you restart all instances of it after
195 If you're using Celery, make sure you restart all instances of it after
196 upgrade.
196 upgrade.
197
197
198
198
199 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
199 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
200 .. _pylons: http://www.pylonsproject.org/
200 .. _pylons: http://www.pylonsproject.org/
@@ -1,110 +1,110 b''
1 .. _installation_iis:
1 .. _installation_iis:
2
2
3 =====================================================================
3 =====================================================================
4 Installing Kallithea on Microsoft Internet Information Services (IIS)
4 Installing Kallithea on Microsoft Internet Information Services (IIS)
5 =====================================================================
5 =====================================================================
6
6
7 The following is documented using IIS 7/8 terminology. There should be nothing
7 The following is documented using IIS 7/8 terminology. There should be nothing
8 preventing you from applying this on IIS 6 well.
8 preventing you from applying this on IIS 6 well.
9
9
10 .. note::
10 .. note::
11
11
12 For the best security, it is strongly recommended to only host the site over
12 For the best security, it is strongly recommended to only host the site over
13 a secure connection, e.g. using TLS.
13 a secure connection, e.g. using TLS.
14
14
15
15
16 Prerequisites
16 Prerequisites
17 -------------
17 -------------
18
18
19 Apart from the normal requirements for Kallithea, it is also necessary to get an
19 Apart from the normal requirements for Kallithea, it is also necessary to get an
20 ISAPI-WSGI bridge module, e.g. isapi-wsgi.
20 ISAPI-WSGI bridge module, e.g. isapi-wsgi.
21
21
22
22
23 Installation
23 Installation
24 ------------
24 ------------
25
25
26 The following assumes that your Kallithea is at ``c:\inetpub\kallithea``, and
26 The following assumes that your Kallithea is at ``c:\inetpub\kallithea``, and
27 will be served from the root of its own website. The changes to serve it in its
27 will be served from the root of its own website. The changes to serve it in its
28 own virtual folder will be noted where appropriate.
28 own virtual folder will be noted where appropriate.
29
29
30 Application pool
30 Application pool
31 ................
31 ................
32
32
33 Make sure that there is a unique application pool for the Kallithea application
33 Make sure that there is a unique application pool for the Kallithea application
34 with an identity that has read access to the Kallithea distribution.
34 with an identity that has read access to the Kallithea distribution.
35
35
36 The application pool does not need to be able to run any managed code. If you
36 The application pool does not need to be able to run any managed code. If you
37 are using a 32-bit Python installation, then you must enable 32-bit program in
37 are using a 32-bit Python installation, then you must enable 32-bit program in
38 the advanced settings for the application pool; otherwise Python will not be able
38 the advanced settings for the application pool; otherwise Python will not be able
39 to run on the website and neither will Kallithea.
39 to run on the website and neither will Kallithea.
40
40
41 .. note::
41 .. note::
42
42
43 The application pool can be the same as an existing application pool,
43 The application pool can be the same as an existing application pool,
44 as long as the Kallithea requirements are met by the existing pool.
44 as long as the Kallithea requirements are met by the existing pool.
45
45
46 ISAPI handler
46 ISAPI handler
47 .............
47 .............
48
48
49 The ISAPI handler can be generated using::
49 The ISAPI handler can be generated using::
50
50
51 paster install-iis my.ini --root=/
51 paster install-iis my.ini --root=/
52
52
53 This will generate a ``dispatch.py`` file in the current directory that contains
53 This will generate a ``dispatch.py`` file in the current directory that contains
54 the necessary components to finalize an installation into IIS. Once this file
54 the necessary components to finalize an installation into IIS. Once this file
55 has been generated, it is necessary to run the following command due to the way
55 has been generated, it is necessary to run the following command due to the way
56 that ISAPI-WSGI is made::
56 that ISAPI-WSGI is made::
57
57
58 python dispatch.py install
58 python2 dispatch.py install
59
59
60 This accomplishes two things: generating an ISAPI compliant DLL file,
60 This accomplishes two things: generating an ISAPI compliant DLL file,
61 ``_dispatch.dll``, and installing a script map handler into IIS for the
61 ``_dispatch.dll``, and installing a script map handler into IIS for the
62 ``--root`` specified above pointing to ``_dispatch.dll``.
62 ``--root`` specified above pointing to ``_dispatch.dll``.
63
63
64 The ISAPI handler is registered to all file extensions, so it will automatically
64 The ISAPI handler is registered to all file extensions, so it will automatically
65 be the one handling all requests to the specified root. When the website starts
65 be the one handling all requests to the specified root. When the website starts
66 the ISAPI handler, it will start a thread pool managed wrapper around the paster
66 the ISAPI handler, it will start a thread pool managed wrapper around the paster
67 middleware WSGI handler that Kallithea runs within and each HTTP request to the
67 middleware WSGI handler that Kallithea runs within and each HTTP request to the
68 site will be processed through this logic henceforth.
68 site will be processed through this logic henceforth.
69
69
70 Authentication with Kallithea using IIS authentication modules
70 Authentication with Kallithea using IIS authentication modules
71 ..............................................................
71 ..............................................................
72
72
73 The recommended way to handle authentication with Kallithea using IIS is to let
73 The recommended way to handle authentication with Kallithea using IIS is to let
74 IIS handle all the authentication and just pass it to Kallithea.
74 IIS handle all the authentication and just pass it to Kallithea.
75
75
76 To move responsibility into IIS from Kallithea, we need to configure Kallithea
76 To move responsibility into IIS from Kallithea, we need to configure Kallithea
77 to let external systems handle authentication and then let Kallithea create the
77 to let external systems handle authentication and then let Kallithea create the
78 user automatically. To do this, access the administration's authentication page
78 user automatically. To do this, access the administration's authentication page
79 and enable the ``kallithea.lib.auth_modules.auth_container`` plugin. Once it is
79 and enable the ``kallithea.lib.auth_modules.auth_container`` plugin. Once it is
80 added, enable it with the ``REMOTE_USER`` header and check *Clean username*.
80 added, enable it with the ``REMOTE_USER`` header and check *Clean username*.
81 Finally, save the changes on this page.
81 Finally, save the changes on this page.
82
82
83 Switch to the administration's permissions page and disable anonymous access,
83 Switch to the administration's permissions page and disable anonymous access,
84 otherwise Kallithea will not attempt to use the authenticated user name. By
84 otherwise Kallithea will not attempt to use the authenticated user name. By
85 default, Kallithea will populate the list of users lazily as they log in. Either
85 default, Kallithea will populate the list of users lazily as they log in. Either
86 disable external auth account activation and ensure that you pre-populate the
86 disable external auth account activation and ensure that you pre-populate the
87 user database with an external tool, or set it to *Automatic activation of
87 user database with an external tool, or set it to *Automatic activation of
88 external account*. Finally, save the changes.
88 external account*. Finally, save the changes.
89
89
90 The last necessary step is to enable the relevant authentication in IIS, e.g.
90 The last necessary step is to enable the relevant authentication in IIS, e.g.
91 Windows authentication.
91 Windows authentication.
92
92
93
93
94 Troubleshooting
94 Troubleshooting
95 ---------------
95 ---------------
96
96
97 Typically, any issues in this setup will either be entirely in IIS or entirely
97 Typically, any issues in this setup will either be entirely in IIS or entirely
98 in Kallithea (or Kallithea's WSGI/paster middleware). Consequently, two
98 in Kallithea (or Kallithea's WSGI/paster middleware). Consequently, two
99 different options for finding issues exist: IIS' failed request tracking which
99 different options for finding issues exist: IIS' failed request tracking which
100 is great at finding issues until they exist inside Kallithea, at which point the
100 is great at finding issues until they exist inside Kallithea, at which point the
101 ISAPI-WSGI wrapper above uses ``win32traceutil``, which is part of ``pywin32``.
101 ISAPI-WSGI wrapper above uses ``win32traceutil``, which is part of ``pywin32``.
102
102
103 In order to dump output from WSGI using ``win32traceutil`` it is sufficient to
103 In order to dump output from WSGI using ``win32traceutil`` it is sufficient to
104 type the following in a console window::
104 type the following in a console window::
105
105
106 python -m win32traceutil
106 python2 -m win32traceutil
107
107
108 and any exceptions occurring in the WSGI layer and below (i.e. in the Kallithea
108 and any exceptions occurring in the WSGI layer and below (i.e. in the Kallithea
109 application itself) that are uncaught, will be printed here complete with stack
109 application itself) that are uncaught, will be printed here complete with stack
110 traces, making it a lot easier to identify issues.
110 traces, making it a lot easier to identify issues.
@@ -1,244 +1,244 b''
1 .. _installation_win:
1 .. _installation_win:
2
2
3 ================================================================
3 ================================================================
4 Installation and upgrade on Windows (7/Server 2008 R2 and newer)
4 Installation and upgrade on Windows (7/Server 2008 R2 and newer)
5 ================================================================
5 ================================================================
6
6
7
7
8 First time install
8 First time install
9 ::::::::::::::::::
9 ::::::::::::::::::
10
10
11 Target OS: Windows 7 and newer or Windows Server 2008 R2 and newer
11 Target OS: Windows 7 and newer or Windows Server 2008 R2 and newer
12
12
13 Tested on Windows 8.1, Windows Server 2008 R2 and Windows Server 2012
13 Tested on Windows 8.1, Windows Server 2008 R2 and Windows Server 2012
14
14
15 To install on an older version of Windows, see `<installation_win_old.html>`_
15 To install on an older version of Windows, see `<installation_win_old.html>`_
16
16
17 Step 1 -- Install Python
17 Step 1 -- Install Python
18 ------------------------
18 ------------------------
19
19
20 Install Python 2.x.y (x = 6 or 7). Latest version is recommended. If you need another version, they can run side by side.
20 Install Python 2.x.y (x = 6 or 7). Latest version is recommended. If you need another version, they can run side by side.
21
21
22 .. warning:: Python 3.x is not supported.
22 .. warning:: Python 3.x is not supported.
23
23
24 - Download Python 2.x.y from http://www.python.org/download/
24 - Download Python 2.x.y from http://www.python.org/download/
25 - Choose and click on the version
25 - Choose and click on the version
26 - Click on "Windows X86-64 Installer" for x64 or "Windows x86 MSI installer" for Win32.
26 - Click on "Windows X86-64 Installer" for x64 or "Windows x86 MSI installer" for Win32.
27 - Disable UAC or run the installer with admin privileges. If you chose to disable UAC, do not forget to reboot afterwards.
27 - Disable UAC or run the installer with admin privileges. If you chose to disable UAC, do not forget to reboot afterwards.
28
28
29 While writing this guide, the latest version was v2.7.9.
29 While writing this guide, the latest version was v2.7.9.
30 Remember the specific major and minor versions installed, because they will
30 Remember the specific major and minor versions installed, because they will
31 be needed in the next step. In this case, it is "2.7".
31 be needed in the next step. In this case, it is "2.7".
32
32
33 Step 2 -- Python BIN
33 Step 2 -- Python BIN
34 --------------------
34 --------------------
35
35
36 Add Python BIN folder to the path. This can be done manually (editing
36 Add Python BIN folder to the path. This can be done manually (editing
37 "PATH" environment variable) or by using Windows Support Tools that
37 "PATH" environment variable) or by using Windows Support Tools that
38 come pre-installed in Windows Vista/7 and later.
38 come pre-installed in Windows Vista/7 and later.
39
39
40 Open a CMD and type::
40 Open a CMD and type::
41
41
42 SETX PATH "%PATH%;[your-python-path]" /M
42 SETX PATH "%PATH%;[your-python-path]" /M
43
43
44 Please substitute [your-python-path] with your Python installation
44 Please substitute [your-python-path] with your Python installation
45 path. Typically this is ``C:\\Python27``.
45 path. Typically this is ``C:\\Python27``.
46
46
47 Step 3 -- Install pywin32 extensions
47 Step 3 -- Install pywin32 extensions
48 ------------------------------------
48 ------------------------------------
49
49
50 Download pywin32 from:
50 Download pywin32 from:
51 http://sourceforge.net/projects/pywin32/files/
51 http://sourceforge.net/projects/pywin32/files/
52
52
53 - Click on "pywin32" folder
53 - Click on "pywin32" folder
54 - Click on the first folder (in this case, Build 219, maybe newer when you try)
54 - Click on the first folder (in this case, Build 219, maybe newer when you try)
55 - Choose the file ending with ".amd64-py2.x.exe" (".win32-py2.x.exe"
55 - Choose the file ending with ".amd64-py2.x.exe" (".win32-py2.x.exe"
56 for Win32) where x is the minor version of Python you installed.
56 for Win32) where x is the minor version of Python you installed.
57 When writing this guide, the file was:
57 When writing this guide, the file was:
58 http://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/pywin32-219.win-amd64-py2.7.exe/download
58 http://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/pywin32-219.win-amd64-py2.7.exe/download
59 (x64)
59 (x64)
60 http://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/pywin32-219.win32-py2.7.exe/download
60 http://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/pywin32-219.win32-py2.7.exe/download
61 (Win32)
61 (Win32)
62
62
63 Step 4 -- Install pip
63 Step 4 -- Install pip
64 ---------------------
64 ---------------------
65
65
66 pip is a package management system for Python. You will need it to install Kallithea and its dependencies.
66 pip is a package management system for Python. You will need it to install Kallithea and its dependencies.
67
67
68 If you installed Python 2.7.9+, you already have it (as long as you ran the installer with admin privileges or disabled UAC).
68 If you installed Python 2.7.9+, you already have it (as long as you ran the installer with admin privileges or disabled UAC).
69
69
70 If it was not installed or if you are using Python>=2.6,<2.7.9:
70 If it was not installed or if you are using Python>=2.6,<2.7.9:
71
71
72 - Go to https://bootstrap.pypa.io
72 - Go to https://bootstrap.pypa.io
73 - Right-click on get-pip.py and choose Saves as...
73 - Right-click on get-pip.py and choose Saves as...
74 - Run "python get-pip.py" in the folder where you downloaded get-pip.py (may require admin access).
74 - Run "python2 get-pip.py" in the folder where you downloaded get-pip.py (may require admin access).
75
75
76 .. note::
76 .. note::
77
77
78 See http://stackoverflow.com/questions/4750806/how-to-install-pip-on-windows
78 See http://stackoverflow.com/questions/4750806/how-to-install-pip-on-windows
79 for details and alternative methods.
79 for details and alternative methods.
80
80
81 Note that pip.exe will be placed inside your Python installation's
81 Note that pip.exe will be placed inside your Python installation's
82 Scripts folder, which is likely not on your path. To correct this,
82 Scripts folder, which is likely not on your path. To correct this,
83 open a CMD and type::
83 open a CMD and type::
84
84
85 SETX PATH "%PATH%;[your-python-path]\Scripts" /M
85 SETX PATH "%PATH%;[your-python-path]\Scripts" /M
86
86
87 Step 5 -- Kallithea folder structure
87 Step 5 -- Kallithea folder structure
88 ------------------------------------
88 ------------------------------------
89
89
90 Create a Kallithea folder structure.
90 Create a Kallithea folder structure.
91
91
92 This is only an example to install Kallithea. Of course, you can
92 This is only an example to install Kallithea. Of course, you can
93 change it. However, this guide will follow the proposed structure, so
93 change it. However, this guide will follow the proposed structure, so
94 please later adapt the paths if you change them. Folders without
94 please later adapt the paths if you change them. Folders without
95 spaces are recommended.
95 spaces are recommended.
96
96
97 Create the following folder structure::
97 Create the following folder structure::
98
98
99 C:\Kallithea
99 C:\Kallithea
100 C:\Kallithea\Bin
100 C:\Kallithea\Bin
101 C:\Kallithea\Env
101 C:\Kallithea\Env
102 C:\Kallithea\Repos
102 C:\Kallithea\Repos
103
103
104 Step 6 -- Install virtualenv
104 Step 6 -- Install virtualenv
105 ----------------------------
105 ----------------------------
106
106
107 .. note::
107 .. note::
108 A python virtual environment will allow for isolation between the Python packages of your system and those used for Kallithea.
108 A python virtual environment will allow for isolation between the Python packages of your system and those used for Kallithea.
109 It is strongly recommended to use it to ensure that Kallithea does not change a dependency that other software uses or vice versa.
109 It is strongly recommended to use it to ensure that Kallithea does not change a dependency that other software uses or vice versa.
110
110
111 In a command prompt type::
111 In a command prompt type::
112
112
113 pip install virtualenv
113 pip install virtualenv
114
114
115 Virtualenv will now be inside your Python Scripts path (C:\\Python27\\Scripts or similar).
115 Virtualenv will now be inside your Python Scripts path (C:\\Python27\\Scripts or similar).
116
116
117 To create a virtual environment, run::
117 To create a virtual environment, run::
118
118
119 virtualenv C:\Kallithea\Env
119 virtualenv C:\Kallithea\Env
120
120
121 Step 7 -- Install Kallithea
121 Step 7 -- Install Kallithea
122 ---------------------------
122 ---------------------------
123
123
124 In order to install Kallithea, you need to be able to run "pip install kallithea". It will use pip to install the Kallithea Python package and its dependencies.
124 In order to install Kallithea, you need to be able to run "pip install kallithea". It will use pip to install the Kallithea Python package and its dependencies.
125 Some Python packages use managed code and need to be compiled.
125 Some Python packages use managed code and need to be compiled.
126 This can be done on Linux without any special steps. On Windows, you will need to install Microsoft Visual C++ compiler for Python 2.7.
126 This can be done on Linux without any special steps. On Windows, you will need to install Microsoft Visual C++ compiler for Python 2.7.
127
127
128 Download and install "Microsoft Visual C++ Compiler for Python 2.7" from http://aka.ms/vcpython27
128 Download and install "Microsoft Visual C++ Compiler for Python 2.7" from http://aka.ms/vcpython27
129
129
130 .. note::
130 .. note::
131 You can also install the dependencies using already compiled Windows binaries packages. A good source of compiled Python packages is http://www.lfd.uci.edu/~gohlke/pythonlibs/. However, not all of the necessary packages for Kallithea are on this site and some are hard to find, so we will stick with using the compiler.
131 You can also install the dependencies using already compiled Windows binaries packages. A good source of compiled Python packages is http://www.lfd.uci.edu/~gohlke/pythonlibs/. However, not all of the necessary packages for Kallithea are on this site and some are hard to find, so we will stick with using the compiler.
132
132
133 In a command prompt type (adapting paths if necessary)::
133 In a command prompt type (adapting paths if necessary)::
134
134
135 cd C:\Kallithea\Env\Scripts
135 cd C:\Kallithea\Env\Scripts
136 activate
136 activate
137
137
138 The prompt will change into "(Env) C:\\Kallithea\\Env\\Scripts" or similar
138 The prompt will change into "(Env) C:\\Kallithea\\Env\\Scripts" or similar
139 (depending of your folder structure). Then type::
139 (depending of your folder structure). Then type::
140
140
141 pip install kallithea
141 pip install kallithea
142
142
143 .. note:: This will take some time. Please wait patiently until it is fully
143 .. note:: This will take some time. Please wait patiently until it is fully
144 complete. Some warnings will appear. Don't worry, they are
144 complete. Some warnings will appear. Don't worry, they are
145 normal.
145 normal.
146
146
147 Step 8 -- Install git (optional)
147 Step 8 -- Install git (optional)
148 --------------------------------
148 --------------------------------
149
149
150 Mercurial being a python package, it was installed automatically when doing "pip install kallithea".
150 Mercurial being a python package, it was installed automatically when doing "pip install kallithea".
151
151
152 You need to install git manually if you want Kallithea to be able to host git repositories.
152 You need to install git manually if you want Kallithea to be able to host git repositories.
153
153
154 See http://git-scm.com/book/en/v2/Getting-Started-Installing-Git#Installing-on-Windows for instructions.
154 See http://git-scm.com/book/en/v2/Getting-Started-Installing-Git#Installing-on-Windows for instructions.
155
155
156 Step 9 -- Configuring Kallithea
156 Step 9 -- Configuring Kallithea
157 -------------------------------
157 -------------------------------
158
158
159 Steps taken from `<setup.html>`_
159 Steps taken from `<setup.html>`_
160
160
161 You have to use the same command prompt as in Step 7, so if you closed
161 You have to use the same command prompt as in Step 7, so if you closed
162 it, reopen it following the same commands (including the "activate"
162 it, reopen it following the same commands (including the "activate"
163 one). When ready, type::
163 one). When ready, type::
164
164
165 cd C:\Kallithea\Bin
165 cd C:\Kallithea\Bin
166 paster make-config Kallithea production.ini
166 paster make-config Kallithea production.ini
167
167
168 Then you must edit production.ini to fit your needs (IP address, IP
168 Then you must edit production.ini to fit your needs (IP address, IP
169 port, mail settings, database, etc.). `NotePad++`__ or a similar text
169 port, mail settings, database, etc.). `NotePad++`__ or a similar text
170 editor is recommended to properly handle the newline character
170 editor is recommended to properly handle the newline character
171 differences between Unix and Windows.
171 differences between Unix and Windows.
172
172
173 __ http://notepad-plus-plus.org/
173 __ http://notepad-plus-plus.org/
174
174
175 For the sake of simplicity, run it with the default settings. After your edits (if any) in the previous command prompt, type::
175 For the sake of simplicity, run it with the default settings. After your edits (if any) in the previous command prompt, type::
176
176
177 paster setup-db production.ini
177 paster setup-db production.ini
178
178
179 .. warning:: This time a *new* database will be installed. You must
179 .. warning:: This time a *new* database will be installed. You must
180 follow a different step to later *upgrade* to a newer
180 follow a different step to later *upgrade* to a newer
181 Kallithea version)
181 Kallithea version)
182
182
183 The script will ask you for confirmation about creating a new database, answer yes (y)
183 The script will ask you for confirmation about creating a new database, answer yes (y)
184
184
185 The script will ask you for the repository path, answer C:\\Kallithea\\Repos (or similar).
185 The script will ask you for the repository path, answer C:\\Kallithea\\Repos (or similar).
186
186
187 The script will ask you for the admin username and password, answer "admin" + "123456" (or whatever you want)
187 The script will ask you for the admin username and password, answer "admin" + "123456" (or whatever you want)
188
188
189 The script will ask you for admin mail, answer "admin@xxxx.com" (or whatever you want).
189 The script will ask you for admin mail, answer "admin@xxxx.com" (or whatever you want).
190
190
191 If you make a mistake and the script doesn't end, don't worry: start it again.
191 If you make a mistake and the script doesn't end, don't worry: start it again.
192
192
193 If you decided not to install git, you will get errors about it that you can ignore.
193 If you decided not to install git, you will get errors about it that you can ignore.
194
194
195 Step 10 -- Running Kallithea
195 Step 10 -- Running Kallithea
196 ----------------------------
196 ----------------------------
197
197
198 In the previous command prompt, being in the C:\\Kallithea\\Bin folder, type::
198 In the previous command prompt, being in the C:\\Kallithea\\Bin folder, type::
199
199
200 paster serve production.ini
200 paster serve production.ini
201
201
202 Open your web server, and go to http://127.0.0.1:5000
202 Open your web server, and go to http://127.0.0.1:5000
203
203
204 It works!! :-)
204 It works!! :-)
205
205
206 Remark:
206 Remark:
207 If it does not work the first time, Ctrl-C the CMD process and start it again. Don't forget the "http://" in Internet Explorer.
207 If it does not work the first time, Ctrl-C the CMD process and start it again. Don't forget the "http://" in Internet Explorer.
208
208
209 What this guide does not cover:
209 What this guide does not cover:
210
210
211 - Installing Celery
211 - Installing Celery
212 - Running Kallithea as a Windows Service. You can investigate here:
212 - Running Kallithea as a Windows Service. You can investigate here:
213
213
214 - http://pypi.python.org/pypi/wsgisvc
214 - http://pypi.python.org/pypi/wsgisvc
215 - http://ryrobes.com/python/running-python-scripts-as-a-windows-service/
215 - http://ryrobes.com/python/running-python-scripts-as-a-windows-service/
216 - http://wiki.pylonshq.com/display/pylonscookbook/How+to+run+Pylons+as+a+Windows+service
216 - http://wiki.pylonshq.com/display/pylonscookbook/How+to+run+Pylons+as+a+Windows+service
217
217
218 - Using Apache. You can investigate here:
218 - Using Apache. You can investigate here:
219
219
220 - https://groups.google.com/group/rhodecode/msg/c433074e813ffdc4
220 - https://groups.google.com/group/rhodecode/msg/c433074e813ffdc4
221
221
222
222
223 Upgrading
223 Upgrading
224 :::::::::
224 :::::::::
225
225
226 Stop running Kallithea
226 Stop running Kallithea
227 Open a CommandPrompt like in Step 7 (cd to C:\Kallithea\Env\Scripts and activate) and type::
227 Open a CommandPrompt like in Step 7 (cd to C:\Kallithea\Env\Scripts and activate) and type::
228
228
229 pip install kallithea --upgrade
229 pip install kallithea --upgrade
230 cd \Kallithea\Bin
230 cd \Kallithea\Bin
231
231
232 Backup your production.ini file now.
232 Backup your production.ini file now.
233
233
234 Then run::
234 Then run::
235
235
236 paster make-config Kallithea production.ini
236 paster make-config Kallithea production.ini
237
237
238 Look for changes and update your production.ini accordingly.
238 Look for changes and update your production.ini accordingly.
239
239
240 Next, update the database::
240 Next, update the database::
241
241
242 paster upgrade-db production.ini
242 paster upgrade-db production.ini
243
243
244 More details can be found in `<upgrade.html>`_.
244 More details can be found in `<upgrade.html>`_.
@@ -1,281 +1,281 b''
1 .. _installation_win_old:
1 .. _installation_win_old:
2
2
3 ======================================================================
3 ======================================================================
4 Installation and upgrade on Windows (XP/Vista/Server 2003/Server 2008)
4 Installation and upgrade on Windows (XP/Vista/Server 2003/Server 2008)
5 ======================================================================
5 ======================================================================
6
6
7
7
8 First-time install
8 First-time install
9 ::::::::::::::::::
9 ::::::::::::::::::
10
10
11 Target OS: Windows XP SP3 32-bit English (Clean installation)
11 Target OS: Windows XP SP3 32-bit English (Clean installation)
12 + All Windows Updates until 24-may-2012
12 + All Windows Updates until 24-may-2012
13
13
14 .. note::
14 .. note::
15
15
16 This installation is for 32-bit systems, for 64-bit Windows you might need
16 This installation is for 32-bit systems, for 64-bit Windows you might need
17 to download proper 64-bit versions of the different packages (Windows Installer, Win32py extensions)
17 to download proper 64-bit versions of the different packages (Windows Installer, Win32py extensions)
18 plus some extra tweaks.
18 plus some extra tweaks.
19 These extra steps haven been marked as "64-bit".
19 These extra steps haven been marked as "64-bit".
20 Tested on Windows Server 2008 R2 SP1, 9-feb-2013.
20 Tested on Windows Server 2008 R2 SP1, 9-feb-2013.
21 If you run into any 64-bit related problems, please check these pages:
21 If you run into any 64-bit related problems, please check these pages:
22
22
23 - http://blog.victorjabur.com/2011/06/05/compiling-python-2-7-modules-on-windows-32-and-64-using-msvc-2008-express/
23 - http://blog.victorjabur.com/2011/06/05/compiling-python-2-7-modules-on-windows-32-and-64-using-msvc-2008-express/
24 - http://bugs.python.org/issue7511
24 - http://bugs.python.org/issue7511
25
25
26 Step 1 -- Install Visual Studio 2008 Express
26 Step 1 -- Install Visual Studio 2008 Express
27 --------------------------------------------
27 --------------------------------------------
28
28
29 Optional: You can also install MinGW, but VS2008 installation is easier.
29 Optional: You can also install MinGW, but VS2008 installation is easier.
30
30
31 Download "Visual C++ 2008 Express Edition with SP1" from:
31 Download "Visual C++ 2008 Express Edition with SP1" from:
32 http://download.microsoft.com/download/E/8/E/E8EEB394-7F42-4963-A2D8-29559B738298/VS2008ExpressWithSP1ENUX1504728.iso
32 http://download.microsoft.com/download/E/8/E/E8EEB394-7F42-4963-A2D8-29559B738298/VS2008ExpressWithSP1ENUX1504728.iso
33 (if not found or relocated, google for "visual studio 2008 express" for updated link. This link was taken from http://stackoverflow.com/questions/15318560/visual-c-2008-express-download-link-dead)
33 (if not found or relocated, google for "visual studio 2008 express" for updated link. This link was taken from http://stackoverflow.com/questions/15318560/visual-c-2008-express-download-link-dead)
34
34
35 You can also download full ISO file for offline installation, just
35 You can also download full ISO file for offline installation, just
36 choose "All -- Offline Install ISO image file" in the previous page and
36 choose "All -- Offline Install ISO image file" in the previous page and
37 choose "Visual C++ 2008 Express" when installing.
37 choose "Visual C++ 2008 Express" when installing.
38
38
39 .. note::
39 .. note::
40
40
41 Using other versions of Visual Studio will lead to random crashes.
41 Using other versions of Visual Studio will lead to random crashes.
42 You must use Visual Studio 2008!"
42 You must use Visual Studio 2008!"
43
43
44 .. note::
44 .. note::
45
45
46 Silverlight Runtime and SQL Server 2008 Express Edition are not
46 Silverlight Runtime and SQL Server 2008 Express Edition are not
47 required, you can uncheck them
47 required, you can uncheck them
48
48
49 .. note::
49 .. note::
50
50
51 64-bit: You also need to install the Microsoft Windows SDK for .NET 3.5 SP1 (.NET 4.0 won't work).
51 64-bit: You also need to install the Microsoft Windows SDK for .NET 3.5 SP1 (.NET 4.0 won't work).
52 Download from: http://www.microsoft.com/en-us/download/details.aspx?id=3138
52 Download from: http://www.microsoft.com/en-us/download/details.aspx?id=3138
53
53
54 .. note::
54 .. note::
55
55
56 64-bit: You also need to copy and rename a .bat file to make the Visual C++ compiler work.
56 64-bit: You also need to copy and rename a .bat file to make the Visual C++ compiler work.
57 I am not sure why this is not necessary for 32-bit.
57 I am not sure why this is not necessary for 32-bit.
58 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 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
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 (32-bit). 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" (32-bit 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 64-bit: Just download and install the 64-bit version of python.
74 64-bit: Just download and install the 64-bit version of python.
75
75
76 Step 3 -- Install Win32py extensions
76 Step 3 -- Install Win32py extensions
77 ------------------------------------
77 ------------------------------------
78
78
79 Download pywin32 from:
79 Download pywin32 from:
80 http://sourceforge.net/projects/pywin32/files/
80 http://sourceforge.net/projects/pywin32/files/
81
81
82 - Click on "pywin32" folder
82 - Click on "pywin32" folder
83 - Click on the first folder (in this case, Build 217, maybe newer when you try)
83 - Click on the first folder (in this case, Build 217, maybe newer when you try)
84 - Choose the file ending with ".win32-py2.x.exe" -> x being the minor
84 - Choose the file ending with ".win32-py2.x.exe" -> x being the minor
85 version of Python you installed (in this case, 7)
85 version of Python you installed (in this case, 7)
86 When writing this guide, the file was:
86 When writing this guide, the file was:
87 http://sourceforge.net/projects/pywin32/files/pywin32/Build%20217/pywin32-217.win32-py2.7.exe/download
87 http://sourceforge.net/projects/pywin32/files/pywin32/Build%20217/pywin32-217.win32-py2.7.exe/download
88
88
89 .. note::
89 .. note::
90
90
91 64-bit: Download and install the 64-bit version.
91 64-bit: Download and install the 64-bit version.
92 At the time of writing you can find this at:
92 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
93 http://sourceforge.net/projects/pywin32/files/pywin32/Build%20218/pywin32-218.win-amd64-py2.7.exe/download
94
94
95 Step 4 -- Python BIN
95 Step 4 -- Python BIN
96 --------------------
96 --------------------
97
97
98 Add Python BIN folder to the path
98 Add Python BIN folder to the path
99
99
100 You have to add the Python folder to the path, you can do it manually
100 You have to add the Python folder to the path, you can do it manually
101 (editing "PATH" environment variable) or using Windows Support Tools
101 (editing "PATH" environment variable) or using Windows Support Tools
102 that came preinstalled in Vista/7 and can be installed in Windows XP.
102 that came preinstalled in Vista/7 and can be installed in Windows XP.
103
103
104 - Using support tools on WINDOWS XP:
104 - Using support tools on WINDOWS XP:
105 If you use Windows XP you can install them using Windows XP CD and
105 If you use Windows XP you can install them using Windows XP CD and
106 navigating to \SUPPORT\TOOLS. There, execute Setup.EXE (not MSI).
106 navigating to \SUPPORT\TOOLS. There, execute Setup.EXE (not MSI).
107 Afterwards, open a CMD and type::
107 Afterwards, open a CMD and type::
108
108
109 SETX PATH "%PATH%;[your-python-path]" -M
109 SETX PATH "%PATH%;[your-python-path]" -M
110
110
111 Close CMD (the path variable will be updated then)
111 Close CMD (the path variable will be updated then)
112
112
113 - Using support tools on WINDOWS Vista/7:
113 - Using support tools on WINDOWS Vista/7:
114
114
115 Open a CMD and type::
115 Open a CMD and type::
116
116
117 SETX PATH "%PATH%;[your-python-path]" /M
117 SETX PATH "%PATH%;[your-python-path]" /M
118
118
119 Please substitute [your-python-path] with your Python installation path.
119 Please substitute [your-python-path] with your Python installation path.
120 Typically: C:\\Python27
120 Typically: C:\\Python27
121
121
122 Step 5 -- Kallithea folder structure
122 Step 5 -- Kallithea folder structure
123 ------------------------------------
123 ------------------------------------
124
124
125 Create a Kallithea folder structure
125 Create a Kallithea folder structure
126
126
127 This is only a example to install Kallithea, you can of course change
127 This is only a example to install Kallithea, you can of course change
128 it. However, this guide will follow the proposed structure, so please
128 it. However, this guide will follow the proposed structure, so please
129 later adapt the paths if you change them. My recommendation is to use
129 later adapt the paths if you change them. My recommendation is to use
130 folders with NO SPACES. But you can try if you are brave...
130 folders with NO SPACES. But you can try if you are brave...
131
131
132 Create the following folder structure::
132 Create the following folder structure::
133
133
134 C:\Kallithea
134 C:\Kallithea
135 C:\Kallithea\Bin
135 C:\Kallithea\Bin
136 C:\Kallithea\Env
136 C:\Kallithea\Env
137 C:\Kallithea\Repos
137 C:\Kallithea\Repos
138
138
139 Step 6 -- Install virtualenv
139 Step 6 -- Install virtualenv
140 ----------------------------
140 ----------------------------
141
141
142 Install Virtual Env for Python
142 Install Virtual Env for Python
143
143
144 Navigate to: http://www.virtualenv.org/en/latest/index.html#installation
144 Navigate to: http://www.virtualenv.org/en/latest/index.html#installation
145 Right click on "virtualenv.py" file and choose "Save link as...".
145 Right click on "virtualenv.py" file and choose "Save link as...".
146 Download to C:\\Kallithea (or whatever you want)
146 Download to C:\\Kallithea (or whatever you want)
147 (the file is located at
147 (the file is located at
148 https://raw.github.com/pypa/virtualenv/master/virtualenv.py)
148 https://raw.github.com/pypa/virtualenv/master/virtualenv.py)
149
149
150 Create a virtual Python environment in C:\\Kallithea\\Env (or similar). To
150 Create a virtual Python environment in C:\\Kallithea\\Env (or similar). To
151 do so, open a CMD (Python Path should be included in Step3), navigate
151 do so, open a CMD (Python Path should be included in Step3), navigate
152 where you downloaded "virtualenv.py", and write::
152 where you downloaded "virtualenv.py", and write::
153
153
154 python virtualenv.py C:\Kallithea\Env
154 python2 virtualenv.py C:\Kallithea\Env
155
155
156 (--no-site-packages is now the default behaviour of virtualenv, no need
156 (--no-site-packages is now the default behaviour of virtualenv, no need
157 to include it)
157 to include it)
158
158
159 Step 7 -- Install Kallithea
159 Step 7 -- Install Kallithea
160 ---------------------------
160 ---------------------------
161
161
162 Finally, install Kallithea
162 Finally, install Kallithea
163
163
164 Close previously opened command prompt/s, and open a Visual Studio 2008
164 Close previously opened command prompt/s, and open a Visual Studio 2008
165 Command Prompt (**IMPORTANT!!**). To do so, go to Start Menu, and then open
165 Command Prompt (**IMPORTANT!!**). To do so, go to Start Menu, and then open
166 "Microsoft Visual C++ 2008 Express Edition" -> "Visual Studio Tools" ->
166 "Microsoft Visual C++ 2008 Express Edition" -> "Visual Studio Tools" ->
167 "Visual Studio 2008 Command Prompt"
167 "Visual Studio 2008 Command Prompt"
168
168
169 .. note::
169 .. note::
170
170
171 64-bit: For 64-bit you need to modify the shortcut that is used to start the
171 64-bit: For 64-bit you need to modify the shortcut that is used to start the
172 Visual Studio 2008 Command Prompt. Use right-mouse click to open properties.
172 Visual Studio 2008 Command Prompt. Use right-mouse click to open properties.
173
173
174 Change commandline from::
174 Change commandline from::
175
175
176 %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"" x86
176 %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"" x86
177
177
178 to::
178 to::
179
179
180 %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"" amd64
180 %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"" amd64
181
181
182 In that CMD (loaded with VS2008 PATHs) type::
182 In that CMD (loaded with VS2008 PATHs) type::
183
183
184 cd C:\Kallithea\Env\Scripts (or similar)
184 cd C:\Kallithea\Env\Scripts (or similar)
185 activate
185 activate
186
186
187 The prompt will change into "(Env) C:\\Kallithea\\Env\\Scripts" or similar
187 The prompt will change into "(Env) C:\\Kallithea\\Env\\Scripts" or similar
188 (depending of your folder structure). Then type::
188 (depending of your folder structure). Then type::
189
189
190 pip install kallithea
190 pip install kallithea
191
191
192 (long step, please wait until fully complete)
192 (long step, please wait until fully complete)
193
193
194 Some warnings will appear, don't worry as they are normal.
194 Some warnings will appear, don't worry as they are normal.
195
195
196 Step 8 -- Configuring Kallithea
196 Step 8 -- Configuring Kallithea
197 -------------------------------
197 -------------------------------
198
198
199 steps taken from http://packages.python.org/Kallithea/setup.html
199 steps taken from http://packages.python.org/Kallithea/setup.html
200
200
201 You have to use the same Visual Studio 2008 command prompt as Step7, so
201 You have to use the same Visual Studio 2008 command prompt as Step7, so
202 if you closed it reopen it following the same commands (including the
202 if you closed it reopen it following the same commands (including the
203 "activate" one). When ready, just type::
203 "activate" one). When ready, just type::
204
204
205 cd C:\Kallithea\Bin
205 cd C:\Kallithea\Bin
206 paster make-config Kallithea production.ini
206 paster make-config Kallithea production.ini
207
207
208 Then, you must edit production.ini to fit your needs (network address and
208 Then, you must edit production.ini to fit your needs (network address and
209 port, mail settings, database, whatever). I recommend using NotePad++
209 port, mail settings, database, whatever). I recommend using NotePad++
210 (free) or similar text editor, as it handles well the EndOfLine
210 (free) or similar text editor, as it handles well the EndOfLine
211 character differences between Unix and Windows
211 character differences between Unix and Windows
212 (http://notepad-plus-plus.org/)
212 (http://notepad-plus-plus.org/)
213
213
214 For the sake of simplicity lets run it with the default settings. After
214 For the sake of simplicity lets run it with the default settings. After
215 your edits (if any), in the previous Command Prompt, type::
215 your edits (if any), in the previous Command Prompt, type::
216
216
217 paster setup-db production.ini
217 paster setup-db production.ini
218
218
219 (this time a NEW database will be installed, you must follow a different
219 (this time a NEW database will be installed, you must follow a different
220 step to later UPGRADE to a newer Kallithea version)
220 step to later UPGRADE to a newer Kallithea version)
221
221
222 The script will ask you for confirmation about creating a NEW database,
222 The script will ask you for confirmation about creating a NEW database,
223 answer yes (y)
223 answer yes (y)
224 The script will ask you for repository path, answer C:\\Kallithea\\Repos
224 The script will ask you for repository path, answer C:\\Kallithea\\Repos
225 (or similar)
225 (or similar)
226 The script will ask you for admin username and password, answer "admin"
226 The script will ask you for admin username and password, answer "admin"
227 + "123456" (or whatever you want)
227 + "123456" (or whatever you want)
228 The script will ask you for admin mail, answer "admin@xxxx.com" (or
228 The script will ask you for admin mail, answer "admin@xxxx.com" (or
229 whatever you want)
229 whatever you want)
230
230
231 If you make some mistake and the script does not end, don't worry, start
231 If you make some mistake and the script does not end, don't worry, start
232 it again.
232 it again.
233
233
234 Step 9 -- Running Kallithea
234 Step 9 -- Running Kallithea
235 ---------------------------
235 ---------------------------
236
236
237 In the previous command prompt, being in the C:\\Kallithea\\Bin folder,
237 In the previous command prompt, being in the C:\\Kallithea\\Bin folder,
238 just type::
238 just type::
239
239
240 paster serve production.ini
240 paster serve production.ini
241
241
242 Open yout web server, and go to http://127.0.0.1:5000
242 Open yout web server, and go to http://127.0.0.1:5000
243
243
244 It works!! :-)
244 It works!! :-)
245
245
246 Remark:
246 Remark:
247 If it does not work first time, just Ctrl-C the CMD process and start it
247 If it does not work first time, just Ctrl-C the CMD process and start it
248 again. Don't forget the "http://" in Internet Explorer
248 again. Don't forget the "http://" in Internet Explorer
249
249
250 What this Guide does not cover:
250 What this Guide does not cover:
251
251
252 - Installing Celery
252 - Installing Celery
253 - Running Kallithea as Windows Service. You can investigate here:
253 - Running Kallithea as Windows Service. You can investigate here:
254
254
255 - http://pypi.python.org/pypi/wsgisvc
255 - http://pypi.python.org/pypi/wsgisvc
256 - http://ryrobes.com/python/running-python-scripts-as-a-windows-service/
256 - http://ryrobes.com/python/running-python-scripts-as-a-windows-service/
257 - http://wiki.pylonshq.com/display/pylonscookbook/How+to+run+Pylons+as+a+Windows+service
257 - http://wiki.pylonshq.com/display/pylonscookbook/How+to+run+Pylons+as+a+Windows+service
258
258
259 - Using Apache. You can investigate here:
259 - Using Apache. You can investigate here:
260
260
261 - https://groups.google.com/group/rhodecode/msg/c433074e813ffdc4
261 - https://groups.google.com/group/rhodecode/msg/c433074e813ffdc4
262
262
263
263
264 Upgrading
264 Upgrading
265 :::::::::
265 :::::::::
266
266
267 Stop running Kallithea
267 Stop running Kallithea
268 Open a CommandPrompt like in Step7 (VS2008 path + activate) and type::
268 Open a CommandPrompt like in Step7 (VS2008 path + activate) and type::
269
269
270 easy_install -U kallithea
270 easy_install -U kallithea
271 cd \Kallithea\Bin
271 cd \Kallithea\Bin
272
272
273 { backup your production.ini file now} ::
273 { backup your production.ini file now} ::
274
274
275 paster make-config Kallithea production.ini
275 paster make-config Kallithea production.ini
276
276
277 (check changes and update your production.ini accordingly) ::
277 (check changes and update your production.ini accordingly) ::
278
278
279 paster upgrade-db production.ini (update database)
279 paster upgrade-db production.ini (update database)
280
280
281 Full steps in http://packages.python.org/Kallithea/upgrade.html
281 Full steps in http://packages.python.org/Kallithea/upgrade.html
@@ -1,97 +1,97 b''
1 ============
1 ============
2 Translations
2 Translations
3 ============
3 ============
4
4
5 Translations are available on Hosted Weblate at the following URL:
5 Translations are available on Hosted Weblate at the following URL:
6
6
7 https://hosted.weblate.org/projects/kallithea/kallithea/
7 https://hosted.weblate.org/projects/kallithea/kallithea/
8
8
9 Registered users may contribute to the existing languages, or request a new
9 Registered users may contribute to the existing languages, or request a new
10 language translations.
10 language translations.
11
11
12
12
13 Translating using Weblate
13 Translating using Weblate
14 -------------------------
14 -------------------------
15
15
16 Weblate_ offers a simple and easy to use interface featuring glossary, machine
16 Weblate_ offers a simple and easy to use interface featuring glossary, machine
17 translation, suggestions based on similar translations in other projects,
17 translation, suggestions based on similar translations in other projects,
18 automatic checks etc. Weblate imports the source code tree directly from
18 automatic checks etc. Weblate imports the source code tree directly from
19 the version control system, and commits edits back from time to time.
19 the version control system, and commits edits back from time to time.
20
20
21 When registering at Weblate, make sure you name and email address you prefer to
21 When registering at Weblate, make sure you name and email address you prefer to
22 be used when your changes are committed. We can and probably will amend changesets
22 be used when your changes are committed. We can and probably will amend changesets
23 coming from Weblate, but having things right from the beginning makes things easier.
23 coming from Weblate, but having things right from the beginning makes things easier.
24
24
25 Weblate performs sanity checks all the time and tries to prevent you from ignoring
25 Weblate performs sanity checks all the time and tries to prevent you from ignoring
26 them. Most common mistakes are inconsistent punctuation, whitespaces, missing or extra
26 them. Most common mistakes are inconsistent punctuation, whitespaces, missing or extra
27 format parameters, untranslated strings copied into the translation. Please perform
27 format parameters, untranslated strings copied into the translation. Please perform
28 necessary corrections when they're needed, or override the false positives.
28 necessary corrections when they're needed, or override the false positives.
29
29
30
30
31 Merging translations from Weblate
31 Merging translations from Weblate
32 ---------------------------------
32 ---------------------------------
33
33
34 Weblate rebases its changes every time it pulls from our repository. Pulls are triggered
34 Weblate rebases its changes every time it pulls from our repository. Pulls are triggered
35 by a web hook from Our Own Kallithea every time it receives new commits. Usually merging
35 by a web hook from Our Own Kallithea every time it receives new commits. Usually merging
36 the new translations is a straightforward process consisting of a pull from Weblate-hosted
36 the new translations is a straightforward process consisting of a pull from Weblate-hosted
37 repository which is available under Data Exports tab in Weblate interface.
37 repository which is available under Data Exports tab in Weblate interface.
38
38
39 Weblate tries to minimise the number of commits, but that's not always work, especially
39 Weblate tries to minimise the number of commits, but that's not always work, especially
40 when two translators work with different languages at more or less the same time.
40 when two translators work with different languages at more or less the same time.
41 It makes sense sometimes to re-order or fold commits by the same author when they touch
41 It makes sense sometimes to re-order or fold commits by the same author when they touch
42 just the same language translation. That, however, may confuse Weblate sometimes, in
42 just the same language translation. That, however, may confuse Weblate sometimes, in
43 which case it should be manually convinced it has to discard the commits it created by
43 which case it should be manually convinced it has to discard the commits it created by
44 using its administrative interface.
44 using its administrative interface.
45
45
46
46
47 Manual creation of a new language translation
47 Manual creation of a new language translation
48 ---------------------------------------------
48 ---------------------------------------------
49
49
50 In the prepared development environment, run the following to ensure
50 In the prepared development environment, run the following to ensure
51 all translation strings are extracted and up-to-date::
51 all translation strings are extracted and up-to-date::
52
52
53 python setup.py extract_messages
53 python2 setup.py extract_messages
54
54
55 Create new language by executing following command::
55 Create new language by executing following command::
56
56
57 python setup.py init_catalog -l <new_language_code>
57 python2 setup.py init_catalog -l <new_language_code>
58
58
59 This creates a new translation under directory `kallithea/i18n/<new_language_code>`
59 This creates a new translation under directory `kallithea/i18n/<new_language_code>`
60 based on the translation template file, `kallithea/i18n/kallithea.pot`.
60 based on the translation template file, `kallithea/i18n/kallithea.pot`.
61
61
62 Edit the new PO file located in `LC_MESSAGES` directory with poedit or your
62 Edit the new PO file located in `LC_MESSAGES` directory with poedit or your
63 favorite PO files editor. After you finished with the translations, check the
63 favorite PO files editor. After you finished with the translations, check the
64 translation file for errors by executing::
64 translation file for errors by executing::
65
65
66 msgfmt -f -c kallithea/i18n/<new_language_code>/LC_MESSAGES/<updated_file.po>
66 msgfmt -f -c kallithea/i18n/<new_language_code>/LC_MESSAGES/<updated_file.po>
67
67
68 Finally, compile the translations::
68 Finally, compile the translations::
69
69
70 python setup.py compile_catalog -l <new_language_code>
70 python2 setup.py compile_catalog -l <new_language_code>
71
71
72
72
73 Updating translations
73 Updating translations
74 ---------------------
74 ---------------------
75
75
76 Extract the latest versions of strings for translation by running::
76 Extract the latest versions of strings for translation by running::
77
77
78 python setup.py extract_messages
78 python2 setup.py extract_messages
79
79
80 Update the PO file by doing::
80 Update the PO file by doing::
81
81
82 python setup.py update_catalog -l <new_language_code>
82 python2 setup.py update_catalog -l <new_language_code>
83
83
84 Edit the new updated translation file. Repeat all steps after `init_catalog` step from
84 Edit the new updated translation file. Repeat all steps after `init_catalog` step from
85 new translation instructions
85 new translation instructions
86
86
87
87
88 Testing translations
88 Testing translations
89 --------------------
89 --------------------
90
90
91 Edit kallithea/tests/test.ini file and set lang attribute to::
91 Edit kallithea/tests/test.ini file and set lang attribute to::
92
92
93 lang=<new_language_code>
93 lang=<new_language_code>
94
94
95 Run Kallithea tests by executing::
95 Run Kallithea tests by executing::
96
96
97 nosetests
97 nosetests
General Comments 0
You need to be logged in to leave comments. Login now