Have a question? Want to report an issue? Contact JFrog support

Skip to end of metadata
Go to start of metadata

Overview

The procedure for upgrading Distribution depends on your installation type. We strongly recommend reading through this page before proceeding with your upgrade.

Upgrading to Version 1.4 and above

In version 1.4 JFrog Distribution underwent a significant change replacing its use of MongoDB with PostgreSQL. If you are upgrading to version 1.4, please pay close attention to the process of migrating your data from MongoDB to PostgreSQL.

Before You Proceed

Before you upgrade

We strongly recommend that you take the actions in this section to ensure you can roll back your system in case you encounter any issues during the upgrade process:

  1. Perform a full backup of the MongoDB collections
  2.  Backup the $DISTRIBUTION_HOME folder  

Backing Up MongoDB Collections

How you backup your MongoDB collections depends on whether you are using Distribution's internal MongoDB database, or your organization's MongoDB database that is external to Distribution.

  1. Backing up an internal MongoDB database
    To backup Distribution's internal MongoDB database, follow these instructions:

    mongodump -h 127.0.0.01 -u distribution -p password -d distribution -o ./backup
  2. Backing up an external MongoDB database
    To back up your organization's external MongoDB database, please refer to  mongodump in the mongoDB documentation.

Backing Up the Distribution Home Folder

Simply copy the contents of your $DISTRIBUTION_HOME folder to a backup folder of your choice.

Page Contents



Running the Upgrade on a Single Node/Server

Download the script from the E+ download page

Upgrading on Docker 

Using External Databases

JFrog Distribution uses a PostgreSQL database for different features of its operation, and gives you the option of installing a dedicated database instance during the installation process, or using your own PostgreSQL database if you already have one already installed and in use in your organization. If you have chosen to use your own PostgreSQL database, you need to ensure Distribution remains connected to it following an upgrade.

For more details, please refer to Using External Databases.


  1. Perform a graceful shutdown of the Distribution server using the existing distribution.sh file:

    Stop distribution
    ./distribution stop
  2. Run the upgrade command on the installation script using the new version of distribution.sh file:

    ./distribution upgrade
  3. Make sure that the mongo server/docker container is up and running to make sure that the data migration can run.
  4. Start Distribution using the new version of distribution.sh file. During the service initialization, the service first trigger the migration process.

    ./distribution start

Upgrading on Linux 

Using External Databases

JFrog Distribution uses a PostgreSQL database for different features of its operation, and gives you the option of installing a dedicated database instance during the installation process, or using your own PostgreSQL database if you already have one already installed and in use in your organization. If you have chosen to use your own PostgreSQL database, you need to ensure Distribution remains connected to it following an upgrade.

For more details, please refer to Using External Databases.

Distribution is supported on a variety of flavors of Linux and follows standard conventions for folder structure. For details, please refer to Linux Installation. 

The following instructions for upgrading Distribution are valid for all supported flavors of Linux.

To upgrade Distribution running on Linux, follow the instructions below replacing <linux-flavor> with the flavor you are using:

  1. Extract the downloaded installation archive.


    tar -xzf distribution-<linux-flavor>-latest.tar.gz
  2. Run the installation script
    (If you are not running as "root", prepend the following command with "sudo").

    ./installDistribution-<linux-flavor>.sh

Migration process

After you finish installing the new version while the upgraded node is booting, an automatic migration process is executed.  This process makes the necessary changes to the configuration files and database tables.

This process may take some time depending on the database size.

You can track the migration process by looking in the Distribution server logs:

log example
2018-08-06 09:49:13,589 [main] [INFO ] (o.j.b.d.a.l.ApplicationStartingListener:24) server version: 1.4.0, last database version was: 1.3.0
2018-08-06 09:52:13,285 [main] [INFO ] (o.j.b.d.a.b.m.AbstractMigrationService:31) running migration from 1.3.0 to 1.4.0
....
2018-08-06 09:53:21,276 [main] [INFO ] (o.j.b.d.a.l.ApplicationStartedListener:27) server version: 1.4.0, last configuration version was: 1.3.0
2018-08-06 09:53:22,674 [main] [INFO ] (o.j.b.d.a.b.m.AbstractMigrationService:31) running migration from 1.3.0 to 1.4.0
....
2018-08-06 09:53:42,111 [main] [INFO ] (o.j.b.d.a.b.m.DataBaseMigrationService:79) Migration to 1.4.0 finished successfully. time took to complete: 20 seconds

Running the Upgrade on an HA Cluster

Distribution HA is available from Distribution version 1.2.

Down time required

In the current version upgrade full down time is required in order to successfully migrate the data from mongoDb to PostgreSQL

Upgrade should be executed one node at a time

When upgrading an HA cluster, make sure complete the upgrade process on one node at a time before moving on to the next one.

  1. Make sure that there are no distribution processes that are in progress or about to start as follows:

    1. For each release bundle in the Release Bundles module, select the bundle to view its details.

    2. For each version in the release bundle details, select the Distribution Tracking tab

    3. For each distribution process, verify that its status is either CompletedFailed or Aborted
      Release Bundle Version Status

  2. Stop all JFrog Distribution processes servers

  3. Upgrade each node in the cluster as described in Running the Upgrade on a Single Node/Server.

  4. After all nodes were upgraded and successfully started you may shutdown the mongoDB  database as it is no longer used:
    1. For a Docker installation run: 

      docker stop distribution_mongo_1
    2. For a native installation run: 

      service mongod stop

Recovering from Upgrade Failure

If for some reason the migration process fails and you see exceptions in the server log or the server does not start after migration, you may need to revert to the previous version and contact our support for assistance.

  • before reverting to previous version please save the distribution.log and dump postgreSQL distribution database to help us investigate and fix the issue

To revert to the previous version, follow these steps:

  1. Perform a fresh install of the previous version of Distribution using. For more information, see the Installing Distribution Instructions.
  2. Before starting the server, restore the Mongo collection from the backup you created using 'mongorestore'. For more information, see mongorestore. 

  3. Copy $DISTRIBUTION_HOME from the backup you created to its original location.
  4. Delete all tables that may have been created in the PostgreSQL database.

  5. Start the server.

Upgrading from Any Version Below Distribution 1.2

To upgrade from any version below version 1.2 (for example, 1.1), follow the these steps:

  1. Stop the Distribution server.
  2. Drop the Mongo database used by the distribution (usually called "distribution") by using 'db.dropDatabase()'. For more information, see db.dropDatabase.

  3. Delete the content of $DISTRIBUTION_HOME folder
  4. Install ther new version by following the Installing Distribution Instructions.
  5. Reconfigure distribution according to the configuration from the previous version.
  6. Recreate the release bundles and permissions from the previous version.

Deploying your GPG Key on the source Artifactory

Starting from v1.3.0, Distribution will trigger the source Artifactory to clone the contents of the signed release bundle into an isolated release-bundles repository. To allow this, you will need to deploy your GPG Key, that is used in each of your Artifactory Edge nodes, to the source Artifactory. Refer to the JFrog Artifactory User Guide. 



  • No labels