Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We're using Vagrant & Chef to provision the staging VM for our app.

Once I have a working cookbook, I upload it to chef-server and Jenkins hook ensures the staging env gets updated.

However, it's not clear to me how to try out the cookbook before I upload it. I can't use chef-solo because we're using environments.

Should I run a chef-server locally in a VM and upload it there? Or should I fix the cookbook versions in the run-lists and upload a new version (so that staging still uses the old one and does not break if the new version is wrong)?

How do you do this?

share|improve this question

1 Answer 1

I suggest using Test Kitchen with the chef-zero provisioner.

There are several examples that use this:

To enable zero as the provisioner, put this in a .kitchen.yml

provisioner:
  name: chef_zero

You'll need to create mock environments, which you should create as JSON files in test/integration/environments.

Additional documentation about Test Kitchen is maintained by Chef Docs

share|improve this answer

Your Answer

 
discard

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.