Adding more nodes to the SolrCloud
Let us see how we can add more nodes to SolrCloud. Create one more machine solr5
. Copy the Tomcat folder to this machine and create the folder solr-cores
in the /home/ubuntu
folder. Alter the tomcat/bin/setenv.sh
file and change the -Dhost
parameter to match the machine's host. For solr5
, it will be:
SOLR_OPTS="-Dsolr.solr.home=/home/ubuntu/solr-cores -Dhost=solr5 -Dport=8080 -DhostContext=solr -DzkClientTimeout=20000 -DzkHost=zoo1:2181,zoo2:2181,zoo3:2181"
Also copy the solr.xml
file from any Solr machine to these machines inside the solr-cores
folder. Now start Tomcat and check whether it is running by opening the following URL: http://solr5:8080/solr
.
There are two ways to identify whether this node has been added to SolrCloud. We can check whether the admin interface on solr5
displays the current Cloud | Graph. Another way is to go to the admin | Cloud | Tree | live_nodes folder. This should contain the name of the live nodes. solr5
should be visible there...