Upsource 2018.2 Help

Tuning up a Docker installation

Configuring Upsource Launcher properties

Upsource Launcher process uses:

  • Upsource-specific properties — can be changed programmatically with the configure command.

    For a list of configurable Upsource-specific Launcher properties, see Upsource-specific properties

  • JVM properties — can be changed programmatically with the configure command or by manually editing the configuration file upsource.jvmoptions.

    A JVM property can be also changed on a temporary basis, passing it as an ad hoc parameter with the regular run command. This method only applies the changes for the current run and does not change the configuration file. Use this option when you want to test changes to your server configuration.

    For a list of the default JVM options for the Upsource Launcher process, seeLauncher default JVM options.

To change Upsource-specific Launcher properties:

  1. Stop Upsource: docker exec <containerId> stop

  2. Enter the regular run command, followed by the configure command and all of the settings that you want to update in the configuration file. You can set multiple options in a single command. For example:

    docker run -it -v <path to data directory>:/opt/upsource/data \ -v <path to conf directory>:/opt/upsource/conf \ -v <path to logs directory>:/opt/upsource/logs \ -v <path to backups directory>:/opt/upsource/backups \ -p <port on host>:8080 \ jetbrains/upsource:<version> \ configure --listen-port 1111 --base-url http://upsource.mydomain.com:2222

To change JVM Launcher properties programmatically:

  1. Stop Upsource: docker exec <containerId> stop

  2. Enter the regular run command

    Specify the entry point

    Type in the configure command followed by all of the settings that you want to update in the configuration file.

    Use the -J prefix followed by a JVM option. Do not add any spaces between the prefix and the option.

    The symbol that precedes the option determines how it is applied:

    • Add an option with the - symbol.

    • Remove an option with the + symbol.

    If you specify a value, the corresponding option is only removed if it has exactly the same value.

    You can set multiple options in a single command.

    Example:

    docker run -it -v <path to data directory>:/opt/upsource/data \ -v <path to conf directory>:/opt/upsource/conf \ -v <path to logs directory>:/opt/upsource/logs \ -v <path to backups directory>:/opt/upsource/backups \ -p <port on host>:8080 \ jetbrains/upsource:<version> \ configure -J-Xmx800m

    In this example we increased the allocated JVM heap size from 600MB (default) to 800MB.

    • Upsource starts with the specified settings.

    • The configuration file upsource.jvmoptions is modified and the new settings will be applied to any consequent startup.

You can also change JVM setting by editing a configuration file manually.

To change JVM Launcher properties manually:

  1. Stop Upsource: docker exec <containerId> stop

  2. Open the configuration file upsource.jvmoptions located in <path to conf directory>/conf/.

    If the the file does not exist, create it and copy the contents of the sample configuration file with the .dist extension into it.

  3. Edit the JVM options directly in the file. Add new JVM options to the end of the file, listing each option on a new line. To set a pre-defined JVM option, simply uncomment the corresponding line.

  4. Save and close the file.

  5. Start Upsource: docker start <containerId>.

    • The changes to the configuration file are copied to the database.

    • Upsource starts with the specified settings.

To change JVM Launcher properties on a temporary basis (ad hoc):

  1. Stop Upsource: docker exec <containerId> stop

  2. Enter the regular run command, followed by all of the settings that you want to pass to Upsource on start.

    Example:

    docker run -it -v <path to data directory>:/opt/upsource/data \ -v <path to conf directory>:/opt/upsource/conf \ -v <path to logs directory>:/opt/upsource/logs \ -v <path to backups directory>:/opt/upsource/backups \ -p <port on host>:8080 \ jetbrains/upsource:<version> \ --J-Xmx1024m --J-XX:+HeapDumpOnOutOfMemoryError

    Use the --J prefix followed by a JVM option. Do not add any spaces between the prefix and the option.

    The symbol that precedes the option determines how it is applied:

    • Add an option with the - symbol.

    • Remove an option with the + symbol.

    If you specify a value, the corresponding option is only removed if it has exactly the same value.

    You can set multiple options in a single command.

    • Upsource starts with the specified settings, bypassing the configuration file.

    • The configuration file is not modified.

    • Subsequent starts that do not specify the ad hoc parameter use the settings that are stored in the configuration file. To run Upsource with the previous settings, simply restart it without passing any custom parameters.

