{"id":347,"date":"2016-04-14T09:45:00","date_gmt":"2016-04-14T09:45:00","guid":{"rendered":"https:\/\/opstree.com\/blog\/\/2016\/04\/14\/chef-kitchen-do-it-simply\/"},"modified":"2026-01-05T14:42:35","modified_gmt":"2026-01-05T09:12:35","slug":"chef-kitchen-do-it-simply","status":"publish","type":"post","link":"https:\/\/opstree.com\/blog\/2016\/04\/14\/chef-kitchen-do-it-simply\/","title":{"rendered":"Chef-Kitchen Do it simply.."},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left;\">\r\n<div dir=\"ltr\" style=\"margin-bottom: 3pt; margin-top: 0; text-align: center;\">\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: center;\">\u00a0<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: center;\"><img loading=\"lazy\" decoding=\"async\" style=\"border: none; transform: rotate(0rad);\" src=\"https:\/\/lh4.googleusercontent.com\/gjrj_vCAoQERzAR9_4ZnEmNfX78YmTSNJfqv4wm4hcLhCLiy6DeCnCBWqf6g-E0QjvLirLYrbAxZkW0UDdAb67bDin334EUCwipS0nxcr9ZIuyjKAIwLAUgsKIFreufLGmB7jtCg\" width=\"556\" height=\"624\" \/><\/div>\r\n<h2 style=\"line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt; text-align: left;\">\u00a0<\/h2>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">If you are from agile background you would be already aware about the importance of testing your code as you develop. As DevOps SCM tools are maturing where we try to have our complete infrastructure as code it becomes a dire necessity to have our infrastructure code to be tested as well. In this blog I&#8217;ll showcase how I&#8217;m using the testing capability of Chef to test our Chef code.<\/div>\r\n<h2 style=\"line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt; text-align: left;\">Prerequisites<\/h2>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">This blog assumes that you have a basic understanding of Chef, Docker, Git and Vagrant. This blog is written in consideration with centos as platform. You can follow same procedure for ubuntu with some basic changes.<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">Setup Kitchen<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">Clone from our github repository to spin up a vagrant with kitchen and other chef tools.<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">$ git clone git@github.com:OpsTree\/Chef.git<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<ul>\r\n<li style=\"line-height: 1.38; text-align: left;\">Go to testkitchen directory. \u00a0<b style=\"font-weight: normal;\"> <br \/><\/b><\/li>\r\n<\/ul>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\">$ cd \u00a0Chef\/centos\/testkitchen<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\"><img loading=\"lazy\" decoding=\"async\" style=\"-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);\" src=\"https:\/\/lh6.googleusercontent.com\/YcTpIPhS-4BiFneG2MRSxKqR_L-mELKOmIReDpLkqEkGiFNLL-jW77ZQ9CUmjlje0uiYpCglVBl3Nt82LRjR_QjTuJtJbKnlcWlLSQ2LHgtwhAWZi7lWWLfnlmyubsPm-TwmNV-P\" width=\"566\" height=\"163\" \/><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">\u00a0<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">This directory includes a Vagrantfile, a cookbook and a knife.rb file.<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">\u00a0<\/div>\r\n<ul>\r\n<li style=\"line-height: 1.38; text-align: left;\">View vagrantfile for provisioning.<\/li>\r\n<\/ul>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">This Vagrantfile have some basic vagrant provisioning with shell.<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">\u00a0<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">$ cat Vagrantfile<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">This file provision your vagrant using shell.<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\"><img loading=\"lazy\" decoding=\"async\" style=\"-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);\" src=\"https:\/\/lh5.googleusercontent.com\/WagVZURSQKnnVb0wF3qyji2Z0CQa4vgKsoDO7J-cRTnCP4GZqk-6rTyIvtQiS_16lQ4Z4u4owO-GUeZaHl7CF7bd3rs8gHd0UyxaxypGt1bPESjbFpdCurfPsNQgxDhneHQfkR1s\" width=\"518\" height=\"180\" \/><\/div>\r\n<div dir=\"ltr\" style=\"margin-bottom: 3pt; margin-top: 0; text-align: center;\">\u00a0<\/div>\r\n<div style=\"text-align: left;\">\u00a0<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\">As this block contains a lot of stuff. FIrstly this need two rpm files to be placed in current directory (i.e. vagrant\/chef\/centos\/testkitchen). Download these rpm using following commands. This vagrantfile uses centos\/7 as base box.<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\">$ wget <a style=\"text-decoration: none;\" href=\"https:\/\/opscode-omnibus-packages.s3.amazonaws.com\/el\/7\/x86_64\/chefdk-0.10.0-1.el7.x86_64.rpm\" target=\"_blank\" rel=\"noopener\">https:\/\/opscode-omnibus-packages.s3.amazonaws.com\/el\/7\/x86_64\/chefdk-0.10.0-1.el7.x86_64.rpm<\/a><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\">$ wget ftp:\/\/195.220.108.108\/linux\/centos\/7.2.1511\/extras\/x86_64\/Packages\/epel-release-7-5.noarch.rpm<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\">Next in this block we are installing docker and rvm to manage our ruby version to 2.2.4.<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<ul>\r\n<li style=\"line-height: 1.38; text-align: left;\">Spin Up Vagrant box<\/li>\r\n<\/ul>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">$ vagrant up<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">\u00a0<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\">This will perform everything for you. And creates a running vagrant with centos7 platform. Next login into this vagrant box using following command.<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left; text-indent: 36pt;\">$ vagrant \u00a0ssh<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\">Your testing environment is ready and you are all set to use kitchen to test and verify your cookbooks in different platforms using docker container. \u00a0<\/div>\r\n<h2 style=\"line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt; text-align: left;\">Test your first cookbook \u00a0<\/h2>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">Change directory to \/vagrant. \/vagrant directory is shared between host and guest machine.<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">$ cd \/vagrant<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">\u00a0<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">This cloned repo has its first cookbook \u201chelloworld\u201d in cookbooks folder. This cookbook creates a directory and place a hello.txt file in it.<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\">\u00a0<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\"><img loading=\"lazy\" decoding=\"async\" style=\"border: none; transform: rotate(0rad);\" src=\"https:\/\/lh5.googleusercontent.com\/nOztp1sYANDiJJEnO6NKVAF2lbtnvbG6U7ecCAQdfsfvjE5YOL5tQ8deGtlyAlAGZv3jQF-uVQUI7pFKJ7LerLQjTXT8t-zOYBK-E_hnAmDbdUqwNDdvi43BVvEkq_ncy34LEzjg\" width=\"442\" height=\"180\" \/><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">\u00a0<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">Go to \/vagrant folder and start using kitchen.<\/div>\r\n<ul>\r\n<li style=\"line-height: 1.38; text-align: left;\">Initialize kitchen<\/li>\r\n<\/ul>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\">$ kitchen init &#8211;driver=docker<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\">\u00a0<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\"><img loading=\"lazy\" decoding=\"async\" style=\"-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);\" src=\"https:\/\/lh4.googleusercontent.com\/GYTvG5GdUCJ3M_AoEe7wQsVEnK5NnwyfdSpoRHvgEJ_EZtF9JJkuj4r8kHSuWRl9PbNdGlM5-g-qiypZ3kXHTkCzB-s6PmTvF2JSB8rrD4FUTnZscJjvjzX05EAaeLQk1UuMh0Io\" width=\"494\" height=\"72\" \/><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\">\u00a0<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\">This command initialize mandatory stuff to start with your kitchen. This creates \u00a0.kitchen.yml, chefignore file and a test folder.<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\">.kitchen.yml file is the main configuration file for kitchen. This file contains mainly 4 blocks driver, provisioner, platforms and suites.<\/div>\r\n<ul style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0;\">\r\n<li style=\"list-style-type: none;\">\r\n<ul style=\"margin-bottom: 0; margin-top: 0;\">\r\n<li style=\"background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666667px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline;\">\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">Driver: \u00a0This is the name of driver that is used to create new node for testing<\/div>\r\n<\/li>\r\n<li style=\"background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666667px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline;\">\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">Provisioner: This is the chef provisioner to simulate test, chef-zero and chef-solo are the options.<\/div>\r\n<\/li>\r\n<li style=\"background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666667px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline;\">\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">Platforms: This is the type of platform on which kitchen runs test eg. ubuntu-14.04 and centos-7.1<\/div>\r\n<\/li>\r\n<li style=\"background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666667px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline;\">\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">Suites: This is the collection of test suites with runlist and attributes.<\/div>\r\n<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<img loading=\"lazy\" decoding=\"async\" style=\"-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);\" src=\"https:\/\/lh3.googleusercontent.com\/XY4xCV7WX4eEot4KtuEz_UIpUWZBKujVlYaMfjTHQaBPansjmT9bO1kEUZjJ-oyqESAPfuCQhR2J7I9OVqB36c11f75WDCMY1FfnceGErSAYM8XHU0PBreM_zfnZyii44xQ9XMn5\" width=\"390\" height=\"262\" \/><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\">\u00a0<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\">Chefignore file determine which files to ignore when uploading cookbooks.<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\">Test folder contains all test files running over the cookbooks.<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<ul>\r\n<li style=\"line-height: 1.38; text-align: left;\">Install required gems<\/li>\r\n<\/ul>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\">Install required gems by using bundle. As your directory contains a Gemfile where gems are described with their specific version. \u00a0<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">\u00a0<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left; text-indent: 36pt;\">$ bundle install<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">Then to verify run following command.<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">$ gem list kitchen<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\"><img loading=\"lazy\" decoding=\"async\" style=\"-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);\" src=\"https:\/\/lh6.googleusercontent.com\/O_sognak3VLB_4gq9Mihhg8UzZomMuoir5AXmZRpjusalKGU71nlSVvwhxrFObaiNp5qiW8EA-VS65r23zLCAMIkVJDjQ4Y9fBrV7D4MbVCpZtZdcvMV8ZXcg3hXzNvftmlWhpFU\" width=\"389\" height=\"110\" \/><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">As this install two essential gems kitchen-docker and test-kitchen.<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<ul>\r\n<li style=\"line-height: 1.38; text-align: left;\">List all \u00a0your nodes.<\/li>\r\n<\/ul>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left; text-indent: 36pt;\">$ bundle exec kitchen list<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\"><img loading=\"lazy\" decoding=\"async\" style=\"-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);\" src=\"https:\/\/lh4.googleusercontent.com\/JYFpms6fvn5bxXdFN2uEywHIN1VJJf_YJ00iD7qY8nC9NdhoMX2yCpxLSFhIRpFCdvo6JrPLdmHBJCh5yx-RKGuzoXtPaT_F-zWCjC_TfzBRg5RX1e4pmIK_LE5CrebO5i_yv_YA\" width=\"507\" height=\"92\" \/><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">This command list all your nodes with last action performed on them.<\/div>\r\n<h3 style=\"line-height: 1.38; margin-bottom: 4pt; margin-top: 16pt; text-align: left;\">Start kitchen cycle<\/h3>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\"><img loading=\"lazy\" decoding=\"async\" style=\"-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);\" src=\"https:\/\/lh5.googleusercontent.com\/hxu11m1DWoNi88HlIDO-GKfTAfWTk67_eaY6W8hXgVT2v-YskKBLhTeKVeYLVjWprkmzPeXciP8hdkhIHlGFM8qQxlYxuveU9fy9uRqnRkvHagsNzQCBuBTXAOI_ezhqXjnWoezU\" width=\"537\" height=\"64\" \/><\/div>\r\n<ul>\r\n<li style=\"line-height: 1.38; text-align: left;\">Create your node using following command<\/li>\r\n<\/ul>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left; text-indent: 36pt;\">$ bundle exec kitchen create<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<ul style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0;\">\r\n<li style=\"list-style-type: none;\">\r\n<ul style=\"margin-bottom: 0; margin-top: 0;\">\r\n<li style=\"background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666667px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline;\">\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">This command pulls image of docker if they are not present locally.<\/div>\r\n<\/li>\r\n<li style=\"background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666667px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline;\">\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">Install \u00a0openssh-server and other essential packages in newly created docker container.<\/div>\r\n<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\">if get \u201cKitchen is finished.\u201d as final output. Now verify with kitchen list once again.<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\"><img loading=\"lazy\" decoding=\"async\" style=\"-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);\" src=\"https:\/\/lh5.googleusercontent.com\/FICbX2UgsixhX5Yz_ehMsoIQekcakv0ZJ9vudYTu73B5AblE2GPbO-C1_rL6KIHaULhfLPESZ22hhwh0P2TPd6fROgxURW4FG94wU52ZrDx7cP7Itq-27uviO4Y5MGo-4JVhQgg6\" width=\"556\" height=\"83\" \/><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<ul>\r\n<li style=\"line-height: 1.38; text-align: left;\">Converge your node<\/li>\r\n<\/ul>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\">This step deploys your cookbook to newly created node. So let&#8217;s tell kitchen which cookbook to run. Edit .kitchen.yml file and add recipe in runlist attribute of suits block.<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\"><img loading=\"lazy\" decoding=\"async\" style=\"-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);\" src=\"https:\/\/lh6.googleusercontent.com\/mQkbsU_xxoR0ibLJAfJdIprXl3EtRYb9akED74WM2ZZseF1qo7SEvxa3iTLkWG5oWINx_fgvDFJSDNQz8tcirHN4iDGpKbNJF9AfxYkYCgw-F92DoIRKUm_ZxYtan5Tn75YSURby\" width=\"311\" height=\"89\" \/><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\">Now run following command to converge your node.<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\">$ bundle exec kitchen converge<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<ul style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0;\">\r\n<li style=\"list-style-type: none;\">\r\n<ul style=\"margin-bottom: 0; margin-top: 0;\">\r\n<li style=\"background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666667px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline;\">\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">Chef solo and dna.json got prepared and pushed into node \/tmp\/kitchen directory<\/div>\r\n<\/li>\r\n<li style=\"background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666667px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline;\">\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">This will put cookbook into the node and install chef by performing an Omnibus package installation.<\/div>\r\n<\/li>\r\n<li style=\"background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666667px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline;\">\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">Chef run initiated with information in .kitchen.yml file.<\/div>\r\n<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\">Verify again with kitchen list.<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\"><img loading=\"lazy\" decoding=\"async\" style=\"-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);\" src=\"https:\/\/lh4.googleusercontent.com\/EKQFJMB-W16Mw2rBjU0xbD5x3kUcTzaQ-wdu7vy6xst2IYUI2UVDd79BjGRC5P-9MAeRAr4-Jr4gzU7pEnhoL1iNPWK2jDlvJsQVjs6nkn_ajg0BptZYKq0GdAmEVUdKSHTJJyhi\" width=\"502\" height=\"82\" \/><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\">\u00a0<\/div>\r\n<ul>\r\n<li style=\"line-height: 1.38; text-align: left;\">Login into node<\/li>\r\n<\/ul>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">$ bundle exec kitchen login \u00a0default-ubuntu-1404<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left; text-indent: 36pt;\">&amp;&amp;<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left; text-indent: 36pt;\">$ bundle exec kitchen login \u00a0default-centos<\/div>\r\n<ul style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0;\">\r\n<li style=\"list-style-type: none;\">\r\n<ul style=\"margin-bottom: 0; margin-top: 0;\">\r\n<li style=\"background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666667px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline;\">\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">Login into node and manually verify \/data directory and hello.txt file in it.<\/div>\r\n<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<ul>\r\n<li style=\"line-height: 1.38; text-align: left;\">Verify your cookbook<\/li>\r\n<\/ul>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">Look into test directory structure.<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">\u00a0<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 72pt; margin-top: 0; text-align: left;\"><img loading=\"lazy\" decoding=\"async\" style=\"-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);\" src=\"https:\/\/lh3.googleusercontent.com\/1eJDHLRWy3j9BPCW2C6n7r1LOBcJs14JlZVsMAaGERgErXvx2mqvkId8BOMS4elH7wCSZR9EZoFWq_uOw929LpxlSLAgQL9vcrE_5j8eQ6Q7wwcSGBngFL6jRbgrHS_XvFYQC8Ow\" width=\"367\" height=\"110\" \/><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\">\u00a0<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\">As this directory contains \u201cdefault\u201d folder this is corresponding to your suit name i.e. default. Now create a directory structure to put files in particular location.<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<ul style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0;\">\r\n<li style=\"list-style-type: none;\">\r\n<ul style=\"margin-bottom: 0; margin-top: 0;\">\r\n<li style=\"background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666667px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline;\">\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">Use Bats to create test<\/div>\r\n<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left; text-indent: 36pt;\">\u00a0<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left; text-indent: 36pt;\">$ mkdir -p test\/integration\/default\/bats<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 72pt; margin-top: 0; text-align: left;\">Busser is the component which provides facility of testing in your node. Bats directory tells kitchen to which Busser runner plugin needs to be installed on the remote instance. In other words the bats directory name will cause Busser to installbusser-bats from RubyGems.<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<ul>\r\n<li style=\"line-height: 1.38; text-align: left;\">Write first test file.<\/li>\r\n<\/ul>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 72pt; margin-top: 0; text-align: left; text-indent: 36pt;\">$ vim \u00a0test\/integration\/default\/bats\/hellotest.bats<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 72pt; margin-top: 0; text-align: left; text-indent: 36pt;\">#!\/usr\/bin\/env bats<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 72pt; margin-top: 0; text-align: left; text-indent: 36pt;\">@test &#8220;\/data directory found in path&#8221; {<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 72pt; margin-top: 0; text-align: left; text-indent: 36pt;\">\u00a0run stat \/data<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 72pt; margin-top: 0; text-align: left; text-indent: 36pt;\">\u00a0[ &#8220;$status&#8221; -eq 0 ]<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 72pt; margin-top: 0; text-align: left; text-indent: 36pt;\">}<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 72pt; margin-top: 0; text-align: left; text-indent: 36pt;\">@test &#8220;hello.txt file found in path&#8221; {<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 72pt; margin-top: 0; text-align: left; text-indent: 36pt;\">\u00a0run stat \/data\/hello.txt<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 72pt; margin-top: 0; text-align: left; text-indent: 36pt;\">\u00a0[ &#8220;$status&#8221; -eq 0 ]<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 72pt; margin-top: 0; text-align: left; text-indent: 36pt;\">}<\/div>\r\n<ul>\r\n<li style=\"line-height: 1.38; text-align: left;\">Run kitchen verify<\/li>\r\n<\/ul>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 72pt; margin-top: 0; text-align: left; text-indent: 36pt;\">$ bundle exec kitchen verify<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 72pt; margin-top: 0; text-align: left; text-indent: 36pt;\">Now verify again with kitchen list, and see last action.<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left; text-indent: 36pt;\"><img loading=\"lazy\" decoding=\"async\" style=\"-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);\" src=\"https:\/\/lh6.googleusercontent.com\/-aTe7iqOVh48mbZH1FtvJKrGFaCRuArsTGlIGG2sGmalE_Y3kxFd4TZrojB5QzTODkrkv6o1sEZcfMwN-k0TF_8UJd0uNIbDglJGNeCuo4wKE-fqVcrSuv5QxEXekm9-hyA1948_\" width=\"501\" height=\"86\" \/><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\">\u00a0<\/div>\r\n<ul style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0;\">\r\n<li style=\"list-style-type: none;\">\r\n<ul style=\"margin-bottom: 0; margin-top: 0;\">\r\n<li style=\"background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666667px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline;\">\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">Use serverspec to create test<\/div>\r\n<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">\u00a0<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">$ mkdir -p test\/integration\/default\/serverspec<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<ul>\r\n<li style=\"line-height: 1.38; text-align: left;\">Write a test<\/li>\r\n<\/ul>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\">$ vim \u00a0test\/integration\/default\/serverspec\/hellotest_spec.rb<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 72pt; margin-top: 0; text-align: left;\">require &#8216;serverspec&#8217;<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 72pt; margin-top: 0; text-align: left; text-indent: 36pt;\"># Required by serverspec<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 108pt; margin-top: 0; text-align: left;\">set :backend, :exec<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 72pt; margin-top: 0; text-align: left; text-indent: 36pt;\">describe &#8220;file hello.txt status&#8221; do<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 72pt; margin-top: 0; text-align: left; text-indent: 36pt;\">\u00a0it &#8220;file hello.txt&#8221; do<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 72pt; margin-top: 0; text-align: left; text-indent: 36pt;\">\u00a0\u00a0\u00a0expect(file(&#8220;\/data\/hello.txt&#8221;)).to exist<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 72pt; margin-top: 0; text-align: left; text-indent: 36pt;\">\u00a0end<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 72pt; margin-top: 0; text-align: left; text-indent: 36pt;\">end<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<ul>\r\n<li style=\"line-height: 1.38; text-align: left;\">Run kitchen verify<\/li>\r\n<\/ul>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 72pt; margin-top: 0; text-align: left; text-indent: 36pt;\">$ bundle exec kitchen verify<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 72pt; margin-top: 0; text-align: left; text-indent: 36pt;\">Now verify again with kitchen list, and see last action.<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left; text-indent: 36pt;\"><img loading=\"lazy\" decoding=\"async\" style=\"-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);\" src=\"https:\/\/lh6.googleusercontent.com\/-aTe7iqOVh48mbZH1FtvJKrGFaCRuArsTGlIGG2sGmalE_Y3kxFd4TZrojB5QzTODkrkv6o1sEZcfMwN-k0TF_8UJd0uNIbDglJGNeCuo4wKE-fqVcrSuv5QxEXekm9-hyA1948_\" width=\"500\" height=\"76\" \/><\/div>\r\n<div dir=\"ltr\" style=\"margin-bottom: 3pt; margin-top: 0; text-align: center;\">\u00a0<\/div>\r\n<div style=\"text-align: left;\">\u00a0<\/div>\r\n<ul>\r\n<li style=\"line-height: 1.38; text-align: left;\">Destroy your node<\/li>\r\n<\/ul>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\">$ bundle exec kitchen destroy<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\">\u00a0<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-left: 36pt; margin-top: 0; text-align: left;\">This will destroy your node.<\/div>\r\n<h3 style=\"line-height: 1.38; margin-bottom: 4pt; margin-top: 16pt; text-align: left;\">Kitchen test<\/h3>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">$ bundle exec kitchen test<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\"><b style=\"font-weight: normal;\">\u00a0<\/b><\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">Kitchen test is an option to perform complete kitchen cycle with one command. This destroy existed nodes and then create, converge, verify node with your predefined suit in .kitchen.yml. And finally it destroy the node.<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 3pt; margin-top: 0; text-align: left;\">\u00a0<\/div>\r\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0; margin-top: 0; text-align: left;\">Now your cookbook is tested. So feel confident to use it. \u00a0<img loading=\"lazy\" decoding=\"async\" style=\"-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);\" src=\"https:\/\/lh5.googleusercontent.com\/7j1-cupLzDPTUWHw9CyJBMDw3pv1BAkmcnuUt4KambVusx-PbavnIoX7faqHs186GZXzpLDEGADEaGD7fdTAFkeGcm-y-D1eagZOz4qBzNbDu0CHRW5W2M0LPMnVVgbzapUd16TA\" width=\"27\" height=\"25\" \/><\/div>\r\n<\/div>\r\n<\/div>\r\n\r\n<p>&nbsp;<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 \u00a0 If you are from agile background you would be already aware about the importance of testing your code as you develop. As DevOps SCM tools are maturing where we try to have our complete infrastructure as code it becomes a dire necessity to have our infrastructure code to be tested as well. In &hellip; <a href=\"https:\/\/opstree.com\/blog\/2016\/04\/14\/chef-kitchen-do-it-simply\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Chef-Kitchen Do it simply..&#8221;<\/span><\/a><\/p>\n","protected":false},"author":72934568,"featured_media":29900,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[225871,28070474],"tags":[768739297,768739308,676319247,8613,101807,76604],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/11\/DevSecOps-1.jpg","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pfDBOm-5B","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/347"}],"collection":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/users\/72934568"}],"replies":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/comments?post=347"}],"version-history":[{"count":4,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/347\/revisions"}],"predecessor-version":[{"id":30273,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/347\/revisions\/30273"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/media\/29900"}],"wp:attachment":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/media?parent=347"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/categories?post=347"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/tags?post=347"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}