13 $ sudo apt-get install curl
17 $ curl -L https://omnitruck.chef.io/install.sh | sudo bash
18 Thank you for installing Chef!
27 ### Start the cookbook
30 wget http://github.com/chef-cookbooks/chef-repo/tarball/master -O - | tar xzf - --strip-components=1
36 $ knife supermarket download mysql
39 ### Invoking chef-solo
42 $ chef-solo -c solo.rb -j web.json
47 ### Simple compile-from-source
50 execute "tar --no-same-owner -zxf hi.tar.gz" do
52 creates "/usr/local/src/node-v#{version}"
58 cwd "/usr/local/src/node-v#{version}"
60 PATH=/usr/local/bin:$PATH
64 creates "/usr/local/src/node-v#{version}/node"
71 remote_file "/usr/local/src/hi.tar.gz" do
75 action :create_if_missing
83 block { File.read ... }
84 not_if { File.exists?(...) }
93 environment({ "PATH" => "..." })
94 command "make install"
102 creates "/usr/local/src/node-v#{version}/node"
103 not_if { File.exists?('...') }
108 * [Learn Chef Rally](https://learn.chef.io) _(learn.chef.io)_
109 * [install_from_source.rb recipe](https://github.com/mdxp/nodejs-cookbook/blob/master/recipes/install_from_source.rb) _(github.com)_