I've actually done a little bit of work on something like this:
Although it's nowhere near being immediately usable for the public. The problem that we were having is that we had nodes that were being spun up on an internal cloud and given a random mac address. We wanted to pass attributes via knife and then have that json blob be accessible from inside the node when it had spun up so we could pass it to chef-solo for initial configuration.
While we're not using EC2 at the moment for this, but an internal xenserver pool, we created a baseline that all nodes would be cloned from and setup to do a
curl -s http://buildserver/chef/imprint | /bin/sh. That imprint script is :
Since the baseline image was configured to set its hostname to something based off its mac address, we were able to have a key-document relationship. Waitress essentially provides a sinatra based interface to a redis backend where that json blob (and mac address) can be stored, and then waits for a node to spin up and issue a GET for its hostname (which happens to be the node's mac address).
So, the tl;dr:
I know what you're talking about and see the value in why you want to do it. Here's how we've approached something similar and I hope it helps.
Ryan C. Creasey
Principal Systems Engineer
On Aug 11, 2010, at 11:14 AM, Charles Sullivan wrote:
I'd also like to see this option available.
@Mark - I've looked previously and have been unable to find anything.
On Wed, Aug 11, 2010 at 12:56 PM, Mark J. Reed email@example.com wrote:
I'd like to pass some parameters on the command line to knife ec2
bootstrap... that will be visible to the recipes in the run list;
ideally, a JSON blob that wound up as the argument to chef-client -j
would be perfect, but any way to get an arbitrary string somewhere a
recipe can see it would be great. Is there such a mechanism?
Mark J. Reed firstname.lastname@example.org