This repository was archived by the owner on Feb 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 85
Elasticsearch Setup
Sumedh Anantrao Kulkarni edited this page Sep 8, 2021
·
8 revisions
Note: Follow below steps on all 3 nodes.
-
Install Elastic-Search rpms
wget https://github.com/Seagate/cortx/releases/download/third-party-deps-1.0.0-0/third-party-centos-7.9.2009-1.0.0-0.tar.gz tar -xvf third-party-centos-7.9.2009-1.0.0-0.tar.gz cd centos-7.9.2009-2.0.0-latest/commons/elasticsearch/ yum install -y *.rpm java-1.8.0-openjdk-headless
-
Install cortx-utils rpm
Follow installation steps till installation of cortx-py-utils from utils-build-guide
-
Add private-ip and node-name of all nodes in /etc/hosts file.
For single node setup
192.168.95.231 srvnode-1
For 3 node setup
192.168.95.231 srvnode-1 192.168.95.232 srvnode-2 192.168.95.233 srvnode-3
Run this cmd individually on all 3 nodes.
/opt/seagate/cortx/utils/bin/elasticsearch_setup post_install --config yaml:///opt/seagate/cortx/utils/conf/elasticsearch/elasticsearch.post_install.tmpl
Run this cmd individually on all 3 nodes.
/opt/seagate/cortx/utils/bin/elasticsearch_setup prepare --config yaml:///opt/seagate/cortx/utils/conf/elasticsearch/elasticsearch.prepare.tmpl
a. Edit /opt/seagate/cortx/utils/conf/elasticsearch/elasticsearch.config.tmpl.1-node template file.
b. /opt/seagate/cortx/utils/bin/elasticsearch_setup config --config yaml:///opt/seagate/cortx/utils/conf/elasticsearch/elasticsearch.config.tmpl.1-node
Sample template file for single node.
server_node:
30512e5ae6df9f1ea02327bab45e499d:
cluster_id: 7f5441ae-6e30-4883-9efd-90e8773f15d0
name: srvnode-1
cluster:
7f5441ae-6e30-4883-9efd-90e8773f15d0:
storage_set:
- server_nodes: ["30512e5ae6df9f1ea02327bab45e499d"]
a. Edit /opt/seagate/cortx/utils/conf/elasticsearch/elasticsearch.config.tmpl.3-node template file.
b. /opt/seagate/cortx/utils/bin/elasticsearch_setup config --config yaml:///opt/seagate/cortx/utils/conf/elasticsearch/elasticsearch.config.tmpl.3-node
Sample file for 3 node:
server_node:
30512e5ae6df9f1ea02327bab45e499d:
cluster_id: 7f5441ae-6e30-4883-9efd-90e8773f15d0
name: srvnode-1
8d00f71d6e0eeef02e971e6356bb83aa:
cluster_id: 7f5441ae-6e30-4883-9efd-90e8773f15d0
name: srvnode-2
0b6dc7068f454d84942b4be638e16179:
cluster_id: 7f5441ae-6e30-4883-9efd-90e8773f15d0
name: srvnode-3
cluster:
7f5441ae-6e30-4883-9efd-90e8773f15d0:
storage_set:
- server_nodes: ["30512e5ae6df9f1ea02327bab45e499d", "8d00f71d6e0eeef02e971e6356bb83aa", "0b6dc7068f454d84942b4be638e16179"]
Run this cmd individually on all 3 nodes.
/opt/seagate/cortx/utils/bin/elasticsearch_setup init --config yaml:///opt/seagate/cortx/utils/conf/elasticsearch/elasticsearch.init.tmpl
systemctl enable elasticsearch.service
systemctl start elasticsearch.service
/opt/seagate/cortx/utils/bin/elasticsearch_setup test --config yaml:///opt/seagate/cortx/utils/conf/elasticsearch/elasticsearch.test.tmpl
Run this cmd individually on all 3 nodes.
/opt/seagate/cortx/utils/bin/elasticsearch_setup reset --config yaml:///opt/seagate/cortx/utils/conf/elasticsearch/elasticsearch.reset.tmpl
Run this cmd individually on all 3 nodes.
/opt/seagate/cortx/utils/bin/elasticsearch_setup cleanup --config yaml:///opt/seagate/cortx/utils/conf/elasticsearch/elasticsearch.cleanup.tmpl
Pre-factory:
/opt/seagate/cortx/utils/bin/elasticsearch_setup cleanup --pre-factory --config yaml:///opt/seagate/cortx/utils/conf/elasticsearch/elasticsearch.cleanup.tmpl