So with some help from tigris on #chef, I got the config mostly sorted out.However, when I do a chef-client run on the node, I now get::/etc# chef-client[Thu, 02 Aug 2012 14:47:22 +0000] INFO: *** Chef 10.12.0 ***[Thu, 02 Aug 2012 14:47:24 +0000] INFO: Run List is [role[nginx-server-cloudant]][Thu, 02 Aug 2012 14:47:24 +0000] INFO: Run List expands to [users, sudo, nginx][Thu, 02 Aug 2012 14:47:24 +0000] INFO: Starting Chef Run for domU-12-31-39-0B-4E-C3.compute-1.internal[Thu, 02 Aug 2012 14:47:24 +0000] INFO: Running start handlers[Thu, 02 Aug 2012 14:47:24 +0000] INFO: Start handlers complete.[Thu, 02 Aug 2012 14:47:24 +0000] INFO: Loading cookbooks [bluepill, build-essential, nginx, ohai, runit, sudo, users, yum][Thu, 02 Aug 2012 14:47:24 +0000] INFO: Storing updated cookbooks/nginx/recipes/proxy-cloudant.rb in the cache.[Thu, 02 Aug 2012 14:47:24 +0000] INFO: HTTP Request Returned 500 Internal Server Error: Net::HTTPServerException: 404 "Not Found"[Thu, 02 Aug 2012 14:47:24 +0000] ERROR: Server returned error for http://redacted:4000/search/users?q=*:*&sort=X_CHEF_id_CHEF_X%20asc&start=0&rows=1000, retrying 1/5 in 3s[Thu, 02 Aug 2012 14:47:27 +0000] INFO: HTTP Request Returned 500 Internal Server Error: Net::HTTPServerException: 404 "Not Found"[Thu, 02 Aug 2012 14:47:27 +0000] ERROR: Server returned error for http://redacted:4000/search/users?q=*:*&sort=X_CHEF_id_CHEF_X%20asc&start=0&rows=1000, retrying 2/5 in 5s[Thu, 02 Aug 2012 14:47:32 +0000] INFO: HTTP Request Returned 500 Internal Server Error: Net::HTTPServerException: 404 "Not Found"[Thu, 02 Aug 2012 14:47:32 +0000] ERROR: Server returned error for http://redacted:4000/search/users?q=*:*&sort=X_CHEF_id_CHEF_X%20asc&start=0&rows=1000, retrying 3/5 in 12s[Thu, 02 Aug 2012 14:47:44 +0000] INFO: HTTP Request Returned 500 Internal Server Error: Net::HTTPServerException: 404 "Not Found"[Thu, 02 Aug 2012 14:47:44 +0000] ERROR: Server returned error for http://redacted:4000/search/users?q=*:*&sort=X_CHEF_id_CHEF_X%20asc&start=0&rows=1000, retrying 4/5 in 23s[Thu, 02 Aug 2012 14:48:07 +0000] INFO: HTTP Request Returned 500 Internal Server Error: Net::HTTPServerException: 404 "Not Found"[Thu, 02 Aug 2012 14:48:07 +0000] ERROR: Server returned error for http://redacted:4000/search/users?q=*:*&sort=X_CHEF_id_CHEF_X%20asc&start=0&rows=1000, retrying 5/5 in 51s[Thu, 02 Aug 2012 14:48:58 +0000] INFO: HTTP Request Returned 500 Internal Server Error: Net::HTTPServerException: 404 "Not Found"[Thu, 02 Aug 2012 14:48:58 +0000] ERROR: Running exception handlers[Thu, 02 Aug 2012 14:48:58 +0000] FATAL: Saving node information to /var/cache/chef/failed-run-data.json[Thu, 02 Aug 2012 14:48:58 +0000] ERROR: Exception handlers complete[Thu, 02 Aug 2012 14:48:58 +0000] FATAL: Stacktrace dumped to /var/cache/chef/chef-stacktrace.out[Thu, 02 Aug 2012 14:48:58 +0000] FATAL: Net::HTTPFatalError: 500 "Internal Server Error":/etc#
Any idea what might be going on? I'm not sure what it's trying to retrieve so I'm not sure which log to look into. I was having some stability problems so I moved from the deb setup to gem setup recently, but I can look at the web UI and use knife node list, knife role list, etc. just fine.Thanks!--~*~ StormeRider ~*~"Every world needs its heroes [...] They inspire us to be better than we are. And they protect from the darkness that's just around the corner."(from Smallville Season 6x1: "Zod")
On Thu, Aug 2, 2012 at 5:33 AM, Dan Crosta < " target="_blank"> > wrote:
On Aug 2, 2012, at 8:29 AM, Morgan Blackthorne < " target="_blank"> > wrote:Thanks, but I'm a bit more used to Puppet. Where can I put the actual file in Chef to push it to the node? I'd like to autoconfigure the node completely with Chef. Does that go in a databag, or a template, or?Check out the cookbook_file resource: http://wiki.opscode.com/display/chef/Resources#Resources-CookbookFile. I think that does what you want. You could also use template, which gives you the ability to vary some of the file contents based on node attributes or variables in your recipe, etc.Still trying to get bootstrapped myself :) Too bad there's know "knife-person bootstrap"...
--~*~ StormeRider ~*~
"Every world needs its heroes [...] They inspire us to be better than we are. And they protect from the darkness that's just around the corner."(from Smallville Season 6x1: "Zod")
On Thu, Aug 2, 2012 at 5:19 AM, Dan Crosta < " target="_blank"> > wrote:On Aug 2, 2012, at 7:28 AM, Morgan Blackthorne wrote:I've got the nginx cookbook in place now, but I'm a little fuzzy on how to proceed next. I bootstrapped a node and it configured nginx with all the defaults. I wrote my own config block which I would like to either:
- place in /etc/nginx/sites-available
- create a symlink to it in /etc/nginx/sites-enabled
- disable the /etc/nginx/sites-enabled/default symlink
You can drop a file in /etc/nginx/sites-available, and then usenginx_site "name-of-your-file-in-sites-available" doenable trueendto have Chef enable the site for you (reloading nginx's configuration as appropriate)Or, to just replace the default config block directly and save the hassle of mucking around with multiple files.What's the best way to go about this?Recent versions of the nginx cookbook have an attribute node["nginx"]["default_site_enabled"] which you can set to false to disable the default site. You can then use the above recommendation to institute your own default site. You can set this from a recipe, role, environment, etc.- Dan
Archive powered by MHonArc 2.6.16.