The rb-site Tool¶
Overview¶
Most of the work of installing and managing a Review Board site is done for you by a tool bundled with Review Board called rb-site.
rb-site has three main commands:
These will be discussed in detail in the following sections.
rb-site always requires a command as the first argument and a site directory as the second. Some commands may accept additional arguments.
Global Options¶
- --console¶
Forces use of the console UI for any interaction.
- -d, --debug¶
Displays debug output in the console.
- -h, --help¶
Shows the help for the program and exits.
- --no-color¶
Disable all color output.
New in version 4.0.
- --version¶
Shows the version number and exits.
rb-site install¶
Installs a new Review Board site. This will ask a series of questions and will populate a tree for the website, as well as generate configuration files.
This takes a directory as the first parameter. For example:
$ rb-site install /path/to/site
See Creating a Review Board Site for more information.
Options¶
- --admin-email=<ADMIN_EMAIL>¶
The e-mail address for the new site administrator account.
- --admin-password=<ADMIN_PASSWORD>¶
The password for the new site administrator account.
- --admin-user=<ADMIN_USER>¶
The username for the new site administrator account.
- --allowed-host=<HOSTNAME>¶
An additional hostname or IP address that can be used to reach the server. This option can be provided multiple times.
Any request made to the server that isn’t provided in the allowed host list, or in
--domain-name
, will be blocked.New in version 4.0.
- --advanced¶
Prompt for advanced options during installation.
- --cache-info=<CACHE_INFO>¶
The detailed cache information. This is dependent on the cache type used.
For
memcached
, this should be a connection string (such asmemcached://localhost:11211/
.For
file
, this should be the path to a cache directory that the web server can write to.
- --cache-type=<CACHE_TYPE>¶
The cache server type. This should be one of:
memcached
file
- --company=<COMPANY>¶
The name of the company or organization that owns the Review Board server. This is used for support purposes.
- --copy-media¶
Copies media files to the site directory. By default, media files and directories are symlinked. This option is implied on Windows.
- --db-host=<HOSTNAME>¶
The hostname running the database server (not used for sqlite3).
- --db-name=<DB_NAME>¶
The database name (database file path for sqlite3).
- --db-pass=<DB_PASS>¶
The password used for connecting to the database (not used for sqlite3).
- --db-type=<DB_TYPE>¶
The database type. This should be one of:
mysql
postgresql
sqlite3
- --db-user=<DB_USER>¶
The username used for connecting to the database (not used for sqlite3).
- --domain-name=<DOMAIN_NAME>¶
The full domain name of the site, excluding the
http://
port or path. For example,reviews.example.com
- --media-url=<MEDIA_URL>¶
The URL containing the media files. This should end with a trailing
/
. For example,/media/
orhttp://media.example.com/
.
- --opt-in-support-data¶
Opt into sending data and stats to help with support.
New in version 4.0.
- --noinput¶
Runs non-interactively, using configuration provided through command line options.
- --secret-key=<SECRET_KEY>¶
A specific value to use for the site’s Secret Key. All site installations using the same database must use the same Secret Key.
This is recommended if automating installs using Docker or another service.
New in version 4.0.
- --settings-local-template=<PATH>¶
A custom template file used to generate the site’s
conf/settings_local.py
file.New in version 4.0.
- --site-root=<SITE_ROOT>¶
The path of the site, relative to the domain. This should end with a trailing
/
. For example,/
or/reviews/
.
- --sitelist=<PATH>¶
The path to a global file used to store the list of installed site directories. This is optional, and used for automating upgrades across multiple site directories.
- --web-server-type=<WEB_SERVER_TYPE>¶
The type of web server that will run the site. This should be one of:
apache
lighttpd
rb-site upgrade¶
Upgrades an existing site installation. This will update the media trees and upgrade the database.
This must be performed every time Review Board is upgraded.
This takes a directory as the first parameter. For example:
$ rb-site upgrade /path/to/site
See Upgrading Review Board Sites for more information.
Options¶
- --all-sites¶
Upgrade all installed sites.
See
--sitelist
.
- --copy-media¶
Copies media files to the site directory. By default, media files and directories are symlinked. This option is implied on Windows.
- --no-db-upgrade¶
Prevents an upgrade and evolution of the database.
- --sitelist=<PATH>¶
The path to a global file used to store the list of installed site directories. This is optional, and used for automating upgrades across multiple site directories.
rb-site manage¶
Performs management commands on a site.
This allows commands provided by Review Board or extensions to be run on your Review Board site. It takes a path to the site, a manage subcommand, and optional parameters.
For example:
$ rb-site manage /path/to/site shell
$ rb-site manage /path/to/site index --full
You can see the common list of manage subcommands by running:
$ rb-site manage --help
Or the full list of all management subcommands (some provided by Django, which may not be relevant to Review Board):
$ rb-site manage /path/to/site list-commands
For more information, and some useful subcommands, see Advanced Management Commands.