Hub 2017.4 Help

Upgrade with Docker

This page describes various scenarios of upgrading an existing Hub service using the Hub docker image.

Upgrade a Docker Image

  1. Create a backup of the Hub database while your existing Hub installation is running.
  2. Stop the running Hub docker container.
  3. Pull an image of the latest Hub version from the Docker Hub Repository: docker pull jetbrains/hub:<version>

    Where <version> is a full version number of an Hub build.

  4. Execute the following command to run a container with the new Hub version, that you have pulled from the repository. All other attributes of the command (volumes and port mappings) must be the same as you have used to run the previous version of the Hub image:
    docker run -it --name <hub-server-instance> \ -v <path to data directory>:/opt/hub/data \ -v <path to conf directory>:/opt/hub/conf \ -v <path to logs directory>:/opt/hub/logs \ -v <path to backups directory>:/opt/hub/backups \ -p <port on host>:8080 \ jetbrains/hub:<new version>

The Hub service starts with the updated Hub version.

Upgrade a ZIP or MSI Installation with Docker Image

  1. Create a backup of the Hub database while your existing Hub installation is running.
  2. Stop the existing Hub service.
  3. Pull an image of the latest Hub version from the Docker Hub Repository: docker pull jetbrains/hub:<version>

    Where <version> is a full version number of an Hub build.

  4. Create and configure Hub-specific directories on the host machine.
  5. Copy the backup file of the Hub database into the backups directory, that you created in the previous step.
  6. Execute the following command to run a container with Hub server and map Hub data volumes and port:
    docker run -it --name <hub-server-instance> \ -v <path to data directory>:/opt/hub/data \ -v <path to conf directory>:/opt/hub/conf \ -v <path to logs directory>:/opt/hub/logs \ -v <path to backups directory>:/opt/hub/backups \ -p <port on host>:8080 \ jetbrains/hub:<version>

    Attributes used with the command:

    • -it — a flag that attaches Hub container input and output including the startup logs to the terminal window. Note that pressing `Ctrl+C` when the terminal is attached to a container output causes the container to shut down. Use `Ctrl+PQ` in order to detach the terminal from container output. For more details, see the official docker documentation.
    • --name hub-server-instance — the arbitrary name for the container.
    • -v <path to NNN directory>:/opt/hub/NNN — binding the Hub-specific 'NNN' directory on the host machine to the respective /opt/hub/NNN directory inside the container.
    • -p <port on host>:8080 — parameter that defines the ports mapping. It instructs the host machine to listen on port <port on host> and propagate all traffic to the port `8080` inside the docker container.
    As the result, Hub service is started on {0.0.0.0:8080} inside the docker container, and port 8080 is mapped to <port on host> that you have specified. This way the service may be accessed from any machine that has network access to <port on host> of the host machine. For instance, if FQDN of the host machine is host.mydomain.com and the <port on host> is 7777, then the service is available at http://host.mydomain.com:7777
  7. The Hub service starts with the web-based Configuration Wizard at the address mentioned above (in our example, it is http://host.mydomain.com:7777). Open the URL in a browser to access the wizard.
  8. In the Configuration Wizard, click Upgrade.
    hub config wizard start
  9. On the Select Upgrade Source page, click the Select button and select the backup file as an upgrade source.
    docker upgrade select source
    Click Next.
  10. On the Confirm Settings page, confirm your system settings and the location of system directories.
    docker upgrade confirm settings
  11. When done, click Upgrade.
    • Hub launches its components.

      Do not close the page in the browser until the setup is complete. When the Hub server is ready, you are redirected to the login page.

  12. Enter the credentials for the Hub administrator account and click the Log in button.
    • Hub opens to the Users page.

    Your Hub installation is upgraded and ready to use.

Last modified: 7 December 2017