Upload
devopsdays
View
785
Download
1
Embed Size (px)
Citation preview
Test Kitchen 1.0A Config Management-Neutral Integration Testing Tool
Fletcher NicholOctober 26, 2013DevOpsDays Vancouver 2013
I love big screens!
Ah.
Confidence
Test Kitchen
A test harness tool to execute your configured code on one or more platforms in isolation
Currently run Chef converges
Seeking input from other configuration management communities very soon
commit fda10bb71cc45c7eebeb4355f8dafa2b55f00709Author: Fletcher Nichol <[email protected]>Date: Sat Dec 1 10:51:52 2012 -0700
Jamie: A Chef Convergence Integration Test Harness.
Also, what the heck I am getting into here?
commit c8303426363a50a08137e518e124dad31facb9f1Author: Fletcher Nichol <[email protected]>Date: Mon Jan 28 22:22:08 2013 -0700
Thank you Jamie, hello Test Kitchen.
This is a first-pass renaming of the Jamie project to test-kitchen. The following are major breaking changes:
* all constant references of `Jamie` have been renamed to `Kitchen` * the .jamie.yml file has been renamed to .kitchen.yml * the binary bin/jamie has been renamed to bin/kitchen * the Rake task namespace :jamie is now :kitchen * the Thor task namespace :jamie is now :kitchen * the `kitchen new_plugin` subcommand will create a 'kitchen-*' gem project
Happiness!
Goals
Simple workflow
Stressing speed
Optimizing for freshness of
code & config
Declarative
Static configuration
Dead simple CI integration
$ bundle install$ rake kitchen:all
Testing freedom
Framework agnostic
Concurrent execution
Isolated log files
Virtualization freedom
Decoupled (plugin
architecture)
Explicit vs. implicit
EcosystemDemoConcepts
EcosystemDemoConcepts
Test Kitchen runs suites on target platforms as instances using drivers
Platform
Operating system or target system
Platform
Operating system version
Platform
Hardware architecture, networking, virtualization, etc.
Platform
It has a name
Platform
Suite
SuiteThe Chef configuration
SuiteA run list, node attributes
SuiteIt has a name
Instance
A suite + platform
Instance
Name is auto-generated
Instance
Has associated actions: create, converge, setup, verify, destroy
Instance
Driver
An implementation of instance actions
Driver
Packaged as a RubyGem
Driver
One driver per instance
Driver
Defines its own configuration requirements
Driver
Bonus!
Test Kitchen runs suites on target platforms as instances using drivers and lets you optionally run tests on them to verify state
How?
Busser
“Your Mars Rover on a converged node” - me
“Your tests, your way!” - also me
Only dependency is Ruby (and thor gem)
Prepares node for test suites
Installs test runner plugins
busser-bash, busser-bats, busser-minitest, busser-shunit2, busser-aruba, busser-serverspec, busser-rspec, busser-shpec, busser-cucumber
No tests? No problem!
EcosystemDemoConcepts
TK::Demorama.new.start!
EcosystemDemoConcepts
Linting
Foodcritic
puppet-lint
Unit
ChefSpec
rspec-puppet
Integration
Test Kitchen
More? Tell me!
[insert website here]
Infrastructure
Cucumber-Chef
TestLab
Leibniz
Vagabond
Honorable Mention
Berkshelf
Vagrant
Bonus!
Test Kitchen! Guide! Soon!
DRAFT
Confidence
Thanks!Fletcher [email protected]/fnicholhw-ops.com/people#fletcher
Credits!• http://www.flickr.com/photos/michaelschiltz/4993352001/
• http://www.flickr.com/photos/nazly/6867975450/
• http://www.flickr.com/photos/jpdaigle/59942231/
• http://www.flickr.com/photos/absent/2157057475/
• http://www.flickr.com/photos/adampenney/2424992539/
• http://www.flickr.com/photos/robboudon/6035265163/
• http://www.flickr.com/photos/waferboard/4659835234/
• http://www.flickr.com/photos/28096801@N05/4916430883/
• http://www.flickr.com/photos/brandonshigeta/4374998947/
• http://www.flickr.com/photos/legin101/5210511841/
• http://www.flickr.com/photos/hoteldelapaixgeneve/5592080585/
• http://www.flickr.com/photos/the_eggwhite/8136644446/
• http://www.flickr.com/photos/34667924@N08/3853027446/
• http://www.flickr.com/photos/seattlemunicipalarchives/6871310641/
• http://www.flickr.com/photos/nasamarshall/7698035402/
• http://www.flickr.com/photos/pankseelen/6339570829/
• http://www.flickr.com/photos/fnichol/galleries/72157636856466494/
• http://www.flickr.com/photos/51342261@N08/5478506479/
• http://www.flickr.com/photos/parkeyparker/4316936774/
• http://www.flickr.com/photos/swfphotos/7498333224/
• http://www.flickr.com/photos/mcdarius/8524417604/
• http://www.flickr.com/photos/bamboo-adventure/3530133273/
• http://www.flickr.com/photos/robboudon/6035816980/