<?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>Crunch Tools</title>
	<atom:link href="http://crunchtools.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://crunchtools.com</link>
	<description></description>
	<lastBuildDate>Wed, 01 May 2013 16:28:11 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Learning Django with OpenShift</title>
		<link>http://crunchtools.com/django-openshift/</link>
		<comments>http://crunchtools.com/django-openshift/#comments</comments>
		<pubDate>Wed, 01 May 2013 02:24:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[Open Source Software]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Work Flow]]></category>

		<guid isPermaLink="false">http://crunchtools.com/?p=2833</guid>
		<description><![CDATA[Background The goal of this article is use the OpenShift Platform as a Service (PaaS) as a learning platform for Django. Most of the technical articles out there about running Django on OpenShift assume the user already understands how to administer Django environments and projects. This article is written from the perspective of someone who [...]]]></description>
				<content:encoded><![CDATA[<span id="Background"><h2>Background</h2></span>
<p>The goal of this article is use the <a href="https://www.openshift.com">OpenShift</a> Platform as a Service (PaaS) as a learning platform for <a href="https://www.djangoproject.com/">Django</a>. Most of the technical articles out there about running Django on OpenShift assume the user already understands how to administer Django environments and projects. This article is written from the perspective of someone who has done some python programming and wants to learn some Django without doing a bunch of setup work.</p>
<p>Since each <a href="https://www.openshift.com/faq/what-is-a-gear">OpenShift Gear</a> <em>&#8220;&#8230;is a container with a set of resources that allows users to run their applications&#8221;</em>, a user can ssh in to test, troubleshoot, debug and learn. This turns out to be quite convenient for learning Django.</p>
<div class='toc wptoc'>
<h2>Contents</h2>
<ol class='toc-odd level-1'>
	<li>
		<a href="#Background">Background</a>
	</li>
	<li>
		<a href="#Django_Quickstart">Django Quickstart</a>
	</li>
	<li>
		<a href="#Learning_Environment">Learning Environment</a>
	</li>
	<li>
		<a href="#Practice_Workflow">Practice Workflow</a>
	</li>
	<li>
		<a href="#Start_Django_Tutorial">Start Django Tutorial</a>
	</li>
</ol>
</ol>
</div>
<div class='wptoc-end'>&nbsp;</div>
<span id="Django_Quickstart"><h2>Django Quickstart</h2></span>
<p>First, we must deploy and OpenShift application. The deployment is completely automated with the <a href="https://www.openshift.com/quickstarts/django">Django Quickstart</a>. Once completed, the web interface will return all of the connection information necessary for Django, Git, and SSH. Estimate 5 minutes.</p>
<blockquote><p><a href="https://www.openshift.com/quickstarts/django">https://www.openshift.com/quickstarts/django</a> -&gt; Deploy Now</p></blockquote>
<p>&nbsp;</p>
<p><a href="http://crunchtools.com/files/2013/04/Screenshot-Django-Quickstart.png"><img class="alignnone size-full wp-image-2878" alt="Screenshot-Django-Quickstart" src="http://crunchtools.com/files/2013/04/Screenshot-Django-Quickstart.png" width="834" height="577" /></a><br />
&nbsp;</p>
<span id="Learning_Environment"><h2>Learning Environment</h2></span>
<p>Once the application and framework are setup, it&#8217;s time to log in, do some basic configuration, and setup a developer workflow. This will allow us to focus on learning Django.</p>
<p>Use ssh to connect to the OpenShift Gear and setup a few things. Luckily, most of the work is done for you by OpenShift. Use the connection information provided for your Gear when the OpenShift application was created in the last step.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ssh 5179e2c7500446ddb7000023@django-fatherlinux.rhcloud.com</div></div>
<p>&nbsp;</p>
<p>Each OpenShift Gear has a small data directory where your application&#8217;s database is stored. Conveniently, this can also be used for scratch work. Clone your application&#8217;s git repo to your data directory. This is not recommended for a production application, but will allow you to start learning Django from a Mac, Windows, or Linux Desktop without worrying if the correct version of Django is installed locally.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">git clone ~/git/django.git/</div></div>
<p>&nbsp;</p>
<p>Configure a few environmental variables to make your workflow easier</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cd ~/app-root/data/django/wsgi/openshift<br />
echo &quot;cd ~/app-root/data&quot; &amp;gt;&amp;gt; ~/app-root/data/.bash_profile<br />
source $OPENSHIFT_HOMEDIR/python-*/virtenv/bin/activate</div></div>
<p>&nbsp;</p>
<p>Here are a couple of tests to verify that the Django environment is working correctly:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">python -c &quot;import django; print(django.get_version())&quot;</div></div>
<p>&nbsp;</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">python manage.py shell</div></div>
<p>&nbsp;</p>
<span id="Practice_Workflow"><h2>Practice Workflow</h2></span>
<p>Login from scratch and create a new Django Application to get comfortable with the workflow. These are the basic instructions to follow every time you connect to the learning environment. We are doing a couple of things here. First, we are creating the application with the Django admin utility, which creates a new directory. Then we are adding the directory to our git repository and committing the change. Finally, we are pushing the change, at which point, OpenShift will take over and perform all of the necessary steps to make your application live.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ssh 5179e2c7500446ddb7000023@django-fatherlinux.rhcloud.com<br />
source $OPENSHIFT_HOMEDIR/python-*/virtenv/bin/activate</div></div>
<p>&nbsp;</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">python manage.py startapp mytest<br />
git add mytest<br />
git commit mytest -m &quot;Created test application&quot;<br />
git push</div></div>
<p>&nbsp;</p>
<span id="Start_Django_Tutorial"><h2>Start Django Tutorial</h2></span>
<p>The following six part <a href="https://docs.djangoproject.com/en/dev/intro/tutorial01/">Django Tutorial</a> is great, but there are a couple of things to be aware of when working in an OpenShift environment. First, having your git repository checked out in the OpenShift Gear is only a good idea for a learning environment. Second, the portion of the tutorial called <a href="https://docs.djangoproject.com/en/dev/intro/tutorial01/#the-development-server">The development server</a> will not work properly because the Django Quickstart configures and adds the OpenShift components necessary to start the Django application for you.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ssh 5179e2c7500446ddb7000023@django-fatherlinux.rhcloud.com<br />
source $OPENSHIFT_HOMEDIR/python-*/virtenv/bin/activate</div></div>
<p>&nbsp;</p>
<p>Finally, turning debugging on can make running through the tutorial a lot easier</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">vi settings.py</div></div>
<p>&nbsp;</p>
<p>Modify debug statement</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">if ON_OPENSHIFT:<br />
&nbsp; &nbsp; DEBUG = True</div></div>
<p>&nbsp;</p>
<p>Commit and push the changes</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">git commit settings.py -m &quot;Turn on debugging&quot;; git push</div></div>
<p>&nbsp;</p>
<p><a>At this point, you can run through the tutorial, modifying the data model, and interacting with components in the shell, have fun!</a></p>
<p><!--Hours Worked 4.5--></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fcrunchtools.com%2Fdjango-openshift%2F&amp;title=Learning%20Django%20with%20OpenShift" id="wpa2a_2"><img src="http://crunchtools.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://crunchtools.com/django-openshift/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Red Hat Enterprise Linux: Release Speed</title>
		<link>http://crunchtools.com/red-hat-enterprise-linux-release-speed/</link>
		<comments>http://crunchtools.com/red-hat-enterprise-linux-release-speed/#comments</comments>
		<pubDate>Tue, 30 Apr 2013 15:23:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[Free Software]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://crunchtools.com/?p=2409</guid>
		<description><![CDATA[Background Recently, I came across an article entitled: 5 Reasons Not to Use CentOS. While I actually disagree with all five points from a technical debate standpoint, I think this article is really the result of a few pain points that some developers express when talking about enterprise editions of Linux. Working as a technology [...]]]></description>
				<content:encoded><![CDATA[<span id="Background"><h2>Background</h2></span>
<p><P>Recently, I came across an article entitled: <a href="http://dev.curatasite.com/articles/20410/5-reasons-not-to-use-centos/">5 Reasons Not to Use CentOS</a>. While I actually disagree with all five points from a technical debate standpoint, I think this article is really the result of a few pain points that some developers express when talking about enterprise editions of Linux.</p>
<p>Working as a technology evangelist at Red Hat, I attend a multitude of conferences and community events. When speaking with developers, a common concern is that the versions of packages in Red Hat Enterprise Linux (RHEL) and all downstream rebuilds are too old for how fast they need to move to provide value to their business. I believe that in some cases, this is a completely valid concern.</p>
<p>There is the age old struggle between innovation and stability. There are several factors involved in the stability of an Enterprise Linux distribution including release cycle, support lifecycle, library compatibility (API) and binary compatibility (ABI). Obviously, there are trade-offs between stability and having the latest features, some of which I will explore in this article.</p>
<div class='toc wptoc'>
<h2>Contents</h2>
<ol class='toc-odd level-1'>
	<li>
		<a href="#Background">Background</a>
	</li>
	<li>
		<a href="#What_is_Stability">What is Stability?</a>
		<ol class='toc-even level-2'>
			<li>
				<a href="#What_is_the_Release_Cycle">What is the Release Cycle?</a>
			</li>
		</ol>
	<li>
		<a href="#Resolution">Resolution</a>
	</li>
</ol>
</ol>
</div>
<div class='wptoc-end'>&nbsp;</div>
<span id="What_is_Stability"><h2>What is Stability?</h2></span>
<p>There is much more to stability than how many bugs are tracked and resolved over a particular period in time. Both RHEL5 and RHEL6 will be <a href="https://access.redhat.com/support/policy/updates/errata/">supported for 10 years</a> respectively. The total lifecyle of support for the platform is important because, the longer it&#8217;s supported, the more value developers and users can derive from their application software. Their work can continue to provide business value without being derailed by migration and testing on a newer version of the platform.
<p>To provide an example which both developers and users alike can connect with, take Gnome 2. There have been quite a number of users frustrated with Gnome 3; many just don&#8217;t want to use it. This has led to several forks including <a href="https://github.com/linuxmint/Cinnamon">Cinnamon</a> and <a href="http://fedoraproject.org/wiki/Features/MATE-Desktop">MATE</a>. These forks fragment the community, but worse are expensive from a resource perspective. With RHEL6, which is based on Gnome 2, the user is supported until 2020. This means those, that do not want to switch to Gnome 3, have plenty of time. In the case of Gnome 2 vs. Gnome 3, the user is free to find another acceptable desktop or perhaps wait for the next major version to mature, but imagine your business had to support several versions of a major piece of accounting software; how expensive would that be?<br />
<span id="What_is_the_Release_Cycle"><h3>What is the Release Cycle?</h3></span>
<p>To provide a little background, RHEL has a target release of <a href="http://www.networkworld.com/news/2012/051512-red-hat-preps-rhel-7-259314.html?hpg1=bn">every three years</a>, but as with any large software project, release dates often slip. RHEL5 was released <a href="http://en.wikipedia.org/wiki/Development_stage#General_availability_.28GA.29">GA</a> <a href="https://access.redhat.com/support/policy/updates/errata/">March 15, 2007</a> while RHEL6 was released <a href="https://access.redhat.com/support/policy/updates/errata/">November 10, 2010</a>. This was just shy of four years between RHEL5 and RHEL6.</p>
<p>First and foremost, I have no special insight or authority when it comes to the RHEL product release cycle, but during this time there was tremendous change in the Red Hat Linux world. KVM became the hypervisor of choice and it is obvious that plenty of technical resources were dedicated to KVM and Red Hat Enterprise Virtualization. Making these tremendous changes while at the same time providing stability, takes time.</p>
<p>During the time it took to release RHEL6, the version of the packages in RHEL5 began to show their age. As time went on, the desire for newer packages in RHEL5 seemed to become more pronounced. The early adopters had moved on to newer versions of languages, libraries, and frameworks. The early understanders (which I consider myself) even questioned how long the next release was taking.</p>
<p>When RHEL6 was released, the contrapositive appeared true. The desire for newer packages subsided and developers went back to work on creating applications, knowing that the work they created would provide business value for up to ten years. So, how to balance innovation (features) with stability?</p>
<span id="Resolution"><h2>Resolution</h2></span>
<p>Well, I suspect the resolution to the challenge of older packages is a combination of things. First, I think the problem manifests it&#8217;s self most evidently in the versions of languages, frameworks, and libraries in loose order of priority, so I will focus my examples there.</p>
<p>I believe that tighter adherence to the <a href="http://www.networkworld.com/news/2012/051512-red-hat-preps-rhel-7-259314.html?hpg1=bn">3 year release cycle</a> combined with <a href="http://docs.fedoraproject.org/en-US/Fedora_Contributor_Documentation/1/html/Software_Collections_Guide/index.html">Software Collections</a> and the new <a href="http://www.google.com/url?sa=t&#038;rct=j&#038;q=&#038;esrc=s&#038;source=web&#038;cd=5&#038;ved=0CFUQFjAE&#038;url=http%3A%2F%2Fwww.redhat.com%2Fdevelopers%2Frhel%2FRH-DevSubscriptions-DS-US-Web.pdf&#038;ei=WPnLUITCEI600QHaj4GwDw&#038;usg=AFQjCNE2jim21rZGc8xV_K-wciHllw8scg&#038;sig2=DRei_7vFemdHG4x3t9UD6g&#038;bvm=bv.1355325884,d.dmQ&#038;cad=rja">Developer Subscription</a> could help to alleviate the challenge of older versions of Ruby, Python, PHP, Perl, Java, C and C++. </p>
<p>In addition to tighter adherence to the targeted release cycle, as Ruby, Python, PHP, and even MySQL mature, release of major versions of these software packages may slow down. This may be offset by the challenge of newer languages and frameworks such as Node.js, but this is again where <a href="http://developerblog.redhat.com/2013/01/28/software-collections-on-red-hat-enterprise-linux/">Software Collections</a> may play a major role.
<p>Finally, there is a range of use cases especially across <a href="http://en.wikipedia.org/wiki/Vertical_market#Examples">vertical markets</a>. In some markets such as Technology and Media, things will always change quickly, perhaps too quickly for an enterprise distribution of Linux. In my experience, this is the exception and not the rule. In verticals such as Banking, Energy, Manufacturing, Government, Transportation, etc, platform stability combined with some developer discipline on package versions can combine to create applications which provide great business value over a long ROI cycle. This allows developers to focus on creating new application instead of maintaining existing applications.</p>
<p>&nbsp;</p>
<p>Better explanation</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fcrunchtools.com%2Fred-hat-enterprise-linux-release-speed%2F&amp;title=Red%20Hat%20Enterprise%20Linux%3A%20Release%20Speed" id="wpa2a_4"><img src="http://crunchtools.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://crunchtools.com/red-hat-enterprise-linux-release-speed/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CentOS Post Mortem &amp; Analysis</title>
		<link>http://crunchtools.com/centos-post-mortem-analysis/</link>
		<comments>http://crunchtools.com/centos-post-mortem-analysis/#comments</comments>
		<pubDate>Thu, 28 Mar 2013 19:02:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[Analysis]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Centos]]></category>
		<category><![CDATA[Free Software]]></category>
		<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[Mortem]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[Selinux]]></category>
		<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[Work Flow]]></category>

		<guid isPermaLink="false">http://crunchtools.com/?p=2722</guid>
		<description><![CDATA[Background I manage the crunchtools lab and the infrastructure for this blog similar to a development data center. I have a rigorous weekly checklist, which includes optionally applying operating system patches as they are available. I do not perform the updates every week because of time constraints, but when I do, I patch all of [...]]]></description>
				<content:encoded><![CDATA[<span id="Background"><h2>Background</h2></span>
<p>I manage the <a href="http://crunchtools.com/crunchtools-lab-environment/">crunchtools lab</a> and the infrastructure for this blog similar to a development data center. I have a rigorous weekly checklist, which includes optionally applying operating system patches as they are available. I do not perform the updates every week because of time constraints, but when I do, I patch all of the systems. Most of my infrastructure is built on <a href="http://www.redhat.com/products/enterprise-linux/">Red Hat Enterprise Linux</a>, but I run this blog on <a href="https://www.linode.com/">Linode</a> which doesn&#8217;t have an image for Red Hat Enterprise Linux. They have the ability to <a href="http://library.linode.com/custom-instances/custom-distro-howto">create a custom image</a>, but I have continued to use the CentOS build, partially to better understand the differences from a hands on perspective.</p>
<p>Several weeks ago, I patched both the <a href="http://www.centos.org/">CentOS</a> operating system, on which this blog runs, and the other Red Hat Enterprise Linux systems in the crunchtools environment. The latest available patches were applied which caused an Apache web server outage, but only on the CentOS system. Clients could not connect so, I sifted through the system logs, but didn&#8217;t see any AVC denials or messages that indicated the cause of the problem. After some experimentation, I realized that SELinux was blocking access to the web server. The SELinux booleans looked fine, so to return to service as quickly as possible, I temporarily disabled SELinux.</p>
<p>A couple of weeks later, I applied some new patches that were available. To some relief, after applying these new patches and testing SELinux, Apache was able to accept connections again.</p>
<span id="Post_Mortem"><h2>Post Mortem</h2></span>
<span id="Environment_Details"><h3>Environment Details</h3></span>
<ul>
<li><strong>Operating System:</strong> CentOS 6.4</li>
<li><strong>Installation Date:</strong> Tue 12 Jul 2011 11:24:06 AM EDT</li>
<li><strong>Provider:</strong> <a href="www.linode.com">Linode</a></li>
<li><strong>Hardware:</strong> XEN Hypervisor</li>
<li><strong>Repositories:</strong> <a href="http://mirror.centos.org/centos-6/6/">CentOS-6 &#8211; Base</a>, <a href="http://mirror.centos.org/centos-6/6/">CentOS-6 &#8211; Extras</a>, <a href="http://mirror.centos.org/centos-6/6/">CentOS-6 &#8211; Updates</a></li>
<li><strong>Optional Repositories:</strong> <a href="http://mirrors.fedoraproject.org/publiclist/EPEL/6/x86_64/">Extra Packages for Enterprise Linux 6 &#8211; x86_64</a></li>
</ul>
<p>&nbsp;</p>
<span id="Timeline"><h3>Timeline</h3></span>
<p>On February 27th updates were applied, which caused the outage. Though perhaps not the cause, the SELinux policy was updated.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">...Feb 27 08:37:49 Updated: selinux-policy-3.7.19-155.el6_3.14.noarch<br />
Feb 27 08:54:45 Updated: selinux-policy-targeted-3.7.19-155.el6_3.14.noarch</div></div>
<p>&nbsp;</p>
<p>At this point, I spent some time digging through the logs and did not see anything to indicate what was blocking the web server. I restarted the web server and eventually decided to reboot the system. When the system came back up, the web server still couldn&#8217;t be accessed. At this point, even tough there was no indication that SELinux was blocking access to the web server, I disabled it.  As soon as SELinux was disabled, the web server was able to accept connections again.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Feb 27 08:54:10 lance kernel: __ratelimit: 22683 callbacks suppressed<br />
Feb 27 08:54:12 lance nagios: SERVICE ALERT: lance;Basic Web Services;OK;HARD;4;HTTP OK: HTTP/1.1 200 OK - 211 bytes in 9.074 second response time<br />
Feb 27 08:54:12 lance nagios: SERVICE NOTIFICATION: nagiosadmin;lance;Basic Web Services;OK;notify-service-by-email;HTTP OK: HTTP/1.1 200 OK - 211 bytes in 9.074 second response time<br />
Feb 27 08:54:28 lance kernel: __ratelimit: 10011 callbacks suppressed<br />
Feb 27 08:54:45 lance yum[4619]: Updated: selinux-policy-targeted-3.7.19-155.el6_3.14.noarch<br />
Feb 27 08:54:55 lance yum[4619]: Updated: epel-release-6-8.noarch<br />
Feb 27 08:55:04 lance kernel: __ratelimit: 14232 callbacks suppressed<br />
Feb 27 08:55:42 lance nagios: SERVICE ALERT: learn.fatherlinux.com;String Check: learn.fatherlinux.com;CRITICAL;SOFT;1;HTTP CRITICAL - No data received from host<br />
Feb 27 08:55:42 lance nagios: SERVICE ALERT: rt.fatherlinux.com;String Check: rt.fatherlinux.com;CRITICAL;SOFT;1;Connection refused<br />
Feb 27 08:55:56 lance kernel: __ratelimit: 9972 callbacks suppressed<br />
Feb 27 08:56:43 lance nagios: SERVICE ALERT: learn.fatherlinux.com;String Check: learn.fatherlinux.com;CRITICAL;SOFT;2;CRITICAL - Socket timeout after 10 seconds<br />
Feb 27 08:56:52 lance nagios: SERVICE ALERT: rt.fatherlinux.com;String Check: rt.fatherlinux.com;CRITICAL;SOFT;2;CRITICAL - Socket timeout after 10 seconds<br />
Feb 27 08:56:52 lance kernel: __ratelimit: 4161 callbacks suppressed<br />
Feb 27 08:57:04 lance kernel: __ratelimit: 46248 callbacks suppressed<br />
Feb 27 08:57:19 lance kernel: __ratelimit: 8328 callbacks suppressed<br />
Feb 27 08:57:32 lance nagios: SERVICE ALERT: learn.fatherlinux.com;String Check: learn.fatherlinux.com;CRITICAL;SOFT;3;Connection refused<br />
Feb 27 08:57:42 lance nagios: SERVICE ALERT: rt.fatherlinux.com;String Check: rt.fatherlinux.com;CRITICAL;SOFT;3;Connection refused<br />
Feb 27 08:58:26 lance kernel: __ratelimit: 3675 callbacks suppressed<br />
Feb 27 08:58:32 lance nagios: SERVICE ALERT: learn.fatherlinux.com;String Check: learn.fatherlinux.com;CRITICAL;HARD;4;Connection refused<br />
Feb 27 08:58:32 lance nagios: SERVICE NOTIFICATION: nagiosadmin;learn.fatherlinux.com;String Check: learn.fatherlinux.com;CRITICAL;notify-service-by-email;Connection refused<br />
Feb 27 08:58:37 lance init: serial (hvc0) main process (1355) killed by TERM signal<br />
Feb 27 08:58:38 lance nagios: Caught SIGTERM, shutting down...</div></div>
<p>&nbsp;</p>
<p>A couple of weeks later, new patches were applied, which included a new SELinux policy. Once the new policy was installed and I enabled SELinux, the web server was able to accept connections while in enforcing mode</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Mar 12 22:50:23 Updated: selinux-policy-3.7.19-195.el6_4.3.noarch<br />
Mar 12 22:52:34 Updated: selinux-policy-targeted-3.7.19-195.el6_4.3.noarch...</div></div>
<p>&nbsp;</p>
<span id="Analysis"><h2>Analysis</h2></span>
<p>During this strange outage, I decided to analyze some of the core variables which correlated with this outage. </p>
<span id="Updates"><h3>Updates</h3></span>
<p>CentOS and RHEL have significant differences in the way they receive and consume updates. From the log snippets below, it can clearly be seen. The number of patches and the dates on which updates are received are different. Notice, CentOS receives 251 patches when it is updated to CentOS 6.4, while RHEL receives 674 patches.</p>
<p>The number of patches is a key difference. When RHEL 6.4 was released, all of the patches were released together. This is because they were all tested together and sent through a quality assurance (QA) cycle together. When CentOS 6.4 was released, a subset of the RHEL patches were released. This means that, on any given patch cycle, the permutation of patches applied to a CentOS operating system is different than RHEL.</p>
<p>A CentOS user does not inherit all of the testing and QA for a given RHEL release or patch set. Since the CentOS repository provides a different permutation of patches, the CentOS team may have to wait until users report a problem to start fixing issues, such as the web server outage described here. This kind of regression bug could have been caught with some kind of automated testing.</p>
<span id="CentOS"><h4>CentOS</h4></span>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cat /var/log/yum.log| grep &quot;Feb 27&quot; | wc -l<br />
37</div></div>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cat /var/log/yum.log| grep &quot;Mar 12&quot; | wc -l<br />
251</div></div>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cat /var/log/yum.log| grep centos-release<br />
Mar 12 22:49:16 Updated: centos-release-6-4.el6.centos.10.x86_64</div></div>
<p>&nbsp;</p>
<span id="RHEL"><h4>RHEL</h4></span>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cat /var/log/yum.log| grep &quot;Feb 21&quot; | wc -l<br />
674</div></div>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cat /var/log/yum.log| grep &quot;Mar 18&quot; | wc -l<br />
24</div></div>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cat /var/log/yum.log| grep redhat-release<br />
Feb 21 10:30:18 Updated: redhat-release-server-6Server-6.4.0.4.el6.x86_64</div></div>
<p>&nbsp;</p>
<span id="Tests"><h3>Tests</h3></span>
<p> Given that the kind of regression described above could have been caught and fixed with automated testing, I decided to analyze the testing process used for CentOS. As I analyzed the pieces of the CentOS test suite which cover Apache and SELinux, I discovered that one of the contributors, <a href="http://athmane.madjoudj.com/">Athane Madjoudj</a>, contributes to not only CentOS, but also the Fedora test framework. For this discussion, I will focus on the CentOS versions of the test framework. The test components described from the Fedora framework are only mentioned to provide guidance for possible future integration of SELinux coverage into other tests. Integrated SELinux coverage could have prevented the outage described here.</p>
<p>A quick analysis of the tests around Apache and SELinux show some shortcomings in the test coverage, but the infrastructure necessary to test for behavior described in this post mortem is fairly complicated to set up and maintain.</p>
<p>Since CentOS is a community supported operating system, the CentOS test suite focuses heavily on testing installation. CentOS does not have a large number of high level application testing or post installation testing such as verifying configuration options or kernel variable tuning.</p>
<p>In particular, the CentOS test suite contains <em>httpd_php.sh</em> which is a good place to start this analysis. This script does some basic testing, but has some limitations. Notice that the web server is only tested from localhost. This is less than optimal because sometimes user space utility bugs, kernel network, kernel firewall, or other configuration problems can cause a web server to be available to localhost, but prevent access from a remote machine.</p>
<p>Similarly, the <em>SELinux</em> test checks for AVC entries in the log and whether <em>Enforcing</em> mode is enabled. This is only a very high level test which does not provide much coverage.</p>
<p>In contrast, a couple of Fedora tests do have integrated testing of SELinux. For example, the Tuned test script does do some SELinux testing.</p>
<p>&nbsp;</p>
<span id="CentOS_Tests"><h4>CentOS Tests</h4></span>
<ul>
<li><a href="https://gitorious.org/testautomation/t_functional/blobs/master/tests/p_httpd/httpd_php.sh">HTTP/PHP</a></li>
<li><a href="https://gitorious.org/testautomation/t_functional/trees/master/tests/p_selinux">SELinux</a></li>
</ul>
<p>&nbsp;</p>
<span id="Fedora_Tests"><h4>Fedora Tests</h4></span>
<ul>
<li><a href="http://fedoraproject.org/wiki/Category:Test_Cases">List of Test Cases</a></li>
<li><a href="https://fedoraproject.org/wiki/QA:Testcase_Power_Management_selinux">Tuned</a></li>
</ul>
<p>&nbsp;</p>
<span id="Bug_Tracker"><h3>Bug Tracker</h3></span>
<p>As a final step, I thought it would be prudent to check the Bug Trackers for CentOS and Red Hat Enterprise Linux for reported problems with SELinux. I searched for http, 155, and 195; I could not find a bug which correlated with SELinux behavior described in this post mortem.</p>
<p> For a point of reference, I went on to investigate the number of open SELinux bugs. <sup>[<a href="http://crunchtools.com/centos-post-mortem-analysis/#footnote_0_2722" id="identifier_0_2722" class="footnote-link footnote-identifier-link" title="Accessed March 26th, 2013 10:47PM EST">1</a>]</sup> I found that there were 301 open SELinux bugs open for Red Hat Enterprise Linux and 50 open for CentOS.</p>
<p>The difference in bugs could be interpreted in any number of ways. It may be indicative of more RHEL users testing and finding SELinux bugs<sup>[<a href="http://crunchtools.com/centos-post-mortem-analysis/#footnote_1_2722" id="identifier_1_2722" class="footnote-link footnote-identifier-link" title="http://news.cnet.com/8301-13505_3-10312978-16.html">2</a>]</sup>, it might indicate that RHEL has more SELinux bugs, or it might indicate that CentOS patches SELinux bugs faster than RHEL, but that is doubtful.</p>
<ul>
<li><strong>Red Hat Enterprise Linux</strong>: 301 SELinux bugs</li>
<li><strong>CentOS</strong>: 50 SELinux bugs</li>
</ul>
<p><a href="https://bugzilla.redhat.com/buglist.cgi?bug_status=__open__&#038;content=selinux&#038;list_id=1227936&#038;product=Red%20Hat%20Enterprise%20Linux%206&#038;query_format=specific&#038;order=bug_status%20DESC%2Crelevance%20DESC&#038;query_based_on=">Red Hat Enterprise Linux Bugzilla<br />
</a><br />
<a href="http://bugs.centos.org/view_all_bug_page.php">CentOS Bug Tracker</a></p>
<p>&nbsp;</p>
<span id="Conclusions"><h2>Conclusions</h2></span>
<p>In this particular case, CentOS experienced an outage and I could not quickly determine why. After a quick <a href="http://crunchtools.com/centralizing-log-files/">analysis</a> syslog messages and the audit log without finding anything, I attempted a reboot. Apache would still not respond to connections. At this point, I took a guess and just disabled SELinux, which succeeded in allowing Apache to accept connection. At this point, I saved /var/log/yum.log and /var/log/messages so that I could document the outage here.</p>
<p>Several weeks later, I applied available patches bringing the CentOS system to the latest available patches, and SELinux and Apache began working together again. During this time the RHEL servers in the crunchtools environment did not experience the same outage. This is in no way meant to imply that the inverse couldn&#8217;t have happened. I believe it is a is possible that a bug may cause an outage on RHEL but not affect CentOS, because RHEL receives updates first and on any given day, the two bit streams are not the same.</p>
<span id="Additional_Notes:_Development_and_Production"><h2>Additional Notes: Development and Production</h2></span>
<p>While RHEL and other enterprise Linux rebuilds share upstream source code, the binary builds are not completely the same. Temporally, each distribution contains different packages and versions. That is to say, on any given day, hour and minute, a rebuild cannot be the <em>same</em> as RHEL. Although, RHEL and rebuilds such as CentOS share Major and Minor versions, for example 6.4, each contains different permutations of patch sets. This makes them different in critical ways; rebuild distributions do not inherit all of the benefits from the testing and quality assurance (QA) provided by Red Hat. This is also the reason that rebuilds not inherit the same hardware and software certifications from third party vendors such as HP or SAP.</p>
<p>Architects and engineers will sometimes investigate a mixed environment of a rebuild distribution in development, while using RHEL in production. Typically, this architecture is investigated to save on subscription costs in the development environment. This architecture contains several important caveats. Since rebuilds are downstream distributions from RHEL, they can contain bugs that do not exist in RHEL. Using a downstream distribution to build an upstream test environment creates some interesting challenges. </p>
<p>If a bug is found in the test environment, it could be specific to the rebuild. If it is specific to the rebuild, Red Hat support cannot be called to work on a fix. At this point, the operations team will have to work with the community to develop a patch, or even develop a patch themselves. Even if the bug can be reproduced on a RHEL system, the development environment can&#8217;t be patched until Red Hat develops and publishes a patch, and the downstream community rebuilds and distributes it. This could take months and there is no guarantee that the patch will ever be released. Over years, this workflow can create significant <a href="http://martinfowler.com/bliki/TechnicalDebt.html">technical debt</a> for engineers. Technical debt leads to increased cost.</p>
<p>Increased technical debt between testing and production environments can work both ways. This could lead to untested problems in production which were never found or tested in the development environment. It is better to have a homogeneous environment built from either all CentOS or all RHEL. Having a mix, sets the environment up to accrue, at least some, technical debt, which off sets the costs of running RHEL in development.</p>
<p>Specific to the crunchtools environment, the challenge with managing RHEL and a rebuild like CentOS has been determining if they are at the <em>same</em> revision at any given point in time. The way the RHEL repositories are exposed via channels vs. the mechanism of base, extras, and updates in CentOS make it difficult to have a core build and associated update repositories for management of both over time. It becomes tempting to apply RHEL updates from my <a href="http://www.redhat.com/products/enterprise-linux/rhn-satellite/">Satellite</a> server to a CentOS box, but that would clearly defeat the purpose for which most users deploy a rebuild.</p>
<p>As this post mortem attempts to demonstrates, there are differences between RHEL and any rebuild. Installing and supporting multiple distributions between development and production environments creates technical debt. Specific to the crunchtools environment, CentOS and RHEL have different build, test, and release mechanisms. Each distribution supports and manages individual Bug Trackers and completely different support mechanisms. Architects and business analysts should consider these variables when calculating ROI.</p>
<ol class="footnotes"><li id="footnote_0_2722" class="footnote">Accessed March 26th, 2013 10:47PM EST</li><li id="footnote_1_2722" class="footnote">http://news.cnet.com/8301-13505_3-10312978-16.html</li></ol><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fcrunchtools.com%2Fcentos-post-mortem-analysis%2F&amp;title=CentOS%20Post%20Mortem%20%26%20Analysis" id="wpa2a_6"><img src="http://crunchtools.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://crunchtools.com/centos-post-mortem-analysis/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Red Hat Enterprise Virtualization (RHEV) &amp; Identity, Policy, Audit (IPA)</title>
		<link>http://crunchtools.com/rhev-ipa/</link>
		<comments>http://crunchtools.com/rhev-ipa/#comments</comments>
		<pubDate>Tue, 26 Feb 2013 12:27:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[KVM]]></category>
		<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://crunchtools.com/?p=2667</guid>
		<description><![CDATA[Background In my ever evolving lab, it came time to integrate Red Hat Enterprise Linux (RHEV) with Identity, Policy, Audit (IPA).There were a few caveats and searching Google didn&#8217;t help, so hopefully this article can save you some time. Integrating the two was fairly straitforward. The biggest challenge was finding a quick and easy way [...]]]></description>
				<content:encoded><![CDATA[<span id="Background"><h2>Background</h2></span>
<p>In my ever <a href="http://crunchtools.com/crunchtools-lab-environment/">evolving lab</a>, it came time to integrate <a href="https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Virtualization/3.1/html/Administration_Guide/sect-Directory_Users.html">Red Hat Enterprise Linux (RHEV)</a> with <a href="https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Identity_Management_Guide/">Identity, Policy, Audit (IPA).</a>There were a few caveats and searching Google didn&#8217;t help, so hopefully this article can save you some time.</p>
<p> Integrating the two was fairly straitforward. The biggest challenge was finding a quick and easy way to provide reverse DNS. I use an external DNS provider which does not do reverse DNS for internal IP addresses. This article will dig into how to setup a full blown proof of concept without needing an external DNS server to provide reverse DNS.</p>
<p>For those that might need a brief primer on DNS records, the following <a href="http://www.debianhelp.co.uk/dnsrecords.htm">article</a> is excellent.</p>
<p>&nbsp;</p>
<div class='toc wptoc'>
<h2>Contents</h2>
<ol class='toc-odd level-1'>
	<li>
		<a href="#Background">Background</a>
	</li>
	<li>
		<a href="#InstallationConfiguration">Installation/Configuration</a>
		<ol class='toc-even level-2'>
			<li>
				<a href="#Prerequisites">Prerequisites</a>
			</li>
		</ol>
	<li>
		<a href="#Integration_Steps">Integration Steps</a>
		<ol class='toc-even level-2'>
			<li>
				<a href="#Install_Identity_Policy_Audit">Install Identity, Policy, Audit</a>
			</li>
			<li>
				<a href="#Option:_Dnsmasq">Option: Dnsmasq</a>
			</li>
			<li>
				<a href="#Red_Hat_Enterprise_Virtualization_RHEV">Red Hat Enterprise Virtualization (RHEV)</a>
			</li>
		</ol>
	<li>
		<a href="#Troubleshooting">Troubleshooting</a>
		<ol class='toc-even level-2'>
			<li>
				<a href="#Logs">Logs</a>
			</li>
			<li>
				<a href="#Network">Network</a>
			</li>
</ol>
</ol>
</ol>
</div>
<div class='wptoc-end'>&nbsp;</div>
<span id="InstallationConfiguration"><h2>Installation/Configuration</h2></span>
<p>The following items are assumed to be available and working.</p>
<span id="Prerequisites"><h3>Prerequisites</h3></span>
<ul>
<li>Clean Red Hat Enterprise Linux 6.3+ Server</li>
<li>Working forward and reverse DNS (both can be satisfied with dnsmasq, described below)</li>
<li>Fully installed and working Red Hat Enterprise Virtualization (RHEV) environment</li>
</ul>
<p>&nbsp;</p>
<span id="Integration_Steps"><h2>Integration Steps</h2></span>
<ul>
<li>Install IPA on Clean Red Hat Enterprise Linux 6.3+ Server</li>
<li>Option: Install/Configure Dnsmasq on RHEV Server</li>
<li>Configure RHEV Domain</li>
</ul>
<p>&nbsp;</p>
<span id="Install_Identity_Policy_Audit"><h3>Install Identity, Policy, Audit</h3></span>
<p>Option: if an external DNS server is available, the following SRV entries should be added. For those unfamiliar with SRV records, this will allow services such as RHEV or the IPA client to discover the correct Kerberos/LDAP/NTP servers by searching DNS.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">_kerberos-master._tcp &nbsp; SRV 0 100 88 dc.crunchtools.com.<br />
_kerberos-master._udp &nbsp; SRV 0 100 88 dc.crunchtools.com.<br />
_kerberos._tcp&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SRV 0 100 88 dc.crunctools.com.<br />
_kerberos._udp&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SRV 0 100 88 dc.crunchtools.com.<br />
_kpasswd._tcp &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SRV 0 100 464 dc.crunchtools.com.<br />
_kpasswd._udp &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SRV 0 100 464 dc.crunchtools.com.<br />
_ldap._tcp&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SRV 0 100 389 dc.crunchtools.com.<br />
_ntp._udp &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SRV 0 100 123 dc.crunchtools.com.</div></div>
<p>&nbsp;</p>
<p>Option: If host based firewall rules are required, the following entries should be added to: /etc/sysconfig/iptables </p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT<br />
-A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT<br />
-A INPUT -m state --state NEW -m tcp -p tcp --dport 389 -j ACCEPT<br />
-A INPUT -m state --state NEW -m tcp -p tcp --dport 636 -j ACCEPT<br />
-A INPUT -m state --state NEW -m tcp -p tcp --dport 88 -j ACCEPT<br />
-A INPUT -m state --state NEW -m tcp -p tcp --dport 464 -j ACCEPT<br />
-A INPUT -m state --state NEW -m udp -p udp --dport 88 -j ACCEPT<br />
-A INPUT -m state --state NEW -m udp -p udp --dport 123 -j ACCEPT<br />
-A INPUT -m state --state NEW -m udp -p udp --dport 464 -j ACCEPT</div></div>
<p>&nbsp;</p>
<p>Install packages </p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">yum install ipa-server bind bind-dyndb-ldap</div></div>
<p>&nbsp;</p>
<p>Configure</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ipa-server-install</div></div>
<p>&nbsp;</p>
<p>Restart ssh</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/etc/init.d/ssh restart</div></div>
<p>&nbsp;</p>
<span id="Option:_Dnsmasq"><h3>Option: Dnsmasq</h3></span>
<p>Reverse DNS lookup of the IPA server is a <strong><a href="https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Virtualization/3.1/html/Administration_Guide/sect-Directory_Users.html">strict requirement</a></strong>. rDNS can be provided by <a href="http://www.thekelleys.org.uk/dnsmasq/doc.html">Dnsmasq</a>, which is available from the base RHEL <a href="https://rhn.redhat.com/network/software/channels/details.pxt?cid=10486">channel</a>.</p>
<blockquote><p>Dnsmasq is a lightweight, easy to configure DNS forwarder and DHCP server.</p></blockquote>
<p>If there is no access to a reverse DNS server, dnsmasq can be installed and configured on the RHEV-M host.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">yum install dnsmasq</div></div>
<p>&nbsp;</p>
<p>Add the following line to /etc/dnsmasq.conf</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">resolv-file=/etc/dnsmasq-resolv.conf</div></div>
<p>&nbsp;</p>
<p>Configure the upstream DNS server in /etc/dnsmasq-resolve.conf</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">nameserver 192.168.128.1<br />
domain crunchtools.com</div></div>
<p>&nbsp;</p>
<p>Configure the standard DNS resolver to look to local host. This will chain all lookups through the local dnsmasq daemon.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">nameserver 192.168.128.1<br />
domain crunchtools.com</div></div>
<p>&nbsp;</p>
<p>Option: Forward DNS SRV records can also be satisfied with dnsmasq</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">srv-host=_ldap._tcp.crunchtools.com,dc.crunchtools.com,389,1<br />
srv-host=_kerberos._tcp.crunchtools.com,dc.crunchtools.com,88,1<br />
srv-host=_kerberos._udp.crunchtools.com,dc.crunchtools.com,88,1<br />
srv-host=_kerberos-master._tcp.crunchtools.com,dc.crunchtools.com,88,1<br />
srv-host=_kerberos-master._udp.crunchtools.com,dc.crunchtools.com,88,1<br />
srv-host=_kpasswd._tcp.crunchtools.com,dc.crunchtools.com,464,1<br />
srv-host=_kpasswd._udp.crunchtools.com,dc.crunchtools.com,464,1<br />
srv-host=_ntp._udp.crunchtools.com,dc.crunchtools.com,123,1</div></div>
<p>&nbsp;</p>
<span id="Red_Hat_Enterprise_Virtualization_RHEV"><h3>Red Hat Enterprise Virtualization (RHEV)</h3></span>
<p>Configure the new domain</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">rhevm-manage-domains -action=add -domain=crunchtools.com -realm=CRUNCHTOOLS.COM -user=admin -provider=IPA -passwordFile=/tmp/.pwd</div></div>
<p>&nbsp;</p>
<span id="Troubleshooting"><h2>Troubleshooting</h2></span>
<p>Finally, here are some techniques used to troubleshoot integrating RHEV and IP.</p>
<span id="Logs"><h3>Logs</h3></span>
<p>The RHEV-M logs do not display much information with regard to a reverse DNS issue.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/var/log/ovirt-engine/engine-manage-domains.log</div></div>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">2013-02-25 12:39:16,233 INFO &nbsp;[org.ovirt.engine.core.utils.kerberos.ManageDomains] Creating kerberos configuration for domain(s): crunchtools.com<br />
2013-02-25 12:39:16,360 INFO &nbsp;[org.ovirt.engine.core.utils.kerberos.ManageDomains] Successfully created kerberos configuration for domain(s): crunchtools.com<br />
2013-02-25 12:39:16,360 INFO &nbsp;[org.ovirt.engine.core.utils.kerberos.ManageDomains] Testing kerberos configuration for domain: crunchtools.com<br />
2013-02-25 12:39:16,677 ERROR [org.ovirt.engine.core.utils.kerberos.KerberosConfigCheck] Error: &nbsp;exception message: dc.crunctools.com.<br />
2013-02-25 12:39:16,680 ERROR [org.ovirt.engine.core.utils.kerberos.ManageDomains] Failure while testing domain crunchtools.com. Details: Kerberos error. Please check log for further details.</div></div>
<p>&nbsp;</p>
<p>The logs for the Kerberos domain will show nothing because the RHEV-M host isn&#8217;t resolving the correct controller.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/var/log/krb5kdc.log</div></div>
<p>&nbsp;</p>
<span id="Network"><h3>Network</h3></span>
<p>Check the SRV records</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">host -t SRV _kerberos._tcp.CRUNCHTOOLS.COM</div></div>
<p>&nbsp;</p>
<p>Watch DNS and Kerberos activity</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">tcpdump -i any port 88 or port 53</div></div>
<p>&nbsp;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fcrunchtools.com%2Frhev-ipa%2F&amp;title=Red%20Hat%20Enterprise%20Virtualization%20%28RHEV%29%20%26%20Identity%2C%20Policy%2C%20Audit%20%28IPA%29" id="wpa2a_8"><img src="http://crunchtools.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://crunchtools.com/rhev-ipa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>El Caso De Red Hat: Un Negocio Exitoso Basado en Software Libre</title>
		<link>http://crunchtools.com/campuslink-2/</link>
		<comments>http://crunchtools.com/campuslink-2/#comments</comments>
		<pubDate>Fri, 14 Dec 2012 20:03:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Presentation]]></category>
		<category><![CDATA[Free Software]]></category>
		<category><![CDATA[Software Libre]]></category>

		<guid isPermaLink="false">http://crunchtools.com/?p=2631</guid>
		<description><![CDATA[Esta presentacion fue presentado en CampusLink 2.0. Fue la primera vez que yo he hablado profesionalmente en Español. Disfruté esta experiencia demasiado y espero tener la oportunidad hacerlo de nueva en años futuros.]]></description>
				<content:encoded><![CDATA[<span id="Abstract"><h2>Abstract</h2></span>
<p>Esta presentacion fue presentado en CampusLink 2.0. Fue la primera vez que yo he hablado profesionalmente en Español. Disfruté esta experiencia demasiado y espero tener la oportunidad hacerlo de nueva en años futuros.</p>
<p>&nbsp;</p>
<span id="Presentation"><h2>Presentation</h2></span>
<p><a href="http://crunchtools.com/campuslink-2/el-caso-de-red-hat-un-negocio-exitoso-basado-en-software-libre/" rel="attachment wp-att-2632">El Caso de Red Hat: Un Negocio Exitoso Basado en Software Libre</a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://crunchtools.com/campuslink-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Campus Link 2.0</title>
		<link>http://crunchtools.com/campus-link-2-0/</link>
		<comments>http://crunchtools.com/campus-link-2-0/#comments</comments>
		<pubDate>Fri, 14 Dec 2012 19:53:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Event]]></category>
		<category><![CDATA[Free Software]]></category>
		<category><![CDATA[Software Libre]]></category>

		<guid isPermaLink="false">http://crunchtools.com/?p=2623</guid>
		<description><![CDATA[Background From the organizers: CampusLink 2.0 es un foro para el contacto directo entre estudiantes, maestros, profesionistas y expertos; inmersos en el mundo de las tecnologías de información. Translation: CampusLink 2.0 is a forum for direct contact between students, teachers, professionals, and experts; Immersion in the world of information technology. This is one of the [...]]]></description>
				<content:encoded><![CDATA[<span id="Background"><h2>Background</h2></span>
<p>From the organizers:</p>
<blockquote><p><a href="http://campuslink.uach.mx/">CampusLink 2.0</a> es un foro para el contacto directo entre estudiantes, maestros, profesionistas y expertos; inmersos en el mundo de las tecnologías de información.</p></blockquote>
<p>Translation: CampusLink 2.0 is a forum for direct contact between students, teachers, professionals, and experts; Immersion in the world of information technology.</p>
<p>This is one of the most wonderful events I have ever attended. It was great to spend time with all of the students at the <a href="http://www.uach.mx/">University of Chihuahua</a>.</p>
<p>&nbsp;</p>
<span id="Talk:_El_Caso_de_Red_Hat:_Un_Negocio_Exitoso_Basado_en_Software_Libre"><h2>Talk: El Caso de Red Hat: Un Negocio Exitoso Basado en Software Libre</h2></span>
<span id="Spanish_Biography"><h2>Spanish Biography</h2></span>
<p>Arquitecto de soluciones en Red Hat &#8211; Fedora. Amplia experiencia en operaciones, análisis de ingeniería en entornos de red. Ha trabajado para compañías multinacionales, lo que le ha brinda un ámplio perfil de competencias en administración y operación de tecnologías. Experto en monitoreo de fallas, análisis e ingeniería de datos.</p>
<span id="Schedule"><h2>Schedule</h2></span>
<p>There were three all day tracks at this event</p>
<p>&nbsp;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fcrunchtools.com%2Fcampus-link-2-0%2F&amp;title=Campus%20Link%202.0" id="wpa2a_10"><img src="http://crunchtools.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://crunchtools.com/campus-link-2-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ohio Linux Fest 2012</title>
		<link>http://crunchtools.com/olf-2012/</link>
		<comments>http://crunchtools.com/olf-2012/#comments</comments>
		<pubDate>Fri, 14 Dec 2012 19:38:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Event]]></category>
		<category><![CDATA[Free Software]]></category>
		<category><![CDATA[Open Source Software]]></category>

		<guid isPermaLink="false">http://crunchtools.com/?p=2609</guid>
		<description><![CDATA[Background From the organizers: The tenth annual Ohio Linux Fest will be held on September 28-30, 2012 at the Greater Columbus Convention Center in downtown Columbus, Ohio. Hosting authoritative speakers and a large expo, the Ohio LinuxFest welcomes all Free and Open Source Software professionals, enthusiasts, and everyone interested in learning more about Free and [...]]]></description>
				<content:encoded><![CDATA[<span id="Background"><h2>Background</h2></span>
<p>From the organizers:</p>
<blockquote><p>The tenth annual Ohio Linux Fest will be held on September 28-30, 2012 at the Greater Columbus Convention Center in downtown Columbus, Ohio. Hosting authoritative speakers and a large expo, the Ohio LinuxFest welcomes all Free and Open Source Software professionals, enthusiasts, and everyone interested in learning more about Free and Open Source Software.</p></blockquote>
<p>This year, I spent my birthday down at Ohio Linux Fest at the Columbus Convention Center.</p>
<p>I had a great time speaking with peers from Rack Space and HP.</p>
<p>&nbsp;</p>
<span id="Schedule"><h2>Schedule</h2></span>
<p>Room Opens 6:30pm, Dinner 7-8pm, presentation 8-9pm</p>
<p>&nbsp;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fcrunchtools.com%2Folf-2012%2F&amp;title=Ohio%20Linux%20Fest%202012" id="wpa2a_12"><img src="http://crunchtools.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://crunchtools.com/olf-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Devops with Bash</title>
		<link>http://crunchtools.com/devops-with-bash/</link>
		<comments>http://crunchtools.com/devops-with-bash/#comments</comments>
		<pubDate>Fri, 14 Dec 2012 19:30:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Presentation]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Systems Administration]]></category>

		<guid isPermaLink="false">http://crunchtools.com/?p=2596</guid>
		<description><![CDATA[This presentation walks through some of the software development processes used to develop <a href="http://crunchtools.com/shiva">Shiva</a>, a mass ssh client. The development of Shiva was used as a teaching aid for a <a href="http://ohiolinux.org/olfi2012/classes/devops-with-bash-programming">class</a> taught at <a href="http://www.ohiolinux.org/">Ohio Linux Fest 2012</a>. Shiva was used to demonstrate concepts such as good command line interface design, testing, configuration design and advanced features of Bash, such as background functions. This presentation and associated class were developed to help systems adminsitrators think more like developers.]]></description>
				<content:encoded><![CDATA[<span id="Abstract"><h2>Abstract</h2></span>
<p>This presentation walks through some of the software development processes used to develop <a href="http://crunchtools.com/shiva">Shiva</a>, a mass ssh client. The development of Shiva was used as a teaching aid for a <a href="http://ohiolinux.org/olfi2012/classes/devops-with-bash-programming">class</a> taught at <a href="http://www.ohiolinux.org/">Ohio Linux Fest 2012</a>. Shiva was used to demonstrate concepts such as good command line interface design, testing, configuration design and advanced features of Bash, such as background functions. This presentation and associated class were developed to help systems adminsitrators think more like developers.</p>
<p>&nbsp;</p>
<span id="Presentation"><h2>Presentation</h2></span>
<p><a href="http://crunchtools.com/devops-with-bash/bash_devops/" rel="attachment wp-att-2597">bash_devops</a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://crunchtools.com/devops-with-bash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RHEL6 and Cisco WRVS4400N Networking</title>
		<link>http://crunchtools.com/ssid-vla/</link>
		<comments>http://crunchtools.com/ssid-vla/#comments</comments>
		<pubDate>Fri, 30 Nov 2012 22:28:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[KVM]]></category>
		<category><![CDATA[Network Administration]]></category>
		<category><![CDATA[Systems Administration]]></category>

		<guid isPermaLink="false">http://crunchtools.com/?p=2498</guid>
		<description><![CDATA[Background This weekend I decided to upgrade my home network with a Cisco WRVS4400N wireless router. Like a typical router it can provide standard wireless services WPA2, DHCP, etc, but the this model also provides support for four distinct VLANs and four distinct SSIDs. This has allowed me to create separate networks for work, play, [...]]]></description>
				<content:encoded><![CDATA[<span id="Background"><h2>Background</h2></span>
<p>This weekend I decided to upgrade my home network with a Cisco WRVS4400N wireless router. Like a typical router it can provide standard wireless services WPA2, DHCP, etc, but the this model also provides support for four distinct VLANs and four distinct SSIDs. This has allowed me to create separate networks for work, play, and a renter who resides in an upstairs apartment.
<p>&nbsp;</p>
<div class='toc wptoc'>
<h2>Contents</h2>
<ol class='toc-odd level-1'>
	<li>
		<a href="#Background">Background</a>
	</li>
	<li>
		<a href="#Basics">Basics</a>
	</li>
	<li>
		<a href="#Caveats">Caveats</a>
	</li>
</ol>
</ol>
</div>
<div class='wptoc-end'>&nbsp;</div>
<span id="Basics"><h2>Basics</h2></span>
<p>The goal of this network setup was to have three distinct SSIDs connected to three different VLANs. This would allow me to separate traffic for work, play, and a renter. Here are the main objectives: </p>
<ol>
<li>Create three VLANs mapped to three different SSIDs</li>
<li>Allow Cisco router to provide DHCP service on VLAN 1 (<a href="http://crunchtools.com/crunchtools-lab-environment/#Layer_2">virbr0</a>) </li>
<li>Allow RHEL6 Server to provide DHCP service on VLAN 2 (<a href="http://crunchtools.com/crunchtools-lab-environment/#Layer_2">virbr1</a>)</li>
<li>Allow Cisco router to provide DHCP service on VLAN 3. VLAN 3 is a non-standard VLAN only at <a href="http://crunchtools.com/crunchtools-lab-environment/#Layer_1">DC4</a> which provides Internet access to the rental unit.</li>
</ol>
<p><a href="http://crunchtools.com/files/2012/11/vlan-ssid.png"><img src="http://crunchtools.com/files/2012/11/vlan-ssid-300x237.png" alt="" title="vlan-ssid" width="300" height="237" class="alignnone size-medium wp-image-2585" /></a></p>
<p>The goal was to have the RHEL6 provide the exact same IP addresses that are provided on VLAN 2 because it is bridged to virbr2 which is attached to all virtual machines created on the RHEL6 server and RHEV Cluster that is housed at DC4. This allows all new virtual machines and physical machines to communicate with all of the crunchtools.com network</p>
<p><a href="http://crunchtools.com/files/2012/09/Crunchtools-layer-3.png"><img src="http://crunchtools.com/files/2012/09/Crunchtools-layer-3-300x210.png" alt="" title="Crunchtools-layer-3" width="300" height="210" class="alignnone size-medium wp-image-2472" /></a></p>
<p>&nbsp;</p>
<span id="Caveats"><h2>Caveats</h2></span>
<p>There is a caveat with regard to DHCP. According to the <a href="https://supportforums.cisco.com/thread/2070234">this post</a>, the Cisco WRVS4400N <a href="https://supportforums.cisco.com/thread/2070234">cannot pass</a> the RHEL 6 provided DHCP to the wireless network because of some missmatch with the wireless and switched network modules.  This means that when a laptop is connected to VLAN 2, it must be assigned a manual IP address.
<p>&nbsp;</p>
</p>
<p>&nbsp;</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;</div></div>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fcrunchtools.com%2Fssid-vla%2F&amp;title=RHEL6%20and%20Cisco%20WRVS4400N%20Networking" id="wpa2a_14"><img src="http://crunchtools.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://crunchtools.com/ssid-vla/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenSSL Certificate Authority</title>
		<link>http://crunchtools.com/openssl-ca/</link>
		<comments>http://crunchtools.com/openssl-ca/#comments</comments>
		<pubDate>Thu, 25 Oct 2012 20:18:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Systems Administration]]></category>

		<guid isPermaLink="false">http://crunchtools.com/?p=2508</guid>
		<description><![CDATA[Background Recently, I discovered how to use the openssl provided CA script to create a certificate authority and self signed certificates. Traditionally, I had ran all fo the commands manually. When using the CA script it is critical to understand the underlying security concepts. Certificate Authority Openssl has infrstructure to create a long lived Certificate [...]]]></description>
				<content:encoded><![CDATA[<span id="Background"><h2>Background</h2></span>
<p> Recently, I discovered how to use the <a href="http://www.openssl.org/">openssl</a> provided CA script to create a <a href="http://en.wikipedia.org/wiki/Certificate_authority">certificate authority</a> and <a href="http://en.wikipedia.org/wiki/Self-signed_certificate">self signed certificates</a>. Traditionally, I had ran all fo the commands manually. When using the CA script it is critical to understand the underlying security concepts.</p>
<span id="Certificate_Authority"><h3>Certificate Authority</h3></span>
<p>Openssl has infrstructure to create a long lived Certificate Authority</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/etc/pki/CA</div></div>
<p>&nbsp;</p>
<p>Certificates signed are tracked. Index file is database for certs in &#8221;&#8217;newcerts&#8221;&#8217;</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/etc/pki/CA/serial<br />
/etc/pki/CA/index.txt<br />
/etc/pki/CA/newcerts</div></div>
<p>&nbsp;</p>
<p>Scripts which come with the openssl package on RHEL can be used to build a certificate authority, complete signing requests, signings, verification</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/etc/pki/tls/misc/CA -h</div></div>
<p>&nbsp;</p>
<div class='toc wptoc'>
<h2>Contents</h2>
<ol class='toc-odd level-1'>
	<li>
		<a href="#Background">Background</a>
		<ol class='toc-even level-2'>
			<li>
				<a href="#Certificate_Authority">Certificate Authority</a>
			</li>
		</ol>
	<li>
		<a href="#Basics">Basics</a>
		<ol class='toc-even level-2'>
			<li>
				<a href="#Configure_a_Certificate_Authority_Openssl_Infrastructure">Configure a Certificate Authority (Openssl Infrastructure)</a>
			</li>
			<li>
				<a href="#Generate_New_Self_Signed_Certificate">Generate New Self Signed Certificate</a>
			</li>
		</ol>
	<li>
		<a href="#Special_Operations">Special Operations</a>
		<ol class='toc-even level-2'>
			<li>
				<a href="#Modify_CA_Script_to_Prevent_Key_Encryption_">Modify CA Script to Prevent Key Encryption </a>
			</li>
		</ol>
	<li>
		<a href="#Conclusion">Conclusion</a>
	</li>
</ol>
</ol>
</div>
<div class='wptoc-end'>&nbsp;</div>
<span id="Basics"><h2>Basics</h2></span>
<span id="Configure_a_Certificate_Authority_Openssl_Infrastructure"><h3>Configure a Certificate Authority (Openssl Infrastructure)</h3></span>
<p>Setup openssl.conf file</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">vim /etc/pki/tls/openssl.conf</div></div>
<p>&nbsp;</p>
<p>Defaults</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">private_key = cakey.pem<br />
certificate = cacert.pem<br />
crl = crl.pem</div></div>
<p>&nbsp;</p>
<p>Customizations</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">countryName_default &nbsp; &nbsp; = US<br />
stateOrProvinceName_default = Ohio<br />
localityName_default&nbsp; &nbsp; &nbsp; &nbsp; = Akron<br />
0.organizationName_default&nbsp; = Crunchtools</div></div>
<p>&nbsp;</p>
<p>Create the certificate authority. Remember to put in a Common Name, or the Certificate Authority will not be built correctly and will be unusable.
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/etc/pki/tls/misc/CA -newca</div></div>
<p>&nbsp;</p>
<span id="Generate_New_Self_Signed_Certificate"><h3>Generate New Self Signed Certificate</h3></span>
<p>Create the signing request, then sign it with your CA. If you generate a new certificate with the CA script, it will not be signed at all. This method keeps track of all certificate in the CA directory. This tracking mechanism allows a certificate to be revoked should it become compromised during it&#8217;s lifetime.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/etc/pki/tls/misc/CA -newreq</div></div>
<p>&nbsp;</p>
<p>Then sign it</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/etc/pki/tls/misc/CA -sign</div></div>
<p>&nbsp;</p>
<p>Verifiy it</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/etc/pki/tls/misc/CA -verify</div></div>
<p>&nbsp;</p>
<span id="Special_Operations"><h2>Special Operations</h2></span>
<span id="Modify_CA_Script_to_Prevent_Key_Encryption_"><h3>Modify CA Script to Prevent Key Encryption </h3></span>
<p>There are times when an administrator would like to generate a key that is not encrypted. For example this will allow the key to start in apache, postfix, dovecot, or vsftpd. This can be done by modifying CA.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">vim /etc/pki/tls/misc/CA</div></div>
<p>&nbsp;</p>
<p>Change from:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">REQ=&quot;$OPENSSL req $SSLEAY_CONFIG&quot;</div></div>
<p>&nbsp;</p>
<p>This tells openssl not to encrypt the generated private key. This option stands for no DES.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">REQ=&quot;$OPENSSL req -nodes $SSLEAY_CONFIG&quot;</div></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<span id="Conclusion"><h2>Conclusion</h2></span>
<p>These commands can be much easier to memorize and use than raw openss with all of it&#8217;s options. This method also tracks certs and enables a sane method for tracking active and revoked certs.</p>
<p>&nbsp;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fcrunchtools.com%2Fopenssl-ca%2F&amp;title=OpenSSL%20Certificate%20Authority" id="wpa2a_16"><img src="http://crunchtools.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://crunchtools.com/openssl-ca/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
