OpenSearch Cluster Installation

From WilliamsNet Wiki
Revision as of 02:59, 7 November 2021 by DrEdWilliams (talk | contribs) (Created page with "Do this on each cluster node === Create Opensearch User === Debian/Ubuntu: adduser --system -uid 968 --shell /bin/bash --gecos 'OpenSearch User'  --group  --disabled-passw...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Do this on each cluster node

Create Opensearch User

Debian/Ubuntu:

adduser --system -uid 968 --shell /bin/bash --gecos 'OpenSearch User'  --group  --disabled-password --home /opt/opensearch opensearch

Fedora:

adduser --system --uid 968 --shell /bin/bash --home-dir /opt/opensearch -m opensearch

Set vm.max_map_count

Create /etc/sysctl.d/vm.maxmap_count (as root) and add modify the following line:

vm.max_map_count=262144

Run the following commands as root:

sysctl --system

Install Java 11 (optional)

The OpenSearch distro comes with Java 8 integrated into the packages. If this won't work for some reason, run the following commands as root:

apt update
apt install -y openjdk-11-jdk

Install Opensearch Tarball

Change to the opensearch user (from root):

su - opensearch
cd ~

Run the following commands as opensearch user:

wget https://artifacts.opensearch.org/releases/bundle/opensearch/1.0.0/opensearch-1.0.0-linux-x64.tar.gz
tar -xvzf opensearch-1.0.0-linux-x64.tar.gz
rm opensearch-1.0.0-linux-x64.tar.gz

Configure OpenSearch

in jvm.options, set the heap size:

  • 4G for master and cold data nodes
  • 8G for hot data nodes

In general, it shouldn't be more than 50% of available memory

On one master node only, configure config.yml to allow certificate authentication. Enable both http and transport under clientcert_auth_domain

for opensearch.yml:

  • cluster.name
  • node.name- can be the hostname, but doesn't have to be
  • path.data
  • path.logs
  • network.host -- host's IP
  • http.port -- leave it as the default (9200) but uncomment it to lock it in
  • discovery.seed_hosts -- IP addresses of all the masters
  • cluster.initial_master_nodes -- put the master node names here (not the hostnames)
  • node.[master|data|ingest|remote] - set the type of the node
  • node.attr.temp - (data nodes only) defines data storage tiers (hot/warm/cold)