Skip to content
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

Create a way to automatically collect hosts for unicast cluster #2

Closed
electrical opened this issue Jan 25, 2013 · 12 comments
Closed

Create a way to automatically collect hosts for unicast cluster #2

electrical opened this issue Jan 25, 2013 · 12 comments
Labels

Comments

@electrical
Copy link
Contributor

For an ES cluster with Unicast the nodes need to be defined in the configuration.
Instead of manually configuring that, it would be nice to have an automated way to do that.

@electrical
Copy link
Contributor Author

Relevant config part: http://pastebin.com/QSWkMAau

Create a define 'node' that exports the required information so it can be collected and put in the config file.

@ghost ghost assigned electrical Jan 25, 2013
@antonbabenko
Copy link

Would be great addition to this module.

@chrisboulton
Copy link
Contributor

If anyone is interested in how we go about this right now - we query the information from our PuppetDB installation using these: https://github.com/dalen/puppet-puppetdbquery

@electrical
Copy link
Contributor Author

I'm currently trying to build a library which allows for collecting variables and then fetch those as an array, which i then hopefully can use in the config variable for the node list.
Otherwise i would need to do some file concat solution.

@electrical
Copy link
Contributor Author

I'm pretty far with this now.
Went for a sort if file / variable concat variant.
It seems to be working pretty good for now.
In the meantime i also found an other bug in the current config file generator ( fixed now ) which didn't print arrays :-(

@electrical
Copy link
Contributor Author

There are still a few issues with this feature and won't make it into master for a while i think.
The biggest problem is merging the configuration hashes together.
Found some solutions but needs to be fully tested.

@electrical
Copy link
Contributor Author

First preview of some generated code:

## GENERATED BY PUPPET ##
---
cluster:
  name: somename
  routing:
    allocation:
      awareness:
        attributes: rack
discovery:
  zen:
    ping:
      unicast:
        hosts:
             - address_host1
             - address_host2

@electrical
Copy link
Contributor Author

Seems i got lucky :-)
I'm able to collect different nodes and add them to the whole config_hash and make it work as expected.
Nicely added feature is that we can write up the keys in a shorter way. see issue #11

@electrical
Copy link
Contributor Author

Need to write some tests for this feature and then i can implement it. stay tuned :-)

@electrical
Copy link
Contributor Author

Sorry for lack of updates on this. Just came back from vacation.
I haven't been able yet to write the testing stuff for this so its not implemented yet.

@matthewbarr
Copy link

Not sure if you have any input w/ the actual folks working on elastic search, but the ability to just do a DNS SVR lookup to specify the hosts would make this whole thing much easier! the AWS pluign requires more access than I'd like, but a simple DNS solution would be great.

@electrical
Copy link
Contributor Author

I've decided to drop this feature.
When i started with this i thought all hosts had to be listed but learned a while ago that was not required.
managing a small list of hosts should be fairly easy.

Closing.

@electrical electrical removed their assignment Feb 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants