Volumes allow a configuration in which different types of data can be held in separate clusters. For example, one small master SolrCloud instance on one node (or two nodes for replication) might serve as a master volume. Other volumes that are separate clusters would connect to the master one.
Volumes can handle additional storage for different repositories. Only the Administrator user can administer (create, edit, and delete) volumes, and only the Administrator user can assign repositories to volumes. Non-Administrator users only have read access: on the Volumes tab, they can see the list of volumes, but they cannot do anything with them.
You can only assign a repository to a volume when the repository is being created, not thereafter. If a repository is not on a dedicated volume, you cannot move it there later. Likewise, if it is on one volume, you cannot then move it to another volume.
Prerequisites
To use volumes, the following requirements must be met:
- You must have more than one Solr instance running. You can install another Solr instance either on a remote server or on the same server using a different port. (Two Solr instances on same server require different ports.)
- All volumes have to be at the same Solr version as the master volume (for XRay version 1.5, Solr 8; for XRay versions 1.4 and earlier, Solr 6).
When Solr Authentication is Enabled
XRay versions 1.4 and prior:
- If the Solr cluster for any volume requires authentication, then its password has to be the same as that of the master volume. Therefore you must configure XRay to use Solr authentication by specifying the user/password in global.properties (jkool.db.server.user and jkool.db.server.pwd), even if the master cluster is not using it.
In XRay 1.5:
- XRay is enhanced to allow each volume cluster to have a different user and password. When setting up the volume, use the new Volume User and Volume Password fields to fill in the Solr user and password needed to connect to the cluster.
Create a Volume for a Solr Installation on a Remote Server
Volumes can be created using the Query Browser. To install the Query Browser, look for jkool-qb.sh in either the jkool-dbai-1.x.tar.gz package or the separate Windows package.
- Download and install Solr on the remote server.
- Start the remote Solr instance.
- Check the SolrCloud console.
- In the solr.in.sh file, provide the Zookeeper host. Example:
ZK_HOST="172.16.31.27:2181/xraysolr"
. If you are running Solr in cloud mode, you must provide the Zookeeper Root (zkroot). If the Zookeeper Root is not provided, an exception is generated while creating Solr cores. - Enter the IP address of the master volume as the 'ZKHOST' and the IP address of the remote volume as the 'SOLRHOST'.
- Create the volume using the query browser.
For XRay Version 1.4, or for Version 1.5 without Solr Authentication enabled:
Create Volume '<Volume Name>'
Description='Local node Solr Cluster',
Url='http://<solr host>:<solr port>',
Properties=('SOLRHOST'='<solr host>',
'SOLRPORT'=<solr port>,
'ZKHOST'='<ZooKeeper host>',
'ZKPORT'=< ZooKeeper port>),
'ZKROOT'='< ZooKeeper root>')
In XRay Version 1.5, when Solr Authentication is enabled and used to connect to the volume, you can add the user and password, as shown bolded below:
Create Volume '<Volume Name>'
Description='Local node Solr Cluster',
Url='http://<solr host>:<solr port>',
VolumeUser='<username'>,
VolumePassword='<pwd>,
Properties=('SOLRHOST'='<solr host>',
'SOLRPORT'=<solr port>,
'ZKHOST'='<ZooKeeper host>',
'ZKPORT'=< ZooKeeper port>),
'ZKROOT'='< ZooKeeper root>')
- Create a repository and assign the newly created volume to this repository using the following query:
Create Repository '<Repo Name>', OrganizationName='<Organization Name>', VolumeName='<Volume Name>'
Query Browser is required because repositories created through the user interface use the master volume.
- Go to misc/schemas and run the create-core.sh command to create the Solr cores in the remote Solr instance.
./create-cores.sh -sh <SOLR HOST> -sp <SOLR PORT> -zh <ZOOKEEPER HOST> -zp <ZOOKEEPER PORT> -zr <ZOOKEEPER ROOT>
This command will create all the Solr cores in the new Solr cluster. Validate that the cores have been created by going to the remote Solr instance in the browser console.
- Log in to XRay, go to the new repository, and create the dashboard. If the dashboard is not created successfully, and instead you receive a message saying that the volume is not assigned to the repository, then check your Volume configuration in Admin Settings.
You can use the 'get repository' query to find out which repository a volume is assigned to. You can also use the 'get volumes' query to determine how many volumes you have, and which volume is assigned to each repository.
Field | Definition | ||
Solr | Zookeeper | ||
Name | Name of Volume | ||
Description | Description of Volume | ||
Type | Solr | Zookeeper | |
URL | Solr address or Zookeeper address. | ||
Organization | Optional. Fill in which organizations can use this volume. Usually this is a single organization for a dedicated volume. | ||
Solr Host |
IP address of your Solr Host. If the volume is being created for a Solr instance on a remote server, the Solr Host is the remote volume. If the volume Type is Solr, the Solr Host is filled in automatically based on the Solr URL entry. |
Not applicable. | |
Solr Port | The Solr port is filled in automatically based on the Solr URL entry. | Not applicable. | |
Zookeeper Host |
If the volume is being created for a Solr instance on a remote server, the Zookeeper Host is the IP address of the master volume. Since Solr comes with its own Zookeeper, if you do not provide the Zookeeper Host properly, the remote Solr will start the Zookeeper that comes with it by default. |
Not applicable. | |
Zookeeper Port | Zookeeper port. For example: 2181 (default). | Not applicable. | |
Zookeeper Root | Root directory of Zookeeper. If you are creating a volume for a Solr installation on a remote server, you must provide the Zookeeper Root to be able to create the Solr cores. | Not applicable. |