<?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>Chef commands line Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/chef-commands-line/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/chef-commands-line/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Sat, 27 Feb 2021 09:50:37 +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>Chef Commands Line Reference &#124; Chef Commands Line Guide &#124; Cheatsheet</title>
		<link>https://www.scmgalaxy.com/tutorials/chef-commands-line-reference/</link>
					<comments>https://www.scmgalaxy.com/tutorials/chef-commands-line-reference/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Sun, 20 Sep 2015 09:17:05 +0000</pubDate>
				<category><![CDATA[Chef]]></category>
		<category><![CDATA[CheatSheet]]></category>
		<category><![CDATA[Chef commands]]></category>
		<category><![CDATA[Chef commands Guide]]></category>
		<category><![CDATA[Chef commands line]]></category>
		<category><![CDATA[Chef commands line Guide]]></category>
		<category><![CDATA[Chef commands line help]]></category>
		<category><![CDATA[Chef commands line reference]]></category>
		<category><![CDATA[Chef commands line Tutorial]]></category>
		<category><![CDATA[Chef commands reference]]></category>
		<category><![CDATA[Chef commands Tutorials]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[Command line]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2015/09/20/chef-commands-line-reference/</guid>

					<description><![CDATA[<p>To run single recipe using chef-solo &#62; chef-solo -c /opt/chef/repo/config/solo.rb -o my_cookbook::recipe To run the single reciepe in same machine [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/chef-commands-line-reference/">Chef Commands Line Reference | Chef Commands Line Guide | Cheatsheet</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-3356 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/09/chef-commands-line-referenc.png" alt="chef-commands-line-reference" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/09/chef-commands-line-referenc.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/09/chef-commands-line-referenc-300x200.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></p>
<p><strong>To run single recipe using chef-solo</strong></p>
<pre><code>&gt; chef-solo -c /opt/chef/repo/config/solo.rb -o my_cookbook::recipe</code></pre>
<p><strong>To run the single reciepe in same machine</strong></p>
<p>&gt; chef-apply hello.rb</p>
<p><strong>To generate the cookbook standard structure</strong></p>
<pre>&gt; chef generate cookbook learn_chef_httpd</pre>
<pre>&gt; knife cookbook create smartmontools -r md</pre>
<p><strong>To generate the template file in cookbook</strong></p>
<pre>&gt; chef generate template learn_chef_httpd index.html</pre>
<p><strong>To run the cookbook in local mode</strong></p>
<pre>&gt; sudo chef-client --local-mode --runlist ‘recipe[learn_chef_httpd]’</pre>
<pre></pre>
<p><strong>To download the cookbooks from market place</strong></p>
<pre>&gt; knife cookbook site download learn_chef_httpd</pre>
<pre>&gt; knife cookbook site install learn_chef_httpd</pre>
<pre></pre>
<p><strong>To Upload the cookbooks to chef server</strong></p>
<pre>&gt; knife cookbook upload learn_chef_httpd</pre>
<pre>&gt; knife cookbook upload -a</pre>
<p><strong>To bootstrap a nodes</strong></p>
<pre>&gt; knife bootstrap {{address}} --ssh-user {{user}} --ssh-password '{{password}}' --sudo --use-sudo-password --node-name node1 --run-list 'recipe[learn_chef_apache2]'</pre>
<pre>&gt; knife bootstrap uvo1t75faaktzc532w6.vm.cld.sr -x root -P Br356YS0iy –sudo –node-name firefox</pre>
<pre>&gt; knife bootstrap 123.45.6.789 -x username -P password –sudo</pre>
<pre></pre>
<p><strong>To see the list of nodes</strong></p>
<pre>&gt;knife node list</pre>
<p><strong>To edit the node run list</strong></p>
<pre>&gt; knife node edit name_of_node</pre>
<p><strong>To see the info about each nodes</strong></p>
<pre>&gt; knife node show node1</pre>
<p><strong>Run the cooksbooks on nodes</strong></p>
<pre>&gt; knife ssh {{address}} 'sudo chef-client' --manual-list --ssh-user {{user}} --ssh-password '{{password}}'</pre>
<pre>&gt; ssh username@ipadddress -i mycredentials.pem sudo chef-client</pre>
<p><strong>To add the run list to the nodes.</strong></p>
<pre>knife node run_list add C2445575914.domain 'recipe[hptrain]'</pre>
<pre>knife node run_list set test-node '''recipe[iptables]''' [Windows - Powershell]</pre>
<pre>knife node run_list set test-node 'recipe[iptables]' [Windows - Command]</pre>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/chef-commands-line-reference/">Chef Commands Line Reference | Chef Commands Line Guide | Cheatsheet</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/chef-commands-line-reference/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
