Changeset - 03bbd33bc084
[Not reviewed]
default
1 17 2
Mads Kiilerich - 11 years ago 2015-03-11 16:10:30
madski@unity3d.com
docs: rework stuff

The existing docs were far from how we wanted it to be. There was so much to do
and it is not feasible to do that cleanup it in clean patches.

Instead, I took a sweep through the docs and changed what I thought could
benefit from a change: structure, examples, advices, language, markup, content,
etc.
20 files changed with 484 insertions and 377 deletions:
0 comments (0 inline, 0 general)
.hgignore
Show inline comments
 
@@ -12,15 +12,15 @@ syntax: regexp
 
^dist/
 
^docs/build/
 
^docs/_build/
 
^data$
 
^sql_dumps/
 
^\.settings$
 
^\.project$
 
^\.pydevproject$
 
^\.coverage$
 
^kallithea\.db$
 
^test\.db$
 
^Kallithea\.egg-info$
 
^rc.*\.ini$
 
^my\.ini$
 
^fabfile.py
 
^\.idea$
README.rst
Show inline comments
 
=========
 
Kallithea
 
=========
 
================
 
Kallithea README
 
================
 

	
 
About
 
-----
 

	
 
``Kallithea`` is a fast and powerful management tool for Mercurial_ and Git_
 
with a built-in push/pull server, full text search and code-review.
 
It works on http/https and has a built in permission/authentication system with
 
the ability to authenticate via LDAP or ActiveDirectory. Kallithea also provides
 
simple API so it's easy to integrate with existing external systems.
 

	
 
Kallithea is similar in some respects to GitHub_ or Bitbucket_,
 
however Kallithea can be run as standalone hosted application on your own server.
 
It is open-source donationware and focuses more on providing a customised,
 
self-administered interface for Mercurial_ and Git_  repositories.
 
Kallithea works on Unix-like systems and Windows, and is powered by the vcs_ library
 
created by Łukasz Balcerzak and Marcin Kuźmiński to uniformly handle multiple
 
version control systems.
 

	
 
Kallithea was forked from RhodeCode in July 2014 and has been heavily modified.
 

	
 
Installation
 
------------
 
Stable releases of Kallithea are best installed via::
 

	
 
    easy_install kallithea
 

	
 
Or::
 
Official releases of Kallithea can be installed via::
 

	
 
    pip install kallithea
 

	
 
Detailed instructions and links may be found on the Installation page.
 
The development repository is kept very stable and used in production by the
 
developers - you can do the same.
 

	
 
Please visit http://packages.python.org/Kallithea/installation.html for
 
more details.
 

	
 

	
 
Source code
 
-----------
 

	
 
The latest sources can be obtained from https://kallithea-scm.org/repos/kallithea
 

	
 
The latest sources can be obtained from https://kallithea-scm.org/repos/kallithea.
 

	
 
MIRRORS:
 

	
 
Issue tracker and sources at Bitbucket_
 

	
 
https://bitbucket.org/conservancy/kallithea
 
The issue tracker and a repository mirror can be found at Bitbucket_ on
 
https://bitbucket.org/conservancy/kallithea.
 

	
 

	
 

	
 
Kallithea Features
 
------------------
 

	
 
- Has its own middleware to handle Mercurial_ and Git_ protocol requests.
 
  Each request is authenticated and logged together with IP address.
 
- Built for speed and performance. You can make multiple pulls/pushes simultaneously.
 
  Proven to work with thousands of repositories and users.
 
- Supports http/https, LDAP, AD, proxy-pass authentication.
 
- Full permissions (private/read/write/admin) together with IP restrictions for each repository,
 
  additional explicit forking, repositories group and repository creation permissions.
 
- User groups for easier permission management.
 
- Repository groups let you group repos and manage them easier. They come with
 
  permission delegation features, so you can delegate groups management.
 
- Users can fork other users repos, and compare them at any time.
 
- Built-in versioned paste functionality (Gist) for sharing code snippets.
 
- Integrates easily with other systems, with custom created mappers you can connect it to almost
 
  any issue tracker, and with an JSON-RPC API you can make much more
 
  any issue tracker, and with a JSON-RPC API you can make much more.
 
- Built-in commit API lets you add, edit and commit files right from Kallithea
 
  web interface using simple editor or upload binary files using simple form.
 
- Powerful pull request driven review system with inline commenting,
 
  changeset statuses, and notification system.
 
- Importing and syncing repositories from remote locations for Git_, Mercurial_ and Subversion.
 
- Mako templates let you customize the look and feel of the application.
 
- Beautiful diffs, annotations and source code browsing all colored by pygments.
 
  Raw diffs are made in Git-diff format for both VCS systems, including Git_ binary-patches
 
  Raw diffs are made in Git-diff format for both VCS systems, including Git_ binary-patches.
 
- Mercurial_ and Git_ DAG graphs and Flot-powered graphs with zooming and statistics
 
  to track activity for repositories
 
  to track activity for repositories.
 
- Admin interface with user/permission management. Admin activity journal, logs
 
  pulls, pushes, forks, registrations and other actions made by all users.
 
- Server side forks. It is possible to fork a project and modify it freely
 
  without breaking the main repository.
 
- reST and Markdown README support for repositories.
 
- Full text search powered by Whoosh on the source files, commit messages, and file names.
 
  Built-in indexing daemons, with optional incremental index build
 
  (no external search servers required all in one application)
 
  (no external search servers required all in one application).
 
- Setup project descriptions/tags and info inside built in DB for easy,
 
  non-filesystem operations.
 
- Intelligent cache with invalidation after push or project change, provides
 
  high performance and always up to date data.
 
- RSS/Atom feeds, Gravatar support, downloadable sources as zip/tar/gz
 
- Optional async tasks for speed and performance using Celery_
 
- RSS/Atom feeds, Gravatar support, downloadable sources as zip/tar/gz.
 
- Optional async tasks for speed and performance using Celery_.
 
- Backup scripts can do backup of whole app and send it over scp to desired
 
  location
 
- Based on Pylons, SQLAlchemy, SQLite, Whoosh, vcs
 

	
 

	
 
Incoming / Plans
 
----------------
 
  location.
 
- Based on Pylons, SQLAlchemy, SQLite, Whoosh, vcs.
 

	
 
- Finer granular permissions per branch, or subrepo
 
- Web-based merges for pull requests
 
- Tracking history for each lines in files
 
- Simple issue tracker
 
- SSH-based authentication with server side key management
 
- Commit based built in wiki system
 
- More statistics and graph (global annotation + some more statistics)
 
- Other advancements as development continues (or you can of course make
 
  additions and or requests)
 

	
 
License
 
-------
 

	
 
``Kallithea`` is released under the GPLv3 license.
 
``Kallithea`` is released under the GPLv3 license. ``Kallithea`` is a
 
`Software Freedom Conservancy`_ project and thus controlled by a non-profit organization.
 
No commercial entity can take ownership of the project and change the direction.
 

	
 
Kallithea started out as an effort to make sure the existing GPLv3 codebase would stay
 
available under a legal license. Kallithea thus has to stay GPLv3 compatible ...
 
but we are also happy it is GPLv3 and happy to keep it that way.
 
A different license (such as AGPL) could perhaps help attract a different community
 
with a different mix of Free Software people and companies but we are happy with the current focus.
 

	
 

	
 
Getting help
 
------------
 
Community
 
---------
 

	
 
``Kallithea`` is maintained by its users who contribute the fixes they would like to see.
 

	
 
Listed bellow are various support resources that should help.
 
Get in touch with the rest of the community:
 

	
 
.. note::
 
- Join the mailing list users and developers - see
 
  http://lists.sfconservancy.org/mailman/listinfo/kallithea-general.
 

	
 
   Please try to read the documentation before posting any issues, especially
 
   the **troubleshooting section**
 
- Use IRC and join #kallithea on FreeNode (irc.freenode.net)
 
  or use http://webchat.freenode.net/?channels=kallithea.
 

	
 
- Open an issue at `issue tracker <https://bitbucket.org/conservancy/kallithea/issues>`_
 
- Follow ``Kallithea`` on Twitter, **@KallitheaSCM**.
 

	
 
- Join #kallithea on FreeNode (irc.freenode.net)
 
  or use http://webchat.freenode.net/?channels=kallithea for web access to irc.
 
- Issues can be reported at `issue tracker <https://bitbucket.org/conservancy/kallithea/issues>`_.
 

	
 
You can follow this project on Twitter, **@KallitheaSCM**.
 
   .. note::
 

	
 
       Please try to read the documentation before posting any issues, especially
 
       the **troubleshooting section**
 

	
 

	
 
Online documentation
 
--------------------
 

	
 
Online documentation for the current version of Kallithea is available at
 
 - http://packages.python.org/Kallithea/
 
 - http://kallithea.readthedocs.org/
 
Online documentation for the current version of Kallithea is available at https://pythonhosted.org/Kallithea/.
 
Documentation for the current development version can be found on http://kallithea.readthedocs.org/.
 

	
 
You may also build the documentation for yourself: go into ``docs/`` and run::
 
You can also build the documentation locally: go to ``docs/`` and run::
 

	
 
   make html
 

	
 
(You need to have Sphinx_ installed to build the documentation. If you don't
 
have Sphinx_ installed you can install it via the command:
 
``easy_install sphinx``)
 
``pip install sphinx``)
 

	
 

	
 
Converting from RhodeCode
 
-------------------------
 

	
 
Currently, you have two options for working with an existing RhodeCode database:
 
 - keep the database unconverted (intended for testing and evaluation)
 
 - convert the database in a one-time step
 

	
 
