Several different elasticsearch clusters in one linux server


(Raul Kaubi) #1

Hi

Is there a possibility to have several different clusters running on same elasticsearch program..? (I would say no, because conf is supposed to be different for each cluster)

Or should I have to install several elasticsearch programs for this to work..?
If so, then I should just install this package as it is and then change the /usr/share/elasticsearch folder name, service name etc.. and then I can install another elasticsearch program (Can I install it as a package though..?) on default locaton and then rename it as I did the first one, correct..?

Raul


(Magnus Bäck) #2

Is there a possibility to have several different clusters running on same elasticsearch program..?

Yes, but they need different cluster names, different configurations, and different data directories. Exactly how this needs to be done depends on whether you're using SysV init, Upstart, systemd, or something else to start ES. It's possible that you can get away with just cloning /etc/init.d/elasticsearch and either /etc/sysconfig/elasticsearch or /etc/default/elasticsearch.


(Raul Kaubi) #3

I am using systemd to start this service (/usr/lib/systemd/system/elasticsearch.service)
I quess I need to modify this also, or add another service file for another cluster..?

But when I have one program running, how can I have different configuratiion files..?
elastisearch.yml file is in elasticsearch/config/ directory, I just can't add there another .yml file..

It's possible that you can get away with just cloning /etc/init.d/elasticsearch and either /etc/sysconfig/elasticsearch or /etc/default/elasticsearch.

Just making new directoory there, with another name..?


(Magnus Bäck) #4

I quess I need to modify this also, or add another service file for another cluster..?

Yes, you'll want to clone that file and make some adjustments.

But when I have one program running, how can I have different configuratiion files..?

You can pass parameters (either via environment variables or command-line options) that set various directory locations.

Over and out for me. I don't know the details and I don't have time to dig.


(system) #5