{"id":8291,"date":"2022-06-01T04:02:27","date_gmt":"2022-06-01T04:02:27","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=8291"},"modified":"2022-12-23T05:52:50","modified_gmt":"2022-12-23T05:52:50","slug":"example-of-chef-recipe-program","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/example-of-chef-recipe-program\/","title":{"rendered":"Chef Tutorials: Example of Chef Recipe Program"},"content":{"rendered":"\n<p><strong>What is Chef Recipe?<\/strong><\/p>\n\n\n\n<p>A recipe is the most fundamental configuration element within the organization. A recipe:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Is authored using Ruby, which is a programming language designed to read and behave in a predictable manner<\/li>\n\n\n\n<li>Is mostly a collection of&nbsp;<a href=\"https:\/\/docs.chef.io\/resources\/\" target=\"_blank\" rel=\"noopener\">resources<\/a>, defined using patterns (resource names, attribute-value pairs, and actions); helper code is added around this using Ruby, when needed<\/li>\n\n\n\n<li>Must define everything that is required to configure part of a system<\/li>\n\n\n\n<li>Must be stored in a cookbook<\/li>\n\n\n\n<li>May be included in another recipe<\/li>\n\n\n\n<li>May use the results of a search query and read the contents of a data bag (including an encrypted data bag)<\/li>\n\n\n\n<li>May have a dependency on one (or more) recipes<\/li>\n\n\n\n<li>Must be added to a run-list before it can be used by Chef Infra Client<\/li>\n\n\n\n<li>Is always executed in the same order as listed in a run-list<\/li>\n<\/ul>\n\n\n\n<script src=\"https:\/\/gist.github.com\/devops-school\/430dc4a0099e511dadeade804a1ce134.js\"><\/script>\n\n\n<div class=\"epyt-gallery\" data-currpage=\"1\" id=\"epyt_gallery_59116\"><iframe loading=\"lazy\"  id=\"_ytid_30282\"  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_59116\"  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 Chef Recipe? A recipe is the most fundamental configuration element within the organization. A recipe:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[88],"tags":[],"class_list":["post-8291","post","type-post","status-publish","format-standard","hentry","category-chef"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/8291","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=8291"}],"version-history":[{"count":4,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/8291\/revisions"}],"predecessor-version":[{"id":31821,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/8291\/revisions\/31821"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=8291"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=8291"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=8291"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}