Maintaining Interoperability
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
Interoperability with RhodeCode 2.2.5 installations is provided so you don't
 
Interoperability with RhodeCode 2.2.X installations is provided so you don't
 
have to immediately commit to switching to Kallithea. This option will most
 
likely go away once the two projects have diverged significantly.
 

	
 
To run Kallithea on a RhodeCode database, run::
 

	
 
   echo "BRAND = 'rhodecode'" > kallithea/brand.py
 

	
 
This location will depend on where you installed Kallithea. If you installed via::
 

	
 
   python setup.py install
 

	
 
then you will find this location at
 
``$VIRTUAL_ENV/lib/python2.7/site-packages/Kallithea-2.2.5-py2.7.egg/kallithea``
 
``$VIRTUAL_ENV/lib/python2.7/site-packages/Kallithea-0.1-py2.7.egg/kallithea``.
 

	
 
One-time Conversion
 
~~~~~~~~~~~~~~~~~~~
 

	
 
Alternatively, if you would like to convert the database for good, you can use
 
a helper script provided by Kallithea. This script will operate directly on the
 
database, using the database string you can find in your ``production.ini`` (or
 
``development.ini``) file. For example, if using SQLite::
 

	
 
   cd /path/to/kallithea
 
   cp /path/to/rhodecode/rhodecode.db kallithea.db
 
   pip install sqlalchemy-migrate
 
   python kallithea/bin/rebranddb.py sqlite:///kallithea.db
 

	
 
.. WARNING::
 
.. Note::
 

	
 
   If you used the other method for interoperability, overwrite brand.py with
 
   an empty file (or watch out for stray brand.pyc after removing brand.py).
 
   If you started out using the branding interoperability approach mentioned
 
   above, watch out for stray brand.pyc after removing brand.py.
 

	
 
.. _virtualenv: http://pypi.python.org/pypi/virtualenv
 
.. _Python: http://www.python.org/
 
.. _Sphinx: http://sphinx.pocoo.org/
 
.. _Mercurial: http://mercurial.selenic.com/
 
.. _Bitbucket: http://bitbucket.org/
 
.. _GitHub: http://github.com/
 
.. _Subversion: http://subversion.tigris.org/
 
.. _Git: http://git-scm.com/
 
.. _Celery: http://celeryproject.org/
 
.. _vcs: http://pypi.python.org/pypi/vcs
 
.. _Software Freedom Conservancy: http://sfconservancy.org/
docs/api/api.rst
Show inline comments
 
.. _api:
 

	
 
===
 
API
 
===
 

	
 

	
 
Kallithea has a simple JSON RPC API with a single schema for calling all api
 
methods. Everything is available by sending JSON encoded http(s) requests to
 
<your_server>/_admin/api .
 

	
 

	
 
API ACCESS FOR WEB VIEWS
 
API access for web views
 
++++++++++++++++++++++++
 

	
 
API access can also be turned on for each web view in Kallithea that is
 
decorated with the `@LoginRequired` decorator. Some views use
 
`@LoginRequired(api_access=True)` and are always available. By default only
 
RSS/ATOM feed views are enabled. Other views are
 
only available if they have been white listed. Edit the
 
`api_access_controllers_whitelist` option in your .ini file and define views
 
that should have API access enabled.
 

	
 
For example, to enable API access to patch/diff raw file and archive::
 

	
 
@@ -27,25 +27,25 @@ For example, to enable API access to pat
 
        ChangesetController:changeset_patch,
 
        ChangesetController:changeset_raw,
 
        FilesController:raw,
 
        FilesController:archivefile
 

	
 
After this change, a Kallithea view can be accessed without login by adding a
 
GET parameter `?api_key=<api_key>` to url.
 

	
 
Exposing raw diffs is a good way to integrate with
 
3rd party services like code review, or build farms that could download archives.
 

	
 

	
 
API ACCESS
 
API access
 
++++++++++
 

	
 
Clients must send JSON encoded JSON-RPC requests::
 

	
 
    {
 
        "id: "<id>",
 
        "api_key": "<api_key>",
 
        "method": "<method_name>",
 
        "args": {"<arg_key>": "<arg_val>"}
 
    }
 

	
 
For example, to pull to a local "CPython" mirror using curl::
 
@@ -66,25 +66,25 @@ The response to the JSON-RPC API call wi
 

	
 
    {
 
        "id":<id>, # the id that was used in the request
 
        "result": "<result>"|null, # JSON formatted result, null if any errors
 
        "error": "null"|<error_message> # JSON formatted error (if any)
 
    }
 

	
 
All responses from API will be `HTTP/1.0 200 OK`. If there is an error,
 
the reponse will have a failure description in *error* and
 
*result* will be null.
 

	
 

	
 
API CLIENT
 
API client
 
++++++++++
 

	
 
Kallithea comes with a `kallithea-api` command line tool providing a convenient
 
way to call the JSON-RPC API.
 

	
 
For example, to call `get_repo`::
 

	
 
 kallithea-api --apihost=<your.kallithea.server.url> --apikey=<yourapikey> get_repo
 

	
 
 calling {"api_key": "<apikey>", "id": 75, "args": {}, "method": "get_repo"} to http://127.0.0.1:5000
 
 Kallithea said:
 
 {'error': 'Missing non optional `repoid` arg in JSON DATA',
 
@@ -100,25 +100,25 @@ Oops, looks like we forgot to add an arg
 
    {'error': None,
 
     'id': 39,
 
     'result': <json data...>}
 

	
 
To avoid specifying apihost and apikey every time, run::
 

	
 
  kallithea-api --save-config --apihost=<your.kallithea.server.url> --apikey=<yourapikey>
 

	
 
This will create a `~/.config/kallithea` with the specified hostname and apikey
 
so you don't have to specify them every time.
 

	
 

	
 
API METHODS
 
API methods
 
+++++++++++
 

	
 

	
 
pull
 
----
 

	
 
Pull the given repo from remote location. Can be used to automatically keep
 
remote repos up to date.
 
This command can only be executed using the api_key of a user with admin rights.
 

	
 
INPUT::
 

	
docs/contributing.rst
Show inline comments
 
.. _contributing:
 

	
 
=========================
 
Contributing to Kallithea
 
=========================
 

	
 
If you would like to contribute to Kallithea, please contact us, any help is
 
greatly appreciated!
 
Kallithea is developed and maintained by its users. Please join us and scratch
 
your own itch.
 

	
 

	
 
Infrastructure
 
--------------
 

	
 
Could I request that you make your source contributions by first forking the
 
Kallithea repository on bitbucket_
 
https://bitbucket.org/conservancy/kallithea and then make your changes to
 
your forked repository. Please post all fixes into **dev** bookmark since your
 
change might be already fixed there and i try to merge all fixes from dev into
 
stable, and not the other way. Finally, when you are finished with your changes,
 
please send us a pull request.
 
The main repository is hosted at Our Own Kallithea (aka OOK) on
 
https://kallithea-scm.org/repos/kallithea/ (which is our self-hosted instance
 
of Kallithea).
 

	
 
To run Kallithea in a development version you always need to install the latest
 
required libs. Simply clone Kallithea and switch to beta branch::
 
For now, we use Bitbucket_ for `Pull Requests`_ and `Issue Tracker`_ services. The
 
issue tracker is for tracking bugs, not for "support", discussion or ideas -
 
please use the `mailing list`_ to reach the community.
 

	
 
We use Weblate_ to translate the user interface messages into languages other
 
than English. Join our project on `Hosted Weblate`_ to help us.
 
To register, you can use your Bitbucket or GitHub account.
 

	
 

	
 
    hg clone https://kallithea-scm.org/repos/kallithea
 
Getting started
 
---------------
 

	
 
after downloading/pulling Kallithea make sure you run::
 

	
 
    python setup.py develop
 
To get started with development::
 

	
 
command to install/verify all required packages, and prepare development
 
enviroment.
 
        hg clone https://kallithea-scm.org/repos/kallithea
 
        cd kallithea
 
        virtualenv ../kallithea-venv
 
        source ../kallithea-venv/bin/activate
 
        python setup.py develop
 
        paster make-config Kallithea my.ini
 
        paster setup-db my.ini --user=user --email=user@example.com --password=password --repos=/tmp
 
        paster serve my.ini --reload &
 
        firefox http://127.0.0.1:5000/
 

	
 
There are two files in the directory production.ini and developement.ini copy
 
the `development.ini` file as rc.ini (which is excluded from version controll)
 
and put all your changes like db connection or server port in there.
 
You can also start out by forking https://bitbucket.org/conservancy/kallithea
 
on Bitbucket_ and create a local clone of your own fork.
 

	
 

	
 
After finishing your changes make sure all tests passes ok. You can run
 
Running tests
 
-------------
 

	
 
After finishing your changes make sure all tests pass cleanly. You can run
 
the testsuite running ``nosetest`` from the project root, or if you use tox
 
run tox for python2.6-2.7 with multiple database test. When using `nosetests`
 
test.ini file is used and by default it uses sqlite for tests, edit this file
 
to change your testing enviroment.
 

	
 

	
 
There's a special set of tests for push/pull operations, you can runn them using::
 

	
 
    paster serve test.ini --pid-file=test.pid --daemon
 
    KALLITHEA_WHOOSH_TEST_DISABLE=1 KALLITHEA_NO_TMP_PATH=1 nosetests -x kallithea/tests/other/test_vcs_operations.py
 
    kill -9 $(cat test.pid)
 

	
 

	
 
