How install multiple service ES on the same server


(Clement Ros) #1

Hi,

I use ES 2.1 and CentOS 7.

I want to install multiple nodes on one server.
I used to create multiple elasticsearch file in /usr/lib/systemd/system, to create multiple services ES, but in 2.1 that doesn't work.

I can't find a way to install multiple ES as a service with systemd.

Someone can help me ?


(David Pilato) #2

Do you have more than 64gb of RAM which would explain why you want to achieve this?


(Clement Ros) #3

Yes, we have 128Gb of RAM.


(Eric Moge) #4

Hi David,
Thank you for reply.
I work with Clement. We currently have a ES 1.7 cluster with multiple nodes instances on each physical machine. This setup works fine even if it's not the optimal architecture. Each instances has its own config file in /etc/elasticsearch and we created a service startup config file for each ES instances in /usr/lib/systemd/system. The es.config parameter allowed us to specify a different config file for each instances.
Clement has to migrate under 2.1 and we encounter some issues using our current settings.
Any suggestions for multiple nodes on the same box will be great.
Thank you


(David Pilato) #5

So basically you have to create one config dir per instance, one data dire per instance, one log dir per instance.
I guess you need to "hack" the standard scripts to do so.

I have a little knowledge on that part so I can't really help.


(Eric Moge) #6

Thank you. It works.
I now have a /etc/elasticsearch-node{n} and /var/log/elasticsearch-node{n} directories for each instances.
Had to chown elasticsearch. on these directories and create a service startup script for each instances in /usr/lib/systemd/system, and tweak the settings to point on the right dir.
Trivial actually. Sorry for not thinking about using different directory. It's the end of the day, getting tired I guess...


(system) #7