title: Using attributes in Chef
body: <p>Just getting started with using <code>chef</code> recently. I gather that attributes are stored in one large monolithic hash named <code>node</code> that's available for use in your recipes and templates.</p>
  
  <p>There seem to be multiple ways of defining attributes</p>
  
  <ol>
  <li>Directly in the recipe itself</li>
  <li>Under an attributes file - e.g. <code>attributes/default.rb</code></li>
  <li>In a JSON object that's passed to the <code>chef-solo</code> call. e.g. <code>chef-solo -j web.json</code></li>
  </ol>
  
  <p>Given the above 3, I'm curious </p>
  
  <ol>
  <li>Are those all the ways attributes can be defined?</li>
  <li>What's the order of precedence here? I'm assuming one of these methods supercedes the others</li>
  <li>Is #3 (the <code>JSON</code> method) only valid for <code>chef-solo</code> ? </li>
  <li>I see both <code>node</code> and <code>default</code> hashes defined. What's the difference? My best guess is that the <code>default</code> hash defined in <code>attributes/default.rb</code> gets merged into the <code>node</code> hash?</li>
  </ol>
  
  <p>Thanks!</p>