| Thank you for any contributions!
 
Coding/contribution guidelines
 
------------------------------
 

	
 
Kallithea is GPLv3 and we assume all contributions are made by the
 
committer/contributor and under GPLv3 unless explicitly stated. We do care a
 
lot about preservation of copyright and license information for existing code
 
that is brought into the project.
 

	
 
We don't have a formal coding/formatting standard. We are currently using a mix
 
of Mercurial (http://mercurial.selenic.com/wiki/CodingStyle), pep8, and
 
consistency with existing code. Run whitespacecleanup.sh to avoid stupid
 
whitespace noise in your patches.
 

	
 
We support both Python 2.6.x and 2.7.x and nothing else. For now we don't care
 
about Python 3 compatibility.
 

	
 
We try to support the most common modern web browsers. IE8 is still supported
 
to the extent it is feasible but we may stop supporting it very soon.
 

	
 
We primarily support Linux and OS X on the server side but Windows should also work.
 

	
 
Html templates should use 2 spaces for indentation ... but be pragmatic. We
 
should use templates cleverly and avoid duplication. We should use reasonable
 
semantic markup with classes and ids that can be used for styling and testing.
 
We should only use inline styles in places where it really is semantic (such as
 
display:none).
 

	
 
JavaScript must use ';' between/after statements. Indentation 4 spaces. Inline
 
multiline functions should be indented two levels - one for the () and one for
 
{}. jQuery value arrays should have a leading $.
 

	
 
Commit messages should have a leading short line summarizing the changes. For
 
bug fixes, put "(Issue #123)" at the end of this line.
 

	
 
Contributions will be accepted in most formats - such as pull requests on
 
bitbucket, something hosted on your own Kallithea instance, or patches sent by
 
mail to the kallithea-general mailing list.
 

	
 
Make sure to test your changes both manually and with the automatic tests
 
before posting.
 

	
 
We care about quality and review and keeping a clean repository history. We
 
might give feedback that requests polishing contributions until they are
 
"perfect". We might also rebase and collapse and make minor adjustments to your
 
changes when we apply them.
 

	
 
We try to make sure we have consensus on the direction the project is taking.
 
Everything non-sensitive should be discussed in public - preferably on the
 
mailing list.  We aim at having all non-trivial changes reviewed by at least
 
one other core developer before pushing. Obvious non-controversial changes will
 
be handled more casually.
 

	
 
For now we just have one official branch ("default") and will keep it so stable
 
that it can be (and is) used in production. Experimental changes should live
 
elsewhere (for example in a pull request) until they are ready.
 

	
 

	
 
"Roadmap"
 
---------
 

	
 
We do not have a road map but are waiting for your contributions. Here are some
 
ideas of places we might want to go - contributions in these areas are very
 
welcome:
 

	
 
* Front end:
 
    * kill YUI - more jQuery
 
    * remove other dependencies - especially the embedded cut'n'pasted ones
 
    * remove hardcoded styling in templates, make markup more semantic while moving all styling to css
 
    * switch to bootstrap or some other modern UI library and cleanup of style.css and contextbar.css
 
    * new fancy style that looks good
 
* testing
 
    * better test coverage with the existing high level test framework
 
    * test even more high level and javascript - selenium/robot and splinter seems like the top candidates
 
    * more unit testing
 
* code cleanup
 
    * move code from templates to controllers and from controllers to libs or models
 
    * more best practice for web apps and the frameworks
 
* features
 
    * relax dependency version requirements after thorough testing
 
    * support for evolve
 
    * updates of PRs ... while preserving history and comment context
 
    * auto pr merge/rebase
 
    * ssh
 
    * bitbucket compatible wiki
 
    * realtime preview / wysiwyg when editing comments and files
 
    * make journal more useful - filtering on branches and files
 
    * community mode with self registration and personal space
 
    * improve documentation
 

	
 
Thank you for your contribution!
 
--------------------------------
 

	
 

	
 
.. _Weblate: http://weblate.org/
 
.. _Issue Tracker: https://bitbucket.org/conservancy/kallithea/issues?status=new&status=open
 
.. _Pull Requests: https://bitbucket.org/conservancy/kallithea/pull-requests
 
.. _bitbucket: http://bitbucket.org/
 
.. _mailing list: http://lists.sfconservancy.org/mailman/listinfo/kallithea-general
 
.. _Hosted Weblate: https://hosted.weblate.org/projects/kallithea/kallithea/
docs/index.rst
Show inline comments
 
.. _index:
 

	
 
.. include:: ./../README.rst
 
Administrators Guide
 
--------------------
 

	
 
**Readme**
 

	
 
Users Guide
 
-----------
 
.. toctree::
 
   :maxdepth: 1
 

	
 
**Installation:**
 
   readme
 

	
 
**Installation**
 

	
 
.. toctree::
 
   :maxdepth: 1
 

	
 
   installation
 
   upgrade
 
   installation_win
 
   installation_win_old
 
   installation_iis
 
   setup
 

	
 
**Usage**
 

	
 
.. toctree::
 
   :maxdepth: 1
 

	
 
   usage/general
 
   usage/git_support
docs/installation.rst
Show inline comments
 
.. _installation:
 

	
 
==========================
 
Installation on Unix/Linux
 
==========================
 

	
 
``Kallithea`` is written entirely in Python. Before posting any issues make
 
sure, your not missing any system libraries and using right version of
 
libraries required by Kallithea. There's also restriction in terms of mercurial
 
clients. Minimal version of hg client known working fine with Kallithea is
 
**1.6**. If you're using older client, please upgrade.
 
``Kallithea`` is written entirely in Python.  Kallithea requires Python version
 
2.6 or higher.
 

	
 
.. Note:: Alternative very detailed installation instructions for Ubuntu Server
 
   with celery, indexer and daemon scripts: https://gist.github.com/4546398
 

	
 

	
 
Installing Kallithea from PyPI (aka "Cheeseshop")
 
-------------------------------------------------
 

	
 
Kallithea requires python version 2.6 or higher.
 
Installing Kallithea from Python Package Index (PyPI)
 
-----------------------------------------------------
 

	
 
The easiest way to install ``kallithea`` is to run::
 

	
 
    easy_install kallithea
 

	
 
Or::
 
``Kallithea`` can be installed from PyPI with::
 

	
 
    pip install kallithea
 

	
 
If you prefer to install Kallithea manually simply grab latest release from
 
http://pypi.python.org/pypi/Kallithea, decompress the archive and run::
 

	
 
    python setup.py install
 

	
 
Step by step installation example for Windows
 
---------------------------------------------
 

	
 
:ref:`installation_win`
 

	
 
Installation in virtualenv
 
--------------------------
 

	
 
Step by step installation example for Linux
 
-------------------------------------------
 

	
 
It is highly recommended to use a separate virtualenv_ for installing Kallithea.
 
This way, all libraries required by Kallithea will be installed separately from your
 
main Python installation and things will be less problematic when upgrading the
 
system or Kallithea.
 
An additional benefit of virtualenv_ is that it doesn't require root privileges. 
 

	
 
For installing Kallithea i highly recommend using separate virtualenv_. This
 
way many required by Kallithea libraries will remain sandboxed from your main
 
python and making things less problematic when doing system python updates.
 

	
 
Alternative very detailed installation instructions for Ubuntu Server with
 
celery, indexer and daemon scripts: https://gist.github.com/4546398
 

	
 

	
 
- Assuming you have installed virtualenv_ create a new virtual environment
 
- Assuming you have installed virtualenv_, create a new virtual environment
 
  using virtualenv command::
 

	
 
    virtualenv --no-site-packages /opt/kallithea-venv
 
    virtualenv /srv/kallithea/venv
 

	
 
.. note:: Older versions of virtualenv required ``--no-site-packages`` to work
 
   correctly. It should no longer be necessary.
 

	
 
.. note:: Using ``--no-site-packages`` when generating your
 
   virtualenv is **very important**. This flag provides the necessary
 
   isolation for running the set of packages required by
 
   Kallithea.  If you do not specify ``--no-site-packages``,
 
   it's possible that Kallithea will not install properly into
 
   the virtualenv, or, even if it does, may not run properly,
 
   depending on the packages you've already got installed into your
 
   Python's "main" site-packages dir.
 
- this will install new virtualenv_ into `/srv/kallithea/venv`.
 
- Activate the virtualenv_ in your current shell session by running::
 

	
 

	
 
- this will install new virtualenv_ into `/opt/kallithea-venv`.
 
- Activate the virtualenv_ by running::
 

	
 
    source /opt/kallithea-venv/bin/activate
 
    source /srv/kallithea/venv/bin/activate
 

	
 
.. note:: If you're using UNIX, *do not* use ``sudo`` to run the
 
   ``virtualenv`` script.  It's perfectly acceptable (and desirable)
 
   to create a virtualenv as a normal user.
 

	
 
- Make a folder for Kallithea data files, and configuration somewhere on the
 
  filesystem. For example::
 

	
 
    mkdir /opt/kallithea
 

	
 
    mkdir /srv/kallithea
 

	
 
- Go into the created directory run this command to install kallithea::
 

	
 
    easy_install kallithea
 

	
 
  or::
 

	
 
    pip install kallithea
 

	
 
  Alternatively, download a .tar.gz from http://pypi.python.org/pypi/Kallithea,
 
  extract it and run::
 

	
 
    python setup.py install
 

	
 
- This will install Kallithea together with pylons and all other required
 
  python libraries into activated virtualenv
 
  python libraries into the activated virtualenv.
 

	
 

	
 
Requirements for Celery (optional)
 
----------------------------------
 

	
 
In order to gain maximum performance
 
there are some third-party you must install. When Kallithea is used
 
together with celery you have to install some kind of message broker,
 
recommended one is rabbitmq_ to make the async tasks work.
 

	
 
Of course Kallithea works in sync mode also and then you do not have to install
 
any third party applications. However, using Celery_ will give you a large
 
speed improvement when using many big repositories. If you plan to use
 
@@ -112,22 +86,116 @@ celeryd using paster and message broker 
 

	
 

	
 
**Message Broker**
 

	
 
- preferred is `RabbitMq <http://www.rabbitmq.com/>`_
 
- A possible alternative is `Redis <http://code.google.com/p/redis/>`_
 

	
 
For installation instructions you can visit:
 
http://ask.github.com/celery/getting-started/index.html.
 
This is a very nice tutorial on how to start using celery_ with rabbitmq_
 

	
 

	
 
You can now proceed to :ref:`setup`
 
-----------------------------------
 
Next
 
----
 

	
 
You can now proceed to :ref:`setup`.
 

	
 

	
 
Upgrading Kallithea from Python Package Index (PyPI)
 
-----------------------------------------------------
 

	
 
.. note::
 
   Firstly, it is recommended that you **always** perform a database and
 
   configuration backup before doing an upgrade.
 

	
 
   (These directions will use '{version}' to note that this is the version of
 
   Kallithea that these files were used with.  If backing up your Kallithea
 
   instance from version 0.1 to 0.2, the ``my.ini`` file could be
 
   backed up to ``my.ini.0-1``.)
 

	
 

	
 
If using a sqlite database, stop the Kallithea process/daemon/service, and
 
then make a copy of the database file::
 

	
 
 service kallithea stop
 
 cp kallithea.db kallithea.db.{version}
 

	
 

	
 
Back up your configuration file::
 

	
 
 cp my.ini my.ini.{version}
 

	
 

	
 
Ensure that you are using the Python Virtual Environment that you'd originally
 
installed Kallithea in::
 

	
 
 pip freeze
 

	
 
will list all packages installed in the current environment.  If Kallithea
 
isn't listed, change virtual environments to your venv location::
 

	
 
 source /srv/kallithea/venv/bin/activate
 

	
 

	
 
Once you have verified the environment you can upgrade ``Kallithea`` with::
 

	
 
 pip install --upgrade kallithea
 

	
 

	
 
Then run the following command from the installation directory::
 

	
 
 paster make-config Kallithea my.ini
 

	
 
This will display any changes made by the new version of Kallithea to your
 
current configuration. It will try to perform an automerge. It's recommended
 
that you re-check the content after the automerge.
 

	
 
.. note::
 
   Please always make sure your .ini files are up to date. Often errors are
 
   caused by missing params added in new versions.
 

	
 

	
 
It is also recommended that you rebuild the whoosh index after upgrading since
 
the new whoosh version could introduce some incompatible index changes. Please
 
read the changelog to see if there were any changes to whoosh.
 

	
 

	
 
The final step is to upgrade the database. To do this simply run::
 

	
 
 paster upgrade-db my.ini
 

	
 
This will upgrade the schema and update some of the defaults in the database,
 
and will always recheck the settings of the application, if there are no new
 
options that need to be set.
 

	
 

	
 
.. note::
 
   DB schema upgrade library has some limitations and can sometimes fail if you try to
 
   upgrade from older major releases. In such case simply run upgrades sequentially, eg.
 
   upgrading from 0.1.X to 0.3.X should be done like that: 0.1.X. > 0.2.X > 0.3.X
 
   You can always specify what version of Kallithea you want to install for example in pip
 
   `pip install Kallithea==0.2`
 

	
 
You may find it helpful to clear out your log file so that new errors are
 
readily apparent::
 

	
 
 echo > kallithea.log
 

	
 
Once that is complete, you may now start your upgraded Kallithea Instance::
 

	
 
 service kallithea start
 

	
 
Or::
 

	
 
 paster serve /srv/kallithea/my.ini
 

	
 
.. note::
 
   If you're using Celery, make sure you restart all instances of it after
 
   upgrade.
 

	
 

	
 
.. _virtualenv: http://pypi.python.org/pypi/virtualenv
 
.. _python: http://www.python.org/
 
.. _mercurial: http://mercurial.selenic.com/
 
.. _celery: http://celeryproject.org/
 
.. _rabbitmq: http://www.rabbitmq.com/
docs/installation_win.rst
Show inline comments
 
@@ -62,24 +62,25 @@ http://sourceforge.net/projects/pywin32/
 
Step 4 - Install pip
 
--------------------
 

	
 
pip is a package management system for Python. You will need it to install Kallithea and its dependencies.
 

	
 
If you installed Python 2.7.9+, you already have it (as long as you ran the installer with admin privileges or disabled UAC).
 

	
 
If it was not installed or if you are using Python>=2.6,<2.7.9:
 

	
 
- Go to https://bootstrap.pypa.io
 
- Right-click on get-pip.py and choose Saves as...
 
- Run "python get-pip.py" in the folder where you downloaded get-pip.py (may require admin access).
 

	
 
(See http://stackoverflow.com/questions/4750806/how-to-install-pip-on-windows for explanations or alternatives)
 

	
 
Note that pip.exe will be placed inside your Python installation's Scripts folder, which is likely not on your path.
 

	
 
Open a CMD and type::
 

	
 
  SETX PATH "%PATH%;[your-python-path]\Scripts" /M
 

	
 

	
 
Step 5 - Kallithea Folder Structure
 
-----------------------------------
 

	
docs/readme.rst
Show inline comments
 
new file 100644
 
.. _readme:
 

	
 
.. include:: ./../README.rst
docs/setup.rst
Show inline comments
 
@@ -2,81 +2,81 @@
 

	
 
=====
 
Setup
 
=====
 

	
 

	
 
Setting up Kallithea
 
--------------------
 

	
 
First, you will need to create a Kallithea configuration file. Run the
 
following command to do this::
 

	
 
    paster make-config Kallithea production.ini
 
    paster make-config Kallithea my.ini
 

	
 
- This will create the file `production.ini` in the current directory. This
 
- This will create the file `my.ini` in the current directory. This
 
  configuration file contains the various settings for Kallithea, e.g proxy
 
  port, email settings, usage of static files, cache, celery settings and
 
  logging.
 

	
 

	
 
Next, you need to create the databases used by Kallithea. I recommend that you
 
Next, you need to create the databases used by Kallithea. It is recommended to
 
use postgresql or sqlite (default). If you choose a database other than the
 
default ensure you properly adjust the db url in your production.ini
 
default ensure you properly adjust the db url in your my.ini
 
configuration file to use this other database. Kallithea currently supports
 
postgresql, sqlite and mysql databases. Create the database by running
 
the following command::
 

	
 
    paster setup-db production.ini
 
    paster setup-db my.ini
 

	
 
This will prompt you for a "root" path. This "root" path is the location where
 
Kallithea will store all of its repositories on the current machine. After
 
entering this "root" path ``setup-db`` will also prompt you for a username
 
and password for the initial admin account which ``setup-db`` sets
 
up for you.
 

	
 
setup process can be fully automated, example for lazy::
 

	
 
    paster setup-db production.ini --user=nn --password=secret --email=nn@your.kallithea.server --repos=/home/nn/my_repos
 
    paster setup-db my.ini --user=nn --password=secret --email=nn@your.kallithea.server --repos=/srv/repos
 

	
 

	
 
- The ``setup-db`` command will create all of the needed tables and an
 
  admin account. When choosing a root path you can either use a new empty
 
  location, or a location which already contains existing repositories. If you
 
  choose a location which contains existing repositories Kallithea will simply
 
  add all of the repositories at the chosen location to it's database.
 
  (Note: make sure you specify the correct path to the root).
 
- Note: the given path for mercurial_ repositories **must** be write accessible
 
  for the application. It's very important since the Kallithea web interface
 
  will work without write access, but when trying to do a push it will
 
  eventually fail with permission denied errors unless it has write access.
 

	
 
You are now ready to use Kallithea, to run it simply execute::
 

	
 
    paster serve production.ini
 
    paster serve my.ini
 

	
 
- This command runs the Kallithea server. The web app should be available at the
 
  127.0.0.1:5000. This ip and port is configurable via the production.ini
 
  127.0.0.1:5000. This ip and port is configurable via the my.ini
 
  file created in previous step
 
- Use the admin account you created above when running ``setup-db``
 
  to login to the web app.
 
- The default permissions on each repository is read, and the owner is admin.
 
  Remember to update these if needed.
 
- In the admin panel you can toggle ldap, anonymous, permissions settings. As
 
- In the admin panel you can toggle LDAP, anonymous, permissions settings. As
 
  well as edit more advanced options on users and repositories
 

	
 
Optionally users can create `rcextensions` package that extends Kallithea
 
functionality. To do this simply execute::
 

	
 
    paster make-rcext production.ini
 
    paster make-rcext my.ini
 

	
 
This will create `rcextensions` package in the same place that your `ini` file
 
lives. With `rcextensions` it's possible to add additional mapping for whoosh,
 
stats and add additional code into the push/pull/create/delete repo hooks.
 
For example for sending signals to build-bots such as jenkins.
 
Please see the `__init__.py` file inside `rcextensions` package
 
for more details.
 

	
 

	
 
Using Kallithea with SSH
 
------------------------
 

	
 
@@ -87,103 +87,97 @@ the box" feature of mercurial_ and you c
 
repositories that Kallithea is hosting. See PublishingRepositories_)
 

	
 
Kallithea repository structures are kept in directories with the same name
 
as the project. When using repository groups, each group is a subdirectory.
 
This allows you to easily use ssh for accessing repositories.
 

	
 
In order to use ssh you need to make sure that your web-server and the users
 
login accounts have the correct permissions set on the appropriate directories.
 
(Note that these permissions are independent of any permissions you have set up
 
using the Kallithea web interface.)
 

	
 
If your main directory (the same as set in Kallithea settings) is for example
 
set to **/home/hg** and the repository you are using is named `kallithea`, then
 
set to **/srv/repos** and the repository you are using is named `kallithea`, then
 
to clone via ssh you should run::
 

	
 
    hg clone ssh://user@server.com/home/hg/kallithea
 
    hg clone ssh://user@server.com//srv/repos/kallithea
 

	
 
Using other external tools such as mercurial-server_ or using ssh key based
 
authentication is fully supported.
 

	
 
Note: In an advanced setup, in order for your ssh access to use the same
 
permissions as set up via the Kallithea web interface, you can create an
 
authentication hook to connect to the Kallithea db and runs check functions for
 
permissions against that.
 

	
 
Setting up Whoosh full text search
 
----------------------------------
 

	
 
Starting from version 1.1 the whoosh index can be build by using the paster
 
The whoosh index can be build by using the paster
 
command ``make-index``. To use ``make-index`` you must specify the configuration
 
file that stores the location of the index. You may specify the location of the
 
repositories (`--repo-location`).  If not specified, this value is retrieved
 
from the Kallithea database.  This was required prior to 1.2.  Starting from
 
version 1.2 it is also possible to specify a comma separated list of
 
from the Kallithea database.
 
It is also possible to specify a comma separated list of
 
repositories (`--index-only`) to build index only on chooses repositories
 
skipping any other found in repos location
 

	
 
You may optionally pass the option `-f` to enable a full index rebuild. Without
 
the `-f` option, indexing will run always in "incremental" mode.
 

	
 
For an incremental index build use::
 

	
 
    paster make-index production.ini
 
    paster make-index my.ini
 

	
 
For a full index rebuild use::
 

	
 
    paster make-index production.ini -f
 
    paster make-index my.ini -f
 

	
 

	
 
building index just for chosen repositories is possible with such command::
 

	
 
 paster make-index production.ini --index-only=vcs,kallithea
 
    paster make-index my.ini --index-only=vcs,kallithea
 

	
 

	
 
In order to do periodical index builds and keep your index always up to date.
 
It's recommended to do a crontab entry for incremental indexing.
 
An example entry might look like this::
 

	
 
    /path/to/python/bin/paster make-index /path/to/kallithea/production.ini
 
    /path/to/python/bin/paster make-index /path/to/kallithea/my.ini
 

	
 
When using incremental mode (the default) whoosh will check the last
 
modification date of each file and add it to be reindexed if a newer file is
 
available. The indexing daemon checks for any removed files and removes them
 
from index.
 

	
 
If you want to rebuild index from scratch, you can use the `-f` flag as above,
 
or in the admin panel you can check `build from scratch` flag.
 

	
 

	
 
Setting up LDAP support
 
-----------------------
 

	
 
Kallithea starting from version 1.1 supports ldap authentication. In order
 
Kallithea supports LDAP authentication. In order
 
to use LDAP, you have to install the python-ldap_ package. This package is
 
available via pypi, so you can install it by running
 

	
 
using easy_install::
 

	
 
    easy_install python-ldap
 

	
 
using pip::
 

	
 
    pip install python-ldap
 

	
 
.. note::
 
   python-ldap requires some certain libs on your system, so before installing
 
   it check that you have at least `openldap`, and `sasl` libraries.
 

	
 
LDAP settings are located in admin->ldap section,
 
LDAP settings are located in Admin->LDAP section.
 

	
 
Here's a typical ldap setup::
 
Here's a typical LDAP setup::
 

	
 
 Connection settings
 
 Enable LDAP          = checked
 
 Host                 = host.example.org
 
 Port                 = 389
 
 Account              = <account>
 
 Password             = <password>
 
 Connection Security  = LDAPS connection
 
 Certificate Checks   = DEMAND
 

	
 
 Search settings
 
 Base DN              = CN=users,DC=host,DC=example,DC=org
 
@@ -232,25 +226,25 @@ Password : optional
 
    Only required if the LDAP server does not allow anonymous browsing of
 
    records.
 

	
 
.. _Enable LDAPS:
 

	
 
Connection Security : required
 
    Defines the connection to LDAP server
 

	
 
    No encryption
 
        Plain non encrypted connection
 

	
 
    LDAPS connection
 
        Enable ldaps connection. It will likely require `Port`_ to be set to
 
        Enable LDAPS connections. It will likely require `Port`_ to be set to
 
        a different value (standard LDAPS port is 636). When LDAPS is enabled
 
        then `Certificate Checks`_ is required.
 

	
 
    START_TLS on LDAP connection
 
        START TLS connection
 

	
 
.. _Certificate Checks:
 

	
 
Certificate Checks : optional
 
    How SSL certificates verification is handled - this is only useful when
 
    `Enable LDAPS`_ is enabled.  Only DEMAND or HARD offer full SSL security
 
    while the other options are susceptible to man-in-the-middle attacks.  SSL
 
@@ -329,25 +323,25 @@ First Name Attribute : required
 

	
 
.. _ldap_attr_lastname:
 

	
 
Last Name Attribute : required
 
    The LDAP record attribute which represents the user's last name.
 

	
 
.. _ldap_attr_email:
 

	
 
Email Attribute : required
 
    The LDAP record attribute which represents the user's email address.
 

	
 
If all data are entered correctly, and python-ldap_ is properly installed
 
users should be granted access to Kallithea with ldap accounts.  At this
 
users should be granted access to Kallithea with LDAP accounts.  At this
 
time user information is copied from LDAP into the Kallithea user database.
 
This means that updates of an LDAP user object may not be reflected as a
 
user update in Kallithea.
 

	
 
If You have problems with LDAP access and believe You entered correct
 
information check out the Kallithea logs, any error messages sent from LDAP
 
will be saved there.
 

	
 
Active Directory
 
''''''''''''''''
 

	
 
Kallithea can use Microsoft Active Directory for user authentication.  This
 
@@ -408,25 +402,25 @@ configure the authentication and add the
 
``X-Forwarded-User``.
 

	
 
For example, the following config section for Apache sets a subdirectory in a
 
reverse-proxy setup with basic auth::
 

	
 
    <Location /<someprefix> >
 
      ProxyPass http://127.0.0.1:5000/<someprefix>
 
      ProxyPassReverse http://127.0.0.1:5000/<someprefix>
 
      SetEnvIf X-Url-Scheme https HTTPS=1
 

	
 
      AuthType Basic
 
      AuthName "Kallithea authentication"
 
      AuthUserFile /home/web/kallithea/.htpasswd
 
      AuthUserFile /srv/kallithea/.htpasswd
 
      require valid-user
 

	
 
      RequestHeader unset X-Forwarded-User
 

	
 
      RewriteEngine On
 
      RewriteCond %{LA-U:REMOTE_USER} (.+)
 
      RewriteRule .* - [E=RU:%1]
 
      RequestHeader set X-Forwarded-User %{RU}e
 
    </Location>
 

	
 

	
 
.. note::
 
@@ -482,36 +476,36 @@ To access hooks setting click `advanced 
 
Settings in Admin.
 

	
 
There are 4 built in hooks that cannot be changed (only enable/disable by
 
checkboxes on previos section).
 
To add another custom hook simply fill in first section with
 
<name>.<hook_type> and the second one with hook path. Example hooks
 
can be found at *kallithea.lib.hooks*.
 

	
 

	
 
Changing default encoding
 
-------------------------
 

	
 
By default Kallithea uses utf8 encoding, starting from 1.3 series this
 
can be changed, simply edit default_encoding in .ini file to desired one.
 
This affects many parts in Kallithea including committers names, filenames,
 
By default, Kallithea uses utf8 encoding.
 
It is configurable as `default_encoding` in the .ini file.
 
This affects many parts in Kallithea including user names, filenames, and
 
encoding of commit messages. In addition Kallithea can detect if `chardet`
 
library is installed. If `chardet` is detected Kallithea will fallback to it
 
when there are encode/decode errors.
 

	
 

	
 
Setting Up Celery
 
-----------------
 
Celery configuration
 
--------------------
 

	
 
Since version 1.1 celery is configured by the Kallithea ini configuration files.
 
Celery is configured in the Kallithea ini configuration files.
 
Simply set use_celery=true in the ini file then add / change the configuration
 
variables inside the ini file.
 

	
 
Remember that the ini files use the format with '.' not with '_' like celery.
 
So for example setting `BROKER_HOST` in celery means setting `broker.host` in
 
the config file.
 

	
 
In order to start using celery run::
 

	
 
 paster celeryd <configfile.ini>
 

	
 

	
 
@@ -528,25 +522,25 @@ Alternatively, you can use some special 
 
directly which scheme/protocol Kallithea will use when generating URLs:
 

	
 
- With `https_fixup = true`, the scheme will be taken from the HTTP_X_URL_SCHEME,
 
  HTTP_X_FORWARDED_SCHEME or HTTP_X_FORWARDED_PROTO HTTP header (default 'http').
 
- With `force_https = true` the default will be 'https'.
 
- With `use_htsts = true`, it will set Strict-Transport-Security when using https.
 

	
 
Nginx virtual host example
 
--------------------------
 

	
 
Sample config for nginx using proxy::
 

	
 
    upstream rc {
 
    upstream kallithea {
 
        server 127.0.0.1:5000;
 
        # add more instances for load balancing
 
        #server 127.0.0.1:5001;
 
        #server 127.0.0.1:5002;
 
    }
 

	
 
    ## gist alias
 
    server {
 
       listen          443;
 
       server_name     gist.myserver.com;
 
       access_log      /var/log/nginx/gist.access.log;
 
       error_log       /var/log/nginx/gist.error.log;
 
@@ -577,29 +571,29 @@ Sample config for nginx using proxy::
 

	
 
       ssl_session_timeout 5m;
 

	
 
       ssl_protocols SSLv3 TLSv1;
 
       ssl_ciphers DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:EDH-RSA-DES-CBC3-SHA:AES256-SHA:DES-CBC3-SHA:AES128-SHA:RC4-SHA:RC4-MD5;
 
       ssl_prefer_server_ciphers on;
 

	
 
       ## uncomment root directive if you want to serve static files by nginx
 
       ## requires static_files = false in .ini file
 
       #root /path/to/installation/kallithea/public;
 
       include         /etc/nginx/proxy.conf;
 
       location / {
 
            try_files $uri @rhode;
 
            try_files $uri @kallithea;
 
       }
 

	
 
       location @rhode {
 
            proxy_pass      http://rc;
 
       location @kallithea {
 
            proxy_pass      http://kallithea;
 
       }
 

	
 
    }
 

	
 
Here's the proxy.conf. It's tuned so it will not timeout on long
 
pushes or large pushes::
 

	
 
    proxy_redirect              off;
 
    proxy_set_header            Host $host;
 
    ## needed for container auth
 
    #proxy_set_header            REMOTE_USER $remote_user;
 
    #proxy_set_header            X-Forwarded-User $remote_user;
 
@@ -690,66 +684,81 @@ that, you'll need to:
 

	
 
    a2enmod wsgi
 

	
 
- Create a wsgi dispatch script, like the one below. Make sure you
 
  check the paths correctly point to where you installed Kallithea
 
  and its Python Virtual Environment.
 
- Enable the WSGIScriptAlias directive for the wsgi dispatch script,
 
  as in the following example. Once again, check the paths are
 
  correctly specified.
 

	
 
Here is a sample excerpt from an Apache Virtual Host configuration file::
 

	
 
    WSGIDaemonProcess pylons \
 
        threads=4 \
 
        python-path=/home/web/kallithea/pyenv/lib/python2.7/site-packages
 
    WSGIScriptAlias / /home/web/kallithea/dispatch.wsgi
 
    WSGIDaemonProcess kallithea \
 
        processes=1 threads=4 \
 
        python-path=/srv/kallithea/pyenv/lib/python2.7/site-packages
 
    WSGIScriptAlias / /srv/kallithea/dispatch.wsgi
 
    WSGIPassAuthorization On
 

	
 
Or if using a dispatcher wsgi script with proper virtualenv activation::
 

	
 
    WSGIDaemonProcess kallithea processes=1 threads=4
 
    WSGIScriptAlias / /srv/kallithea/dispatch.wsgi
 
    WSGIPassAuthorization On
 

	
 

	
 
.. note::
 
   when running apache as root please add: `user=www-data group=www-data`
 
   into above configuration
 
   When running apache as root, please make sure it doesn't run Kallithea as
 
   root, for examply by adding: `user=www-data group=www-data` to the configuration.
 

	
 
.. note::
 
   Running Kallithea in multiprocess mode in apache is not supported,
 
   make sure you don't specify `processes=num` directive in the config
 
   If running Kallithea in multiprocess mode,
 
   make sure you set `instance_id = \*` in the configuration so each process
 
   gets it's own cache invalidationkey.
 

	
 

	
 
Example wsgi dispatch script::
 

	
 
    import os
 
    os.environ["HGENCODING"] = "UTF-8"
 
    os.environ['PYTHON_EGG_CACHE'] = '/home/web/kallithea/.egg-cache'
 
    os.environ['PYTHON_EGG_CACHE'] = '/srv/kallithea/.egg-cache'
 

	
 
    # sometimes it's needed to set the curent dir
 
    os.chdir('/home/web/kallithea/')
 
    os.chdir('/srv/kallithea/')
 

	
 
    import site
 
    site.addsitedir("/home/web/kallithea/pyenv/lib/python2.7/site-packages")
 
    site.addsitedir("/srv/kallithea/pyenv/lib/python2.7/site-packages")
 

	
 
    from paste.deploy import loadapp
 
    from paste.script.util.logging_config import fileConfig
 

	
 
    fileConfig('/home/web/kallithea/production.ini')
 
    application = loadapp('config:/home/web/kallithea/production.ini')
 
    fileConfig('/srv/kallithea/my.ini')
 
    application = loadapp('config:/srv/kallithea/my.ini')
 

	
 
Or using proper virtualenv activation::
 

	
 
    activate_this = '/srv/kallithea/venv/bin/activate_this.py'
 
    execfile(activate_this,dict(__file__=activate_this))
 

	
 
Note: when using mod_wsgi you'll need to install the same version of
 
Mercurial that's inside Kallithea's virtualenv also on the system's Python
 
environment.
 
    import os
 
    os.environ['HOME'] = '/srv/kallithea'
 

	
 
    ini = '/srv/kallithea/kallithea.ini'
 
    from paste.script.util.logging_config import fileConfig
 
    fileConfig(ini)
 
    from paste.deploy import loadapp
 
    application = loadapp('config:' + ini)
 

	
 

	
 
Other configuration files
 
-------------------------
 

	
 
Some example init.d scripts can be found in init.d directory::
 

	
 
  https://kallithea-scm.org/repos/kallithea/files/tip/init.d/
 
Some example init.d scripts can be found in init.d directory: https://kallithea-scm.org/repos/kallithea/files/tip/init.d/
 

	
 
.. _virtualenv: http://pypi.python.org/pypi/virtualenv
 
.. _python: http://www.python.org/
 
.. _mercurial: http://mercurial.selenic.com/
 
.. _celery: http://celeryproject.org/
 
.. _rabbitmq: http://www.rabbitmq.com/
 
.. _python-ldap: http://www.python-ldap.org/
 
.. _mercurial-server: http://www.lshift.net/mercurial-server.html
 
.. _PublishingRepositories: http://mercurial.selenic.com/wiki/PublishingRepositories
 
.. _Issues tracker: https://bitbucket.org/conservancy/kallithea/issues
docs/theme/nature/layout.html
Show inline comments
 
{% extends "basic/layout.html" %}
 

	
 
{% block sidebarlogo %}
 
<div style="text-align:center;margin:10px;padding:20px;background:white">
 
  <img src="{{pathto('_static/kallithea-logo.svg',1)}}"/>
 
</div>
 
<h3>Support Kallithea development</h3>
 
<div style="text-align:center">
 
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
 
<input type="hidden" name="cmd" value="_s-xclick">
 
<input type="hidden" name="hosted_button_id" value="EYXFS3SQPHYUL">
 
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
 
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
 
</form>
 
    <div style="padding:5px">
 
     <a href="https://flattr.com/thing/922714/Donate-to-Software-Freedom-Conservancy" target="_blank">
 
     <img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>
 
    </div>
docs/theme/nature/static/kallithea-logo.svg
Show inline comments
 
new file 100644
 
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
 
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" enable-background="new 0 0 163 30" xml:space="preserve" height="30" viewBox="0 0 140 30" width="140" version="1.1" y="0px" x="0px">
 
  <metadata>
 
    <rdf:RDF>
 
      <cc:Work rdf:about="">
 
        <dc:format>image/svg+xml</dc:format>
 
        <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
 
        <dc:title/>
 
      </cc:Work>
 
    </rdf:RDF>
 
  </metadata>
 
  <g display="none">
 
    <rect display="inline" height="163" width="256" y="-66.5" x="-24" fill="#404c2c"/>
 
  </g>
 
  <g transform="matrix(.83 0 0 1 5.6391 0)">
 
      <g fill="#b1d579">
 
        <path d="m26.04 25.875v-20.64l5.451-0.473v21.113h-5.451zm17.215 0h-6.141l-5.451-8.066 5.589-6.704h5.555l-5.555 6.481 6.003 8.289z"/>
 
        <path d="m58.951 21.592c0 1.141 0.379 1.557 1.242 1.809l-1.138 2.865c-2.174-0.141-3.588-0.668-4.416-2.143-1.311 1.641-3.347 2.225-5.52 2.225-3.657 0-5.969-1.918-5.969-4.617 0-3.227 3.036-4.979 8.59-4.979h1.863v-0.641c0-1.751-0.862-2.28-3.105-2.28-1.173 0-2.967 0.278-4.795 0.779l-1.242-2.893c2.312-0.695 4.83-1.085 6.9-1.085 5.313 0 7.59 1.808 7.59 5.229v5.731zm-5.347 0.194v-2.614h-1.346c-2.484 0-3.691 0.695-3.691 2.169 0 1.169 0.793 1.864 2.139 1.864 1.276 0 2.242-0.529 2.898-1.419z"/>
 
        <path d="m68.057 21.73c0 0.834 0.345 1.141 0.932 1.141 0.276 0 0.655-0.057 0.897-0.139l1.069 3.115c-0.931 0.305-2.242 0.5-3.519 0.5-3.036 0-4.83-1.447-4.83-4.173v-16.939l5.451-0.473v16.968z"/>
 
        <path d="m77.785 21.73c0 0.834 0.345 1.141 0.932 1.141 0.276 0 0.655-0.057 0.897-0.139l1.069 3.115c-0.931 0.305-2.242 0.5-3.519 0.5-3.036 0-4.83-1.447-4.83-4.173v-16.939l5.451-0.473v16.968z"/>
 
        <path d="m88.169 5.819c0 1.418-1.346 2.503-3.243 2.503-1.896 0-3.208-1.085-3.208-2.503 0-1.419 1.312-2.504 3.208-2.504 1.897 0 3.243 1.085 3.243 2.504zm-5.935 20.056v-14.771h5.451v14.771h-5.451z"/>
 
        <path d="m102.93 25.18c-1.379 0.779-3.312 1.168-4.968 1.168-4.036-0.027-6.003-1.863-6.003-5.341v-6.843h-2.588v-3.06h2.588v-3.199l5.451-0.5v3.7h4.209l-0.587 3.06h-3.622v6.787c0 1.419 0.586 1.92 1.725 1.92 0.621 0 1.242-0.14 1.967-0.501l1.828 2.809z"/>
 
        <path d="m120.04 15.082v10.793h-5.45v-10.042c0-1.558-0.691-1.975-1.726-1.975-1.208 0-2.208 0.695-3.175 1.892v10.125h-5.45v-20.64l5.45-0.445v7.9c1.483-1.363 3.141-2.059 5.279-2.059 3.174 0 5.072 1.641 5.072 4.451z"/>
 
        <path d="m139.5 19.783h-11.35c0.379 2.643 1.932 3.365 4.174 3.365 1.484 0 2.795-0.416 4.382-1.308l2.243 2.447c-1.829 1.168-4.176 2.06-7.143 2.06-6.105 0-9.211-3.172-9.211-7.789 0-4.422 3.002-7.928 8.557-7.928 5.242 0 8.451 2.782 8.451 7.566 0.001 0.474-0.033 1.142-0.102 1.587zm-5.244-2.838c-0.034-2.002-0.794-3.394-2.968-3.394-1.793 0-2.896 0.946-3.139 3.589h6.105l0.002-0.195z"/>
 
        <path d="m156.78 21.592c0 1.141 0.379 1.557 1.242 1.809l-1.139 2.865c-2.175-0.141-3.589-0.668-4.416-2.143-1.312 1.641-3.348 2.225-5.521 2.225-3.658 0-5.97-1.918-5.97-4.617 0-3.227 3.035-4.979 8.59-4.979h1.863v-0.641c0-1.751-0.861-2.28-3.104-2.28-1.172 0-2.968 0.278-4.795 0.779l-1.242-2.893c2.312-0.695 4.83-1.085 6.899-1.085 5.312 0 7.591 1.808 7.591 5.229l0.002 5.731zm-5.347 0.194v-2.614h-1.346c-2.484 0-3.691 0.695-3.691 2.169 0 1.169 0.793 1.864 2.14 1.864 1.275 0 2.24-0.529 2.897-1.419z"/>
 
      </g>
 
  </g>
 
  <g fill="#b1d579">
 
      <path d="m8.155 18.736c-0.086-0.21-0.048-0.579-0.048-0.579l-0.097-8.098h-1.149l0.098 8.398s-0.034 0.455 0.091 0.709c0.125 0.255 0.413 0.599 0.413 0.599l3.491 3.384s0.107 0.122 0.292 0.486l0.001-1.876-2.884-2.702c0 0.002-0.122-0.11-0.208-0.321z"/>
 
      <path d="m19.362 23.255c0.088-0.331 0.089-0.608 0.089-0.608l-0.01-2.976h-1.237v3.082s-0.007 0.113-0.069 0.254c-0.063 0.142-0.091 0.173-0.091 0.173l-2.319 2.395h1.569l1.768-1.832c0.001-0.001 0.217-0.17 0.3-0.488z"/>
 
      <path d="m12.905 15.81c0.18-0.288 0.437-0.463 0.437-0.463l2.998-3.073s0.511-0.461 0.622-0.782c0.108-0.321 0.045-1.436 0.045-1.436l-0.111-6.44h-1.491l0.077 6.441s0.062 0.514 0 0.726-0.294 0.481-0.294 0.481l-3.137 3.212s-0.638 0.705-0.743 0.934c-0.104 0.228-0.057 1.347-0.057 1.347l-0.003 5.005-0.001 1.876-0.002 1.938h1.479l0.051-8.819c-0.002-0.001-0.048-0.66 0.13-0.947z"/>
 
  </g>
 
  <g stroke="#b1d579" fill="none" stroke-miterlimit="10">
 
      <circle cx="18.723" cy="17.973" r="1.698" stroke-width="1.4318"/>
 
      <circle cx="7.454" cy="7.291" r="2.769" stroke-width="1.7898"/>
 
  </g>
 
</svg>
docs/upgrade.rst
Show inline comments
 
deleted file
docs/usage/debugging.rst
Show inline comments
 
.. _debugging:
 

	
 
===================
 
Debugging Kallithea
 
===================
 

	
 
If you encountered problems with Kallithea here are some instructions how to
 
possibly debug them.
 

	
 
** First make sure you're using the latest version available.**
 

	
 
enable detailed debug
 
Enable detailed debug
 
---------------------
 

	
 
Kallithea uses standard python logging modules to log it's output.
 
By default only loggers with INFO level are displayed. To enable full output
 
change `level = DEBUG` for all logging handlers in currently used .ini file.
 
This change will allow to see much more detailed output in the logfile or
 
console. This generally helps a lot to track issues.
 

	
 

	
 
enable interactive debug mode
 
Enable interactive debug mode
 
-----------------------------
 

	
 
To enable interactive debug mode simply comment out `set debug = false` in
 
.ini file, this will trigger and interactive debugger each time there an
 
error in browser, or send a http link if error occured in the backend. This
 
is a great tool for fast debugging as you get a handy python console right
 
in the web view. ** NEVER ENABLE THIS ON PRODUCTION ** the interactive console
 
can be a serious security threat to you system.
docs/usage/general.rst
Show inline comments
 
@@ -7,25 +7,25 @@ General Kallithea usage
 

	
 
Repository deleting
 
-------------------
 

	
 
Currently when admin/owner deletes a repository, Kallithea does not physically
 
delete a repository from filesystem, it renames it in a special way so it's
 
not possible to push,clone or access repository. It's worth a notice that,
 
even if someone will be given administrative access to Kallithea and will
 
delete a repository You can easy restore such action by restoring `rm__<date>`
 
from the repository name, and internal repository storage (.hg/.git). There
 
is also a special command for cleaning such archived repos::
 

	
 
    paster cleanup-repos --older-than=30d production.ini
 
    paster cleanup-repos --older-than=30d my.ini
 

	
 
This command will scan for archived repositories that are older than 30d,
 
display them and ask if you want to delete them (there's a --dont-ask flag also)
 
If you host big amount of repositories with forks that are constantly deleted
 
it's recommended that you run such command via crontab.
 

	
 
Follow current branch in file view
 
----------------------------------
 

	
 
In file view when this checkbox is checked the << and >> arrows will jump
 
to changesets within the same branch currently viewing. So for example
 
if someone is viewing files at 'beta' branch and marks `follow current branch`
docs/usage/git_support.rst
Show inline comments
 
.. _git_support:
 

	
 
===========
 
GIT support
 
===========
 

	
 

	
 
Git support in Kallithea 1.3 was enabled by default. You need to have a git
 
client installed on the machine to make git fully work.
 
Kallithea Git support is enabled by default. You just need a git
 
command line client installed on the server to make Git work fully.
 

	
 
Although There is one limitation on git usage.
 

	
 
- large pushes requires a http server with chunked encoding support.
 
Web server with chunked encoding
 
--------------------------------
 

	
 
if you plan to use git you need to run Kallithea with some
 
http server that supports chunked encoding which git http protocol uses,
 
i recommend using waitress_ or gunicorn_ (linux only) for `paste` wsgi app
 
replacement. Starting from version 1.4 waitress_ is the default wsgi server
 
used in Kallithea.
 
Large Git pushes do however require a http server with support for chunked encoding for POST.
 

	
 
To use, simply change change the following in the .ini file::
 
The Python web servers waitress_ and gunicorn_ (linux only) can be used.
 
By default, Kallithea uses waitress_ for `paster serve` instead of the built-in `paste` WSGI server. 
 

	
 
    use = egg:Paste#http
 

	
 
to::
 
The default paste server is controlled in the .ini file::
 

	
 
    use = egg:waitress#main
 

	
 
or::
 

	
 
    use = egg:gunicorn#main
 

	
 

	
 
And comment out bellow options::
 
Also make sure to comment out the following options::
 

	
 
    threadpool_workers =
 
    threadpool_max_requests =
 
    use_threadpool =
 

	
 

	
 
You can simply run `paster serve` as usual.
 

	
 
Disabling Git
 
-------------
 

	
 
You can always disable git/hg support by editing a
 
file **kallithea/__init__.py** and commenting out backends
 
file **kallithea/__init__.py** and commenting out the backend.
 

	
 
.. code-block:: python
 

	
 
   BACKENDS = {
 
       'hg': 'Mercurial repository',
 
       #'git': 'Git repository',
 
   }
 

	
 
.. _waitress: http://pypi.python.org/pypi/waitress
 
.. _gunicorn: http://pypi.python.org/pypi/gunicorn
docs/usage/locking.rst
Show inline comments
 
.. _locking:
 

	
 
===================================
 
Kallithea repository locking system
 
===================================
 

	
 

	
 
The scenario for repos with `locking function` enabled is that
 
every initial clone and every pull gives users (with write permission)
 
the exclusive right to do a push.
 

	
 
Each repo can be manually unlocked by admin from the repo settings menu.
 

	
 
| Repos with **locking function=disabled** is the default, that's how repos work
 
  today.
 
| Repos with **locking function=enabled** behaves like follows:
 

	
 
Repos have a state called `locked` that can be true or false.
 
The hg/git commands `hg/git clone`, `hg/git pull`, and `hg/git push`
 
influence this state:
 

	
 
- The command `hg/git pull <repo>` will lock that repo (locked=true)
 
  if the user has write/admin permissions on this repo
 

	
 
- The command `hg/git clone <repo>` will lock that repo (locked=true) if the
 
  user has write/admin permissions on this repo
 

	
 

	
 
Kallithea will remember the user id who locked the repo
 
Kallithea will remember the user id who locked the repo so
 
only this specific user can unlock the repo (locked=false) by calling
 

	
 
- `hg/git push <repo>`
 

	
 
every other command on that repo from this user and
 
every command from any other user will result in http return code 423 (locked)
 

	
 

	
 
additionally the http error includes the <user> that locked the repo
 
(e.g. “repository <repo> locked by user <user>”)
 
Every other command on that repo from this user and
 
every command from any other user will result in http return code 423 (locked).
 

	
 

	
 
So the scenario of use for repos with `locking function` enabled is that
 
every initial clone and every pull gives users (with write permission)
 
the exclusive right to do a push.
 

	
 

	
 
Each repo can be manually unlocked by admin from the repo settings menu.
 
Additionally, the http error includes the <user> that locked the repo
 
(e.g. “repository <repo> locked by user <user>”).
docs/usage/statistics.rst
Show inline comments
 
.. _statistics:
 

	
 
==========
 
Statistics
 
==========
 

	
 
The Kallithea statistics system makes heavy demands of the server resources, so
 
in order to keep a balance between usability and performance, the statistics are
 
cached inside db and are gathered incrementally, this is how Kallithea does
 
cached inside db and are gathered incrementally. This is how Kallithea does
 
this:
 

	
 
With Celery disabled
 
--------------------
 

	
 
- On each first visit to the summary page a set of 250 commits are parsed and
 
  updates statistics cache.
 
- This happens on each single visit to the statistics page until all commits are
 
  fetched. Statistics are kept cached until additional commits are added to the
 
  repository. In such a case Kallithea will only fetch the new commits when
 
  updating it's cache.
 

	
docs/usage/subrepos.rst
Show inline comments
 
.. _subrepos:
 

	
 
=============================================
 
working with Kallithea and mercurial subrepos
 
Working with Kallithea and Mercurial subrepos
 
=============================================
 

	
 
example usage of Subrepos with Kallithea::
 
Example usage of Subrepos with Kallithea::
 

	
 
    ## init a simple repo
 
    hg init repo1
 
    cd repo1
 
    echo "file1" > file1
 
    hg add file1
 
    hg ci --message "initial file 1"
 

	
 
    #clone subrepo we want to add
 
    hg clone http://rc.local/subrepo
 
    hg clone http://kallithea.local/subrepo
 

	
 
    ## use path like url to existing repo in Kallithea
 
    echo "subrepo = http://rc.local/subrepo" > .hgsub
 
    echo "subrepo = http://kallithea.local/subrepo" > .hgsub
 

	
 
    hg add .hgsub
 
    hg ci --message "added remote subrepo"
 

	
 

	
 
In the file list of a clone of repo1 you will see a connected subrepo at
 
revision it was during cloning.
 
Clicking in subrepos link should send you to proper repository in Kallithea.
 

	
 
In file list of repo1 you will see a connected subrepo at revision it was
 
during cloning.
 
Clicking in subrepos link should send you to proper repository in Kallithea
 

	
 
cloning repo1 will also clone attached subrepository.
 
Cloning repo1 will also clone attached subrepository.
 

	
 
Next we can edit the subrepo data, and push back to Kallithea. This will update
 
both of repositories.
 

	
 
see http://mercurial.aragost.com/kick-start/en/subrepositories/ for more
 
information about subrepositories
 
See http://mercurial.aragost.com/kick-start/en/subrepositories/ for more
 
information about subrepositories.
docs/usage/troubleshooting.rst
Show inline comments
 
@@ -30,49 +30,46 @@ Troubleshooting
 
    Apache, Nginx or other http servers kill the connection due to to large
 
    body.
 

	
 
|
 

	
 
:Q: **Apache doesn't pass basicAuth on pull/push?**
 
:A: Make sure you added `WSGIPassAuthorization true`.
 

	
 
|
 

	
 
:Q: **Git fails on push/pull?**
 
:A: Make sure you're using an wsgi http server that can handle chunked encoding
 
    such as `waitress` or `gunicorn`
 
    such as `waitress` or `gunicorn`.
 

	
 
|
 

	
 
:Q: **How i use hooks in Kallithea?**
 
:Q: **How can I use hooks in Kallithea?**
 
:A: It's easy if they are python hooks just use advanced link in hooks section
 
    in Admin panel, that works only for Mercurial. If you want to use githooks,
 
    just install proper one in repository eg. create file in
 
    `/gitrepo/hooks/pre-receive`. You can also use Kallithea-extensions to
 
    connect to callback hooks, for both Git and Mercurial.
 

	
 
|
 

	
 
:Q: **Kallithea is slow for me, how can i make it faster?**
 
:A: See the :ref:`performance` section
 
:Q: **Kallithea is slow for me, how can I make it faster?**
 
:A: See the :ref:`performance` section.
 

	
 
|
 

	
 
:Q: **UnicodeDecodeError on Apache mod_wsgi**
 
:A: Please read: https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi/#if-you-get-a-unicodeencodeerror
 
:A: Please read: https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi/#if-you-get-a-unicodeencodeerror.
 

	
 
|
 

	
 
:Q: **Requests hanging on Windows**
 
:A: Please try out with disabled Antivirus software, there are some known problems with Eset Anitivirus. Make sure
 
    you have installed latest windows patches (especially KB2789397)
 
    you have installed latest windows patches (especially KB2789397).
 

	
 

	
 
.. _virtualenv: http://pypi.python.org/pypi/virtualenv
 
.. _python: http://www.python.org/
 
.. _mercurial: http://mercurial.selenic.com/
 
.. _celery: http://celeryproject.org/
 
.. _rabbitmq: http://www.rabbitmq.com/
 
.. _python-ldap: http://www.python-ldap.org/
 
.. _mercurial-server: http://www.lshift.net/mercurial-server.html
 
.. _PublishingRepositories: http://mercurial.selenic.com/wiki/PublishingRepositories
 
.. _Issues tracker: https://bitbucket.org/conservancy/kallithea/issues
init.d/supervisord.conf
Show inline comments
 
@@ -14,38 +14,38 @@ logfile_maxbytes=50MB        ; (max main
 
logfile_backups=10           ; (num of main logfile rotation backups;default 10)
 
loglevel=info                ; (log level;default info; others: debug,warn,trace)
 
pidfile=/%(here)s/supervisord_kallithea.pid ; (supervisord pidfile;default supervisord.pid)
 
nodaemon=true               ; (start in foreground if true;default false)
 
minfds=1024                  ; (min. avail startup file descriptors;default 1024)
 
minprocs=200                 ; (min. avail process descriptors;default 200)
 
umask=022                    ; (process file creation umask;default 022)
 
user=username                  ; (default is current user, required if root)
 
;identifier=supervisor       ; (supervisord identifier, default is 'supervisor')
 
;directory=/tmp              ; (default is not to cd during start)
 
;nocleanup=true              ; (don't clean up tempfiles at start;default false)
 
;childlogdir=/tmp            ; ('AUTO' child log dir, default $TEMP)
 
environment=HOME=/home/username       ; (key value pairs to add to environment)
 
environment=HOME=/srv/kallithea       ; (key value pairs to add to environment)
 
;strip_ansi=false            ; (strip ansi escape codes in logs; def. false)
 

	
 
; the below section must remain in the config file for RPC
 
; (supervisorctl/web interface) to work, additional interfaces may be
 
; added by defining them in separate rpcinterface: sections
 
[rpcinterface:supervisor]
 
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
 

	
 
[supervisorctl]
 
serverurl=http://127.0.0.1:9001 ; use an http:// url to specify an inet socket
 
;username=user               ; should be same as http_username if set
 
;password=123                ; should be same as http_password if set
 
;prompt=mysupervisor         ; cmd line prompt (default "supervisor")
 
;history_file=~/.sc_history  ; use readline history if available
 

	
 

	
 
; restart with supervisorctl restart kallithea:*
 
[program:kallithea]
 
numprocs = 1
 
numprocs_start = 5000 # possible should match ports
 
directory=/home/username/kallithea-dir
 
command = /home/username/v-env/bin/paster serve rc.ini
 
directory=/srv/kallithea
 
command = /srv/kallithea/venv/bin/paster serve my.ini
 
process_name = %(program_name)s_%(process_num)04d
 
redirect_stderr=true 
 
stdout_logfile=/%(here)s/kallithea.log 
 
\ No newline at end of file
 
stdout_logfile=/%(here)s/kallithea.log 
0 comments (0 inline, 0 general)