Changeset - 2d4e1f5e854e
[Not reviewed]
beta
0 3 0
Marcin Kuzminski - 13 years ago 2013-02-08 19:24:07
marcin@python-works.com
docs updates
3 files changed with 20 insertions and 4 deletions:
0 comments (0 inline, 0 general)
docs/setup.rst
Show inline comments
 
@@ -644,92 +644,92 @@ Besides the regular apache setup you wil
 
into [app:main] section of your .ini file::
 

	
 
    filter-with = proxy-prefix
 

	
 
Add the following at the end of the .ini file::
 

	
 
    [filter:proxy-prefix]
 
    use = egg:PasteDeploy#prefix
 
    prefix = /<someprefix>
 

	
 

	
 
then change <someprefix> into your choosen prefix
 

	
 
Apache's WSGI config
 
--------------------
 

	
 
Alternatively, RhodeCode can be set up with Apache under mod_wsgi. For
 
that, you'll need to:
 

	
 
- Install mod_wsgi. If using a Debian-based distro, you can install
 
  the package libapache2-mod-wsgi::
 

	
 
    aptitude install libapache2-mod-wsgi
 

	
 
- Enable mod_wsgi::
 

	
 
    a2enmod wsgi
 

	
 
- Create a wsgi dispatch script, like the one below. Make sure you
 
  check the paths correctly point to where you installed RhodeCode
 
  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/rhodecode/pyenv/lib/python2.6/site-packages
 
    WSGIScriptAlias / /home/web/rhodecode/dispatch.wsgi
 
    WSGIPassAuthorization On
 

	
 
.. note::
 
   when running apache as root please add: `user=www-data group=www-data`
 
   into above configuration
 

	
 
.. note::
 
   RhodeCode cannot be runned in multiprocess mode in apache, make sure
 
   you don't specify `processes=num` directive in the config
 
   Running RhodeCode in multiprocess mode in apache is not supported,
 
   make sure you don't specify `processes=num` directive in the config
 

	
 

	
 
Example wsgi dispatch script::
 

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

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

	
 
    import site
 
    site.addsitedir("/home/web/rhodecode/pyenv/lib/python2.6/site-packages")
 

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

	
 
    fileConfig('/home/web/rhodecode/production.ini')
 
    application = loadapp('config:/home/web/rhodecode/production.ini')
 

	
 
Note: when using mod_wsgi you'll need to install the same version of
 
Mercurial that's inside RhodeCode's virtualenv also on the system's Python
 
environment.
 

	
 

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

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

	
 
  https://secure.rhodecode.org/rhodecode/files/beta/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/marcinkuzminski/rhodecode/issues
 
.. _google group rhodecode: http://groups.google.com/group/rhodecode
docs/upgrade.rst
Show inline comments
 
@@ -30,70 +30,78 @@ Back up your configuration file::
 

	
 

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

	
 
 pip freeze
 

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

	
 
 source /opt/rhodecode-venv/bin/activate
 

	
 

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

	
 
 easy_install -U rhodecode
 

	
 
Or::
 

	
 
 pip install --upgrade rhodecode
 

	
 

	
 
Then run the following command from the installation directory::
 

	
 
 paster make-config RhodeCode production.ini
 

	
 
This will display any changes made by the new version of RhodeCode 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 production.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 1.2.X to 1.5.X should be done like that: 1.2.X. > 1.3.X > 1.4.X > 1.5.X
 
   You can always specify what version of RhodeCode you want to install for example in pip
 
   `pip install RhodeCode==1.3.6`
 

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

	
 
 echo > rhodecode.log
 

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

	
 
 service rhodecode start
 

	
 
Or::
 

	
 
 paster serve /var/www/rhodecode/production.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/usage/general.rst
Show inline comments
 
.. _general:
 

	
 
=======================
 
General RhodeCode usage
 
=======================
 

	
 

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

	
 
Currently when admin/owner deletes a repository, RhodeCode 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 RhodeCode 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)
 
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
 

	
 
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`
 
checkbox the << and >> buttons will only show him revisions for 'beta' branch
 

	
 

	
 
Compare view from changelog
 
---------------------------
 

	
 
Checkboxes in compare view allow users to view combined compare view. You can
 
only show the range between the first and last checkbox (no cherry pick).
 
Clicking more than one checkbox will activate a link in top saying
 
`Show selected changes <from-rev> -> <to-rev>` clicking this will bring
 
compare view
 
compare view. In this view also it's possible to switch to combined compare.
 

	
 
Compare view is also available from the journal on pushes having more than
 
one changeset
 

	
 

	
 
Non changeable repository urls
 
------------------------------
 

	
 
Due to complicated nature of repository grouping, often urls of repositories
 
can change.
 

	
 
example::
 

	
 
  #before
 
  http://server.com/repo_name
 
  # after insertion to test_group group the url will be
 
  http://server.com/test_group/repo_name
 

	
 
This can be an issue for build systems and any other hardcoded scripts, moving
 
repository to a group leads to a need for changing external systems. To
 
overcome this RhodeCode introduces a non changable replacement url. It's
 
simply an repository ID prefixed with `_` above urls are also accessible as::
 

	
 
  http://server.com/_<ID>
 

	
 
Since ID are always the same moving the repository will not affect such url.
 
the _<ID> syntax can be used anywhere in the system so urls with repo_name
 
for changelogs, files and other can be exchanged with _<ID> syntax.
 

	
 

	
 
Mailing
 
-------
 

	
 
When administrator will fill up the mailing settings in .ini files
 
RhodeCode will send mails on user registration, or when RhodeCode errors occur
 
on errors the mails will have a detailed traceback of error.
 

	
 

	
 
Mails are also sent for code comments. If someone comments on a changeset
 
mail is sent to all participants, the person who commited the changeset
 
(if present in RhodeCode), and to all people mentioned with @mention system.
 

	
 

	
 
Trending source files
 
---------------------
 

	
 
Trending source files are calculated based on pre defined dict of known
 
types and extensions. If You miss some extension or Would like to scan some
0 comments (0 inline, 0 general)