Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
How would you serve up a real website, say www.google.com after the nginx install has completed?
I followed both you tutorials and everything worked until “sudo chef-client.” This command fails and returns this:
root@client:~/chef-repo/cookbooks# knife node edit client1 ERROR: You must set your EDITOR environment variable or configure your editor via knife.rb root@client:~/chef-repo/cookbooks# export EDITOR=nano root@client:~/chef-repo/cookbooks# knife node edit client1 Saving updated run_list on node client1 root@client:~/chef-repo/cookbooks# knife node edit client1 Node not updated, skipping node save root@client:~/chef-repo/cookbooks# knife node edit client1 Node not updated, skipping node save root@client:~/chef-repo/cookbooks# sudo chef-client1 sudo: chef-client1: command not found root@client:~/chef-repo/cookbooks# sudo chef-client [2014-06-19T12:58:02-07:00] WARN: ***************************************** [2014-06-19T12:58:02-07:00] WARN: Did not find config file: /etc/chef/client.rb, using command line options.
Logs read this:
Generated at 2014-06-19 12:58:05 -0700
Chef::Exceptions::CannotWritePrivateKey: I cannot write your private key to /etc/chef/client.pem - check permissions?
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/api_client/registration.rb:70:in assert_destination_writable!' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/api_client/registration.rb:53:in run’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/client.rb:323:in register' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/client.rb:416:in do_run’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/client.rb:213:in block in run' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/client.rb:207:in fork’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/client.rb:207:in run' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/application.rb:217:in run_chef_client’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/application/client.rb:328:in block in run_application' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/application/client.rb:317:in loop’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/application/client.rb:317:in run_application' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/lib/chef/application.rb:67:in run’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8/bin/chef-client:26:in <top (required)>' /usr/bin/chef-client:23:in load’
/usr/bin/chef-client:23:in `<main>’
@granthardester, you need to add the editor env variable to knife. Open your <code>.chef/knife.rb</code> and add the line: <pre> knife[:editor] = ‘/path/to/your/fav/editor’ </pre>
Thanks for the quick reply! I’m officially a dummy. I thought you could apply the “sudo chef-client” command on the workstation, but it has to be done on the client machine itself. Once I ran “sudo chef-client” on the node, the cookbook ran. Sorry for the confusion!
@granthardester: Check out the previous part of this series: How to Install a Chef Server, Workstation, and Client on Ubuntu VPS Instances
It seems that the path has changed slightly in the latest Nginx.
Just edit your path in the ~/chef-repo/cookbooks/<your.recipe.name>/recipes/default.rb From: cookbook_file “/usr/share/nginx/www/index.html” do
To: cookbook_file “/usr/share/nginx/html/index.html” do
I appreciate for this tutorial…
How Can i get this cook books to my local using eclipse… Where Can I get my git repository details to clone the cookbooks.
Awesome Tutorials…configured the environment in first go using this guide…Thanks for your help
What version of nginx is the tutorial using? Would be nice to know, so can specify and have it work as per the tutorial. The cookbook_file fails. Looks like the latest version of nginx, which you get when following along, defaults to serving up pages from a folder that is not created by the recipe: /var/www/nginx-default
This doesn’t work: cookbook_file “/usr/share/nginx/www/index.html” do source “index.html” mode “0644” end
Best way to have this folder created via chef? or to specific nginx default to an existing folder?