##// END OF EJS Templates
docs: recommend --upgrade for all pip installations in a virtualenv...
Thomas De Schampheleire -
r6703:29e9cb56 default
parent child Browse files
Show More
@@ -1,314 +1,314 b''
1 1 .. _contributing:
2 2
3 3 =========================
4 4 Contributing to Kallithea
5 5 =========================
6 6
7 7 Kallithea is developed and maintained by its users. Please join us and scratch
8 8 your own itch.
9 9
10 10
11 11 Infrastructure
12 12 --------------
13 13
14 14 The main repository is hosted on Our Own Kallithea (aka OOK) at
15 15 https://kallithea-scm.org/repos/kallithea/, our self-hosted instance
16 16 of Kallithea.
17 17
18 18 For now, we use Bitbucket_ for `pull requests`_ and `issue tracking`_. The
19 19 issue tracker is for tracking bugs, not for support, discussion, or ideas --
20 20 please use the `mailing list`_ or :ref:`IRC <readme>` to reach the community.
21 21
22 22 We use Weblate_ to translate the user interface messages into languages other
23 23 than English. Join our project on `Hosted Weblate`_ to help us.
24 24 To register, you can use your Bitbucket or GitHub account. See :ref:`translations`
25 25 for more details.
26 26
27 27
28 28 Getting started
29 29 ---------------
30 30
31 31 To get started with Kallithea development::
32 32
33 33 hg clone https://kallithea-scm.org/repos/kallithea
34 34 cd kallithea
35 35 virtualenv ../kallithea-venv
36 36 source ../kallithea-venv/bin/activate
37 37 pip install --upgrade pip setuptools
38 pip install -e .
39 pip install -r dev_requirements.txt
38 pip install --upgrade -e .
39 pip install --upgrade -r dev_requirements.txt
40 40 gearbox make-config my.ini
41 41 gearbox setup-db -c my.ini --user=user --email=user@example.com --password=password --repos=/tmp
42 42 gearbox serve -c my.ini --reload &
43 43 firefox http://127.0.0.1:5000/
44 44
45 45 If you plan to use Bitbucket_ for sending contributions, you can also fork
46 46 Kallithea on Bitbucket_ first (https://bitbucket.org/conservancy/kallithea) and
47 47 then replace the clone step above by a clone of your fork. In this case, please
48 48 see :ref:`contributing-guidelies` below for configuring your fork correctly.
49 49
50 50
51 51 Contribution flow
52 52 -----------------
53 53
54 54 Starting from an existing Kallithea clone, make sure it is up to date with the
55 55 latest upstream changes::
56 56
57 57 hg pull
58 58 hg update
59 59
60 60 Review the :ref:`contributing-guidelines` and :ref:`coding-guidelines`.
61 61
62 62 If you are new to Mercurial, refer to Mercurial `Quick Start`_ and `Beginners
63 63 Guide`_ on the Mercurial wiki.
64 64
65 65 Now, make some changes and test them (see :ref:`contributing-tests`). Don't
66 66 forget to add new tests to cover new functionality or bug fixes.
67 67
68 68 For documentation changes, run ``make html`` from the ``docs`` directory to
69 69 generate the HTML result, then review them in your browser.
70 70
71 71 Before submitting any changes, run the cleanup script::
72 72
73 73 ./scripts/run-all-cleanup
74 74
75 75 When you are completely ready, you can send your changes to the community for
76 76 review and inclusion. Most commonly used methods are sending patches to the
77 77 mailing list (via ``hg email``) or by creating a pull request on Bitbucket_.
78 78
79 79 .. _contributing-tests:
80 80
81 81
82 82 Running tests
83 83 -------------
84 84
85 85 After finishing your changes make sure all tests pass cleanly. Run the testsuite
86 86 by invoking ``py.test`` from the project root::
87 87
88 88 py.test
89 89
90 90 Note that testing on Python 2.6 also requires ``unittest2``.
91 91
92 92 Note that on unix systems, the temporary directory (``/tmp`` or where
93 93 ``$TMPDIR`` points) must allow executable files; Git hooks must be executable,
94 94 and the test suite creates repositories in the temporary directory. Linux
95 95 systems with /tmp mounted noexec will thus fail.
96 96
97 97 You can also use ``tox`` to run the tests with all supported Python versions
98 98 (currently Python 2.6--2.7).
99 99
100 100 When running tests, Kallithea uses `kallithea/tests/test.ini` and populates the
101 101 SQLite database specified there.
102 102
103 103 It is possible to avoid recreating the full test database on each invocation of
104 104 the tests, thus eliminating the initial delay. To achieve this, run the tests as::
105 105
106 106 gearbox serve -c kallithea/tests/test.ini --pid-file=test.pid --daemon
107 107 KALLITHEA_WHOOSH_TEST_DISABLE=1 KALLITHEA_NO_TMP_PATH=1 py.test
108 108 kill -9 $(cat test.pid)
109 109
110 110 In these commands, the following variables are used::
111 111
112 112 KALLITHEA_WHOOSH_TEST_DISABLE=1 - skip whoosh index building and tests
113 113 KALLITHEA_NO_TMP_PATH=1 - disable new temp path for tests, used mostly for testing_vcs_operations
114 114
115 115 You can run individual tests by specifying their path as argument to py.test.
116 116 py.test also has many more options, see `py.test -h`. Some useful options
117 117 are::
118 118
119 119 -k EXPRESSION only run tests which match the given substring
120 120 expression. An expression is a python evaluable
121 121 expression where all names are substring-matched
122 122 against test names and their parent classes. Example:
123 123 -x, --exitfirst exit instantly on first error or failed test.
124 124 --lf rerun only the tests that failed at the last run (or
125 125 all if none failed)
126 126 --ff run all tests but run the last failures first. This
127 127 may re-order tests and thus lead to repeated fixture
128 128 setup/teardown
129 129 --pdb start the interactive Python debugger on errors.
130 130 -s, --capture=no don't capture stdout (any stdout output will be
131 131 printed immediately)
132 132
133 133 Performance tests
134 134 ^^^^^^^^^^^^^^^^^
135 135
136 136 A number of performance tests are present in the test suite, but they are
137 137 not run in a standard test run. These tests are useful to
138 138 evaluate the impact of certain code changes with respect to performance.
139 139
140 140 To run these tests::
141 141
142 142 env TEST_PERFORMANCE=1 py.test kallithea/tests/performance
143 143
144 144 To analyze performance, you could install pytest-profiling_, which enables the
145 145 --profile and --profile-svg options to py.test.
146 146
147 147 .. _pytest-profiling: https://github.com/manahl/pytest-plugins/tree/master/pytest-profiling
148 148
149 149 .. _contributing-guidelines:
150 150
151 151
152 152 Contribution guidelines
153 153 -----------------------
154 154
155 155 Kallithea is GPLv3 and we assume all contributions are made by the
156 156 committer/contributor and under GPLv3 unless explicitly stated. We do care a
157 157 lot about preservation of copyright and license information for existing code
158 158 that is brought into the project.
159 159
160 160 Contributions will be accepted in most formats -- such as pull requests on
161 161 Bitbucket, something hosted on your own Kallithea instance, or patches sent by
162 162 email to the `kallithea-general`_ mailing list.
163 163
164 164 When contributing via Bitbucket, please make your fork of
165 165 https://bitbucket.org/conservancy/kallithea/ `non-publishing`_ -- it is one of
166 166 the settings on "Repository details" page. This ensures your commits are in
167 167 "draft" phase and makes it easier for you to address feedback and for project
168 168 maintainers to integrate your changes.
169 169
170 170 .. _non-publishing: https://www.mercurial-scm.org/wiki/Phases#Publishing_Repository
171 171
172 172 Make sure to test your changes both manually and with the automatic tests
173 173 before posting.
174 174
175 175 We care about quality and review and keeping a clean repository history. We
176 176 might give feedback that requests polishing contributions until they are
177 177 "perfect". We might also rebase and collapse and make minor adjustments to your
178 178 changes when we apply them.
179 179
180 180 We try to make sure we have consensus on the direction the project is taking.
181 181 Everything non-sensitive should be discussed in public -- preferably on the
182 182 mailing list. We aim at having all non-trivial changes reviewed by at least
183 183 one other core developer before pushing. Obvious non-controversial changes will
184 184 be handled more casually.
185 185
186 186 There is a main development branch ("default") which is generally stable so that
187 187 it can be (and is) used in production. There is also a "stable" branch that is
188 188 almost exclusively reserved for bug fixes or trivial changes. Experimental
189 189 changes should live elsewhere (for example in a pull request) until they are
190 190 ready.
191 191
192 192 .. _coding-guidelines:
193 193
194 194
195 195 Coding guidelines
196 196 -----------------
197 197
198 198 We don't have a formal coding/formatting standard. We are currently using a mix
199 199 of Mercurial's (https://www.mercurial-scm.org/wiki/CodingStyle), pep8, and
200 200 consistency with existing code. Run ``scripts/run-all-cleanup`` before
201 201 committing to ensure some basic code formatting consistency.
202 202
203 203 We support both Python 2.6.x and 2.7.x and nothing else. For now we don't care
204 204 about Python 3 compatibility.
205 205
206 206 We try to support the most common modern web browsers. IE9 is still supported
207 207 to the extent it is feasible, IE8 is not.
208 208
209 209 We primarily support Linux and OS X on the server side but Windows should also work.
210 210
211 211 HTML templates should use 2 spaces for indentation ... but be pragmatic. We
212 212 should use templates cleverly and avoid duplication. We should use reasonable
213 213 semantic markup with element classes and IDs that can be used for styling and testing.
214 214 We should only use inline styles in places where it really is semantic (such as
215 215 ``display: none``).
216 216
217 217 JavaScript must use ``;`` between/after statements. Indentation 4 spaces. Inline
218 218 multiline functions should be indented two levels -- one for the ``()`` and one for
219 219 ``{}``.
220 220 Variables holding jQuery objects should be named with a leading ``$``.
221 221
222 222 Commit messages should have a leading short line summarizing the changes. For
223 223 bug fixes, put ``(Issue #123)`` at the end of this line.
224 224
225 225 Use American English grammar and spelling overall. Use `English title case`_ for
226 226 page titles, button labels, headers, and 'labels' for fields in forms.
227 227
228 228 .. _English title case: https://en.wikipedia.org/wiki/Capitalization#Title_case
229 229
230 230 Template helpers (that is, everything in ``kallithea.lib.helpers``)
231 231 should only be referenced from templates. If you need to call a
232 232 helper from the Python code, consider moving the function somewhere
233 233 else (e.g. to the model).
234 234
235 235 Notes on the SQLAlchemy session
236 236 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
237 237
238 238 Each HTTP request runs inside an independent SQLAlchemy session (as well
239 239 as in an independent database transaction). ``Session`` is the session manager
240 240 and factory. ``Session()`` will create a new session on-demand or return the
241 241 current session for the active thread. Many database operations are methods on
242 242 such session instances - only ``Session.remove()`` should be called directly on
243 243 the manager.
244 244
245 245 Database model objects
246 246 (almost) always belong to a particular SQLAlchemy session, which means
247 247 that SQLAlchemy will ensure that they're kept in sync with the database
248 248 (but also means that they cannot be shared across requests).
249 249
250 250 Objects can be added to the session using ``Session().add``, but this is
251 251 rarely needed:
252 252
253 253 * When creating a database object by calling the constructor directly,
254 254 it must explicitly be added to the session.
255 255
256 256 * When creating an object using a factory function (like
257 257 ``create_repo``), the returned object has already (by convention)
258 258 been added to the session, and should not be added again.
259 259
260 260 * When getting an object from the session (via ``Session().query`` or
261 261 any of the utility functions that look up objects in the database),
262 262 it's already part of the session, and should not be added again.
263 263 SQLAlchemy monitors attribute modifications automatically for all
264 264 objects it knows about and syncs them to the database.
265 265
266 266 SQLAlchemy also flushes changes to the database automatically; manually
267 267 calling ``Session().flush`` is usually only necessary when the Python
268 268 code needs the database to assign an "auto-increment" primary key ID to
269 269 a freshly created model object (before flushing, the ID attribute will
270 270 be ``None``).
271 271
272 272 TurboGears2 DebugBar
273 273 ^^^^^^^^^^^^^^^^^^^^
274 274
275 275 It is possible to enable the TurboGears2-provided DebugBar_, a toolbar overlayed
276 276 over the Kallithea web interface, allowing you to see:
277 277
278 278 * timing information of the current request, including profiling information
279 279 * request data, including GET data, POST data, cookies, headers and environment
280 280 variables
281 281 * a list of executed database queries, including timing and result values
282 282
283 283 DebugBar is only activated when ``debug = true`` is set in the configuration
284 284 file. This is important, because the DebugBar toolbar will be visible for all
285 285 users, and allow them to see information they should not be allowed to see. Like
286 286 is anyway the case for ``debug = true``, do not use this in production!
287 287
288 288 To enable DebugBar, install ``tgext.debugbar`` and ``kajiki`` (typically via
289 289 ``pip``) and restart Kallithea (in debug mode).
290 290
291 291
292 292 "Roadmap"
293 293 ---------
294 294
295 295 We do not have a road map but are waiting for your contributions. Refer to the
296 296 wiki_ for some ideas of places we might want to go -- contributions in these
297 297 areas are very welcome.
298 298
299 299
300 300 Thank you for your contribution!
301 301 --------------------------------
302 302
303 303
304 304 .. _Weblate: http://weblate.org/
305 305 .. _issue tracking: https://bitbucket.org/conservancy/kallithea/issues?status=new&status=open
306 306 .. _pull requests: https://bitbucket.org/conservancy/kallithea/pull-requests
307 307 .. _bitbucket: http://bitbucket.org/
308 308 .. _mailing list: http://lists.sfconservancy.org/mailman/listinfo/kallithea-general
309 309 .. _kallithea-general: http://lists.sfconservancy.org/mailman/listinfo/kallithea-general
310 310 .. _Hosted Weblate: https://hosted.weblate.org/projects/kallithea/kallithea/
311 311 .. _wiki: https://bitbucket.org/conservancy/kallithea/wiki/Home
312 312 .. _DebugBar: https://github.com/TurboGears/tgext.debugbar
313 313 .. _Quick Start: https://www.mercurial-scm.org/wiki/QuickStart
314 314 .. _Beginners Guide: https://www.mercurial-scm.org/wiki/BeginnersGuides
@@ -1,139 +1,139 b''
1 1 .. _installation:
2 2
3 3 ==========================
4 4 Installation on Unix/Linux
5 5 ==========================
6 6
7 7 The following describes three different ways of installing Kallithea:
8 8
9 9 - :ref:`installation-source`: The simplest way to keep the installation
10 10 up-to-date and track any local customizations is to run directly from
11 11 source in a Kallithea repository clone, preferably inside a virtualenv
12 12 virtual Python environment.
13 13
14 14 - :ref:`installation-virtualenv`: If you prefer to only use released versions
15 15 of Kallithea, the recommended method is to install Kallithea in a virtual
16 16 Python environment using `virtualenv`. The advantages of this method over
17 17 direct installation is that Kallithea and its dependencies are completely
18 18 contained inside the virtualenv (which also means you can have multiple
19 19 installations side by side or remove it entirely by just removing the
20 20 virtualenv directory) and does not require root privileges.
21 21
22 22 - :ref:`installation-without-virtualenv`: The alternative method of installing
23 23 a Kallithea release is using standard pip. The package will be installed in
24 24 the same location as all other Python packages you have ever installed. As a
25 25 result, removing it is not as straightforward as with a virtualenv, as you'd
26 26 have to remove its dependencies manually and make sure that they are not
27 27 needed by other packages.
28 28
29 29 Regardless of the installation method you may need to make sure you have
30 30 appropriate development packages installed, as installation of some of the
31 31 Kallithea dependencies requires a working C compiler and libffi library
32 32 headers. Depending on your configuration, you may also need to install
33 33 Git and development packages for the database of your choice.
34 34
35 35 For Debian and Ubuntu, the following command will ensure that a reasonable
36 36 set of dependencies is installed::
37 37
38 38 sudo apt-get install build-essential git python-pip python-virtualenv libffi-dev python-dev
39 39
40 40 For Fedora and RHEL-derivatives, the following command will ensure that a
41 41 reasonable set of dependencies is installed::
42 42
43 43 sudo yum install gcc git python-pip python-virtualenv libffi-devel python-devel
44 44
45 45 .. _installation-source:
46 46
47 47
48 48 Installation from repository source
49 49 -----------------------------------
50 50
51 51 To install Kallithea in a virtualenv_ using the stable branch of the development
52 52 repository, follow the instructions below::
53 53
54 54 hg clone https://kallithea-scm.org/repos/kallithea -u stable
55 55 cd kallithea
56 56 virtualenv ../kallithea-venv
57 57 . ../kallithea-venv/bin/activate
58 58 pip install --upgrade pip setuptools
59 pip install -e .
59 pip install --upgrade -e .
60 60 python2 setup.py compile_catalog # for translation of the UI
61 61
62 62 You can now proceed to :ref:`setup`.
63 63
64 64 .. _installation-virtualenv:
65 65
66 66
67 67 Installing a released version in a virtualenv
68 68 ---------------------------------------------
69 69
70 70 It is highly recommended to use a separate virtualenv_ for installing Kallithea.
71 71 This way, all libraries required by Kallithea will be installed separately from your
72 72 main Python installation and other applications and things will be less
73 73 problematic when upgrading the system or Kallithea.
74 74 An additional benefit of virtualenv_ is that it doesn't require root privileges.
75 75
76 76 - Assuming you have installed virtualenv_, create a new virtual environment
77 77 for example, in `/srv/kallithea/venv`, using the virtualenv command::
78 78
79 79 virtualenv /srv/kallithea/venv
80 80
81 81 - Activate the virtualenv_ in your current shell session and make sure the
82 82 basic requirements are up-to-date by running::
83 83
84 84 . /srv/kallithea/venv/bin/activate
85 85 pip install --upgrade pip setuptools
86 86
87 87 .. note:: You can't use UNIX ``sudo`` to source the ``virtualenv`` script; it
88 88 will "activate" a shell that terminates immediately. It is also perfectly
89 89 acceptable (and desirable) to create a virtualenv as a normal user.
90 90
91 91 .. note:: Some dependencies are optional. If you need them, install them in
92 92 the virtualenv too::
93 93
94 pip install psycopg2
95 pip install python-ldap
94 pip install --upgrade psycopg2
95 pip install --upgrade python-ldap
96 96
97 97 This might require installation of development packages using your
98 98 distribution's package manager.
99 99
100 100 - Make a folder for Kallithea data files, and configuration somewhere on the
101 101 filesystem. For example::
102 102
103 103 mkdir /srv/kallithea
104 104
105 105 - Go into the created directory and run this command to install Kallithea::
106 106
107 pip install kallithea
107 pip install --upgrade kallithea
108 108
109 109 Alternatively, download a .tar.gz from http://pypi.python.org/pypi/Kallithea,
110 110 extract it and run::
111 111
112 pip install .
112 pip install --upgrade .
113 113
114 114 - This will install Kallithea together with all other required
115 115 Python libraries into the activated virtualenv.
116 116
117 117 You can now proceed to :ref:`setup`.
118 118
119 119 .. _installation-without-virtualenv:
120 120
121 121
122 122 Installing a released version without virtualenv
123 123 ------------------------------------------------
124 124
125 125 For installation without virtualenv, 'just' use::
126 126
127 127 pip install kallithea
128 128
129 129 Note that this method requires root privileges and will install packages
130 130 globally without using the system's package manager.
131 131
132 132 To install as a regular user in ``~/.local``, you can use::
133 133
134 134 pip install --user kallithea
135 135
136 136 You can now proceed to :ref:`setup`.
137 137
138 138
139 139 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
@@ -1,185 +1,185 b''
1 1 .. _upgrade:
2 2
3 3 ===================
4 4 Upgrading Kallithea
5 5 ===================
6 6
7 7 This describes the process for upgrading Kallithea, independently of the
8 8 Kallithea installation method.
9 9
10 10 .. note::
11 11 If you are upgrading from a RhodeCode installation, you must first
12 12 install Kallithea 0.3.2 and follow the instructions in the 0.3.2
13 13 README to perform a one-time conversion of the database from
14 14 RhodeCode to Kallithea, before upgrading to the latest version
15 15 of Kallithea.
16 16
17 17
18 18 1. Stop the Kallithea web application
19 19 -------------------------------------
20 20
21 21 This step depends entirely on the web server software used to serve
22 22 Kallithea, but in any case, Kallithea should not be running during
23 23 the upgrade.
24 24
25 25 .. note::
26 26 If you're using Celery, make sure you stop all instances during the
27 27 upgrade.
28 28
29 29
30 30 2. Create a backup of both database and configuration
31 31 -----------------------------------------------------
32 32
33 33 You are of course strongly recommended to make backups regularly, but it
34 34 is *especially* important to make a full database and configuration
35 35 backup before performing a Kallithea upgrade.
36 36
37 37 Back up your configuration
38 38 ^^^^^^^^^^^^^^^^^^^^^^^^^^
39 39
40 40 Make a copy of your Kallithea configuration (``.ini``) file.
41 41
42 42 If you are using :ref:`rcextensions <customization>`, you should also
43 43 make a copy of the entire ``rcextensions`` directory.
44 44
45 45 Back up your database
46 46 ^^^^^^^^^^^^^^^^^^^^^
47 47
48 48 If using SQLite, simply make a copy of the Kallithea database (``.db``)
49 49 file.
50 50
51 51 If using PostgreSQL, please consult the documentation for the ``pg_dump``
52 52 utility.
53 53
54 54 If using MySQL, please consult the documentation for the ``mysqldump``
55 55 utility.
56 56
57 57 Look for ``sqlalchemy.url`` in your configuration file to determine
58 58 database type, settings, location, etc.
59 59
60 60
61 61 3. Activate the Kallithea virtual environment (if any)
62 62 ------------------------------------------------------
63 63
64 64 Verify that you are using the Python environment that you originally
65 65 installed Kallithea in by running::
66 66
67 67 pip freeze
68 68
69 69 This will list all packages installed in the current environment. If
70 70 Kallithea isn't listed, activate the correct virtual environment.
71 71 See the appropriate installation page for details.
72 72
73 73
74 74 4. Install new version of Kallithea
75 75 -----------------------------------
76 76
77 77 Please refer to the instructions for the installation method you
78 78 originally used to install Kallithea.
79 79
80 80 If you originally installed using pip, it is as simple as::
81 81
82 82 pip install --upgrade kallithea
83 83
84 84 If you originally installed from version control, it is as simple as::
85 85
86 86 cd my-kallithea-clone
87 87 hg pull -u
88 pip install -e .
88 pip install --upgrade -e .
89 89
90 90
91 91 5. Upgrade your configuration
92 92 -----------------------------
93 93
94 94 Run the following command to create a new configuration (``.ini``) file::
95 95
96 96 gearbox make-config new.ini
97 97
98 98 Then compare it with your old config file and see what changed.
99 99
100 100 .. note::
101 101 Please always make sure your ``.ini`` files are up to date. Errors
102 102 can often be caused by missing parameters added in new versions.
103 103
104 104 .. _upgrade_db:
105 105
106 106
107 107 6. Upgrade your database
108 108 ------------------------
109 109
110 110 .. note::
111 111 If you are *downgrading* Kallithea, you should perform the database
112 112 migration step *before* installing the older version. (That is,
113 113 always perform migrations using the most recent of the two versions
114 114 you're migrating between.)
115 115
116 116 First, run the following command to see your current database version::
117 117
118 118 alembic -c my.ini current
119 119
120 120 Typical output will be something like "9358dc3d6828 (head)", which is
121 121 the current Alembic database "revision ID". Write down the entire output
122 122 for troubleshooting purposes.
123 123
124 124 The output will be empty if you're upgrading from Kallithea 0.3.x or
125 125 older. That's expected. If you get an error that the config file was not
126 126 found or has no ``[alembic]`` section, see the next section.
127 127
128 128 Next, if you are performing an *upgrade*: Run the following command to
129 129 upgrade your database to the current Kallithea version::
130 130
131 131 alembic -c my.ini upgrade head
132 132
133 133 If you are performing a *downgrade*: Run the following command to
134 134 downgrade your database to the given version::
135 135
136 136 alembic -c my.ini downgrade 0.4
137 137
138 138 Alembic will show the necessary migrations (if any) as it executes them.
139 139 If no "ERROR" is displayed, the command was successful.
140 140
141 141 Should an error occur, the database may be "stranded" half-way
142 142 through the migration, and you should restore it from backup.
143 143
144 144 Enabling old Kallithea config files for Alembic use
145 145 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
146 146
147 147 Kallithea configuration files created before the introduction of Alembic
148 148 (i.e. predating Kallithea 0.4) need to be updated for use with Alembic.
149 149 Without this, Alembic will fail with an error like this::
150 150
151 151 FAILED: No config file 'my.ini' found, or file has no '[alembic]' section
152 152
153 153 If Alembic complains specifically about a missing ``alembic.ini``, it is
154 154 likely because you did not specify a config file using the ``-c`` option.
155 155 On the other hand, if the mentioned config file actually exists, you
156 156 need to append the following lines to it::
157 157
158 158 [alembic]
159 159 script_location = kallithea:alembic
160 160
161 161 Your config file should now work with Alembic.
162 162
163 163
164 164 7. Rebuild the Whoosh full-text index
165 165 -------------------------------------
166 166
167 167 It is recommended that you rebuild the Whoosh index after upgrading since
168 168 new Whoosh versions can introduce incompatible index changes.
169 169
170 170
171 171 8. Start the Kallithea web application
172 172 --------------------------------------
173 173
174 174 This step once again depends entirely on the web server software used to
175 175 serve Kallithea.
176 176
177 177 Before starting the new version of Kallithea, you may find it helpful to
178 178 clear out your log file so that new errors are readily apparent.
179 179
180 180 .. note::
181 181 If you're using Celery, make sure you restart all instances of it after
182 182 upgrade.
183 183
184 184
185 185 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
General Comments 0
You need to be logged in to leave comments. Login now