How to provide different config paths to start multiple Elasticsearch GA 6 instances in a single machine?

Hi,

I am using Elasticsearch GA 6. I would like to run multiple ES instances in my machine. While I was using GA 5, I use to start elasticsearch like;

./elasticsearch -Epath.conf=../config/node1_config
./elasticsearch -Epath.conf=../config/node2_config

etc.but in GA 6, there is unknown setting [path.conf], so I set ES_PATH_CONF before starting ES. What if I want to start multiple nodes in a single machine? How can I do this?

Thanks.

1 Like

I always use a startup script, maybe you can use it or something similar

#!/bin/bash

CURRENT_PROJECT=$(pwd)

export ES_PATH_CONF=$CURRENT_PROJECT/config

DATA=$CURRENT_PROJECT/data
LOGS=$CURRENT_PROJECT/logs
REPO=$CURRENT_PROJECT/backups
NODE_NAME=Node1
CLUSTER_NAME=playground

BASH_ES_OPTS="-Epath.data=$DATA -Epath.logs=$LOGS -Epath.repo=$REPO -Enode.name=$NODE_NAME -Ecluster.name=$CLUSTER_NAME"

ELASTICSEARCH=$HOME/Development/elastic/elasticsearch/elasticsearch-6.0.0

$ELASTICSEARCH/bin/elasticsearch $BASH_ES_OPTS

# Other specific options you can add to the elasticsearch.yml
# cluster.routing.allocation.disk.threshold_enabled: false
1 Like

Thanks. This helps :slight_smile:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.