Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We are resource limited here, and want our qa and staging environments on one machine.

We are going to run separate binaries and confs for our app & supporting services.

According to chef docs it is possible to have a single machine be two nodes. It just never explains how.

Much appreciated!

share|improve this question
up vote 6 down vote accepted

You'll need to execute chef client with an alternative configuration. The default config file and directory is /etc/chef/client.rb. You could use that one for one of the nodes / environments. Let's assume that will be "staging". You should probably make sure the node and environment are set up for the proper values:

node_name "mynode.staging"
environment "staging"

The other you could create such as /etc/chef/qa/client.rb for your qa configuration. In order to avoid conflict, you'll need to change the various configuration values for Chef that point in /etc/chef, and /var/chef.

See the Chef Configuration Settings wiki page for a complete list of configuration settings you can modify.

You should use the node_name and environment values similar to the staging environment. When you run chef, specify the alternative configuration file.

chef-client -c /etc/chef/qa/client.rb

share|improve this answer
Thanks, I'd upvote but I don't have enough repuation on this site yet. Much appreciated!! – Jeff V Oct 10 '12 at 16:44
You're welcome. I'm glad it was helpful. – jtimberman Oct 11 '12 at 6:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.