Nowhere in the docs or default master config is it mentioned how to enable the whoosh search runner. I understand why (alpha), but if noone finds or uses it it'll be dead code forever.
You need to enable the whoosh search backend in the master config:
And restart the master. Then you can send in any search term to search query.
This does explain the lack of interest :)
I have slated this for 0.15.0 so it should not be forgotten
What is the whoosh search runner? Similar to Chef Search? I have been googling if saltstack supports the ability to query your infrastructure. I find it very useful to query the infrastructure when configuring systems (e.g. who is my rsyslog remote server).
Is this already supported? Maybe point me to some info around this?
Salt is able to query the infrastructure directly without the use of a search system because the remote execution is so fast, this is the right way to do it. Salt is made to ask the running infrastructure about itself instead of relying on a search index.
The search system is at this point very alpha and is similar to chef search. But there has been little to no demand for it based on the fact that it is possible to just query the live system, hence why it is still in alpha
Thanks thatch. Are there any examples or docs I can look at around this? Would love to see an example or information on returning all nodes matching x, and how to use the information they return (such as eth3's ip address).
Is this something that goes into an sls file? Or I need a custom state module to perform the query?
See #4309, it doesn't work (AFAICT) atm.
Ahh, have you used salt remote execution at all? What tutorials have you gone through? All of this is built into the salt command on the master, take a look at the first walkthrough:
Using the salt command, targets and functions, this data is very easy to gather.
Thanks @Mrten. @thatch45 are there examples of the way you described? Thanks again for the help, very much appreciated. I have written opentsack deployment cookbooks in chef since the bexar release. Looking to start going through the openstack states/pillars.
Yes, the walkthrough has examples and all of the salt commands are self documenting with examples. Once you get familiar with this and states take a look at the peer interface which allows for realtime queries and actions to be performed from minion to minion. This makes it easy to discover any needed resources on the fly
@thatch45 yes, I have gone through that. I probably need to re-think the way I am used to doing things. I find I run into the following pattern often.
I need memcached installed across 5 servers, so i target those servers and install it.
I then need an application's config file to write out the 5 memcached server's eth3 IP address in it's config. With chef, I would search for the memcached role, and populate the template accordingly.
I am curious how to accomplish something similar to that. It goes for many things, finding my mysql servers and populating Ips, or finding the remote rsyslogd server, and configuring the clients for remote logging, etc...
ok, you do that in the peer interface, so a command like:
salt -G role:memcache network.interfaces
will return the network interfaces, to do this in states take a look at the peer system:
Since this is not a bug related discussion please continue on the mailing list or in IRC