Upgrading via installV2.sh ( Xray Version >= 3.131.x )

Use installV2.sh to upgrade JFrog Xray and optionally enable RabbitMQ Quorum Queues or upgrade to RabbitMQ 4, starting from version 3.131.x.

Upgrading from Xray Version 3.131.x to 3.131.x or above

RPM, Debian, or Docker Compose

Starting JFrog Xray version 3.131.x, the installer script will allow you to install RabbitMQ 4 and/or Quorum queues, optionally.

The installer script works with all supported upgrade methods (RPM, Debian, and Docker Compose). It provides you an interactive way to upgrade Xray and its dependencies.

Stage 1

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

  2. Add the following in the system.yaml

    1. (Only for Docker Compose)

      shared:
          rabbitMq:
              username: guest

      (Default is guest. If you override this during installation, update accordingly.)

    2. (Only for RPM and Debian based installation)

      shared:
          rabbitMq:
              autoStop: true
  3. Stop the service.

    systemd OS

    systemctl stop xray.service

    systemv OS

    service xray stop

    Docker Compose

    cd jfrog-xray-<version>-compose
    docker-compose -p xray down
    docker compose -p xray-rabbitmq -f docker-compose-rabbitmq.yaml down
  4. Extract the contents of the compressed archive and go to the extracted folder. The installer script is located in the extracted folder.

tar -xvf jfrog-xray-<version>-<compose|rpm|deb>.tar.gz
cd jfrog-xray-<version>-<compose|rpm|deb>
📘

For Docker Compose upgrades, merge any customizations from your current docker-compose.yaml into the newly extracted version before proceeding.

📘

The newly extracted archive includes a fresh .env file with the latest component versions (for example, ROUTER_VERSION, OBSERVABILITY_VERSION, XRAY_VERSION).
Do not overwrite or remove these version entries as they must remain as is to ensure the correct versions are installed. Copy only the non-version settings from your previous .env file into the new one.

Stage 2

  1. Run the installer script.

    If needed, the script will prompt you with a series of mandatory inputs, including the jfrogURL (custom base URL), joinKey, and the Rabbitmq Quorum queue or version migration.

    Compose

    ./configV2.sh

    RPM/DEB

    ./installV2.sh

Upgrading to RabbitMQ and the Quorum queue is a 2-step process. The first time you run the upgrade script, it will ask you to optionally enable Quorum Queue with RabbitMQ3

Installer script prompt asking whether to enable Quorum Queue migration
  1. Add the following section to the system.yaml file (if not present)

    shared:
      rabbitMq:
        replicaCount: <your current rabbitmq node count>
      dataMigrations:
        migrate_msgs_from_other_rabbitmq:
          vhost: "%2F"
  2. (Only for Docker Compose) Edit the docker-compose-rabbitmq.yaml and add the ulimits under services if not already set:

    services:
      rabbitmq:
        ulimits:
          nofile:
            soft: 100000
            hard: 100000
  3. ❗ Restart Xray only after adding the above configuration to system.yaml.

  4. After completing the above, proceed to the next set of nodes

Verification of Quorum Queue Migration

❗Proceed to Stage 3 - Only after all the nodes are upgraded in the cluster to quorum and the quorum migration is verified in the logs)

Quorum migration will only happen, after all the nodes are upgraded in the cluster

Follow these steps to verify:

  1. See Verify quorum migration in troubleshooting page
  2. Look for these logs in the xray-server.log: (Will take 20 minutes after the migration for these logs to appear)
RabbitMQ migration migrate_msgs_from_other_rabbitmq completed successfully
RabbitMQ migration delete_classic_queues_vhost completed successfully

Stage 3

  1. The next time you run the same script, it will optionally ask you to upgrade to RabbitMQ4

  2. Stop the service.

    systemd OS

    systemctl stop xray.service

    systemv OS

    service xray stop

    Docker Compose

    cd jfrog-xray-<version>-compose
    docker-compose -p xray down
    docker compose -p xray-rabbitmq -f docker-compose-rabbitmq.yaml down
  3. Run the installer script.

    Compose

    ./configV2.sh

    RPM/DEB

    ./installV2.sh
Installer script prompt asking whether to upgrade to RabbitMQ 4
  1. After the upgrade start the Xray service.

systemd OS

