Chef Search for Node Discovery

I haven’t tried this for a while, so I thought I’d see if there was any
progress.

I need to write a cookbook that discovers other chef nodes. The issue with
chef search is that nodes don’t report in until they’ve done their first
chef client run, which means that the client has to run twice on the one
doing the discovering, but… that also applies to the one that wants to be
discovered. End result, not automated. This has basically made chef search
unusable in every situation for me where it might otherwise be useful.

Is there a better way? I’m on EC2. My other option was to write an ohai
plugin to scan ec2 and return instances matching the correct criteria.

Thanks,
Doug

May I ask what prevented you from doing a two pass run, triggering another run 1 min later with a call to "at" on certain cases (empty search, etc) to circumvent this issue ?

Le 13 juin 2015 07:01, Douglas Garstang <doug.garstang@gmail.com> a écrit :

I haven't tried this for a while, so I thought I'd see if there was any progress.

I need to write a cookbook that discovers other chef nodes. The issue with chef search is that nodes don’t report in until they’ve done their first chef client run, which means that the client has to run twice on the one doing the discovering, but… that also applies to the one that wants to be discovered. End result, not automated. This has basically made chef search unusable in every situation for me where it might otherwise be useful.

Is there a better way? I’m on EC2. My other option was to write an ohai plugin to scan ec2 and return instances matching the correct criteria.

Thanks,

Doug