TEST DRIVEN INFRASTRUCTURE WITH CHEF
DevOps meetup Würzburg
2017-09-12
Markus Heurung
Slide 2
Slide 2 text
$ whoami
MARKUS HEURUNG
> @muhh
> [email protected]
> Web Ops lead @freistil building freistilbox
Slide 3
Slide 3 text
TEST DRIVEN WHAT?
@sadserver
Slide 4
Slide 4 text
TEST DRIVEN DEVELOPMENT
1. Write test
2. implement functionality
3. refactor
Slide 5
Slide 5 text
CHEFDK
The Chef Development Kit is a package that contains
everything that is needed to start using Chef1
1 https://docs.chef.io/workstation.html#chef-dk
RUBOCOP
RuboCop is a Ruby static code analyzer. Out of the box it
will enforce many of the guidelines outlined in the
community Ruby Style Guide.2
chef exec rubocop .
2 http://rubocop.readthedocs.io/
Slide 9
Slide 9 text
FOODCRITIC
Foodcritic is a helpful lint tool you can use to check
your Chef cookbooks for common problems.3
chef exec foodcritic .
3 http://foodcritic.io
Slide 10
Slide 10 text
BERKSHELF
Berkshelf is a dependency manager for Chef cookbooks.
With it, you can easily depend on community cookbooks
and have them safely included in your workflow.4
4 http://berkshelf.com
Slide 11
Slide 11 text
CHEFSPEC
ChefSpec is a unit testing framework for testing Chef
cookbooks.
ChefSpec makes it easy to write examples and get fast
feedback on cookbook changes without the need for
virtual machines or cloud servers.5
5 https://chefspec.github.io/chefspec/
Slide 12
Slide 12 text
SERVERSPEC
RSpec tests for your servers configured by CFEngine,
Puppet, Ansible, Itamae or anything else.6
6 http://serverspec.org
Slide 13
Slide 13 text
INSPEC
InSpec is compliance as code7
7 https://www.inspec.io
Slide 14
Slide 14 text
TEST-KITCHEN
Kitchen provides a test harness to execute
infrastructure code on one or more platforms in
isolation.8
8 http://kitchen.ci