SolrCloud Configuration Guide
SolrCloud Configuration in Rosetta
SolrCloud is a cluster of Solr servers that combines fault tolerance and high availability for flexible distributed search and indexing. These servers are managed by the ZooKeeper service. This document explains how to configure SolrCloud for Rosetta.
The following terms are referred to in this document:
- Legacy (non-SolrCloud) mode – Includes distributed indexing and searching. When an IDX server or a Solr instance is down, part of the data is unavailable.
- Shard – A logical piece of a collection. Each shard is made up of one or more replicas.
- Replica – One copy of a shard.
- SolrCloud mode – Includes index replication, failover, load balancing, and distributed queries with the help of ZooKeeper. Every index update is distributed across the cluster to every shard and replica of the cluster.
- Replication Factor – The number of physical replicas to be created for each logical shard of the collection.
Configuring IDX Servers to SolrCloud Mode
To configure Rosetta to use SolrCloud mode, confirm Rosetta is down on all IDX servers and perform the following steps on each one:
-
Open global.properties (/exlibris/dps/d4_1/system.dir/conf) and locate the following properties:
zk.leader.port=5811
zk.election.port=5821
zk.client.port=5831Three ports are assigned: One is the client port and the other two are used by the Zookeeper servers to communicate with each other. Assign different ports if necessary or skip to the next step.
-
Enter the hostnames (the same name as in the “server.name” property) of three Rosetta servers to run the Zookeeper ensemble (the servers do not have to be IDX servers). For example:
zk.server.1=rosetta1.myinstitution.com
zk.server.2=rosetta2.myinstitution.com
zk.server.3=rosetta3.myinstitution.com -
Run rosettings.csh. The following menu appears:
>dps_bin >rosettings.csh
[1] Update gateway details
[2] Update server name
[3] Update pds server details
[4] Update database passwords
[5] Setup Solr
[6] Exit. - Select option 5 Setup Solr. The following appears:
Solr Cloud options:
[1] Setup SolrCloud
[2] Setup as zookeeper server
[3] Update SolrCloud Cluster Architecture
[4] Rollback to Solr Legacy-mode -
Select option 1 Setup SolrCloud. Enter a replication factor (the number of replicas for each shard). The number should be between 1 and the total number of IDX servers.
Repeat the previous command for each IDX server.
-
On each ZooKeeper server (defined in #2) run rosettings.csh, select 5 Setup Solr, and then 2 Setup as ZooKeeper server.
This step must be performed on all the ZK environments in a time range of up to 10 minutes, in order for the configurations to be uploaded. -
Restart all IDX servers.
Adding Replicas/Shards to an Existing SolrCloud Cluster
Adding a shard is required in case an IDX server is added to the Rosetta cluster (either a new server or reassignment of a non-IDX server). Adding a replica means using an existing IDX server to replicate another IDX server.
Confirm Rosetta is down.
- If you are adding a replica, skip to the next step. If you are adding a shard, open global.properties (/exlibris/dps/d4_1/system.dir/conf), locate the app.role property, and add ‘IDX’:
app.role=DEP,REP,DEL,PER,IDX
Save changes and run $dps_dev/system.dir/bin/set_globals.sh.
-
Run rosettings.csh and select option 5 Setup Solr. The following appears:
Solr Cloud options:
[1] Setup SolrCloud
[2] Setup as zookeeper server
[3] Update SolrCloud Cluster Architecture
[4] Rollback to Solr Legacy-mode -
Select 3 Update SolrCloud Cluster Architecture. Enter a replication factor (the number of replicas for each shard). The number should be between 1 and the total number of IDX servers).
-
Rerun rosettings.csh, select 2 Setup as ZooKeeper server for the Zookeeper servers to update the ZooKeeper ensemble with the change.
This step must be performed on all the ZK environments in a time range of up to 10 minutes, in order for the configurations to be uploaded
Rollback to Non-SolrCloud Mode
To roll back to non-SolrCloud mode:
-
run rosettings.csh and select 5 Setup Solr:
Solr Cloud options:
[1] Setup SolrCloud
[2] Setup as zookeeper server
[3] Update SolrCloud Cluster Architecture
[4] Rollback to Solr Legacy-modebr /> -
Select 4 Rollback to Solr Legacy-mode.
Repeat for each IDX server.