RhodeCode Control CLI Guide

Note

The RhodeCode Control command line is case sensitive.

If you are running a Unix system without a source file, then you can use the RhodeCode Control commands from the follow location: ~/.rccontrol-profile/bin/rccontrol

Shell Autocomplete

rccontrol enables shell autocomplete integration. To enable autocomplete this is what you would need to put into your .bashrc:

eval "$(_RCCONTROL_COMPLETE=source rccontrol)"

Common Options and Arguments

Unless specified, all rccontrol commands support the following options and arguments. These arguments are used to support custom configurations and non-standard setups:

rccontrol [command] [-v, --verbose] [-c, --config <PATH>] [-r, --profile <DIRECTORY>]
[-I, --install-dir <DIRECTORY>] [--help]

Common options and arguments applicable to all RhodeCode Control commands.

Parameters:
  • -v – (Optional) Enables verbosity.
  • -c – (Optional) Location of .rccontrol.ini.
  • -r – (Optional) Location of .rccontrol-profile.
  • -I – (Optional) Location of application instances.
  • --help – (Optional) Display the command help message.
# Configure a custom Enterprise deployment
$ rccontrol install Enterprise -c ./path/to/custom.ini -I /custom/location/

# Uninstall a custom Enterprise installation
$ rccontrol uninstall Enterprise -I /custom/path/ -c ./path/to/.rrcontrol.ini

rccontrol import

rccontrol import <app> <ini_file> [--version <number>] [--start-at-boot]
[--self-managed-supervisor] [--offline]

Imports your current RhodeCode Enterprise installation, with all the required dependencies to being managed by RhodeCode Control. This is necessary to be able to upgrade existing RhodeCode Enterprise versions installed prior to 3.0.0. Once imported you can then use the rccontrol upgrade command to move to the latest RhodeCode Enterprise version. This command takes the following options and arguments:

Parameters:
  • app – The options are Community or Enterprise.
  • ini_file – Imports the application using the given .ini file.
  • --version – (Optional) Imports a specified version of RhodeCode Enterprise into RhodeCode Control.
  • --start-at-boot – (Optional) Set the imported version of RhodeCode Enterprise to start at boot. The default is yes.
  • --self-managed-supervisor – (Optional) Allow customization of the supervisor settings for the imported version of RhodeCode Enterprise. The default is for RhodeCode Control to manage them and overwrite any custom changes.
  • --offline – (Optional) Uses the files in the local cache instead of downloading them. This is intended to be used in offline environments and by default is False.

This command takes Shell Autocomplete.

# Import your current version using this command
$ rccontrol import Enterprise /home/rhodecode/data/rhodecode.ini
Parsing "rhodecode.ini":
- host: 0.0.0.0
- port: 5000
- database: sqlite:////home/{user}/rhodecode/data/rhodecode.db?timeout=60
...
Installing RhodeCode Enterprise
Configuring RhodeCode Enterprise ...
Supervisord state is: RUNNING
Added process group enterprise-1

rccontrol install

rccontrol install <app> [--version <number>] [--start-at-boot]
[--self-managed-supervisor] [--offline] [--accept-license]

Installs the specified RhodeCode application. It is possible to pass in JSON data to fill in some default arguments for installation. For example:

rccontrol install Community '{"email":"me@rhodecode.com", "username":"admin", "password":"secret", "host":"0.0.0.0", "repo_dir":"/path/to/repos"}'
Parameters:
  • app – The options are Community, Enterprise or VCSServer.
  • --version – (Optional) Set the targeted version otherwise default to the latest.
  • --start-at-boot – (Optional) Set the installed application to start at boot. The default is yes.
  • --self-managed-supervisor – (Optional) Allow customization of the supervisor settings for the installed application. The default is for RhodeCode Control to manage them and overwrite any custom changes.
  • --offline – (Optional) Uses the files in the local cache instead of downloading them. This is intended to be used in offline environments and by default is False.
  • --accept-license – (Optional) Accept the current license for installer without asking for confirmation.

rccontrol ishell

rccontrol ishell <instance-id>

Starts the specified application iShell interface. Only Enterprise or Community instances can start an iShell interface.

Parameters:instance-id – Instance identifier.

This command takes Shell Autocomplete.

# Start ishell for this instance
$ rccontrol ishell enterprise-1

rccontrol license

rccontrol license

Display license information.

$ rccontrol license

Type:         Default
Expiry:       Never
Instances:    Unlimited

rccontrol restart

rccontrol restart <instance-id> [--exact-match]

Restarts the specified application instance.

Parameters:
  • instance-id – Instance identifier.
  • --exact-match – (Optional) Toggle regex based matching. The default is False.

This command takes Shell Autocomplete.

# Restart the specified Enterprise instance
$ rccontrol restart enterprise-1

# Restart the VCS Server
$ rccontrol restart vcsserver-1

rccontrol self-destroy

rccontrol self-destroy [--force]

Completely removes RhodeCode Control, RhodeCode Enterprise, and any VCS Server instances installed on your server. Together with any files that installer have created. It works like full uninstall command.

Parameters:--force – (Optional) Don’t ask for confirmation. The default is False.

Note