systemctl start xray.service

systemv OS

systemctl start xray

Docker Compose

cd jfrog-xray-<version>-compose
docker-compose -p xray up -d
docker compose -p xray-rabbitmq -f docker-compose-rabbitmq.yaml up -d
  1. Access Xray from your browser at:

http://<jfrogUrl>/ui/ , go the Xray tab in the Application module in the UI.

  1. Check Xray Log.
tail -f $JFROG_HOME/xray/var/log/console.log

Linux Archive

Starting with Xray version 3.131.x, the installer script will optionally allow you to install RabbitMQ 4 and/or Quorum queues. Before proceeding with the upgrade, make sure your existing Xray deployment is using RabbitMQ version 3.11.x or higher

The installer script provides an interactive way to upgrade Xray and its dependencies. Make sure to upgrade one node at a time when upgrading a cluster of nodes.

Stage 1

  1. Download Xray (Linux Archive).

  2. Add the following in the system.yaml

    shared:
        rabbitMq:
            autoStop: true
  3. Stop the service.

    cd $JFROG_HOME/xray/app/bin
    ./xray.sh stop
    
    or
    
    systemctl stop xray.service
  4. Extract the contents of the compressed archive, go to the extracted folder, and replace the existing $JFROG_HOME/xray/app with the new app folder. The installer script is located in the extracted folder.

    tar -xvf jfrog-xray-<version>-<linux>.tar.gz
    cd jfrog-xray-<version>-<linux>
    
    # Export variables to simplify commands
    export JFROG_HOME=/opt/jfrog
    export JF_NEW_VERSION=/opt/jfrog/jfrog-xray-<version>-linux
    
    # Remove app
    rm -rf $JFROG_HOME/xray/app
    
    # Copy new app
    cp -fr $JF_NEW_VERSION/app $JFROG_HOME/xray/
    
    # Remove extracted new version
    rm -rf $JF_NEW_VERSION

Stage 2

  1. Run the installer script.

    If needed, the script will prompt you with a series of mandatory inputs, including the jfrogURL (custom base URL), joinKey, and the Rabbitmq Quorum queue or version migration.

    cd $JFROG_HOME/xray/app/bin
    ./installV2.sh
    Installer script prompt asking whether to enable Quorum Queue migration
  2. chown -R xray user:xray user $JFROG_HOME/xray

  3. Add the following section to the system.yaml file (if not present)

    shared:
      rabbitMq:
        replicaCount: <your current rabbitmq node count>
      dataMigrations:
        migrate_msgs_from_other_rabbitmq:
          vhost: "%2F"
  4. ❗ Restart Xray only after adding the above configuration to system.yaml.

    $JFROG_HOME/xray/app/bin/xray.sh start|stop
    
    or
    
    systemctl start xray.service
  5. After completing the above, proceed to the next set of nodes

Verification of Quorum Queue Migration

❗Proceed to Stage 3 - Only after all the nodes are upgraded in the cluster to quorum and the quorum migration is verified in the logs)

Quorum migration will only happen, after all the nodes are upgraded in the cluster

Follow these steps to verify:

  1. See Verify quorum migration in troubleshooting page
  2. Look for these logs in the xray-server.log: (Will take 20 minutes after the migration for these logs to appear)
RabbitMQ migration migrate_msgs_from_other_rabbitmq completed successfully
RabbitMQ migration delete_classic_queues_vhost completed successfully

Stage 3

  1. The next time you run the same script, it will optionally ask you to upgrade to RabbitMQ4
    ❗Erlang 27 should be installed prior to upgrading to RabbitMq 4
  2. Stop the service.
    cd $JFROG_HOME/xray/app/bin
    ./xray.sh stop
    
    or
    
    systemctl stop xray.service
  3. Run the installer script.
    cd $JFROG_HOME/xray/app/bin
    ./installV2.sh
Installer script prompt asking whether to upgrade to RabbitMQ 4
  1. After the upgrade start the Xray service.
$JFROG_HOME/xray/app/bin/xray.sh start|stop

or

systemctl start xray.service
  1. Access Xray from your browser at:

http://<jfrogUrl>/ui/ , go to the Xray tab in the Application module in the UI.

  1. Check Xray Log.
tail -f $JFROG_HOME/xray/var/log/console.log

Related Topics