Installing Elasticsearch
Pre-requisites:
If you already have Elasticsearch version 7.7.1 installed, ensure that you set up the properties related to the Elasticsearch server connectivity correctly in
Administer > System > OneData Property Configuration. For details, see
OneData Configuration Properties.
Shut down the
OneData server if it is running.
Use this procedure to install the Elasticsearch engine as either a standalone server or a clustered server and configure Elasticsearch to work with the OneData.
To install an Elasticsearch server
You can install Elasticsearch either on the machine where OneData is installed or on a separate machine.
2. Unzip the Elasticsearch installer from the Zip or tar file and run the installer.
If you want to install Elasticsearch as a clustered server, follow the setup instructions in the Elasticsearch documentation.
If you have multiple instances of OneData installed, create an Elasticsearch cluster with a unique name for each OneData instance. For example, if you have Dev, Test, Prod OneData instances, then you could name the Elasticsearch cluster name corresponding to these instances as OneData-DEV, OneData-TEST, and OneData-PROD.
3. On the Menu toolbar, click Administer > System > OneData Property Configuration, and follow these steps:
a. Click the Elasticsearch tab.
b. Set the following properties appropriately:
In
onedata.search.elasticsearch.server.httpurl, specify the host name of the machine where you installed Elasticsearch.
4. Complete the security configurations recommended in the Elasticsearch documentation.
5. To verify if the connectivity information from OneData to Elasticsearch is correct:
a. On the Menu toolbar, click Administer > System > OneData Property Configuration.
b. Click the Elasticsearch tab.
c. Verify if the following properties are set correctly:
onedata.search.elasticsearch.server.httpurl=http://localhost:9240 onedata.search.elasticsearch.cluster.clustername=Elasticsearch_cluster_name Note:
If you do not have a clustered Elasticsearch setup, ignore the cluster properties in both files.
You might have customized values in the first property. The values given here are the default values.
d. Navigate to Elasticsearch Home\config and open the elasticsearch.yml file.
e. Verify if the following details in the elasticsearch.yml file match those in Administer > System > OneData Property Configuration > Elasticsearch:
cluster.name: Unique_Elasticsearch_cluster_name
http.port: 9240
cluster.initial_master_nodes: ["master-node-a","master-node-b"]
discovery.seed_hosts: ["host-1","host-2"]
network.host: 0.0.0.0
f. Save and close the elasticsearch.yml file.
g. Repeat the steps on each OneData instance.
6. On the Menu toolbar, click Administer > System > OneData Property Configuration > Elasticsearch, and set the following property values appropriately:
onedata.search.elasticsearch.enabled. Set this property to
true to enable the Elasticsearch server in
OneData.
onedata.search.elasticsearch.loaddata.loadonstartup. If the data is static and reindexing is not required every time
OneData restart occurs, after the second
OneData restart, modify the value of the property to
false.
7. Navigate to Elasticsearch Home/bin and follow these steps:
a. Start the Elasticsearch server as follows:
Windows machine: elasticsearch.bat Linux machine: ./elasticsearch Starting the Elasticsearch server before OneData ensures that the OneData loads data into the Elasticsearch server before the search requests from users begin.
b. Make the following HTTP call:
http://localhost:9240/
c. Verify if the HTTP response contains these details to indicate that the Elasticsearch server is running:
cluster_name: Unique_Value_for_OneData_Instance number (version number) = Elasticsearch_version_number If you have set the onedata.search.elasticsearch.loaddata.loadonstartup property to true, OneData loads all supported data objects to the Elasticsearch server on startup.
Note:
If there are errors when loading data objects to the Elasticsearch server, check the log file onedataSearchEngine.log. This log provides a summary of the entire data load process in INFO mode. This log summary also includes the number of records processed for each table.
8. Start the OneData server.
Elasticsearch is now ready for use in OneData.
9. Refer to Elasticsearch documentation for the available plugins and their installation steps.
Next Steps:
1. Complete all the configurations required to enable Elasticsearch full-text search. For details of the Elasticsearch configuration parameters details, see
OneData Configuration Properties.
2. In Job Center, schedule Elasticsearch data refresh jobs from the work area to ensure that all latest changes in the repository are available users.