This command is not supported on Windows. Removal should be done trough the Add/Remove menu for more details, see Install RhodeCode Control on Windows

# Completely remove all RhodeCode applications
$ rccontrol self-destroy
You are about to PERMANENTLY remove the following folders:

/home/user/.rccontrol
/home/user/.rccontrol-profile
/home/user/.rccontrol.ini
/opt/rhodecode/store
/tmp/rccontrol.lock

Additionally remove supervisord configs and fix shell
Do you really want to continue? [y/N]:

rccontrol self-init

rccontrol self-init

Initializes RhodeCode Control and supervisord on your server.

# Start RhodeCode Control
$ rccontrol self-init
Supervisord state is: RUNNING

rccontrol self-stop

rccontrol self-stop [--force]

Stops all instances and supervisord. With –force flag run an stop by killing all processes and supervisord.

# Stop RhodeCode Control
$ rccontrol self-stop
Sent stop signal to supervisord with PID:102245
Supervisord state is: STOPPED

rccontrol self-update

rccontrol self-update [<URL>] [--force] [--offline]

Retrieves the latest version information and upgrades RhodeCode Control to the newest available version. This command will fetch MANIFEST file from the RhodeCode servers which lists the available versions of RhodeCode Control, RhodeCode Enterprise, RhodeCode Community and VCS Server.

Parameters:
  • URL – (Optional) Replaces your /home/user/.rccontrol/instance-id/cache/MANIFEST file with the one specified. The MANIFEST file controls what versions of software can be installed and should only be modified in special circumstances.
  • --force – (Optional) Ignores the version check to allow RhodeCode Control to be replaced with the same version. This is useful to switch to a repacked release or attempt to repair your current installation. The default is False.
  • --offline – (Optional) Avoids going online to fetch the latest MANIFEST file and/or copy of RhodeCode Control instead using the files in the local cache. This overrides the URL argument and by default is False.
$ rccontrol self-update
Currently running RhodeCode Control "1.7.0"
Downloading https://dl.rhodecode.com/linux/MANIFEST ...

Latest version "1.8.0"
Downloading https://dl.rhodecode.com/linux/RhodeCodeControl-1.8.0.tar.bz2 ...
Extracting Control ...
Successfully upgraded RhodeCode Control.

Supervisord state is: RUNNING

rccontrol start

rccontrol start <instance-id> [--exact-match]

Starts the specified application instance.

Parameters:
  • instance-id – Instance identifier.
  • --exact-match – (Optional) Toggle regex based matching. The default is False.

This command takes Shell Autocomplete.

# Start the specified Enterprise instance
$ rccontrol start enterprise-1

# Start the specified VCS Server instance
$ rccontrol start vcsserver-1

rccontrol status

rccontrol status <instance-id>

Displays the status of installed application instances.

Parameters:instance-id – (Optional) Instance identifier.
# Display the status of installed applications
$ rccontrol status

 - NAME: enterprise-1
 - STATUS: STOPPED
 - TYPE: Enterprise
 - VERSION: 1.5.0
 - URL: http://127.0.0.1:10000

 - NAME: enterprise-2
 - STATUS: STOPPED
 - TYPE: Enterprise
 - VERSION: 2.2.8
 - URL: http://127.0.0.1:10001

 - NAME: enterprise-3
 - STATUS: RUNNING
 - TYPE: Enterprise
 - VERSION: 3.5.0
 - VCS: vcsserver-1
 - URL: http://127.0.0.1:10003

 - NAME: vcsserver-1
 - STATUS: RUNNING
 - TYPE: VCSServer
 - VERSION: 3.5.0
 - URL: http://127.0.0.1:10002

rccontrol stop

rccontrol stop <instance-id> [--exact-match]

Stops the specified application instance.

Parameters:
  • instance-id – Instance identifier.
  • --exact-match – (Optional) Toggle regex based matching. The default is False.

This command takes Shell Autocomplete.

# Stops this instance
$ rccontrol stop enterprise-1

rccontrol uninstall

rccontrol uninstall <instance-id> [--exact-match]

Uninstalls the specified application instance.

Parameters:
  • instance-id – Instance identifier.
  • --exact-match – (Optional) Toggle regex based matching. The default is True.

This command takes Shell Autocomplete.

# Uninstall a specific instance
$ rccontrol uninstall enterprise-1

rccontrol upgrade

rccontrol upgrade <instance-id> [--version <number>] [--exact-match] [--force]
[--offline]

Upgrades the specified application instance.

Parameters:
  • instance-id – Instance identifier.
  • --version – (Optional) Set the targeted version otherwise default to the latest.
  • --exact-match – (Optional) Toggle regex based matching. The default is False.
  • --force – (Optional) Ignores the version check to allow an instance to be replaced with the same version. This is useful to switch to a repacked release or attempt to repair the current installation. The default is False.
  • --offline – (Optional) Uses the files in the local cache instead of downloading them. This is intended to be used in offline environments and by default is False.

This command takes Shell Autocomplete.

# Upgrade to the latest version
$ rccontrol upgrade vcsserver-1

# Upgrade to a specific version
$ rccontrol upgrade enterprise-1 --version 3.5.0