Upsource 2020.1 Help

Upgrade from Docker to Docker

Upgrade procedures vary significantly depending on the version increment:

Major upgrade

Follow this instruction to upgrade your existing Docker installation to a newer major version (i.e. 2019.1.5 to 2020.1.0) with a Docker distribution.

You can also use this procedure to migrate from Upsource distributed installation to a latest Docker version.

  1. Back up your data!. Create a backup while your existing Upsource installation is running.

  2. Stop the running container with your existing Upsource version:

    docker exec <containerId> stop
  3. Delete all content from the data and conf folders — the folders you mapped as volumes to the /opt/upsource/data and /opt/upsource/conf inside the container during the installation of the existing instance.

  4. If the date-specific backup folder has been moved from the default directory (the one mapped as a volume to the /opt/upsource/backups inside the container), copy the date-specific backup folder to the default directory.

  5. Pull an image of the latest Upsource version from the Docker Hub Repository:

    docker pull jetbrains/upsource:<version> Where <version> is a full version number of an Upsource build.

  6. Run the new docker container and map Upsource data volumes and port:

    docker run -it --name <upsource-server-instance> \ -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>

    Where:

    <upsource-server-instance> is a name you give to the container.

    -v <path to data directory>:/opt/upsource/data maps the data directory in the container to the corresponding data directory left on the host machine from the previous installation. The same mapping is set for the other directories: conf, logs, backups.

    -p <port on host>:8080 this port mapping instructs your host machine to listen on <port on host> and propagate all traffic to port 8080 inside the Docker container.

    jetbrains/upsource:<version> points to an image with the new Upsource version.

  7. Follow the wizard.

    After the container of the new version finishes the startup process, the Configuration Wizard is deployed and listens on the main Upsource port at the URL that ends with some non-root context:

    http://<host>:<port>/contextPath

    The wizard URL is printed in the console output and is recorded in the logs:

    "JetBrains Upsource Configuration Wizard will be available on [http://<host>:<port>/contextPath] after start"

    Look it up in the console, access the wizard, then follow its steps to finish the upgrade process:

    • On the first page of Configuration Wizard click Upgrade

    • Select the location of the last backup in the container. It's a date-specific directory inside the backups folder, e.g. /opt/upsource/backups/2017 Jul 11 18-29-38

    • Verify your system settings and location of system directories. Click Upgrade to finish.

    Meanwhile the Upsource service URL will be showing a page with the "Upgrade in progress" notice to Upsource end users.

  8. You can now remove the old container with the following command:

    docker rm <containerId>

    To see all stopped containers, run:

    docker ps -a

Minor upgrade

Follow this instruction to patch-upgrade your existing Docker installation to a newer minor version (i.e. 2020.1.0 to 2020.1.1) with a Docker distribution.

  1. Stop the running container with your existing Upsource version:

    docker exec <containerId> stop
  2. Pull an image of the latest Upsource version from the Docker Hub Repository:

    docker pull jetbrains/upsource:<version> Where <version> is a full version number of an Upsource build.

  3. Run the new docker container and map Upsource data volumes and port:

    docker run -it --name <upsource-server-instance> \ -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>

    Where:

    <upsource-server-instance> is a name you give to the container.

    -v <path to data directory>:/opt/upsource/data maps the data directory in the container to the corresponding data directory left on the host machine from the previous installation. The same mapping is set for the other directories: conf, logs, backups.

    -p <port on host>:8080 this port mapping instructs your host machine to listen on <port on host> and propagate all traffic to port 8080 inside the Docker container.

    jetbrains/upsource:<version> points to an image with the new Upsource version.

  4. Follow the wizard.

    After the container of the new version finishes the startup process, the Configuration Wizard is deployed and listens on the main Upsource port at the URL that ends with some non-root context:

    http://<host>:<port>/contextPath

    The wizard URL is printed in the console output and is recorded in the logs:

    "JetBrains Upsource Configuration Wizard will be available on [http://<host>:<port>/contextPath] after start"

    Look it up in the console, access the wizard, then follow its steps to finish the upgrade process.

    Meanwhile the Upsource service URL will be showing a page with the "Upgrade in progress" notice to Upsource end users.

  5. You can now remove the old container with the following command:

    docker rm <containerId>

    To see all stopped containers, run:

    docker ps -a
Last modified: 02 April 2021