Install RhodeCode Enterprise¶
To install RhodeCode Enterprise, download and run the installer script. This script installs RhodeCode Enterprise, Pylons, and all other
required Python libraries into an activated virtualenv
and starts an instance. To do this,
use the following example.
Installing on Linux¶
Use the following example to install on a Linux distro.
# makes a directory for RhodeCode Enterprise
mkdir ~/rhodecode
# navigates into the directory
cd ~/rhodecode
# Downloads the installer
curl -O -L https://rhodecode.com/trial/rhodecode-installer.py
# Runs the installer
sudo python rhodecode-installer.py
Installing on Windows¶
To install RhodeCode Enterprise on Windows, use the installer. You can download it here rhodecode-installer.exe. This installs RhodeCode Enterprise 2.2.5. To upgrade to RhodeCode Enterprise 2.2.6, use the following steps:
- Navigate into your RhodeCode Enterprise virtual environment
- Upgrade RhodeCode Enterprise using the following command:
paster upgrade production.ini
Using Pip¶
You can also install RhodeCode Enterprise using pip from our server. To install RhodeCode Enterprise use the following command:
* pip install https://rhodecode.com/dl/latest
To upgrade using pip, use the following command:
*pip install --upgrade https://rhodecode.com/dl/latest
Configuring RhodeCode Enterprise¶
If you need to make changes to the default installation, then you must alter the configuration file. This
configuration file contains the various settings for RhodeCode Enterprise, e.g proxy port, email settings, cache, celery settings,
and logging details. By default the file is created in the following location: ~/rhodecode/data/production.ini
. If
it does not exist, create the configuration file using the following command.
rhodecode-config --filename=production.ini
Setting up Email¶
To setup email with your RhodeCode Enterprise instance, open the default ~/rhodecode/data/production.ini
file and uncomment and
configure the email section.
#email_to = admin@localhost
#error_email_from = paste_error@localhost
#app_email_from = rhodecode-noreply@localhost
#error_message =
#email_prefix = [RhodeCode]
#smtp_server = mail.server.com
#smtp_username =
#smtp_password =
#smtp_port =
#smtp_use_tls = false
#smtp_use_ssl = true
## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
#smtp_auth =
Changing Database Settings¶
If you wish to make a database change in RhodeCode Enterprise you need to specify the database details in the production.ini
file.
In this file you must properly adjust the database url. If you have not created a database you can create one by
running the following command.
paster setup-rhodecode production.ini
This will prompt you for a root
path. This root
path is the location where RhodeCode Enterprise will store all repositories on
the current machine. After entering this root
path the setup-rhodecode
command will also prompt
you for a username
and password
for the initial admin account. If you need to set the database,
use the following example to get started, MySQL and PostgreSQL.
# SQLITE [default]
sqlalchemy.db1.url = sqlite:////root/rhodecode/data/rhodecode.db?timeout=60
# see sqlalchemy docs for other advanced settings
sqlalchemy.db1.echo = false
sqlalchemy.db1.pool_recycle = 3600
sqlalchemy.db1.convert_unicode = true
Setup RhodeCode Enterprise Shortcut¶
Use the following example to setup RhodeCode Enterprise in one command.
paster setup-rhodecode production.ini --user=marcink --password=secret --email=marcin@rhodecode.org
--repos=/home/marcink/my_repos
- The
setup-rhodecode
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 RhodeCode Enterprise will simply add all of the repositories at the chosen location to its database.
Note
The path for mercurial repositories must be write accessible since the RhodeCode Enterprise web interface will work without write access, but when trying to do a push will fail with permission denied errors.
Run RhodeCode Enterprise¶
To run RhodeCode Enterprise with the paster
command, use the following example.
paster serve production.ini
This command runs the RhodeCode Enterprise server. The default web app location is 127.0.0.1:5000
. You can set this in the
production.ini
file under the COMMON section.
## COMMON ##
host = 0.0.0.0
port = 5000
Install rcextensions¶
You can install the rcextensions
package with RhodeCode Enterprise. This must be installed in the same location as your
production.ini
file. rcextensions
adds additional mapping for whoosh, statistics,
and adds additional code for repository hooks. This is used for for sending signals to build-bots
such as jenkins. For more information, see the __init__.py
file inside the rcextensions
package. To install
rcextensions
, use the following example:
rhodecode-extensions --config=/path/to/production.ini
Whoosh Full Text Search¶
The whoosh index can be build by using the paster
command with the make-index
option. To use
the``make-index`` option you must specify the configuration file that stores the location of the index. You can also
specify the location of the repositories you wish to index with the --repo-location
option. If this is not
specified, the location is retrieved from the database. You can also specify a comma separated list of repositories
with the --index-only
option to build an index of just the specified repositories and omitting any others from the
index.
To enable a full index rebuild use the -f
option. Without the -f option,
indexing will run always in “incremental” mode. Use the following examples to build your required Whoosh full text
search.
paster make-index production.ini # Incremental build
paster make-index production.ini -f # Full index build
paster make-index production.ini --index-only=vcs,rhodecode # Only index these repos
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. Use the following example to set up a cronjob.
crontab -e # open cron job file
# rebuild a full index every from scratch every Sunday at 4am
01 4 * * 0 /path/to/python/bin/paster make-index /path/to/rhodecode/production.ini -f
Install Celery (Optional)¶
By default, RhodeCode Enterprise works in synchronous mode. Running RhodeCode Enterprise with Celery will give you a large speed improvement when handling many large repositories. Celery is an asynchronous task manager based on distributed message passing, and this makes asynchronous task queuing work efficiently.
If you install Celery you also need multi-broker support. The recommended message broker is rabbitmq. If you make
the decision to run RhodeCode Enterprise with Celery you need to run celeryd
using the paster
command and message broker. To
configure Celery and RabbitMQ, see the documentation here on the Celery website.