puppet-elasticsearch icon indicating copy to clipboard operation
puppet-elasticsearch copied to clipboard

ES_HOME cannot be changed.

Open giuliana-bezerra opened this issue 6 years ago • 4 comments

I cannot change ES_HOME directory, the module states a fixed value: /usr/share/elasticsearch/. Is it possible to change this value? If so, how? I need this because in my company the path for elasticsearch is required to be /home/elasticsearch.

giuliana-bezerra avatar Sep 13 '17 13:09 giuliana-bezerra

ES_HOME can be set in the environment variables for the init scripts with something like this:

class { 'elasticsearch':
  init_defaults => {
    'ES_HOME' => '/home/elasticsearch',
  }
}

Note, however, that fully supporting a non-package installation in a way you're describing is probably going to have some bugs (as this module is meant to be used with the deb/rpm packages), but changing the value for SysV/systemd scripts should be doable.

Does that help?

tylerjl avatar Sep 13 '17 15:09 tylerjl

I need a non-package installation, through source folder.

giuliana-bezerra avatar Sep 18 '17 17:09 giuliana-bezerra

I see - that won't work with the module currently but I'll retag this as a feature request and it can potentially happen down the road. Although the Elasticsearch home directory is parameterized in a few places, some paths (like the service files) aren't and will need to be changed to do so (there are some other parts as well, such as creating system users, which the deb and rpm packages do for us).

tylerjl avatar Sep 18 '17 18:09 tylerjl

We build our own RPMs, accounting for customer specific paths and I encountered the same issue with the systemd file using a hard coded /usr/share/elasticsearch/bin folder. For now, I am working around this by creating a symlink from /usr/share/elasticsearch to the real folder but having this respecting the variable $homedir or even a new $bindir would be a good feature.

joernott avatar Mar 23 '18 12:03 joernott