Skip to content

Instantly share code, notes, and snippets.

@saimonmoore
Created March 20, 2009 20:31
Show Gist options
  • Select an option

  • Save saimonmoore/82562 to your computer and use it in GitHub Desktop.

Select an option

Save saimonmoore/82562 to your computer and use it in GitHub Desktop.
#/etc/chef/server.rb
log_level :info
log_location STDOUT
ssl_verify_mode :verify_none
# registration_url "http://saimon:[email protected]"
# openid_url "http://saimon:[email protected]"
# template_url "http://saimon:[email protected]"
# remotefile_url "http://saimon:[email protected]"
# search_url "http://saimon:[email protected]"
registration_url "http://webtypes.com:4000"
openid_url "http://webtypes.com:4001"
template_url "http://webtypes.com:4000"
remotefile_url "http://webtypes.com:4000"
search_url "http://webtypes.com:4000"
cookbook_path [ "/var/chef/site-cookbooks", "/var/chef/cookbooks" ]
merb_log_path "/var/log/chef-server-merb.log"
confirmation_token "myconfirmationtoken"
#/etc/chef/client.rb
log_level :info
log_location STDOUT
ssl_verify_mode :verify_none
# registration_url "http://saimon:[email protected]"
# openid_url "http://saimon:[email protected]"
# template_url "http://saimon:[email protected]"
# remotefile_url "http://saimon:[email protected]"
# search_url "http://saimon:[email protected]"
registration_url "http://webtypes.com:4000"
openid_url "http://webtypes.com:4001"
template_url "http://webtypes.com:4000"
remotefile_url "http://webtypes.com:4000"
search_url "http://webtypes.com:4000"
#1st chef-client run (with confirmation token) called by chef-solo
# registration on chef server (not validated) - I validated manually
Mar 20 16:42:31 ip-10-224-55-212 user-data: DEBUG: Platform is ubuntu version 8.10
Mar 20 16:42:31 ip-10-224-55-212 user-data: DEBUG: Registering prorails_ec2-eu-int_webtypes_com for an openid
Mar 20 16:42:31 ip-10-224-55-212 user-data: DEBUG: Sending HTTP Request via GET to /registrations/prorails_ec2-eu-int_webtypes_com
Mar 20 16:42:31 ip-10-224-55-212 user-data: DEBUG: Creating directory /var/chef/cache
Mar 20 16:42:31 ip-10-224-55-212 user-data: DEBUG: Creating directory /var/chef/cache/registration
Mar 20 16:42:31 ip-10-224-55-212 user-data: DEBUG: Sending HTTP Request via POST to /registrations
Mar 20 16:42:31 ip-10-224-55-212 user-data: DEBUG: Authenticating prorails_ec2-eu-int_webtypes_com via openid
Mar 20 16:42:31 ip-10-224-55-212 user-data: DEBUG: Sending HTTP Request via POST to /openid/consumer/start
Mar 20 16:42:31 ip-10-224-55-212 user-data: DEBUG: Sending HTTP Request via GET to /openid/server?openid.assoc_handle=%7BHMAC-SHA1%7D%7B49c3c49d%7D%7BP9CckQ%3D%3D%7D&openid.claimed_id=http%3A%2F%2Fwebtypes.com%3A4001%2Fopenid%2Fserver%2Fnode%2Fprorails_ec2-eu-int_webtypes_com&openid.identity=http%3A%2F%2Fwebtypes.com%3A4001%2Fopenid%2Fserver%2Fnode%2Fprorails_ec2-eu-int_webtypes_com&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.realm=http%3A%2F%2Fwebtypes.com%3A4000%2Fopenid%2Fconsumer&openid.return_to=http%3A%2F%2Fwebtypes.com%3A4000%2Fopenid%2Fconsumer%2Fcomplete
Mar 20 16:42:31 ip-10-224-55-212 user-data: DEBUG: After authenticating prorails_ec2-eu-int_webtypes_com via openid got response: {"action"=>"/openid/server/decision"}
Mar 20 16:42:31 ip-10-224-55-212 user-data: DEBUG: Sending HTTP Request via POST to /openid/server/decision
Mar 20 16:42:31 ip-10-224-55-212 user-data:
Mar 20 16:42:31 ip-10-224-55-212 user-data: ---- End /usr/local/bin/chef-client -l debug -t my-validation-token
Mar 20 16:42:31 ip-10-224-55-212 user-data: STDOUT ----
Mar 20 16:42:31 ip-10-224-55-212 user-data: ---- Begin /usr/local/bin/chef-client -l debug -t my-validation-token
Mar 20 16:42:31 ip-10-224-55-212 user-data: STDERR ----
Mar 20 16:42:31 ip-10-224-55-212 user-data: /usr/local/lib/ruby/1.8/net/http.rb:2097:in `error!': 401 "Unauthorized" (Net::HTTPServerException)
Mar 20 16:42:31 ip-10-224-55-212 user-data: ^Ifrom /usr/local/lib/ruby/gems/1.8/gems/chef-0.5.7/lib/chef/rest.rb:228:in `run_request'
Mar 20 16:42:31 ip-10-224-55-212 user-data: ^Ifrom /usr/local/lib/ruby/gems/1.8/gems/chef-0.5.7/lib/chef/rest.rb:90:in `post_rest'
Mar 20 16:42:31 ip-10-224-55-212 user-data: ^Ifrom /usr/local/lib/ruby/gems/1.8/gems/chef-0.5.7/lib/chef/client.rb:210:in `authenticate'
Mar 20 16:42:31 ip-10-224-55-212 user-data: ^Ifrom /usr/local/lib/ruby/gems/1.8/gems/chef-0.5.7/lib/chef/client.rb:70:in `run'
Mar 20 16:42:31 ip-10-224-55-212 user-data: ^Ifrom /usr/local/lib/ruby/gems/1.8/gems/chef-0.5.7/bin/chef-client:113
Mar 20 16:42:31 ip-10-224-55-212 user-data: ^Ifrom /usr/local/lib/ruby/gems/1.8/gems/chef-0.5.7/bin/chef-client:107:in `loop'
Mar 20 16:42:31 ip-10-224-55-212 user-data: ^Ifrom /usr/local/lib/ruby/gems/1.8/gems/chef-0.5.7/bin/chef-client:107
Mar 20 16:42:31 ip-10-224-55-212 user-data: ^Ifrom /usr/local/bin/chef-client:19:in `load'
Mar 20 16:42:31 ip-10-224-55-212 user-data: ^Ifrom /usr/local/bin/chef-client:19
Mar 20 16:42:31 ip-10-224-55-212 user-data:
Mar 20 16:42:31 ip-10-224-55-212 user-data: ---- End /usr/local/bin/chef-client -l debug -t my-validation-token
Mar 20 16:42:31 ip-10-224-55-212 user-data: STDERR ----
Mar 20 16:42:31 ip-10-224-55-212 user-data: ^Ifrom /usr/local/lib/ruby/gems/1.8/gems/chef-0.5.7/lib/chef/mixin/command.rb:153:in `chdir'
Mar 20 16:42:31 ip-10-224-55-212 user-data: ^Ifrom /usr/local/lib/ruby/gems/1.8/gems/chef-0.5.7/lib/chef/mixin/command.rb:153:in `run_command'
Mar 20 16:42:31 ip-10-224-55-212 user-data: ^Ifrom /usr/local/lib/ruby/gems/1.8/gems/chef-0.5.7/lib/chef/provider/execute.rb:48:in `action_run'
Mar 20 16:42:31 ip-10-224-55-212 user-data: ^Ifrom /usr/local/lib/ruby/gems/1.8/gems/chef-0.5.7/lib/chef/runner.rb:87:in `send'
Mar 20 16:42:31 ip-10-224-55-212 user-data: ^Ifrom /usr/local/lib/ruby/gems/1.8/gems/chef-0.5.7/lib/chef/runner.rb:87:in `converge'
Mar 20 16:42:31 ip-10-224-55-212 user-data: ^Ifrom /usr/local/lib/ruby/gems/1.8/gems/chef-0.5.7/lib/chef/runner.rb:85:in `each'
Mar 20 16:42:31 ip-10-224-55-212 user-data: ^Ifrom /usr/local/lib/ruby/gems/1.8/gems/chef-0.5.7/lib/chef/runner.rb:85:in `converge'
Mar 20 16:42:31 ip-10-224-55-212 user-data: ^Ifrom /usr/local/lib/ruby/gems/1.8/gems/chef-0.5.7/lib/chef/resource_collection.rb:58:in `each'
Mar 20 16:42:31 ip-10-224-55-212 user-data: ^Ifrom /usr/local/lib/ruby/gems/1.8/gems/chef-0.5.7/lib/chef/resource_collection.rb:57:in `each'
Mar 20 16:42:31 ip-10-224-55-212 user-data: ^Ifrom /usr/local/lib/ruby/gems/1.8/gems/chef-0.5.7/lib/chef/runner.rb:63:in `converge'
Mar 20 16:42:31 ip-10-224-55-212 user-data: ^Ifrom /usr/local/lib/ruby/gems/1.8/gems/chef-0.5.7/lib/chef/client.rb:344:in `converge'
Mar 20 16:42:31 ip-10-224-55-212 user-data: ^Ifrom /usr/local/lib/ruby/gems/1.8/gems/chef-0.5.7/lib/chef/client.rb:96:in `run_solo'
Mar 20 16:42:31 ip-10-224-55-212 user-data: ^Ifrom /usr/local/lib/ruby/gems/1.8/gems/chef-0.5.7/bin/chef-solo:94
Mar 20 16:42:31 ip-10-224-55-212 user-data: ^Ifrom /usr/local/bin/chef-solo:19:in `load'
Mar 20 16:42:31 ip-10-224-55-212 user-data: ^Ifrom /usr/local/bin/chef-solo:19
Mar 20 16:42:31 ip-10-224-55-212 user-data: /usr/local/lib/ruby/gems/1.8/gems/chef-0.5.7/lib/chef/runner.rb:63:in `converge'/usr/local/lib/ruby/gems/1.8/gems/chef-0.5
.7/lib/chef/client.rb:344:in `converge'/usr/local/lib/ruby/gems/1.8/gems/chef-0.5.7/lib/chef/client.rb:96:in `run_solo'/usr/local/lib/ruby/gems/1.8/gems/chef-0.5.7/bi
n/chef-solo:94/usr/local/bin/chef-solo:19:in `load'/usr/local/bin/chef-solo:19
#second chef-client run (without confirmation token) registration is already validated
root@ip-10-224-55-212:~# chef-client -j /etc/chef/prorails.json
INFO: Starting Chef Run
/usr/local/lib/ruby/1.8/net/http.rb:2097:in `error!': 500 "Internal Server Error" (Net::HTTPFatalError)
from /usr/local/lib/ruby/gems/1.8/gems/chef-0.5.7/lib/chef/rest.rb:228:in `run_request'
from /usr/local/lib/ruby/gems/1.8/gems/chef-0.5.7/lib/chef/rest.rb:95:in `put_rest'
from /usr/local/lib/ruby/gems/1.8/gems/chef-0.5.7/lib/chef/client.rb:323:in `save_node'
from /usr/local/lib/ruby/gems/1.8/gems/chef-0.5.7/lib/chef/client.rb:75:in `run'
from /usr/local/lib/ruby/gems/1.8/gems/chef-0.5.7/bin/chef-client:113
from /usr/local/lib/ruby/gems/1.8/gems/chef-0.5.7/bin/chef-client:107:in `loop'
from /usr/local/lib/ruby/gems/1.8/gems/chef-0.5.7/bin/chef-client:107
from /usr/local/bin/chef-client:19:in `load'
from /usr/local/bin/chef-client:19
#third chef run (not more 500 error)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment