i was wondering if you help me out here;
am trying to run multiple elasticsearch processes on the same (CentOS) server, but i have been un-successful so far.
and i have not enabled the service wrapper. and Elasticsearch has been installed using the .rpm package
the requirements are:
every instance belongs to a different cluster (cluster.name)
every instance uses a different port, 9201, 9202, 9203, etc.
every instance should be parameterised with different ES_HEAP_SIZE
the elasticsearch.yml file is attached where all parameters are described.
and the questions are:
how to set a different configuration file per instance when Des.config seems to be deprecated in 2.2
how to set a custom ES_HEAP_SIZE (-Xmx=24G -Xms=24G) when
# bin/elasticsearch -Des.config=config/IP-spotlight.RRv4/elasticsearch.yml
[2016-02-14 19:44:02,858][INFO ][bootstrap ] es.config is no longer supported. elasticsearch.yml must be placed in the config directory and cannot be renamed.
Basically, you should not have any performance penalty for using the docker networking stack.
There are some great articles that stress test various docker networking strategies and, in a nutshell, you can have the goodies of both worlds if you need that at some point in time. I would not bother.
I am not a networking guy, though here are my thoughts based on some exp. When you use --net=host:
You are on your own with networking
I think, port mapping should be done via some additional script
You might want to check out official docker docker docs when it comes to -net=host, since this is not really a default docker way to do it
I have not tried v2.2 so my suggestion might not work... if you do RPM installation, check the startup script at /etc/init.d/elasticsearch. That's where I set the config location such as CONF_DIR, CONF_FILE.
If this works, you can make a copy of this script to es01, es02, etc... then have each pointing to /data/es01/config, /data/es02/config, etc.. where the elasticsearch.yml file for each instance exists. This way each instance can be started with its own elasticsearch.yml file.
For this multi-instance setup, one thing that you need to look out for beside the HEAP_SIZE is the number of processors. You need to specifically set it per instance, otherwise, you will eventually run into problems related to the number of open files. I don't know about 2.2 but I've seen the problems at least with 2.1.x and 1.7.3.
For example, if the server physically has 16 cores, 64GB RAM, I normally reserve 50% RAM for Lucene, so I will have roughly 32GB left. In this case, I will run two instances with each has 30GB HEAP_SIZE and upto 8 cores (I would start with 4 cores) This way ES will behave properly.
i eventually did dockerize only elastic search and left kibana running as normal processes in multiple ports.
i came across with the multiple systemd/init scripts solution but i didn't went for it because you can configure ES_HEAP_SIZE only in /etc/sysconfig/elasticsearch, thus you cannot specify multiple elastic search instances with different heap size while having elastic search running as a service.
(please correct me if i am wrong)
that was the reason for deploying it with docker, because is a more standard way for other users to see how it has been deployed, with the mapping of configurations, directories, names, labels, tags to be just one command way.
@nskalis I'm using CentOS 6, I was able to set ES_HEAP_SIZE right in /etc/init.d/elasticsearch or es01, es02, etc listed above. I did not touch /etc/sysconfig/elasticsearch.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.