- From: Nobuhiko Sekiya <
>
- To:
- Subject: [chef] I would like to have examples of using shef in cilent mode
- Date: Sun, 24 Jul 2011 06:09:46 -0700 (PDT)
Hello.
First time posting.
Can somebody please help me out here.
I recently started to use shef, so I could test my recipes and resources for
both before and after uploading it to cookbook.
I have read the wiki on shef.
http://wiki.opscode.com/display/chef/Shef
I would like to debug the run_list which I have already uploaded.
I though my choice would to use shef in client mode.
I did the commands below.
*****************************************************************
~]# shef --client
loading configuration: /etc/chef/client.rb
Session type: client
Loading......[Sun, 24 Jul 2011 01:56:48 -0400] INFO: Run List is
[role[coherenceWeb]]
[Sun, 24 Jul 2011 01:56:48 -0400] INFO: Run List expands to
[coherence::install_3.7.0, WebLogic::install_10.3.5]
...[Sun, 24 Jul 2011 01:56:50 -0400] INFO: Loading cookbooks [WebLogic,
coherence]
done.
This is shef, the Chef shell.
Chef Version: 0.10.2
http://www.opscode.com/chef
http://wiki.opscode.com/display/chef/Home
run `help' for help, `exit' or ^D to quit.
Ohai2u
chef >
chef >
chef > run_chef
=> true
chef >
chef > cookbooks.all
=> [nil, nil, nil, nil]
chef > roles.all
=> [#<Chef::Role:0xb79067dc @default_attributes={}, @description="",
@index_id=nil, @couchdb=#<Chef::CouchDB:0xb79066d8
@rest=#<Chef::REST:0xb7906688 @redirect_limit=10, @cookies={},
@redirects_followed=0,
@auth_credentials=#<Chef::REST::AuthCredentials:0xb7906638 @key_file=nil,
@client_name=nil>, @url="
http://localhost:5984", @sign_request=true,
@default_headers={}, @sign_on_redirect=true>, @db="chef">,
@env_run_lists={"_default"=>#<Chef::RunList:0xb79060fc
@run_list_items=[#<Chef::RunList::RunListItem:0xb7906048 @type=:recipe,
@version=nil, @name="coherence::install_3.7.0">,
#<Chef::RunList::RunListItem:0xb7906034 @type=:recipe, @version=nil,
@name="WebLogic::install_10.3.5">]>}, @couchdb_id=nil, @name="coherenceWeb",
@override_attributes={}, @couchdb_rev="1-2a6a6d3873ea278b8e5fd5f9be0af9f4">,
#<Chef::Role:0xb7905c4c @default_attributes={}, @description="Base role
applied
to all nodes", @index_id=nil, @couchdb=#<Chef::CouchDB:0xb7905b48
@rest=#<Chef::REST:0xb7905af8 @redirect_limit=10, @cookies={},
@redirects_followed=0,
@auth_credentials=#<Chef::REST::AuthCredentials:0xb7905aa8 @key_file=nil,
@client_name=nil>, @url="
http://localhost:5984", @sign_request=true,
@default_headers={}, @sign_on_redirect=true>, @db="chef">,
@env_run_lists={"_default"=>#<Chef::RunList:0xb790556c
@run_list_items=[#<Chef::RunList::RunListItem:0xb79054b8 @type=:recipe,
@version=nil, @name="chef-client::delete_validation">,
#<Chef::RunList::RunListItem:0xb79054a4 @type=:recipe, @version=nil,
@name="chef-client::config">, #<Chef::RunList::RunListItem:0xb7905454
@type=:recipe, @version=nil, @name="chef-client">]>}, @couchdb_id=nil,
@name="base",
@override_attributes={"chef_client"=>{"server_url"=>"
https://api.opscode.com/organizations/nobu",
"init_style"=>"init", "validation_client_name"=>"nobu-validator"}},
@couchdb_rev="2-df66dc291a8c0cebfaea1b7ee7d704ae">]
chef >
*****************************************************************************
I thought that, starting shef by client mode would load the recipes that I
have
in my run_list( the one which you can see by 'knife node show xxx')
to the 'current recipes'.
But when I ran run_chef, nothing happened. There seemed to be nothing loaded
on
my 'current recipes'
So, right now I do not know the usage of shef in client mode.
Can you give examples like the one shown on wiki page? Currently it only shows
usage in standalone mode.
By the way,
I am using hosted shef platform and chef version is 0.10.2.
Thank you,
Nobuhiko Sekiya
- [chef] I would like to have examples of using shef in cilent mode, Nobuhiko Sekiya, 07/24/2011
Archive powered by MHonArc 2.6.16.