[chef] Re: Re: Roles to JSON broken on Chef-Solo


Chronological Thread 
  • From: consiliens < >
  • To:
  • Subject: [chef] Re: Re: Roles to JSON broken on Chef-Solo
  • Date: Mon, 19 Jul 2010 19:19:54 -0600
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=lKp1xKsWgmklhIPxOtqsKft9aE09ROy9xVZ9e6N6IJWtYPpLYn4gs7tEa/spAStsMb LARsRT+NIoLfk5K7a4pGBc+uILJbArByOUlPKk7DXDIRuIvlcDKasErnFUqWRYoYPbYA 3RuLKxVM13wp4l7GFqJTHAskz7nL2DtXVSbIg=

On 07/19/2010 06:36 PM, consiliens wrote:
On 07/19/2010 12:07 PM, Daniel DeLeo wrote:
On Fri, Jul 16, 2010 at 1:01 PM, 
consiliens< >
 wrote:
Why does chef-solo require a key to generate a JSON representation of
a role
for use with chef-solo?

`rake roles` calls `knife role from file` which assumes you want to
upload the role to the server. With chef solo, you are not required to
convert the role to JSON before using it, however--you should be able
to just configure your `role_path` in solo.rb and run with it. I see
this is not documented on the roles page in the wiki, and the chef
solo page states that you have to convert to JSON first, which is
incorrect. I don't have time to fix these right now, but I'll make a
note to fix them as I'm able. If you're willing to fix them, that
would be greatly appreciated.

Dan DeLeo


I'm willing to fix them. Thank you for explaining how to use roles with
chef-solo.

I tried role_path and it's still not working. I'll update the wiki once it works. Here's the code I'm using.

sudo chef-solo --config ./solo.rb

# Contents of solo.rb
file_cache_path File.expand_path( '..',           __FILE__ )
cookbook_path   File.expand_path( '../cookbooks', __FILE__ )
role_path       File.expand_path( '../roles',     __FILE__ )
node_name       'nginx'

../roles contains nginx.rb that uses the Role DSL as defined on the wiki. http://wiki.opscode.com/display/chef/Roles



Archive powered by MHonArc 2.6.16.

§