O'Reilly logo

Chef Infrastructure Automation Cookbook by Matthias Marschall

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Running Chef Solo

If running your own Chef Server seems like overkill and you're not comfortable with using Hosted Chef, you can use Chef Solo to execute cookbooks on your server.

Getting ready

Before you're able to run Chef Solo on your servers, you will need to add two files to your local Chef repository: solo.rb and node.json.

The solo.rb file tells Chef Solo where to find the cookbooks, roles, and data bags.

The node.json file sets the run list (and any other node-specific attributes if required).

  1. Create a solo.rb file inside your Chef repository with the following contents:
    current_dir = File.expand_path(File.dirname(__FILE__)) file_cache_path "#{current_dir}" cookbook_path "#{current_dir}/cookbooks" role_path "#{current_dir}/roles" data_bag_path ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required