DevOps Classroom Series – 19/Jan/2021

Test Kitchen

  • This is used to automatically test cookbooks across any platformas and test suites

  • Test kitchen has drivers which determine where the test executions can happen Preview

  • All of this is configured in kitchen.yaml file in cookbook Preview

  • Now lets understand kitchen.yaml syntax Refer Here

  • Lets create a cookbook called as kitchendemo Preview

  • Lets launch visual studio code and navigate to kitchen.yaml Preview

  • Refer Here for the changeset

  • Provisioner is which is used to execute the cookbook and behave like a chef server.

  • The default provisioner is ChefZero. This is a simple inmemory ChefServer. The other provisioner option which you can used to run cookbooks is Chef Solo.

  • Both Chef Solo and Chef Zero can work on one machine (chefserver and chef node is on same machine)

  • Chef Zero is lightweight suitable for testing

  • Chef Solo is opensource version of chef-client that allows using cookbooks with nodes without requiring access to chef server

  • In chef cookbook we can write unit test cases and inspec is a test harness tool

  • For official documentation of test kitchen Refer Here

  • Refer Here for getting started guide of test kitchen

  • Refer Here for the ec2 configuration used

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About learningthoughtsadmin