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:

  1. Navigate into your RhodeCode Enterprise virtual environment
  2. 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

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.