-
-
Notifications
You must be signed in to change notification settings - Fork 599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to define discovery.zen.ping.unicast.hosts #426
Comments
Hi @UnderGreen -- I apologize I didn't respond sooner. Right now, this is just a single string, e.g. As far as using Chef search, this cookbook doesn't currently have an opinion about the best way to derive the list of unicast hosts. If we included a Chef search recipe that did so, we'd get into a few different problems -- how to find other nodes (tags? runlists? etc), should it be a default behavior, as well as how to override the behavior. We had this in a previous version and it was fraught with peril :) |
I'd like to leave this open so we can provide an example in the docs of using Chef search, even if we don't provide an implementation 👍 |
This is how we do it at the moment: default.rbelk_nodes = '["' + search(:node, 'role:elasticsearch-datanode').map(&:ipaddress).sort.uniq.join('", "') + '"]'
elasticsearch_configure 'elasticsearch' do
configuration ({
'cluster.name' => 'cluster-01',
'path.data' => '/es/data',
'path.logs' => '/es/logs',
'network.host' => '_bond0_',
'discovery.zen.ping.multicast.enabled' => 'false',
'discovery.zen.ping.unicast.hosts' => elk_nodes
})
end Make sure your chef nodes have the correct role (elasticsearch-datanode in this case). To verify which hosts are being included run |
Thank you! |
How does this work with password protected ES nodes? |
Hi @wheelq -- can you open a new issue? This one has been closed for more than 2 years. Please cite exactly what setting you're asking about, too. Thanks! |
I did't see documentation here about defining parameter discovery.zen.ping.unicast.hosts.
If I understood - need to define string like
'["host1", "host2"]'
. But I want to do it via chef search. I should write my own lwrp for this goal?The text was updated successfully, but these errors were encountered: