<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Cookbooks Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/cookbooks/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/cookbooks/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Tue, 13 Jul 2021 14:46:06 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>week6 &#8211; Community cookbooks and further resources</title>
		<link>https://www.scmgalaxy.com/tutorials/week6-community-cookbooks-and-further-resources/</link>
					<comments>https://www.scmgalaxy.com/tutorials/week6-community-cookbooks-and-further-resources/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Tue, 09 Jan 2018 12:12:01 +0000</pubDate>
				<category><![CDATA[Chef]]></category>
		<category><![CDATA[Cookbooks]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=4727</guid>

					<description><![CDATA[<p>Community cookbooks and further resources week6 &#8211; Community cookbooks and further resources</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/week6-community-cookbooks-and-further-resources/">week6 &#8211; Community cookbooks and further resources</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Community cookbooks and further resources</p>
<p><strong><a href="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2018/01/week6-Community-cookbooks-and-further-resources.pdf">week6 &#8211; Community cookbooks and further resources</a></strong></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/week6-community-cookbooks-and-further-resources/">week6 &#8211; Community cookbooks and further resources</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/week6-community-cookbooks-and-further-resources/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Write 10 Chef Cookbooks to test your chef programming skills</title>
		<link>https://www.scmgalaxy.com/tutorials/write-10-chef-cookbooks-to-test-your-chef-programming-skills/</link>
					<comments>https://www.scmgalaxy.com/tutorials/write-10-chef-cookbooks-to-test-your-chef-programming-skills/#comments</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Mon, 27 Feb 2017 18:48:58 +0000</pubDate>
				<category><![CDATA[Chef]]></category>
		<category><![CDATA[Chef cookbook]]></category>
		<category><![CDATA[Chef programming]]></category>
		<category><![CDATA[Chef programming skills]]></category>
		<category><![CDATA[Chef programming test]]></category>
		<category><![CDATA[Chef recipe]]></category>
		<category><![CDATA[Cookbooks]]></category>
		<category><![CDATA[Skills]]></category>
		<category><![CDATA[Test]]></category>
		<category><![CDATA[Write]]></category>
		<category><![CDATA[Write chef cookbooks]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2017/02/27/write-10-chef-cookbooks-to-test-your-chef-programming-skills/</guid>

					<description><![CDATA[<p>Write a cookbook using you can install apache http server in CentOs and Ubuntu, enable the services and start the [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/write-10-chef-cookbooks-to-test-your-chef-programming-skills/">Write 10 Chef Cookbooks to test your chef programming skills</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h3><img fetchpriority="high" decoding="async" class="aligncenter wp-image-3004 size-full" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/02/10-chef-cookbooks-to-test-y.png" alt="chef-cookbooks-to-test-your-chef-programming-skills" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/02/10-chef-cookbooks-to-test-y.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/02/10-chef-cookbooks-to-test-y-300x200.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></h3>
<ol>
<li>
<h3>Write a cookbook using you can install apache http server in CentOs and Ubuntu, enable the services and start the service.</h3>
</li>
<li>
<h3>Write a recipe using template resources to create a file, but only if an attribute has a specific value.</h3>
</li>
<li>
<h3>Write a recipe to create a file using a string, but not if “/etc/passwd” exists?</h3>
</li>
<li>
<h3>Write a cookbook to unzip a file, and then move a files from one location to another using batch, bash chef resources?</h3>
</li>
<li>
<h3>Create a role and assign any two cookbooks to role and setup a 2 nodes assigned to role and conerse the role.</h3>
</li>
<li>
<h3>Write a cookbook using install version of latest tomcat and deploy jenkins.war files into war.</h3>
</li>
<li>
<h3>Write a 4 cookbooks php, mysql, apache and webapp respectively and map a dependency between them and install a sample web application.</h3>
</li>
<li>
<h3>Write a cookbook to install git, wget, zip in RHEL and Ubuntu.</h3>
</li>
<li>
<h3>Write a cookbook in which create a file using a string, but only if “/etc/passwd” exists</h3>
</li>
<li>
<h3>Write a coobook to run a batch file that unzips and then moves files from one location to another.</h3>
</li>
</ol>
<h3></h3>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/write-10-chef-cookbooks-to-test-your-chef-programming-skills/">Write 10 Chef Cookbooks to test your chef programming skills</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/write-10-chef-cookbooks-to-test-your-chef-programming-skills/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Write 10 Chef Cookbooks to test your chef programming skills</title>
		<link>https://www.scmgalaxy.com/tutorials/write-10-chef-cookbooks-to-test-your-chef-programming-skills-2/</link>
					<comments>https://www.scmgalaxy.com/tutorials/write-10-chef-cookbooks-to-test-your-chef-programming-skills-2/#comments</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Mon, 27 Feb 2017 18:48:58 +0000</pubDate>
				<category><![CDATA[Chef]]></category>
		<category><![CDATA[Chef cookbook]]></category>
		<category><![CDATA[Chef programming]]></category>
		<category><![CDATA[Chef programming skills]]></category>
		<category><![CDATA[Chef programming test]]></category>
		<category><![CDATA[Chef recipe]]></category>
		<category><![CDATA[Cookbooks]]></category>
		<category><![CDATA[Skills]]></category>
		<category><![CDATA[Test]]></category>
		<category><![CDATA[Write]]></category>
		<category><![CDATA[Write chef cookbooks]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2017/02/27/write-10-chef-cookbooks-to-test-your-chef-programming-skills-2/</guid>

					<description><![CDATA[<p>Write a cookbook using you can install apache http server in CentOs and Ubuntu, enable the services and start the [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/write-10-chef-cookbooks-to-test-your-chef-programming-skills-2/">Write 10 Chef Cookbooks to test your chef programming skills</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img decoding="async" class="aligncenter wp-image-3024 size-full" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/02/write-10-chef-cookbooks-to-.png" alt="chef-cookbooks" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/02/write-10-chef-cookbooks-to-.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/02/write-10-chef-cookbooks-to--300x200.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></p>
<ol>
<li>Write a cookbook using you can install apache http server in CentOs and Ubuntu, enable the services and start the service.</li>
<li>Write a recipe using template resources to create a file, but only if an attribute has a specific value.
<ol>
<li>Write a recipe to create a file using a string, but not if “/etc/passwd” exists?</li>
</ol>
</li>
<li>Write a cookbook to unzip a file, and then move a files from one location to another using batch, bash chef resources?</li>
<li>Create a role and assign any two cookbooks to role and setup a 2 nodes assigned to role and conerse the role.</li>
<li>Write a cookbook using install version of latest tomcat and deploy jenkins.war files into war.</li>
<li>Write a 4 cookbooks php, mysql, apache and webapp respectively and map a dependency between them and install a sample web application.</li>
<li>Write a cookbook to install git, wget, zip in RHEL and Ubuntu.</li>
<li>Write a cookbook in which create a file using a string, but only if “/etc/passwd” exists</li>
<li>Write a coobook to run a batch file that unzips and then moves files from one location to another.</li>
</ol>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/write-10-chef-cookbooks-to-test-your-chef-programming-skills-2/">Write 10 Chef Cookbooks to test your chef programming skills</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/write-10-chef-cookbooks-to-test-your-chef-programming-skills-2/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Chef &#8211; Documenting Cookbooks automatically</title>
		<link>https://www.scmgalaxy.com/tutorials/chef-documenting-cookbooks-automatically/</link>
					<comments>https://www.scmgalaxy.com/tutorials/chef-documenting-cookbooks-automatically/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Tue, 18 Aug 2015 16:20:57 +0000</pubDate>
				<category><![CDATA[Chef]]></category>
		<category><![CDATA[Auto]]></category>
		<category><![CDATA[Automate]]></category>
		<category><![CDATA[Automatically]]></category>
		<category><![CDATA[Automation]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Chef cookbook]]></category>
		<category><![CDATA[Chef cookbook documentation]]></category>
		<category><![CDATA[Chef Guide]]></category>
		<category><![CDATA[Chef Tutorial]]></category>
		<category><![CDATA[Cookbooks]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[Documenting Cookbooks]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2015/08/18/chef-documenting-cookbooks-automatically/</guid>

					<description><![CDATA[<p>Problems Area &#8211; Our infrastructure has many cookbooks that aim to be reusable, primarily through encapsulating behaviour in LWRPs. This [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/chef-documenting-cookbooks-automatically/">Chef &#8211; Documenting Cookbooks automatically</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img decoding="async" class="alignnone size-full wp-image-3444 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/08/chef-documenting-cookbooks.png" alt="chef-documenting-cookbooks" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/08/chef-documenting-cookbooks.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/08/chef-documenting-cookbooks-300x200.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></p>
<p><strong>Problems Area &#8211;</strong></p>
<p>Our infrastructure has many cookbooks that aim to be reusable, primarily through encapsulating behaviour in LWRPs. This led to an explosion of LWRPs and sometimes the documentation didn&#8217;t keep up or did just not exist.</p>
<p><strong>Solution 1: Follow Best Practices </strong></p>
<p>This command will create a README.rdoc by default, and I prefer <a href="https://www.collectiveray.com/markdown-cheat-sheet">Markdown</a>, so I specify the -r md option.</p>
<pre>&gt; knife cookbook create smartmontools -r md</pre>
<p><strong>Solution 2: Automate using plugins</strong></p>
<p>README.md which should be generated automatcially must contain information about the recipes, attributes, platform compatibility and cookbook requirements (i.e. depends, recommends, suggests etc).</p>
<p>Mathias Lafeldt wrote a knife plugin that generates an initial README.md from the metadata.rb file in a a cookbook.</p>
<p>Link &#8211;</p>
<ul>
<li><a href="https://github.com/mlafeldt/knife-cookbook-readme">https://github.com/mlafeldt/knife-cookbook-readme</a></li>
<li><a href="http://mlafeldt.github.io/knife-cookbook-readme/">http://mlafeldt.github.io/knife-cookbook-readme/</a></li>
</ul>
<p>Extension of Mathias Lafeldt was done here with regenerate README.md from the cookbook source code</p>
<ul>
<li><a href="https://github.com/realityforge/knife-cookbook-doc">https://github.com/realityforge/knife-cookbook-doc</a></li>
</ul>
<p><strong>Please refer these useful blogs as well which is referenced in order to write this article&#8230;</strong></p>
<ul>
<li><a href="http://realityforge.org/code/2013/04/01/documenting-cookbooks.html">http://realityforge.org/code/2013/04/01/documenting-cookbooks.html</a></li>
</ul>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/chef-documenting-cookbooks-automatically/">Chef &#8211; Documenting Cookbooks automatically</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/chef-documenting-cookbooks-automatically/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Know about metadata.rb and metadata.json in Chef</title>
		<link>https://www.scmgalaxy.com/tutorials/know-about-metadata-rb-and-metadata-json-in-chef/</link>
					<comments>https://www.scmgalaxy.com/tutorials/know-about-metadata-rb-and-metadata-json-in-chef/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Tue, 18 Aug 2015 15:52:08 +0000</pubDate>
				<category><![CDATA[Chef]]></category>
		<category><![CDATA[Chef cookbooks]]></category>
		<category><![CDATA[Chef Guide]]></category>
		<category><![CDATA[Chef Tutorials]]></category>
		<category><![CDATA[Cookbooks]]></category>
		<category><![CDATA[Metadata]]></category>
		<category><![CDATA[Metadata in chef]]></category>
		<category><![CDATA[metadata.json]]></category>
		<category><![CDATA[metadata.rb]]></category>
		<category><![CDATA[What]]></category>
		<category><![CDATA[What is metadata.json]]></category>
		<category><![CDATA[What is metadata.rb]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2015/08/18/know-about-metadata-rb-and-metadata-json-in-chef/</guid>

					<description><![CDATA[<p>What is Metadata in chef? In order to understand cookbooks without evaluating them every files, we generate metadata about cookbooks [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/know-about-metadata-rb-and-metadata-json-in-chef/">Know about metadata.rb and metadata.json in Chef</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-3446 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/08/metadata-rb-and-metadata-js.png" alt="metadata-rb-and-metadata-json-in-chef" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/08/metadata-rb-and-metadata-js.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/08/metadata-rb-and-metadata-js-300x200.png 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></p>
<p><strong>What is Metadata in chef?</strong></p>
<p>In order to understand cookbooks without evaluating them every files, we generate metadata about cookbooks</p>
<p><strong>What is metadata.rb?</strong></p>
<p>Before unerstanding about metadata.json, we need to understand about metadata.rb.</p>
<p>Every cookbook requires a small amount of metadata. Metadata is stored in a file called metadata.rb that lives at the top of each cookbook’s directory. The contents of the metadata.rb file provides hints to the Chef server so that cookbooks are deployed to each node correctly.</p>
<p>A metadata.rb file is never interpreted directly. Rather, the metadata.rb file provides a simple location to store and edit data that is then compiled by the Chef server and stored as JSON data.</p>
<p>Metadata is compiled whenever &#8230;.</p>
<p>1. a cookbook is uploaded to the Chef server or</p>
<p>2. when the knife cookbook metadata subcommand is run. knife creates a metadata.rb file automatically whenever the knife cookbook create subcommand is run.</p>
<p><strong>metadata.json</strong></p>
<p>metadata.json is generated from metadata.rb. to generate or regenerate the Chef cookbook metadata, which creates a new &#8216;metadata.json&#8217; file from the &#8216;metadata.rb&#8217; file.</p>
<p>From the command line of your Chef development server, enter the following command:</p>
<p># knife cookbook metadata my-cookbook -o &lt;COOKBOOK_PATH&gt;</p>
<p>Example:  # knife cookbook metadata my-cookbook-name -o /opt/development/cookbooks/</p>
<p>A metadata.json file can be edited directly, should temporary changes be required. Any subsequent upload or action that generates metadata will cause the existing metadata.json file to be overwritten with the newly generated metadata. Therefore, any permanent change to metadata that is required should only be made in the metadata.rb file.</p>
<p><strong>What if metadata.rb and metadata.json both are present in cookbooks?</strong></p>
<p>If a cookbook contains both a metadata.rb and metadata.json at cookbook load time, the metadata.rb will be preferred. This should be swapped around to ensure that dynamically built metadata which has been compiled is read properly without error.</p>
<p>knife cookbook upload reads metadata.rb and ignores metadata.json. It generates the data from the .rb file, and uploads that. It does not create a metadata.json file, on disk or in the cookbook itself&#8211;this is just metadata in the cookbook object.</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/know-about-metadata-rb-and-metadata-json-in-chef/">Know about metadata.rb and metadata.json in Chef</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/know-about-metadata-rb-and-metadata-json-in-chef/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
