<?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>Arrfab's Blog</title>
	<atom:link href="http://www.arrfab.net/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.arrfab.net/blog</link>
	<description>Linux tips and tricks ...</description>
	<lastBuildDate>Tue, 21 Feb 2012 20:28:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Puppet, Foreman and selinux on CentOS</title>
		<link>http://www.arrfab.net/blog/?p=350</link>
		<comments>http://www.arrfab.net/blog/?p=350#comments</comments>
		<pubDate>Tue, 21 Feb 2012 14:23:41 +0000</pubDate>
		<dc:creator>fabian.arrotin</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Monitoring]]></category>

		<guid isPermaLink="false">http://www.arrfab.net/blog/?p=350</guid>
		<description><![CDATA[We implemented Puppet as a configuration management system at $work ,  and Puppet is a great tool. Then I heard about some dashboards that could be used on top of it. I've heard about different dashboards ($management_people *like* dashboards) like Puppet-dashboard and Foreman. I was advised by several people to give Foreman a try and [...]]]></description>
			<content:encoded><![CDATA[<p>We implemented <a href="http://puppetlabs.com" target="_blank">Puppet</a> as a configuration management system at $work ,  and Puppet is a great tool. Then I heard about some dashboards that could be used on top of it. I've heard about different dashboards ($management_people *like* dashboards) like <a href="http://puppetlabs.com/puppet/related-projects/dashboard/" target="_blank">Puppet-dashboard</a> and <a href="http://theforeman.org/" target="_blank">Foreman</a>.</p>
<p>I was advised by several people to give Foreman a try and it's really simple to install. Their <a href="http://theforeman.org/projects/foreman/wiki/Installation_instructions" target="_blank">wiki</a> covers basic installation and there is even a<a href="http://yum.theforeman.org/" target="_blank"> yum repo</a> that can be used (Epel has to be enabled too). As i have a small network to manage, I decided to setup Foreman on the same host as puppetmaster. Configuring /etc/foreman/* is easy and missing parts can be configured just by looking at the Foreman website wiki/FAQ. But troubles came when I enabled reports : puppetmasterd config was changed to include :</p>
<blockquote><p>[master]<br />
reports = store, foreman</p></blockquote>
<p>and the foreman.rb script (copied and modified from /usr/share/foreman/extras/puppet/foreman/templates/foreman-report.rb.erb) integrated in the correct /usr/lib/ruby/site_ruby/1.8/puppet/reports dir. (Note : don't forget to update $foreman_url).</p>
<p>But no reports were coming in Foreman. hmmm .... error message was :</p>
<blockquote><p>Report foreman failed: Could not send report to Foreman at http://puppetmaster.mybeautifuldomain.com:3000/reports/create?format=yml: Permission denied - connect(2)</p></blockquote>
<p>That was not an iptables issue, but selinux one :</p>
<blockquote><p>type=AVC msg=audit(1329830711.788:28372): avc:  denied  { name_connect } for  pid=13144 comm="puppetmasterd" dest=3000 scontext=unconfined_u:system_r:puppetmaster_t:s0 tcontext=system_u:object_r:ntop_port_t:s0 tclass=tcp_socket</p></blockquote>
<p>Here is my locally generated selinux for Foreman :</p>
<blockquote><p>module foreman 1.0;</p>
<p>require {<br />
type puppetmaster_t;<br />
type http_port_t;<br />
type ntop_port_t;<br />
class tcp_socket name_connect;<br />
}</p>
<p>#============= puppetmaster_t ==============<br />
allow puppetmaster_t http_port_t:tcp_socket name_connect;<br />
allow puppetmaster_t ntop_port_t:tcp_socket name_connect;</p></blockquote>
<p>Things work really better after I added my foreman.pp selinux module on that host. If you don't know how to compile selinux custom policies, please read the nice <a href="http://wiki.centos.org/HowTos/SELinux" target="_blank">Selinux page on the CentOS wiki</a>, and especially the <a href="http://wiki.centos.org/HowTos/SELinux#head-aa437f65e1c7873cddbafd9e9a73bbf9d102c072" target="_blank">"Manually customizing selinux policies"</a> section. Tools like sealert (from setroubleshoot-server package) and audit2allow are really helpful when there is no pre-defined selinux boolean that can be used.</p>
<p>Hope this helps .. and now going back enjoying reports, including error reports by mail (nice feature)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.arrfab.net/blog/?feed=rss2&#038;p=350</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS Automated QA explained &#8230;</title>
		<link>http://www.arrfab.net/blog/?p=342</link>
		<comments>http://www.arrfab.net/blog/?p=342#comments</comments>
		<pubDate>Mon, 09 Jan 2012 14:41:51 +0000</pubDate>
		<dc:creator>fabian.arrotin</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.arrfab.net/blog/?p=342</guid>
		<description><![CDATA[While Johnny was explaining to the rest of the world how CentOS 6.1 and 6.2 were released, I received quite some questions about the QA tests and how they were performed. Well, let me explain in some words how it's now organized. Previously, there was only a Tests Matrix that was shared between the QA [...]]]></description>
			<content:encoded><![CDATA[<p>While <a href="http://centosnow.blogspot.com/2012/01/centos-in-2012.html" target="_blank">Johnny was explaining</a> to the rest of the world how CentOS 6.1 and 6.2 were released, I received quite some questions about the QA tests and how they were performed. Well, let me explain in some words how it's now organized. Previously, there was only a Tests Matrix that was shared between the QA team members : each member of that group had access to the QA bits, could download/rsync the complete tree (with ISO images too) and do his tests, and then reported the results in one way or the other (irc, mailing-list). Of course it didn't scale out very well. Too much manual intervention, and when someone was busy with personal (or work related) issues, no feedback was coming back to the CentOS devteam.</p>
<p>So during <a href="http://archive.fosdem.org/2011/" target="_blank">Fosdem 2011</a>, I had a meeting with <a href="http://www.karan.org/blog/index.php" target="_blank">Karanbir</a> to see how we could solve that issue and put automation in the QA loop. We dedicated some (old) machines to be used only for QA, and in a separate VLAN. Basically, here are the steps from the built bits to the QA reports.</p>
<ul>
<li>The CentOS buildfarm (using the newly build system called 'reimzul' and using <a href="http://kr.github.com/beanstalkd/" target="_blank">beanstalkd</a> as a queuing system) pushes automatically each new tree to the dedicated QA hardware</li>
<li>There is a rsync post-xfer script that is launched from there that also uses beanstalkd and some workers (so we can scale out easily if we add machines)</li>
<li>Each built and pushed tree/ISOs set has its own BuildTag (that is used to identify what was tested and when)</li>
<li>Some tools (hosted in an internal Git repository) are then used to deploy some Virtual Machines (actually a mix of BareMetal and VMs : blade/Virtual Box/Xen/KVM) and send a report if the "deploy VM step" failed (VMs are installed through ISO/pxe boot/virt-install through http/ftp/nfs methods)</li>
<li>A test suite (that we call the t_functional stack) is then copied from the local git repo to those newly deployed machines and each test is then ran. From that point a report is then automatically sent to the QA mailing-list so that people can see the results, while the full log is available on QA head node.</li>
</ul>
<p>The fact that we use two separate git repositories (one for the deploy/provisioniong functions and another one for the tests themselves) was really a good thing, as it permitted some people to include their tests in the t_functional stack. For example , <a href="http://athmane.wordpress.com/" target="_blank">Athmane</a> did a great job writing/fixing some tests used for 6.1 and 6.2.</p>
<p>More informations to come later about how you (yes, *you*) can participate and contribute such CentOS QA auto-tests !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.arrfab.net/blog/?feed=rss2&#038;p=342</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

