Playing with cucumber-chef 2.1
Ruby Shell
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.cucumber-chef
environments
features
roles
site-cookbooks
.chef
.gitignore
BUILDING_A_SERVER.md
Cheffile
Cheffile.lock
Gemfile
Gemfile.lock
Labfile
README.md
Vagrantfile
WORKFLOW.md
cucumber.yml
push_to_live

README.md

We've been kicking cucumber-chef 2.1 around for a couple of weeks and finally achieved full end-to-end-ness with the latest rc releases the other day (thanks @zpatten). This should get you up and running with a test lab and a sample cucumber feature (with a bit of librarian thrown in for free).

Dependencies

You'll need Oracle's VirtualBox, and Vagrant. I'm assuming you're using RVM, too.

How to play

git clone git://github.com/theodi/cuke-chef.git
cd cuke-chef
bundle
librarian-chef install
cucumber-chef setup

This takes ages, you should go and make some tea or something (you can watch the logs with tail -f .cucumber-chef/cucumber-chef.log if you're into that sort of thing).

When it's done, you can run the sample cuke with

cucumber --tags @superawesomeserver

Everything should be green. If you see red, I really want to hear about it, please.

Remember to cucumber-chef destroy your test lab before attempting to provision another one or Vagrant will sulk and refuse to play.

Not really sure if this will be useful to anybody else just yet, I think it's more about me getting my ducks in a row for now. But expect more interesting things when we actually start building out some intrastructure...

Fetching data bags

To run your tests, you need local copies of the data bags from the live chef server. You can do this like so:

mkdir -p data_bags/envs
knife data bag show envs development --format json > data_bags/envs/development.json
knife data bag show envs production --format json > data_bags/envs/production.json
mkdir -p data_bags/{your_app}
knife data bag show {your_app} database --format json > data_bags/{your_app}/database.json