{"id":8303,"date":"2020-01-04T00:13:02","date_gmt":"2020-01-04T00:13:02","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=8303"},"modified":"2021-11-15T06:46:06","modified_gmt":"2021-11-15T06:46:06","slug":"chef-configuration-management-interview-questions-and-answers-part-3","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/chef-configuration-management-interview-questions-and-answers-part-3\/","title":{"rendered":"Chef Configuration Management Interview Questions and Answers Part &#8211; 3"},"content":{"rendered":"\n<p><strong>What is a resource?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Read-only data identified by a type and a name.<\/li><li>A description of some piece of a system and its desired state.  &#8211; ANS<\/li><li>An ordered series of configuration states.<\/li><\/ul>\n\n\n\n<p><strong>What is a recipe?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>A file that groups related resources.    &#8211; ANS<\/li><li>A file that configures the chef-client run.<\/li><li>A file that configures your workstation.<\/li><\/ul>\n\n\n\n<p><strong>What happens when you don&#8217;t specify a resource&#8217;s action?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>You get an error message but the chef-client run continues.<\/li><li>You get an error message and the chef-client run halts.<\/li><li>The default action is assumed.   &#8211; ANS<\/li><\/ul>\n\n\n\n<p><strong>What does the code package &#8216;httpd&#8217; mean?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>It identifies a package resource.   &#8211; ANS<\/li><li>It tags the system as a web server.<\/li><li>It is incomplete and will cause an error message.<\/li><\/ul>\n\n\n\n<p><strong>What determines when Chef applies resources?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The order of their precedence.<\/li><li>The order of their attributes.<\/li><li>The order they&#8217;re listed in a recipe.   &#8211; ANS<\/li><\/ul>\n\n\n\n<p><strong>When must you list a resources attributes?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Immediately after the resource name.<\/li><li>Immediately after the actions.<\/li><li>You can list them anywhere within the resource block.   &#8211; ANS<\/li><\/ul>\n\n\n\n<p><strong>What does a cookbook do?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>It includes recipes and external information and makes them easier to manage. &#8211; ANS<\/li><li>It includes only external information, such as templates, and makes them easier to manage.<\/li><li>It includes only recipes and makes them easier to manage.<\/li><\/ul>\n\n\n\n<p><strong>What is a run-list?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>A run-list specifies which recipes to run.<\/li><li>A run-list specifies which recipes to run and the order in which to run them. &#8211; ANS<\/li><li>A run-list specifies which cookbooks to run.<\/li><\/ul>\n\n\n\n<p><strong>What does test and repair mean?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Chef applies changes only when they are necessary. &#8211; ANS<\/li><li>Chef always applies changes and then tests to see if they are correct.<\/li><li>Chef repairs incorrect states and then tests to see if they are now correct.<\/li><\/ul>\n\n\n\n<p><strong>What language are compliance tests written in:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>InSpec. &#8211; ANS<\/li><li>Chef.<\/li><li>Ruby.<\/li><\/ul>\n\n\n\n<p><strong>What cookbook can be used to send compliance data to compliance server during a chef-client run?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Compliance cookbook.    <\/li><li>InSpec cookbook.<\/li><li>Audit cookbook. &#8211; ANS<\/li><\/ul>\n\n\n\n<p><strong>Where are compliance profiles stored?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>On target nodes.<\/li><li>On Chef Automate Compliance server. &#8211; ANS<\/li><\/ul>\n\n\n\n<p><strong>Test Kitchen:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Lets you run your cookbooks in temporary environments. &#8211; ANS<\/li><li>Manages the virtual machines you use for temporary environments.<\/li><li>Makes it easier to work with the hypervisor that manages the virtual machines.<\/li><\/ul>\n\n\n\n<p><strong>Which of these commands generates the .kitchen.yml file?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>kitchen cat .kitchen.yml<\/li><li>file &#8216;\/.kitchen.yml&#8217;<\/li><li>chef generate cookbook &#8211; ANS<\/li><\/ul>\n\n\n\n<p><strong>Which of these commands directs Test Kitchen to add a temporary environment?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>kitchen make<\/li><li>kitchen create &#8211; ANS<\/li><li>kitchen build<\/li><\/ul>\n\n\n\n<p><strong>The kitchen converge command:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Runs chef-client on the instance. &#8211; ANS<\/li><li>Runs automated tests on the instance.<\/li><li>Downloads the latest version of the provisioner.<\/li><\/ul>\n\n\n\n<p><strong>Which command gets rid of unwanted instances?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>kitchen delete<\/li><li>kitchen clean<\/li><li>kitchen destroy &#8211; ANS<\/li><\/ul>\n\n\n\n<p><strong>What is the advantage to using Test Kitchen?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>You can find problems earlier in the development process. &#8211; ANS<\/li><li>It&#8217;s an alternative to using a testing environment in the deployment pipeline.<\/li><li>It&#8217;s an alternative to using another testing framework such as Bats or InSpec.<\/li><\/ul>\n\n\n\n<p><strong>You&#8217;ve fixed an error in your cookbook and want to rerun it using Test Kitchen. Which command do you use?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>kitchen converge &#8211; ANS<\/li><li>kitchen verify<\/li><li>kitchen repair<\/li><\/ul>\n\n\n<div class=\"epyt-gallery\" data-currpage=\"1\" id=\"epyt_gallery_77205\"><iframe loading=\"lazy\"  id=\"_ytid_84402\"  width=\"760\" height=\"427\"  data-origwidth=\"760\" data-origheight=\"427\" src=\"https:\/\/www.youtube.com\/embed\/?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  data-epytgalleryid=\"epyt_gallery_77205\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe><div class=\"epyt-gallery-list\"><div>Sorry, there was a YouTube error.<\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>What is a resource? Read-only data identified by a type and a name. A description of some piece of a system and its desired state. &#8211; ANS An ordered series&#8230; <\/p>\n","protected":false},"author":1,"featured_media":8313,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[88],"tags":[],"class_list":["post-8303","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-chef"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/8303","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=8303"}],"version-history":[{"count":2,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/8303\/revisions"}],"predecessor-version":[{"id":25223,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/8303\/revisions\/25223"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/8313"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=8303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=8303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=8303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}