- From: Tom H <
>
- To:
- Cc: Akzhan Abdulin <
>
- Subject: [chef] Re: Re: "yum install xxxx" or "apt-get install xxxx" analogy for chef?
- Date: Thu, 23 Feb 2012 15:16:48 +0000
On 21/02/12 11:29, Akzhan Abdulin wrote:
"
type="cite">Oops. You are right. chef-client -j is very
unattractive option.
Yeah, I ended up with a wrapper script that is sort of a hack to
append some role or recipe string to the run_list and write it to
/etc/chef/first-boot.json and run chef-client -j
/etc/chef/first-boot.json and then remove it after the script has
run.
I considered temporarily changing the run_list to just the recipe I
wanted using the -j options, but it deletes all the local cookbooks
from the cache that are not included, so the next run of the full
list takes ages to re-download etc.
I suspect the answer is involves tinkering with knife to invoke shef
or something like that.
Tom
"
type="cite">
For our developer boxes, typically the users won't
know chef, and won't have a locally configured
knife, and these guys would be used to installing
tomcat or some package using the distro specific
tool (apt/yum/emerge).
However for a bunch of packages/services we have
chef recipes specifically to get tomcat6 or others
onto CentOS 5.6 boxes e.g. recipe[tomcat::tomcat6]
Obviously its possible to create a
/etc/chef/tomcat.json file and run it as chef-client
-j /etc/chef/tomcat.json such as
{ "run_list" : ["recipe[tomcat::tomcat6]"] }
Or even to open "shef -z" session and apply the
recipe interactively. Or even to run knife as the
chef-client user with the client.pem and client.rb
file...
However I am looking for something that can be
easily applied as a one-liner... does such a thing
exist as a plugin for chef-client?
chef-client -r "recipe[somecookbook::somerecipe]"
would be perfect... ;-)
Thanks
Tom
|
Archive powered by MHonArc 2.6.16.