Run multiple Elasticsearch instance on the same server

Hi,

i have an ES server with an instance already installed and running.
That one has been deployed from rpm file (v5.6.4)
/etc/elasticsearch/

current yml file :

#cluster
cluster.name: nakisa
#node
node.name: leasing
#path
path.data: /data/ESData
path.logs: /data/ESLogs
#memory
bootstrap.memory_lock: true
#ports
network.host: 10.10.10.102
http.port: 9200
http.enabled: false

according ES guide, we can only ES using this command : systemctl start elasticsearch.service
I mean service name cannot be changed as it already defined in the source (in rpm package).

I am looking for a way to create a new instance (with a different name) i could host on the same server.

is it possible to start in parallel a new instance with a different name ?
i would for example save files in /etc/elasticsearch_sim/

do you have any suggestion ?

thanks for you help

regards

Willy

1 Like

I'm running up to 6 instances of ES on the same machine. I use Puppet and the official Puppet module from Elastic to do this. OS is Debian but I would think RedHat/Centos are supported too.

This is what /etc/elasticsearch looks like

/etc/elasticsearch # find .
.
./scripts
./x-pack
./x-pack/users_roles
./x-pack/users
./x-pack/log4j2.properties
./x-pack/roles.yml
./x-pack/role_mapping.yml
./es-00
./es-00/logging.yml
./es-00/log4j2.properties
./es-00/scripts
./es-00/elasticsearch.yml
./es-00/jvm.options
./es-01
./es-01/logging.yml
./es-01/log4j2.properties
./es-01/scripts
./es-01/elasticsearch.yml
./es-01/jvm.options
./es-02
./es-02/logging.yml
./es-02/log4j2.properties
./es-02/scripts
./es-02/elasticsearch.yml
./es-02/jvm.options
./es-03
./es-03/logging.yml
./es-03/log4j2.properties
./es-03/scripts
./es-03/elasticsearch.yml
./es-03/jvm.options

Each instance has it's on SystemD unit file

/etc/systemd # find . -name "elastic"
./system/multi-user.target.wants/elasticsearch-es-00.service
./system/multi-user.target.wants/elasticsearch-es-01.service
./system/multi-user.target.wants/elasticsearch-es-02.service
./system/multi-user.target.wants/elasticsearch-es-03.service

The ES binary is just installed once

As long as you run each instance on it's own port you should be fine :slight_smile:

2 Likes

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