When upgrading an HA cluster, the procedure for upgrading each node is similar to upgrading a single instance (Non-HA) installation, however, there are additional actions required for the nodes to operate as a high availability cluster. If you are upgrading an Xray HA cluster, please refer to Upgrading an HA Cluster. |
Upgrading Xray's Docker distribution is done using the latest installation script that you need to download from the |
JFrog Xray uses several databases for different features of its operation. Until version 1.10, Xray installed an instance of all of these databases dedicated for its own use. From version 1.10, Xray gives you the option of using your own MongoDB or PostgreSQL databases if you have these already installed and in use in your organization. If you wish to use your own external database, you first need to perform a number of preliminary operations before upgrading Xray. For more details, please refer to Using External Databases. |
After downloading the latest installation script from the , to upgrade your Xray installation, follow the steps below:
Give the installation script "execute" privileges on your machine.
chmod +x xray |
Stop your current Xray instance:
xray stop |
Run the upgrade
command on the installation script
xray upgrade |
Start xray
xray start |
To use an external database, that’s already installed in your organization, follow the process described here. |
In addition to managing installation and upgrade, the installation script can provide additional information or perform additional tasks on your installation such as restarting Xray, displaying log files and more. For details, run:
xray help |
Xray is supported on a variety of flavors of Linux and follows standard conventions for folder structure. For details, please refer to Linux Installation.
To upgrade Xray running on Linux, follow the instructions below replacing <linux-flavor> with the flavor you are using:
JFrog Xray uses several databases for different features of its operation. Until version 1.10, Xray installed an instance of all of these databases dedicated for its own use. From version 1.10, Xray gives you the option of using your own MongoDB or PostgreSQL databases if you have these already installed and in use in your organization. If you wish to use your own external database, you first need to perform a number of preliminary operations before upgrading Xray. For more details, please refer to Using External Databases. |
Extract the downloaded installation archive to a temporary folder /tmp
tar -zxvf xray-<linux-flavor>-latest.tar.gz |
Run the installation script located in the extracted folder
(if you are not running as "root", prepend the following command with "sudo")
./installXray-<linux-flavor>.sh |
To use an external database, that’s already installed in your organization, follow the process described here. |
The installation script offers several facilities for maintenance. For details, please refer to Interacting with the Linux Installer.
When upgrading your Xray installation, the installation script places files in default locations.
For the Xray data files and PostgreSQL home directory, you may modify the location from the default. For details, please refer to the README file in your Xray home directory.
In some cases, when upgrading Xray to the latest version, Xray also needs to update its database (for example, if the database schema changes). While Xray handles this internal upgrade process automatically, it is a process which may take some time, and it is important that you don't interrupt the upgrade process and let it run to completion. During the upgrade process, Xray will provide a visual indication of its progress.
In case of an issue, Xray will stop the upgrade process and will provide error information which you can share with JFrog support for further help, this can be also troubleshooted.
JFrog Xray uses several databases for different features of its operation. Until version 1.10, Xray installed an instance of all of these databases dedicated for its own use.
From version 1.10, Xray gives you the option of using your own MongoDB or PostgreSQL databases if you have these already installed and in use in your organization.
Xray currently supports the following versions for each of these databases: postgres:9.5.2 |
It is up to you to choose which, if any of these databases to externalize when you upgrade Xray.
If you choose to have Xray use any of your own databases for its operation, you take full responsibility for the maintenance, monitoring, backup and correct functioning of these databases. |
You only need to follow the process below to use your own database once. Subsequent upgrades can be performed as usual, without having to follow the process below. |
To use your own databases with Xray, follow the procedure below:
Stop Xray microservices
./xray.sh stop |
Back up the Xray configuration file using the following command:
mv <XRAY_HOME_FOLDER>/config/xray_config.yaml <XRAY_HOME_FOLDER>/config/xray_config_orig.yaml |
During the upgrade process, the default configuration file will be recreated in the same location.
Stop all the external databases that you want Xray to use
./xray.sh stop all |
Prepare all the external databases that you want Xray to use by adding the required schema as described in the corresponding snippets below:
|
|
Purge your current installation of Xray:
With Aptitude: apt-get purge xray With YUM: yum erase xray |
Manually clean up your previous installation
Purging your previous installation of Xray only removes Xray's configuration folder found, by default, at Therefore, after purging your previous version, make sure to clean any residual database files left in your system and the data folder found, by default, at |
Continue with upgrading Xray as described in Upgrading on Docker or Upgrading on Linux according to your installation type.