yard
vagrant
foodcritic
rubocop
berkshelf
should_not
chefspec
test-kitchen
kitchen-vagrant
chef-encrypted-attributes
guard
guard-foodcritic
guard-rubocop
guard-rspec
guard-kitchen
More info at Guard Readme.
You must have VirtualBox and Vagrant installed.
You can install gem dependencies with bundler:
$ gem install bundler
$ bundle install --without travis
$ bundle exec rake doc
$ bundle exec rake style
$ bundle exec rake unit
$ bundle exec rake integration:vagrant
Or:
$ bundle exec kitchen list
$ bundle exec kitchen test
[...]
You need to have Docker installed.
$ wget -qO- https://get.docker.com/ | sh
Then use the integration:docker
rake task to run the tests:
$ bundle exec rake integration:docker
kitchen-digitalocean
kitchen-ec2
You can run the tests in the cloud instead of using vagrant. First, you must set the following environment variables:
AWS_ACCESS_KEY_ID
(Seekitchen-ec2
gem documentation).AWS_SECRET_ACCESS_KEY
(Seekitchen-ec2
gem documentation).AWS_SSH_KEY_ID
: EC2 SSH public key name. This is the name used in Amazon EC2 Console's Key Pars section (Seekitchen-ec2
gem documentation).DIGITALOCEAN_ACCESS_TOKEN
(Seekitchen-digitalocean
gem documentation).DIGITALOCEAN_SSH_KEY_IDS
: DigitalOcean SSH numeric key IDs (Seekitchen-digitalocean
gem documentation).SSH_KEY_PATH
: EC2 SSH private key local full path. Only when you are not using an SSH Agent.
Then use the integration:cloud
rake task to run the tests:
$ bundle exec rake integration:cloud
- ChefDK: https://downloads.chef.io/chef-dk/
- Berkhelf and Omnibus vagrant plugins:
$ vagrant plugin install vagrant-berkshelf vagrant-omnibus
- The path correctly set for ChefDK:
$ export PATH="/opt/chefdk/bin:${PATH}"
$ vagrant up
To run Chef again on the same machine:
$ vagrant provision
To destroy the machine:
$ vagrant destroy