Chef-solo is great. You might not need client/server.

June 17, 2010 Pivotal Labs

You should be doing automated configuration, period. Chef is a great automated configuration tool.

It has to be said, however, that chef has lots of parts, arguably an excess. If you google around for chef intros you see chef-solo referenced as a simple first step into “full” or “real” chef – chef client/server.

On our project we’ve built a mature web application, we’ve been using chef for over a year, and have never once felt the need for the client/server model, and we have no reason to expect to.

Here’s how we run chef manually:

cd ~/projectroot
git pull
chef/run.sh

(that’s it)

run.sh contains:

sudo sh -c "RAILS_ENV=$RAILS_ENV chef-solo -c chef/config/solo.rb -j chef/config/$RAILS_ENV/`hostname -s`.json"

We have capistrano (multi-server ssh tool) do the equivalent on deploy:

sudo [
  "cd #{app_root}",
  "export RAILS_ENV=#{self.variables[:rails_env]}",
  "chef/run.sh"
].join(" && ")

We deploy our code and update system config at the same time.

And that’s all we need or want.

Links:

About the Author

Biography

More Content by Pivotal Labs
Previous
Keeping track of Cedar
Keeping track of Cedar

If you're interested in following the growth of Cedar, or just testing iPhone projects in general, you can ...

Next
Cedar has moved to Pivotal’s GitHub account
Cedar has moved to Pivotal’s GitHub account

For anyone following the Cedar project on GitHub, I've moved it from my personal GitHub account to Pivotal'...

Enter curious. Exit smarter.

Learn More