Test Kitchen 1.0
A Config Management-Neutral Integration
Testing Tool
Fletcher Nichol
October 26, 2013
DevOpsDays Vancouver...
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 fda10bb71cc45c7eebeb4355f8dafa2b55f00709
Author: Fletcher Nichol <fnichol@nichol.ca>
Date:
Sat Dec 1 10:51:52 2012 ...
commit c8303426363a50a08137e518e124dad31facb9f1
Author: Fletcher Nichol <fnichol@nichol.ca>
Date:
Mon Jan 28 22:22:08 2013...
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
Concepts

Demo

Ecosystem
Concepts

Demo

Ecosystem
Test Kitchen runs suites on
target platforms as instances
using drivers
Platform
Platform
Operating system or target
system
Platform
Operating system version
Platform
Hardware architecture,
networking, virtualization, etc.
Platform
It has a name
Suite
Suite
The Chef configuration
Suite
A run list, node attributes
Suite
It has a name
Instance
Instance
A suite + platform
Instance
Name is auto-generated
Instance
Has associated actions: create,
converge, setup, verify, destroy
Driver
Driver
An implementation of instance
actions
Driver
Packaged as a RubyGem
Driver
One driver per instance
Driver
Defines its own configuration
requirements
Bonus!
Test Kitchen runs suites on
target platforms as instances
using drivers and lets you
optionally run tests on them to
verif...
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, busserserverspec, busser-rspec,
busser-shpec, bus...
No tests? No problem!
Concepts

Demo

Ecosystem
TK::Demorama.new.start!
Concepts

Demo

Ecosystem
Linting
Foodcritic
puppet-lint
Unit
ChefSpec
rspec-puppet
Integration
Test Kitchen
[insert website here]
More? Tell me!
Infrastructure
Cucumber-Chef
TestLab
Leibniz
Vagabond
Honorable Mention
Berkshelf
Vagrant
Bonus!
DRAFT
Test Kitchen! Guide! Soon!
Confidence
Thanks!
Fletcher Nichol
@fnichol
github.com/fnichol
hw-ops.com/people#fletcher
Credits!
• http://www.flickr.com/photos/michaelschiltz/4993352001/
• http://www.flickr.com/photos/nazly/6867975450/
• http:/...
Test kitchen 1.0 - Fletcher Nichol
Test kitchen 1.0 - Fletcher Nichol
Test kitchen 1.0 - Fletcher Nichol
Test kitchen 1.0 - Fletcher Nichol
Test kitchen 1.0 - Fletcher Nichol
Upcoming SlideShare
Loading in …5
×

Test kitchen 1.0 - Fletcher Nichol

1,303 views

