- From: Sean OMeara <
>
- To:
- Subject: [chef] Re: Re: Re: Passing parameters via knife bootstrap?
- Date: Wed, 11 Aug 2010 16:22:31 -0400
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=TjVDFJUYeUGU+GsWLJRcwHMwPfR5xylkitMMfj6H54xOhX0Gcx7mXSny0RKihKVsj4 +OaEJAu0c51b+y6x4p1+BlsZNmNUeWbMfNCdr6u9djfEsPzvHDALF94qjX5dX6C16hkQ TdSF25R743wFQNeIWrehJVA4mkXscLt897FMI=
You can specify arbitrary bootstrap templates to knife with the -d flag.
It'll look in ~/.chef/bootstrap.
Right now its hardcoded to default to "ubuntu10.04-gems.erb", which
you can find here:
http://github.com/opscode/chef/tree/master/chef/lib/chef/knife/bootstrap/
-s
On Wed, Aug 11, 2010 at 2:35 PM, Ryan C. Creasey
<
>
wrote:
>
I've actually done a little bit of work on something like this:
>
http://github.com/rcreasey/waitress
>
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 :
>
https://gist.github.com/412f9588c4c60341108f
>
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
>
Technology Operations
>
IGN Entertainment
>
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
>
<
>
>
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
>
> <
>
>
>
>
>
--
>
Charles Sullivan
>
>
>
>
Archive powered by MHonArc 2.6.16.