Upgrading from Distribution Version 2.x to 2.x

JFrog Installation & Setup Documentation

Content Type
Installation & Setup
ft:sourceType
Paligo

Warning

Before you upgrade, ensure that the operating system version that you use is supported. See System Requirements for detailed information on operating system support.

The following upgrade methods are supported:

Interactive Script Upgrade (recommended)

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.

  1. Download Distribution (RPM, Debian or Docker Compose).

  2. Stop the service.

    Systemd OS Systemv OS Docker - Stop and remove old containers

  3. 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, make sure to merge your customizations in your current docker-compose.yaml file to the new extracted version of thedocker-compose.yamlfile.

    Note

    Copy the contents of the .env file in the previous installation to the newly created .env file in this archive without copying the versions, as this will affect the upgrade.

  4. Run the installer script.

    Note: if needed, the script will prompt you with a series of mandatory inputs, including the jfrogURL (custom base URL) and joinKey.

    Compose RPM/DEB

  5. Start and manage the Distribution service.

    systemd OS

    distribution.service

    systemv OS Docker Compose

  6. Access Distribution from your browser at: http://<jfrogUrl>/ui/, go the Distribution tab in the Application module in the UI.

  7. Check Distribution Log.

Manual RPM/Debian Upgrade
  1. Download Distribution (RPM or Debian)

  2. Stop the current server.

    systemd OS systemv OS

  3. Extract the contents of the compressed archive and go to the extracted folder.

  4. Install Distribution as a service on Red Hat compatible Linux distributions, as a root user.

    rpm Debian

  5. Start and manage Distribution.

    systemd OS systemv OS

  6. Access Distribution from your browser at: http://<jfrogUrl>/ui/, go the Distribution tab in the Application module in the UI.

  7. Check Distribution Log.

Linux Archive Upgrade
  1. Stop the current server.

    Stop Distribution

  2. Extract the contents of the compressed archive and go to the extracted folder.

    Untar

  3. Replace the existing $JFROG_HOME/distribution/app with the new app folder.

    Upgrade

    Note

    Verify that the password specified in the requirepass field in $JFROG_HOME/distribution/var/etc/redis/redis.conf (for more information, refer to https://redis.io/docs/manual/config/) and the redis.password field in $JFROG_HOME/distribution/etc/system.yaml are the same.

  4. Manage Distribution.

    Run the following command as the distribution user.

  5. Access Distribution from your browser at:http://<jfrogUrl>/ui/, go theDashboard tab in theApplicationmodule in the UI.

  6. Check Distribution Log.

Helm Upgrade

Note

Due to breaking changes in the PostgreSQL Helm chart, you will need to migrate the database from the old to the new database.

Note

Downtime is required to perform an upgrade.

Note

To upgrade Distribution, you will first need to verify the following.

  1. Verify that you have upgraded Artifactory to v.7x. For more information, see Helm Upgrade.

  2. f you are using the default PostgreSQL (postgresql.enabled=true), you need to pass previous 9.x or 10.x's postgresql.image.tag and databaseUpgradeReady=true; you will also need to delete the existing statefulset of the PostgreSQL subchart before the Helm upgrade because the 9.x chart version of PostgreSQL has breaking changes.

    Run helm upgrade with the following values set.

  1. Update the existing deployed version to the updated version.

  2. If Distribution was installed without providing a value to postgresql.postgresqlPassword (the password was autogenerated), follow these instructions.

    1. Get the current password by running the following.

    2. Upgrade the release by passing the previously auto-generated secret.

  3. If Distribution was installed without providing a value to rabbitmq.rabbitmqPassword/rabbitmq-ha.rabbitmqPassword (the password was autogenerated), follow these instructions.

    1. Get the current password by running the following.

    2. Upgrade the release by passing the previously auto-generated secret.

  4. If Distribution was installed with all of the default values (e.g., with no user-provided values for Rabbit/Postgres), follow these steps.

    1. Retrieve all current passwords (RabbitMQ/PostgreSQL) as explained in the above section.

    2. 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.

  1. Block user access to Distribution (but do not shut down).

  2. Get the service name OLD_PG_SERVICE_NAME using the command below. For example: OLD_PG_SERVICE_NAME as <OLD_RELEASE_NAME>-postgresql.

  3. Save the previous password OLD_PG_SERVICE_NAME or extract it from the secret of the existing PostgreSQL pod.

  4. 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.

  5. Connect to the new PostgreSQL pod (you can obtain the name by running kubectl get pods).

  6. Once logged in, create a dump file from the previous database usingpg_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.

  7. Once you have the backup file, you can restore it with a command like the one below.

  8. 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.

  9. Run the command helm upgradeto bring up Distribution.

  10. Run the following command to remove the old Distribution deployment and Helm release.

  11. Access Distribution from your browser at: http://<jfrogUrl>/ui/, then go to the Security & Compliance tab in the Application module in the UI.

  12. Check the status of your deployed Helm releases.

    Distribution should now be ready for use.