Published on

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,303
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
8
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Test kitchen 1.0 - Fletcher Nichol

  1. 1. Test Kitchen 1.0 A Config Management-Neutral Integration Testing Tool Fletcher Nichol October 26, 2013 DevOpsDays Vancouver 2013
  2. 2. I love big screens!
  3. 3. Ah.
  4. 4. Confidence
  5. 5. Test Kitchen
  6. 6. A test harness tool to execute your configured code on one or more platforms in isolation
  7. 7. Currently run Chef converges
  8. 8. Seeking input from other configuration management communities very soon
  9. 9. commit fda10bb71cc45c7eebeb4355f8dafa2b55f00709 Author: Fletcher Nichol <fnichol@nichol.ca> 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?
  10. 10. commit c8303426363a50a08137e518e124dad31facb9f1 Author: Fletcher Nichol <fnichol@nichol.ca> 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
  11. 11. Happiness!
  12. 12. Goals
  13. 13. Simple workflow
  14. 14. Stressing speed
  15. 15. Optimizing for freshness of code & config
  16. 16. Declarative
  17. 17. Static configuration
  18. 18. Dead simple CI integration
  19. 19. $ bundle install $ rake kitchen:all
  20. 20. Testing freedom
  21. 21. Framework agnostic
  22. 22. Concurrent execution
  23. 23. Isolated log files
  24. 24. Virtualization freedom
  25. 25. Decoupled (plugin architecture)
  26. 26. Explicit vs. implicit
  27. 27. Concepts Demo Ecosystem
  28. 28. Concepts Demo Ecosystem
  29. 29. Test Kitchen runs suites on target platforms as instances using drivers
  30. 30. Platform
  31. 31. Platform Operating system or target system
  32. 32. Platform Operating system version
  33. 33. Platform Hardware architecture, networking, virtualization, etc.
  34. 34. Platform It has a name
  35. 35. Suite
  36. 36. Suite The Chef configuration
  37. 37. Suite A run list, node attributes
  38. 38. Suite It has a name
  39. 39. Instance
  40. 40. Instance A suite + platform
  41. 41. Instance Name is auto-generated
  42. 42. Instance Has associated actions: create, converge, setup, verify, destroy
  43. 43. Driver
  44. 44. Driver An implementation of instance actions
  45. 45. Driver Packaged as a RubyGem
  46. 46. Driver One driver per instance
  47. 47. Driver Defines its own configuration requirements
  48. 48. Bonus!
  49. 49. Test Kitchen runs suites on target platforms as instances using drivers and lets you optionally run tests on them to verify state
  50. 50. How?
  51. 51. Busser
  52. 52. “Your Mars Rover on a converged node” - me
  53. 53. “Your tests, your way!” - also me
  54. 54. Only dependency is Ruby (and thor gem)
  55. 55. Prepares node for test suites
  56. 56. Installs test runner plugins
  57. 57. busser-bash, busser-bats, busser-minitest, busser-shunit2, busser-aruba, busserserverspec, busser-rspec, busser-shpec, busser-cucumber
  58. 58. No tests? No problem!
  59. 59. Concepts Demo Ecosystem
  60. 60. TK::Demorama.new.start!
  61. 61. Concepts Demo Ecosystem
  62. 62. Linting
  63. 63. Foodcritic
  64. 64. puppet-lint
  65. 65. Unit
  66. 66. ChefSpec
  67. 67. rspec-puppet
  68. 68. Integration
  69. 69. Test Kitchen
  70. 70. [insert website here] More? Tell me!
  71. 71. Infrastructure
  72. 72. Cucumber-Chef
  73. 73. TestLab
  74. 74. Leibniz
  75. 75. Vagabond
  76. 76. Honorable Mention
  77. 77. Berkshelf
  78. 78. Vagrant
  79. 79. Bonus!
  80. 80. DRAFT Test Kitchen! Guide! Soon!
  81. 81. Confidence
  82. 82. Thanks! Fletcher Nichol @fnichol github.com/fnichol hw-ops.com/people#fletcher
  83. 83. 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/seattlemunicipalarchives/ 6871310641/ • http://www.flickr.com/photos/nasamarshall/7698035402/ • http://www.flickr.com/photos/pankseelen/6339570829/ • http://www.flickr.com/photos/adampenney/2424992539/ • http://www.flickr.com/photos/fnichol/galleries/ 72157636856466494/ • http://www.flickr.com/photos/robboudon/6035265163/ • http://www.flickr.com/photos/51342261@N08/5478506479/ • http://www.flickr.com/photos/waferboard/4659835234/ • http://www.flickr.com/photos/parkeyparker/4316936774/ • http://www.flickr.com/photos/28096801@N05/4916430883/ • http://www.flickr.com/photos/swfphotos/7498333224/ • http://www.flickr.com/photos/brandonshigeta/4374998947/ • http://www.flickr.com/photos/mcdarius/8524417604/ • http://www.flickr.com/photos/legin101/5210511841/ • http://www.flickr.com/photos/bamboo-adventure/ 3530133273/ • 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/robboudon/6035816980/

×