Configuring TORO Integrate to Run with Remote Solr
For ease of installation and deployment1, TORO Integrate ships with an embedded instance of Apache Solr. Solr is used internally by custom search indices, Tracker, and Monitor. But aside from using the default embedded Solr instance, you can configure TORO Integrate to connect to a stand-alone Solr server2 instead. This is useful when you have a cluster of TORO Integrate servers or if you simply want to have a dedicated instance of Solr. To learn more about how to do this, follow the steps below.
Remote and cloud instances of Solr do not have the ability to create new cores
Unlike embedded Solr instances which can dynamically create new cores on demand of Integrate Packages3, remote and cloud instances of Solr cannot. If a package needs a certain core or collection and you're using a remote or cloud instance of Solr which doesn't have the required core or collection yet, the package will not start. You will have to create them manually.
Delegating Solr servers
As with cloud instances, you can use the embedded Solr instance in place of the configured remote Solr server in the
event that it becomes unavailable. To enable this behavior, you must set the
instance property to
Go to the
conffolder under TORO Integrate's home directory
Update your instance
.propertiesfile to let TORO Integrate know that you'll be using a remote Solr server.
We recommend creating an
override.propertiesfile, if one doesn't exist yet, and then adding or modifying these key-value pairs in the file:
... where you must replace
<solr-server-url>with the URL of your remote Solr instance.
If you have multiple TORO Integrate servers and you want them to connect to a single remote Solr instance, you must assign a unique Solr core prefix for each instance. To do so, set each TORO Integrate server's
Having a prefix will help every TORO Integrate server determine which Solr cores belong to them and thus, will prevent instances from touching other instances' search index data.
Copy the configuration files of TORO Integrate's required Solr cores to Solr.
Go to the
<toro-integrate-home>/solr/coresdirectory, and copy the
invoke-monitorfolders and paste them to your
<solr-home>/server/solrdirectory. Rename the copied folders such that they follow the format
1 2 3 4 5 6 7
<solr-home>/server/solr ├── configsets ├── core_invoke_monitor ├── README.txt ├── solr.xml ├── core_tracker ├── zoo.cfg
As you may notice from the example above, the directories have been renamed and prefixed with
core. This is because these Solr cores belong to the
On another note, if you have set the value of
solr.prefix, you must also rename the required Solr cores such that their names follow the format
<prefix>_<package_name>_<core_name>. Otherwise, TORO Integrate won't be able to find them and will shift back to using embedded Solr.
We will rename the directories:
mv invoke-monitor <solr-prefix>_core_invoke_monitor mv tracker <solr-prefix>_core_tracker
And we will edit the contents of their
If you wish to retain the
invoke_monitorcores' previous data, you must create copies of their data files in your remote Solr server.
If you have been previously using embedded Solr, then this is as easy as copying the contents of the
<toro-integrate-home>/data/solr/core_invoke_monitordirectories and placing them under the
If you have other Solr cores you'd like to keep, Steps 3 and 4 above still apply. Simply copy their configuration folders to the
<solr-home>/server/solrdirectory and rename them accordingly such that they follow the format
<prefix>_<package_name>_<core_name>, depending on whether or not you have configured the instance's
solr.prefixproperty. Copy over the data of their cores, if you wish to retain them.
Start or restart your remote Solr by executing
./solr startunder the
<solr-home>/bindirectory. You should have new cores named
core_invoke_monitordisplayed on your Solr admin page like the following:
If you have configured other custom Solr cores, you should see them as well.
Restart your TORO Integrate instance. Upon startup, TORO Integrate should print logs like the following if it has been able to successfully communicate to the remote Solr instance:
1 2 3 4
25/04/18 16:39:19.222 INFO [RemoteSolrServer] Starting core: core/tracker 25/04/18 16:39:19.737 INFO [RemoteSolrServer] Starting core: core/tracker completed 25/04/18 16:39:19.749 INFO [RemoteSolrServer] Starting core: core/invoke_monitor 25/04/18 16:39:19.755 INFO [RemoteSolrServer] Starting core: core/invoke_monitor completed