It creates a file at /etc/elasticsearch/elastic-node01/elasticsearch.yaml
I then tried the following configuration (which from the documentation I read, I think should work, but it isn't working)
class { 'elasticsearch':
version => '6.2.4',
status => 'disabled',
datadir_instance_directories => false,
config => {
'cluster' => {
'network.host' => '_site_',
'node.name' => $facts['hostname'],
}
}
}
Both configurations run without errors, but in the second configuration, no file is created at /etc/elasticsearch/elasticsearch.yml, in fact, puppet actually spits out the following:
Notice: /Stage[main]/Elasticsearch::Package/Package[elasticsearch]/ensure: created
Info: /Stage[main]/Elasticsearch::Package/Package[elasticsearch]: Scheduling refresh of Exec[remove_plugin_dir]
Notice: /Stage[main]/Elasticsearch::Package/Exec[remove_plugin_dir]: Triggered 'refresh' from 1 event
Notice: /Stage[main]/Elasticsearch::Config/File[/usr/share/elasticsearch/plugins]/ensure: created
Notice: /Stage[main]/Elasticsearch::Config/File[/etc/elasticsearch/scripts]/ensure: created
Info: Computing checksum on file /etc/elasticsearch/elasticsearch.yml
Info: /Stage[main]/Elasticsearch::Config/File[/etc/elasticsearch/elasticsearch.yml]: Filebucketed /etc/elasticsearch/elasticsearch.yml to puppet with sum 3aa77775c113d3828a9e8e87637eb286
Notice: /Stage[main]/Elasticsearch::Config/File[/etc/elasticsearch/elasticsearch.yml]/ensure: removed
Info: Computing checksum on file /etc/elasticsearch/jvm.options
Info: /Stage[main]/Elasticsearch::Config/File[/etc/elasticsearch/jvm.options]: Filebucketed /etc/elasticsearch/jvm.options to puppet with sum 775a7b047687f7389149bff042a0e04d
Notice: /Stage[main]/Elasticsearch::Config/File[/etc/elasticsearch/jvm.options]/ensure: removed
Info: Computing checksum on file /etc/elasticsearch/log4j2.properties
Info: /Stage[main]/Elasticsearch::Config/File[/etc/elasticsearch/log4j2.properties]: Filebucketed /etc/elasticsearch/log4j2.properties to puppet with sum b3030447ca9e02e0e19b2c3d38bea137
Notice: /Stage[main]/Elasticsearch::Config/File[/etc/elasticsearch/log4j2.properties]/ensure: removed
Thanks for your answer. Based on what you have said, I don't think I explained myself properly. I only want to run one instance of elasticsearch on the server. I want to use the puppet module to install based on the default elastic configuration i.e: /etc/elasticsearch/elasticsearch.yml and not /etc/elasticsearch/my-instance-name/elasticsearch.yml
Thank you for pointing that out to me.
I realize now that I can still use this module for a single instance. Just need to adapt to the new locations of all the files and system services etc.
The module creates individual SystemD unit files for each instance. I have only needed to customize a few things to get ES ingest nodes with specific plugins to work (especially on machines that run several ES nodes but over all I am very happy with the puppet module
Howdy! The confusion and non-standard setup here is one reason why we're probably going to drop support for multiple instances, since it's the source of lots of bugs. If there's specific feedback about whether this does/does not seem like a good idea to keep or drop, we'd love feedback on the aforementioned github issue.
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.