<?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>provision Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/provision/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/provision/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Sat, 27 Feb 2021 09:50:25 +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 solo &#124; Chef solo Tutorial &#124; Chef solo Guide</title>
		<link>https://www.scmgalaxy.com/tutorials/chef-solo/</link>
					<comments>https://www.scmgalaxy.com/tutorials/chef-solo/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Tue, 10 Nov 2015 23:33:51 +0000</pubDate>
				<category><![CDATA[Chef]]></category>
		<category><![CDATA[Chef Solo]]></category>
		<category><![CDATA[Chef solo Guide]]></category>
		<category><![CDATA[Chef Solo Setup]]></category>
		<category><![CDATA[Chef solo Tutorial]]></category>
		<category><![CDATA[provision]]></category>
		<category><![CDATA[Solo]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2015/11/10/chef-solo/</guid>

					<description><![CDATA[<p>Install chef ============ &#62; curl -L https://www.opscode.com/chef/install.sh &#124; bash Check ===== &#62; chef-solo -v Setup chef repository ===================== &#62; wget [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/chef-solo/">Chef solo | Chef solo Tutorial | Chef solo Guide</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-3101 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/11/chef-solo.png" alt="chef-solo" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/11/chef-solo.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/11/chef-solo-300x200.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></div>
<div><strong>Install chef</strong></div>
<div>============</div>
<div>&gt; curl -L https://www.opscode.com/chef/install.sh | bash</div>
<div></div>
<div><strong>Check</strong></div>
<div>=====</div>
<div>&gt; chef-solo -v</div>
<div></div>
<div>Setup chef repository</div>
<div>=====================</div>
<div>&gt; wget http://github.com/opscode/chef-repo/tarball/master</div>
<div></div>
<div>&gt; tar zxvf master</div>
<div></div>
<div>&gt; mv opscode-chef-repo-f9d4b0c/ chef-repo</div>
<div></div>
<div>&gt;ls chef-repo/</div>
<div></div>
<div><strong>Create .chef directory inside chef-repo</strong></div>
<div>=======================================</div>
<div>&gt; mkdir chef-repo/.chef</div>
<div></div>
<div>Setup a local cookbook path</div>
<div>===========================</div>
<div></div>
<div>&gt; vi chef-repo/.chef/knife.rb</div>
<div>cookbook_path [ &#8216;/root/chef-repo/cookbooks&#8217; ]</div>
<div></div>
<div><strong>Create your first cookbook</strong></div>
<div>==========================</div>
<div></div>
<div>&gt; knife cookbook create ntp</div>
<div></div>
<div><strong>Writing your first recipe</strong></div>
<div>=========================</div>
<div>&gt; vi chef-repo/cookbooks/ntp/recipes/default.rb</div>
<div></div>
<div>package &#8216;ntp&#8217;</div>
<div></div>
<div><strong>Now configure your server using chef-solo</strong></div>
<div>=========================================</div>
<div>&gt; vi chef-repo/solo.rb</div>
<div></div>
<div>file_cache_path &#8220;/root/chef-solo&#8221;</div>
<div>cookbook_path &#8220;/root/chef-repo/cookbooks&#8221;</div>
<div></div>
<div>&gt; vi web.json</div>
<div></div>
<div>{</div>
<div>&#8220;run_list&#8221;: [ &#8220;recipe[ntp]&#8221; ]</div>
<div>}</div>
<div></div>
<div><strong>Ensure ntp is not installed</strong></div>
<div>===========================</div>
<div>&gt; yum remove -y ntp</div>
<div></div>
<div><strong>Use chef-solo to configure your server</strong></div>
<div>=====================================</div>
<div></div>
<div>&gt; chef-solo -c chef-repo/solo.rb -j chef-repo/web.json</div>
<div></div>
<div><strong>Confirm ntp is installed</strong></div>
<div>========================</div>
<div>&gt; yum info ntp</div>
<div></div>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/chef-solo/">Chef solo | Chef solo Tutorial | Chef solo Guide</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/chef-solo/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Provision a AWS ec2 vm using chef &#124; Step by Step Guide &#124; AWS ec2 vm Tutorial</title>
		<link>https://www.scmgalaxy.com/tutorials/provision-a-aws-ec2-vm-using-chef/</link>
					<comments>https://www.scmgalaxy.com/tutorials/provision-a-aws-ec2-vm-using-chef/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Tue, 27 Oct 2015 01:33:54 +0000</pubDate>
				<category><![CDATA[Amazon (Elastic Cloud)]]></category>
		<category><![CDATA[Chef]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[AWS ec2]]></category>
		<category><![CDATA[AWS ec2 vm]]></category>
		<category><![CDATA[AWS ec2 vm Guide]]></category>
		<category><![CDATA[AWS ec2 vm Tutorial]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[How]]></category>
		<category><![CDATA[How to Provision a AWS ec2 vm]]></category>
		<category><![CDATA[Process]]></category>
		<category><![CDATA[provision]]></category>
		<category><![CDATA[Provision a AWS ec2 vm using chef]]></category>
		<category><![CDATA[Provision a AWS ec2 vm using chef Tutorials]]></category>
		<category><![CDATA[Provisioning AWS ec2 vm]]></category>
		<category><![CDATA[Steps]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Virtual machine]]></category>
		<category><![CDATA[VM]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2015/10/27/provision-a-aws-ec2-vm-using-chef/</guid>

					<description><![CDATA[<p>Provision a AWS ec2 vm using chef Step 1: Install chefdk Step 2: Setup AWS Credentails Step X: Setup your [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/provision-a-aws-ec2-vm-using-chef/">Provision a AWS ec2 vm using chef | Step by Step Guide | AWS ec2 vm Tutorial</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-3108 size-full" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/10/provision-a-aws-ec2-vm-usin.png" alt="provision-a-aws-ec2-vm-using-chef" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/10/provision-a-aws-ec2-vm-usin.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/10/provision-a-aws-ec2-vm-usin-300x200.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></p>
<p>Provision a AWS ec2 vm using chef</p>
<p><strong>Step 1: <a href="tutorials/how-to-install-chefdk-in-rhel-ubantu-mac-and-windows" target="_blank" rel="noopener">Install chefdk</a></strong></p>
<p><strong>Step 2: <a href="tutorials/setup-aws-credentails-using-aws-command-line-interface" target="_blank" rel="noopener">Setup AWS Credentails</a></strong></p>
<p><strong>Step X: <a href="tutorials/configure-the-knife-command" target="_blank" rel="noopener">Setup your knife config</a></strong></p>
<p>Step X: Make sure following is set and exported in env.</p>
<p>&nbsp;</p>
<pre style="margin-top: 0px; margin-bottom: 2.1em; padding: 0.8em 1em; border: 1px solid #05232b; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; border-radius: 0.4em; color: #93a1a1; overflow: auto; background: url('http://jtimberman.housepub.org/images/noise.png?1423629076') 0% 0% #002b36;"><code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; vertical-align: baseline;">AWS_ACCESS_KEY_ID=secrets AWS_SECRET_ACCESS_KEY=secrets AWS_DEFAULT_REGION=us-east-1 AWS_SSH_KEY=your_ssh_key_name AWS_ACCESS_KEY=secrets AWS_SECRET_KEY=secrets</code></pre>
<p>&nbsp;</p>
<pre style="margin-top: 0px; margin-bottom: 2.1em; padding: 0.8em 1em; border: 1px solid #05232b; font-stretch: inherit; line-height: 1.45em; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; vertical-align: baseline; box-shadow: rgba(0, 0, 0, 0.0588235) 0px 0px 10px; border-radius: 0.4em; color: #93a1a1; overflow: auto; background: url('http://jtimberman.housepub.org/images/noise.png?1423629076') 0% 0% #002b36;"><code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; vertical-align: baseline;"></code></pre>
<p><strong>Step 3: Genrate a new repository using the chef generate command</strong><strong><a href="scm/configuration-management-tools/setup-aws-credentails-using-aws-command-line-interface.html" target="_blank" rel="noopener"><br />
</a></strong></p>
<p>&gt; chef generate repo chefdk-provision-demo<br />
&gt; cd chefdk-provision-demo</p>
<p><strong>Step 4: Generate a provision cookbook. This is the required name, and it must be in the current directory.</strong><br />
&gt; chef generate cookbook provision</p>
<p><strong>Step 5: Edit the default recipe, $EDITOR provision/recipes/default.rb with following code&#8230;</strong></p>
<pre>context = ChefDK::ProvisioningData.context with_driver 'aws::us-west-2' options = { ssh_username: 'admin', use_private_ip_for_ssh: false, bootstrap_options: { key_name: 'jtimberman', image_id: 'ami-0d5b6c3d', instance_type: 'm3.medium', }, convergence_options: context.convergence_options, } machine context.node_name do machine_options options action context.action converge true end</pre>
<p>Understand the code:<br />
&gt; To break this down, first we get the ChefDK provisioning context that will pass in options to chef-provisioning.<br />
&gt; Then we tell chef-provisioning to use the AWS driver, and in the us-west-2 region.<br />
&gt; The options hash is used to setup the instance.<br />
&gt; We’re using Debian 8, which uses the admin user to log in, an SSH key that exists in the AWS region, the actual AMI, and finally the instance type.<br />
&gt; Then, we’re going to set the convergence options automatically from ChefDK. This is the important part that will ensure the node has the right run list.</p>
<p><strong>Step 6: Generate a Policyfile.rb and And edit its content, $EDITOR Policyfile.rb.</strong><br />
&gt; chef generate policyfile<br />
&gt; vi policyfile.rb</p>
<pre>name            "chefdk-provision-demo" default_source  :community run_list        "recipe[libuuid-user]" cookbook        "libuuid-user"</pre>
<p>Here we’re simply getting the libuuid-user cookbook from Supermarket and applying the default recipe to the nodes that have this policy.</p>
<p><strong>Step 7: The next step is to install the Policyfile. This generates the Policyfile.lock.json, and downloads the cookbooks to the cache, ~/.chefdk/cache/cookbooks. If this isn’t run, chef will complain, with a reminder to run it.</strong></p>
<p>&gt; chef install</p>
<p>Step 8: Finally, we can provision a testing system with this policy:</p>
<p>&gt; chef provision testing &#8211;sync -n debian-libuuid</p>
<p><strong>Reference:</strong><br />
<a href="http://jtimberman.housepub.org/blog/2015/05/15/quick-tip-chefdk-provision/" target="_blank" rel="noopener">http://jtimberman.housepub.org/blog/2015/05/15/quick-tip-chefdk-provision/</a></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/provision-a-aws-ec2-vm-using-chef/">Provision a AWS ec2 vm using chef | Step by Step Guide | AWS ec2 vm Tutorial</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/provision-a-aws-ec2-vm-using-chef/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