Configuring Upsource Frontend properties

Upsource Frontend process uses:

Upsource Frontend properties can be changed programmatically with the configure command or by manually editing the configuration file upsource-frontend.jvmoptions

To configure Frontend properties programmatically:

  1. Stop Upsource: docker exec <containerId> stop

  2. Enter the regular run command

    Specify the entry point

    Type in the configure command followed by all of the settings that you want to update in the configuration file.

    Use the -J prefix followed by a property or JVM option. Do not add any spaces between the prefix and the property.

    The symbol that precedes the option determines how it is applied:

    • Add an option with the - symbol.

    • Remove an option with the + symbol.

    If you specify a value, the corresponding option is only removed if it has exactly the same value.

    You can set multiple options in a single command.

    Example:

    docker run -it -v <path to data directory>:/opt/upsource/data \ -v <path to conf directory>:/opt/upsource/conf \ -v <path to logs directory>:/opt/upsource/logs \ -v <path to backups directory>:/opt/upsource/backups \ -p <port on host>:8080 \ --entrypoint=/bin/bash jetbrains/upsource:<version> \ /opt/upsource/apps/upsource-frontend/bin/upsource-frontend.sh \ configure -J-Dfrontend.diff.filesize.limit=2000

    In this example we increased the maximum number of lines to display in a diff from 1000(default) to 2000.

    • Upsource starts with the specified settings.

    • The configuration file upsource-frontend.jvmoptions is modified and the new settings will be applied to any consequent startup.

To configure Frontend properties manually:

  1. Stop Upsource: docker exec <containerId> stop

  2. Open the configuration file upsource-frontend.jvmoptions. The file is located in the <path to conf directory>/conf/upsource-frontend/. If the file does not exist, create it.

  3. Edit existing properties directly in the file. Add new properties with their values to the end of the file.

  4. Save and close the file.

  5. Start Upsource: docker start <containerId>.

    • The changes to the configuration file are copied to the database.

    • Upsource starts with the specified settings.

Configuring Upsource Cassandra properties

You can manage the Cassandra process by changing its JVM options with the configure command or by manually editing the configuration file cassandra.jvmoptions. See Upsource Cassandra properties for a list of the default options.

To configure Cassandra properties programmatically:

  1. Stop Upsource: docker exec <containerId> stop

  2. Enter the regular run command

    Specify the entry point

    Type in the configure command followed by all of the settings that you want to update in the configuration file.

    Use the -J prefix followed by a JVM option. Do not add any spaces between the prefix and the option.

    The symbol that precedes the option determines how it is applied:

    • Add an option with the - symbol.

    • Remove an option with the + symbol.

    If you specify a value, the corresponding option is only removed if it has exactly the same value.

    You can set multiple options in a single command.

    Example:

    docker run -it -v <path to data directory>:/opt/upsource/data \ -v <path to conf directory>:/opt/upsource/conf \ -v <path to logs directory>:/opt/upsource/logs \ -v <path to backups directory>:/opt/upsource/backups \ -p <port on host>:8080 \ --entrypoint=/bin/bash jetbrains/upsource:<version> \ /opt/upsource/apps/cassandra/bin/cassandra.sh \ configure -J-Xmx3500m -J-XX:+HeapDumpOnOutOfMemoryError
    • Upsource starts with the specified settings.

    • The configuration file cassandra.jvmoptions is modified and the new settings will be applied to any consequent startup.

To configure Cassandra properties manually:

  1. Stop Upsource: docker exec <containerId> stop

  2. Open the configuration file cassandra.jvmoptions located in the <path to conf directory>/conf/cassandra/.

    If the the file does not exist, create it and copy the contents of the sample configuration file with the .dist extension into it.

  3. Edit the JVM options directly in the file. Add new JVM options to the end of the file, listing each option on a new line. To set a pre-defined JVM option, simply uncomment the corresponding line.

  4. Save and close the file.

  5. Start Upsource: docker start <containerId>.

    • The changes you made to the configuration file are copied to the database.

    • Upsource starts with the specified settings.

Last modified: 13 March 2019