The documentation makes it sound as though you can set Environment Variables and use them in the /etc/elasticsearch/elasticsearch.yml file. It even gives ${HOSTNAME} as an example. According to Ubuntu, if I set a variable in /etc/environment, that variable name is available every time I log in.
When I set ES_HEAP_SIZE=4g or FOO=bar in my /etc/environment file I can see it with echo ${ES_HEAP_SIZE} or export -p but Elasticsearch completes ignores these variables.
If you run Elasticsearch from the command line do you still see the same behavior? Running Elasticsearch from the command line below shows it does pickup the environment variable and set the node name accordinglky.. How are you starting Elasticsearch? Upstart or systemd? I'd try using /etc/default/elasticsearch to set ES_HEAP_SIZE.
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.