Start up ES with environment and variables in systemd

For config directory, I am trying to "eliminate" the need to use the elasticsearch.yml for each instance by having each instance start up with the environment and variables.

Eg. Using systemd
Environment="ES_JAVA_OPTS=-Xms1g Xmx1g"
ExecStart=/opt/elasticsearch/bin/elasticsearch
-Ecluster.name=production
-Ecluster.initial_master_nodes=es01,es02,es03
-Ediscovery.seed_hosts=192.168.100.1,192.168.100.2,192.168.100.3
-Enetwork.host=192.168.100.1
-Ehttp.port=9200
-Enode.name=es01
-Epath.logs=/var/log/elasticsearch/es01
-Epath.data=/data/es01

Seems that all the required settings can be placed in the service file and "eliminate" the need to use elasticsearch.yml.

Is there any caveat in doing this?

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