Files @ ffd45b185016
Branch filter:

Location: kallithea/docs/installation.rst

ffd45b185016 4.2 KiB text/prs.fallenstein.rst Show Annotation Show as Raw Download as Raw
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.

This imports changes between changesets 21af6c4eab3d and 6177597791c2 in
RhodeCode's original repository, including only changes to Python files and HTML.

RhodeCode clearly licensed its changes to these files under GPLv3
in their /LICENSE file, which states the following:
The Python code and integrated HTML are licensed under the GPLv3 license.

(See:
https://code.rhodecode.com/rhodecode/files/v2.2.5/LICENSE
or
http://web.archive.org/web/20140512193334/https://code.rhodecode.com/rhodecode/files/f3b123159901f15426d18e3dc395e8369f70ebe0/LICENSE
for an online copy of that LICENSE file)

Conservancy reviewed these changes and confirmed that they can be licensed as
a whole to the Kallithea project under GPLv3-only.

While some of the contents committed herein are clearly licensed
GPLv3-or-later, on the whole we must assume the are GPLv3-only, since the
statement above from RhodeCode indicates that they intend GPLv3-only as their
license, per GPLv3ยง14 and other relevant sections of GPLv3.
.. _installation:

============
Installation
============

``RhodeCode`` 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 RhodeCode. There's also restriction in terms of mercurial
clients. Minimal version of hg client known working fine with RhodeCode is
**1.6**. If you're using older client, please upgrade.


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

Rhodecode requires python version 2.5 or higher.

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

    easy_install rhodecode

Or::

    pip install rhodecode

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

    python setup.py install

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

:ref:`installation_win`


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


For installing RhodeCode i highly recommend using separate virtualenv_. This
way many required by RhodeCode 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
  using virtualenv command::

    virtualenv --no-site-packages /opt/rhodecode-venv


.. 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
   RhodeCode.  If you do not specify ``--no-site-packages``,
   it's possible that RhodeCode 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 `/opt/rhodecode-venv`.
- Activate the virtualenv_ by running::

    source /opt/rhodecode-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 rhodecode data files, and configuration somewhere on the
  filesystem. For example::

    mkdir /opt/rhodecode


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

    easy_install rhodecode

  or::

    pip install rhodecode

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

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

In order to gain maximum performance
there are some third-party you must install. When RhodeCode 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 RhodeCode 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
RhodeCode for say 7 to 10 repositories, RhodeCode will perform perfectly well
without celery running.

If you make the decision to run RhodeCode with celery make sure you run
celeryd using paster and message broker together with the application.

.. note::
   Installing message broker and using celery is optional, RhodeCode will
   work perfectly fine without them.


**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`
-----------------------------------



.. _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/