Distribution Upgrade from Version 2.x to 2.x
Upgrade Distribution within 2.x versions using Helm, Docker Compose, RPM, Debian, or Linux Archive.
Warning
Before you upgrade, verify that the operating system version you use is supported. See System Requirements for details on operating system support.
The following upgrade methods are supported:
Interactive Script Upgrade (recommended)
Distribution 2.37.0 and later:
Redis has been removed from the Distribution installer and replaced by an internal in-memory system. For more details, see the Distribution 2.37.0 release notes.
The installer script works with all supported upgrade methods (RPM, Debian, and Docker Compose). It provides you an interactive way to install Distribution and its dependencies.
-
Download Distribution (RPM, Debian, or Docker Compose).
-
Stop the service.
systemd
sudo systemctl stop distribution.servicesystemv
sudo service distribution stopDocker Compose
Navigate to the directory containing your
docker-compose.yamland run:docker-compose down -
Extract the contents of the compressed archive and go to the extracted folder. The installer script is located in the extracted folder.
Note: For Docker Compose upgrades, merge your customizations from the current
docker-compose.yamlfile into the newly extracteddocker-compose.yaml.
Note
Copy the contents of the
.envfile in the previous installation to the newly created.envfile in this archive without copying the versions, as this will affect the upgrade.
-
Run the installer script.
Note: If required, the script prompts for mandatory inputs, including the
jfrogURL(custom base URL) andjoinKey.RPM/DEB
sudo ./install.shDocker Compose
sudo ./config.sh -
Start and manage the Distribution service.
systemd
sudo systemctl start distribution.servicesystemv
sudo service distribution startDocker Compose
Navigate to the directory containing your new
docker-compose.yamland run:docker-compose up -d -
Access Distribution from your browser at:
http://<jfrogUrl>/ui/, click the Distribution tab in the Platform module in the UI. -
Check the Distribution log.
tail -f $JFROG_HOME/distribution/var/log/console.log
Manual RPM/Debian Upgrade
-
Download Distribution (RPM or Debian).
-
Stop the current server.
systemd
sudo systemctl stop distribution.servicesystemv
sudo service distribution stop -
Extract the contents of the compressed archive and go to the extracted folder.
-
Install Distribution using the package from the extracted archive.
RPM
sudo rpm -Uvh distribution/distribution.rpmDebian
sudo dpkg -i distribution/distribution.deb -
Start and manage Distribution.
systemd
sudo systemctl start distribution.servicesystemv
sudo service distribution start -
Access Distribution from your browser at:
http://<jfrogUrl>/ui/, click the Distribution tab in the Platform module in the UI. -
Check the Distribution log.
tail -f $JFROG_HOME/distribution/var/log/console.log
Linux Archive Upgrade
Distribution 2.37.0 and later:
Redis has been removed from the Distribution installer and replaced by an internal in-memory system. For more details, see the Distribution 2.37.0 release notes.
-
Stop the current server.
$JFROG_HOME/distribution/app/bin/distribution.sh stop -
Extract the contents of the compressed archive and go to the extracted folder.
tar -xvf jfrog-distribution-<version>-linux.tar.gz -
Set the path to the extracted directory.
export JF_NEW_VERSION=<path to extracted folder, e.g., jfrog-distribution-<version>-linux> -
Replace the existing
$JFROG_HOME/distribution/appwith the newappfolder.rm -rf $JFROG_HOME/distribution/app cp -r $JF_NEW_VERSION/app $JFROG_HOME/distribution/ rm -rf $JF_NEW_VERSION chown -R distribution:distribution $JFROG_HOME/distribution/app
Note
Verify that the password specified in the
requirepassfield in$JFROG_HOME/distribution/var/etc/redis/redis.conf(for more information, see Redis documentation) and theredis.passwordfield in$JFROG_HOME/distribution/var/etc/system.yamlare the same.
-
Start the Distribution service.
Run the following command as the distribution user.
$JFROG_HOME/distribution/app/bin/distribution.sh start -
Access Distribution from your browser at:
http://<jfrogUrl>/ui/, click the Distribution tab in the Platform module in the UI. -
Check the Distribution log.
tail -f $JFROG_HOME/distribution/var/log/console.log
Helm Upgrade
Upgrading to Distribution 2.37.0 or Later
Distribution 2.37.0 and later:
Redis has been removed from the Distribution installer and replaced by an internal in-memory system. For more details, see the Distribution 2.37.0 release notes.
When upgrading from a version prior to 2.37.0, a pre-upgrade webhook (distribution-upgrade-hook) is automatically executed. This webhook handles the migration by deleting the existing StatefulSet with --cascade=orphan (preserving running pods) to allow the updated spec — which no longer includes Redis — to be applied cleanly.
In most cases, no manual intervention is required. However, if the hook job fails (for example, due to RBAC permissions or image pull issues), you may need to manually delete the StatefulSet before retrying the upgrade:
kubectl delete statefulset <release-name>-distribution --cascade=orphan -n <namespace>Note
Because of breaking changes in the PostgreSQL Helm chart, migrate the database from the old to the new database.
Note
Downtime is required to perform an upgrade.
Note
Before upgrading Distribution, complete the following.
Upgrade JFrog Artifactory to v7.x.
If you use the default PostgreSQL (
postgresql.enabled=true), pass the previous 9.x or 10.xpostgresql.image.taganddatabaseUpgradeReady=true. Also delete the existing PostgreSQL subchart statefulset before the Helm upgrade, because the 9.x chart version of PostgreSQL has breaking changes.Run
helm upgradewith the following values set.
-
Update the existing deployed version to the updated version.
-
If Distribution was installed without providing a value to
postgresql.postgresqlPassword(the password was autogenerated), follow these instructions.- Get the current password by running the following.
- Upgrade the release by passing the previously auto-generated secret.
-
If Distribution was installed without providing a value to
rabbitmq.rabbitmqPassword/rabbitmq-ha.rabbitmqPassword(the password was autogenerated), follow these instructions.- Get the current password by running the following.
- Upgrade the release by passing the previously auto-generated secret.
-
If Distribution was installed with all of the default values (e.g., with no user-provided values for Rabbit/Postgres), follow these steps.
- Retrieve all current passwords (RabbitMQ/PostgreSQL) as explained in the above section.
- Upgrade the release by passing the previously auto-generated secrets.
Migration Process
The recommended migration process is a full database export and import of PostgreSQL.
-
Block user access to Distribution (but do not shut down).
-
Get the service name
OLD_PG_SERVICE_NAMEusing the command below. For example:OLD_PG_SERVICE_NAMEas<OLD_RELEASE_NAME>-postgresql. -
Save the previous password
OLD_PG_SERVICE_NAMEor extract it from the secret of the existing PostgreSQL pod. -
Install the new Distribution version with 0 replicas.
A new PostgreSQL pod will be deployed and started. The Distribution pod will be deployed but not started, since the replica count is 0.
For example.
-
Connect to the new PostgreSQL pod (you can obtain the name by running
kubectl get pods). -
Once logged in, create a dump file from the previous database using
pg_dump, and connect to the previous PostgreSQL chart.After running the command above, you should be prompted for a password; this password is the previous chart password (
OLD_PASSWORD). This operation could take some time depending on the database size. -
Once you have the backup file, you can restore it with a command like the one below.
-
After running the command above, you will be prompted for a password; this is the current chart password. This operation could take some time depending on the database size.
-
Run the command
helm upgradeto bring up Distribution. -
Run the following command to remove the old Distribution deployment and Helm release.
-
Access Distribution from your browser at:
http://<jfrogUrl>/ui/, then go to the Security & Compliance tab in the Platform module in the UI. -
Check the status of your deployed Helm releases.
Distribution should now be ready for use.
Updated 24 days ago
