<?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>Freenode Infra-Talk Channel</title>
	<atom:link href="http://infra-talk.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://infra-talk.org</link>
	<description>Syndicator</description>
	<lastBuildDate>Mon, 06 Feb 2012 12:19:27 +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>How to upgrade a Solaris server to a particular patching level</title>
		<link>http://wildness.espix.org/index.php?post/2012/02/06/How-to-upgrade-a-Solaris-server-to-a-particular-patching-level</link>
		<comments>http://wildness.espix.org/index.php?post/2012/02/06/How-to-upgrade-a-Solaris-server-to-a-particular-patching-level#comments</comments>
		<pubDate>Mon, 06 Feb 2012 11:48:00 +0000</pubDate>
		<dc:creator>wildcat</dc:creator>
				<category><![CDATA[patch]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[wesunsolve]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[    Situation


Today at work, I needed to prepare the patching of a two-nodes cluster. Not only I should patch this cluster, but I should also mimic the same patching level as the currently used prod server. Well Well. Instead of making a diff of the ...]]></description>
			<content:encoded><![CDATA[    <h2>Situation</h2>


<p>Today at work, I needed to prepare the patching of a two-nodes cluster. Not only I should patch this cluster, but I should also mimic the same patching level as the currently used prod server. Well Well. Instead of making a diff of the showrev and try to sort out which patch is installed on this node, not on the other and so on, I tried to define a new way of doing this kind of things. I'll describe my method here, don't hesitate to comment, suggest or criticize something :)</p>


<h2>The Idea</h2>


<p>The idea is to use <strong>PCA</strong> to achieve everything. As you may (or may not) know, <strong>PCA</strong> is based upon <em>patchdiag.xref</em> files, which are provided by <del>SUN</del> Oracle once a day.</p>


<p>They contain the list of latest released patches as well as dependencies.
The Idea of my solution is to generate a <em>patchdiag.xref</em> based on the patching level I should match.
I could then use <strong>PCA</strong> together with this patchdiag.xref on the two nodes I need to patch. Child-Game!</p>


<h2>WeSunSolve to the rescue</h2>


<p>Again, you may (or not) know that <a href="http://wesunsolve.net" hreflang="en">WeSunSolve</a> allow you to register yourself and use the Panel as a little server dashboard. You can enter some server name and link some patching level to them. This is being done using a simple "<em>showrev -p</em>" output that you can paste on the website to add patch level to a server.</p>


<p>Once you got two (or more) server, you can use the newly added feature <a href="http://wesunsolve.net/srvUpgrade" hreflang="en">Server Upgrade</a>. You can choose two patching level there to generate a patchdiag.xref file:</p>

<ul>
<li>Source patching level, is the patch level of the server you'll need to patch.</li>
<li>Destination patching level, is the patch level of the server you want to mimic.</li>
</ul>

<h2>Use PCA, and voila!</h2>


<p>Next step is known by you all! Just use pca together with the <em>patchdiag.xref</em> file and see the output:</p>


<pre> $ ./pca -X . -f explorer.XXXXXXXXX.YYYYYYYYY-2011.12.17.02.00 -l
 Using /home/wildcat/YYYYYYYYYYY/./patchdiag.xref from Feb/03/12
 Host: XXXXXXXXXXX (SunOS 5.9/Generic_122300-05/sparc/sun4u)
 List: missing (133/210205)
 
 Patch  IR   CR RSB Age Synopsis
 <del></del><del> </del> - <del> </del>- <del>- </del><del></del><del></del><del></del><del></del><del></del><del></del><del></del><del></del><del></del><del></del><del></del><del></del><del></del>-
 112951 13 &lt; 14 RS- 999 SunOS 5.9: patchadd and patchrm Patch
 111711 16 &lt; 18 R-- 999 SunOS 5.9: 32-bit Shared library patch for C++
 111712 16 &lt; 18 R-- 999 SunOS 5.9: 64-Bit Shared library patch for C++
 **SNIPPED**</pre>]]></content:encoded>
			<wfw:commentRss>http://wildness.espix.org/index.php?feed/atom/comments/48</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automate Everything!</title>
		<link>http://zaargy.com/?p=64</link>
		<comments>http://zaargy.com/?p=64#comments</comments>
		<pubDate>Sun, 05 Feb 2012 22:21:57 +0000</pubDate>
		<dc:creator>zaargy</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://zaargy.com/?p=64</guid>
		<description><![CDATA[Oh how I cheered when I read Tom Blomfield&#8217;s Automate Everything post! I&#8217;ve lost count of the number of times I&#8217;ve been subjected to some Byzantine business process and thought that surely there must be a better way?! What&#8217;s weird is how many people don&#8217;t feel this way. These are people who&#8217;ll do the same [...]]]></description>
			<content:encoded><![CDATA[<p>Oh how I cheered when I read Tom Blomfield&#8217;s <a href="http://tomblomfield.com/post/17092502705/automate-everything" title="Automate Everything">Automate Everything</a> post! I&#8217;ve lost count of the number of times I&#8217;ve been subjected to some Byzantine business process and thought that surely there must be a better way?! What&#8217;s weird is how many people don&#8217;t feel this way. These are people who&#8217;ll do the same thing a hundred times and just put up with it like it makes perfect sense to them to do the same thing a hundred times! The thought that there could be a better way doesn&#8217;t enter their head.</p>
<p>It seems to me that these are people who interact with the world in a fundamentally different way from the way that I do. That doesn&#8217;t make them wrong &#8211; just different (and maybe a little sadomasochistic).</p>
<p>I have often thought it would be cool to have some putative automater person whose sole job is go round and improve all these sort of silly processes and do things like making the coffee machine report outages to IRC (and other such little things that bring joy and happiness) but somehow I doubt this idea will catch on any time soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://zaargy.com/?feed=atom&#038;p=64</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Logging in Linux</title>
		<link>http://zaargy.com/?p=44</link>
		<comments>http://zaargy.com/?p=44#comments</comments>
		<pubDate>Sun, 05 Feb 2012 16:21:48 +0000</pubDate>
		<dc:creator>zaargy</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://zaargy.com/?p=44</guid>
		<description><![CDATA[Logging in Linux is something that&#8217;s always bothered me. I hate this stuff: james@lucinda:/var/log$ ls -l dmesg* -rw-r----- 1 root adm 45822 Feb 4 08:41 dmesg -rw-r----- 1 root adm 45822 Jan 30 00:58 dmesg.0 -rw-r----- 1 root adm 12264 Jan 30 00:28 dmesg.1.gz -rw-r----- 1 root adm 12266 Jan 30 00:19 dmesg.2.gz -rw-r----- 1 [...]]]></description>
			<content:encoded><![CDATA[<p>Logging in Linux is something that&#8217;s always bothered me. I hate this stuff:</p>
<pre>james@lucinda:/var/log$ ls -l dmesg*
-rw-r----- 1 root adm 45822 Feb  4 08:41 dmesg
-rw-r----- 1 root adm 45822 Jan 30 00:58 dmesg.0
-rw-r----- 1 root adm 12264 Jan 30 00:28 dmesg.1.gz
-rw-r----- 1 root adm 12266 Jan 30 00:19 dmesg.2.gz
-rw-r----- 1 root adm 12271 Jan 29 20:02 dmesg.3.gz
-rw-r----- 1 root adm 12130 Jan 29 19:48 dmesg.4.gz</pre>
<p>Old logs are the in same directory as current logs which is just noisy but more importantly there is also a whole slew of problems with log rotation, compression, keeping arcane syslog configuration updated as things change, running out of space if you mess up etc. And let&#8217;s face it, having logs sitting on a server like this is next to useless &#8211; you want them pushed to a central location so that you can keep track of what&#8217;s going on. </p>
<p>With this mind, I finally got round to trying out an idea I had a while ago about how to clean this stuff up. I now have this:</p>
<pre>james@lucinda:/var/log$ ls -l dmesg*
prw-r--r-- 1 root root 0 Feb  5 14:05 dmesg</pre>
<p>My logs are now named pipes! From an application&#8217;s perspective nothing has changed &#8211; the log file is the same place and looks and acts like a file. Of course, this isn&#8217;t very useful if nothing is connected to the other end of the pipe, so I wrote a little ruby application called <a href="https://github.com/zaargy/monsoon" title="monsoon">Monsoon</a> that sits and watches named pipes in directory that you configure and every time something is sent down one of these pipes, it packages it up into a json fragment as follows:</p>
<pre>
    {
        "time": "Sun Feb 05 14:05:41 +0000 2012",
        "message": "test message",
        "origin": {
            "route": "/var/log/dmesg",
            "hostname": "lucinda"
        }
    }</pre>
<p>and sends off to a TCP server socket that you configure &#8211; but this of course could be sent off via stomp or HTTP instead &#8211; where you can do something useful with it (put into a database, logstash, SOLR, and so on) It&#8217;s then just a case of ensuring that whatever is storing the logs has enough disk space instead of your whole web cluster or whatever (though obviously you should still monitor that too).</p>
<p>I&#8217;m quite pleased with the results so far. I&#8217;m going to test some more and see how things go.</p>
]]></content:encoded>
			<wfw:commentRss>http://zaargy.com/?feed=atom&#038;p=44</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Logging in Linux</title>
		<link>http://zaargy.com/?p=44</link>
		<comments>http://zaargy.com/?p=44#comments</comments>
		<pubDate>Sun, 05 Feb 2012 16:21:48 +0000</pubDate>
		<dc:creator>zaargy</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://zaargy.com/?p=44</guid>
		<description><![CDATA[Logging in Linux is something that&#8217;s always bothered me. I hate this stuff: james@lucinda:/var/log$ ls -l dmesg* -rw-r----- 1 root adm 45822 Feb 4 08:41 dmesg -rw-r----- 1 root adm 45822 Jan 30 00:58 dmesg.0 -rw-r----- 1 root adm 12264 Jan 30 00:28 dmesg.1.gz -rw-r----- 1 root adm 12266 Jan 30 00:19 dmesg.2.gz -rw-r----- 1 [...]]]></description>
			<content:encoded><![CDATA[<p>Logging in Linux is something that&#8217;s always bothered me. I hate this stuff:</p>
<pre>james@lucinda:/var/log$ ls -l dmesg*
-rw-r----- 1 root adm 45822 Feb  4 08:41 dmesg
-rw-r----- 1 root adm 45822 Jan 30 00:58 dmesg.0
-rw-r----- 1 root adm 12264 Jan 30 00:28 dmesg.1.gz
-rw-r----- 1 root adm 12266 Jan 30 00:19 dmesg.2.gz
-rw-r----- 1 root adm 12271 Jan 29 20:02 dmesg.3.gz
-rw-r----- 1 root adm 12130 Jan 29 19:48 dmesg.4.gz</pre>
<p>Old logs are the in same directory as current logs which is just noisy but more importantly there is also a whole slew of problems with log rotation, compression, keeping arcane syslog configuration updated as things change, running out of space if you mess up etc. And let&#8217;s face it, having logs sitting on a server like this is next to useless &#8211; you want them pushed to a central location so that you can keep track of what&#8217;s going on. </p>
<p>With this mind, I finally got round to trying out an idea I had a while ago about how to clean this stuff up. I now have this:</p>
<pre>james@lucinda:/var/log$ ls -l dmesg*
prw-r--r-- 1 root root 0 Feb  5 14:05 dmesg</pre>
<p>My logs are now named pipes! From an application&#8217;s perspective nothing has changed &#8211; the log file is the same place and looks and acts like a file. Of course, this isn&#8217;t very useful if nothing is connected to the other end of the pipe, so I wrote a little ruby application called <a href="https://github.com/zaargy/monsoon" title="monsoon">Monsoon</a> that sits and watches named pipes in directory that you configure and every time something is sent down one of these pipes, it packages it up into a json fragment as follows:</p>
<pre>
    {
        "time": "Sun Feb 05 14:05:41 +0000 2012",
        "message": "test message",
        "origin": {
            "route": "/var/log/dmesg",
            "hostname": "lucinda"
        }
    }</pre>
<p>and sends off to a TCP server socket that you configure &#8211; but this of course could be sent off via stomp or HTTP instead &#8211; where you can do something useful with it (put into a database, logstash, SOLR, and so on) It&#8217;s then just a case of ensuring that whatever is storing the logs has enough disk space instead of your whole web cluster or whatever (though obviously you should still monitor that too).</p>
<p>I&#8217;m quite pleased with the results so far. I&#8217;m going to test some more and see how things go.</p>
]]></content:encoded>
			<wfw:commentRss>http://zaargy.com/?feed=atom&#038;p=44</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache reverse-proxying and the REMOTE_USER variable</title>
		<link>http://www.prontab.com/2012/02/apache-reverse-proxying-and-remoteuser.html</link>
		<comments>http://www.prontab.com/2012/02/apache-reverse-proxying-and-remoteuser.html#comments</comments>
		<pubDate>Thu, 02 Feb 2012 11:41:00 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[kerberos]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[remote_user]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[sinatra]]></category>
		<category><![CDATA[sso]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I spent an alarming amount of time yesterday attempting to make the most of Apache's ridiculously easy mod_auth_kerb module for SSO Kerberos authentication with a little in-house Sinatra app I've been working on. Apparently Kerberos within nginx or rub...]]></description>
			<content:encoded><![CDATA[I spent an alarming amount of time yesterday attempting to make the most of Apache's ridiculously easy mod_auth_kerb module for SSO Kerberos authentication with a little in-house Sinatra app I've been working on. Apparently Kerberos within nginx or ruby is a bit of an unofficial ballache, so I decided to take the easy route out. However, it transpires that only one person on the whole internet knew of the existence of the ProxyPassInterpolateEnv boolean.<br /><br />To put this in context, for my app I only want kerberos to validate the user and then pass on the username to the app. It's a git deploy frontend, and I like blaming people.<br /><br />You'll find a lot of stuff about doing a complicated rewrite so that REMOTE_USER actually evaluates before a reverse proxy. I couldn't get any of this stuff to work - not only that but it's a horrible solution anyway requiring about three lines of rewrite - and I'll be honest, I'm not up together on my apache rewrites anyway.<br /><br />So the following is the solution I ended up with. It simply makes Apache forward on the REMOTE_USER variable, created by your auth module, to whatever you're reverse proxying - in my case a Sinatra app. It actually appears as REMOTE_USER as opposed to the specified REMOTE-USER as well. I neither know why nor care.<br /><br />Excuse the formatting.<br /><br /><code>&lt;Virtualhost *:443&gt;<br /><span class="Apple-tab-span" style="white-space: pre;">   </span>SSLEngine on<br /><span class="Apple-tab-span" style="white-space: pre;">   </span>SSLCipherSuite ... <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HA HA SSL BUSINESS<br />&nbsp; &nbsp; &nbsp; &nbsp; ... <br /><span class="Apple-tab-span" style="white-space: pre;">   </span>ServerName yer-mum.com<br /><span class="Apple-tab-span" style="white-space: pre;">   </span>ProxyPassInterpolateEnv On<br /><span class="Apple-tab-span" style="white-space: pre;">   </span>ProxyPass / http://localhost:4567/<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>RequestHeader set REMOTE-USER %{REMOTE_USER}s<br />&nbsp; &nbsp; &lt;Location /&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; AuthType Kerberos<br />&nbsp; &nbsp; &nbsp; &nbsp; AuthName "AD Login"<br />&nbsp; &nbsp; &nbsp; &nbsp; KrbMethodNegotiate On<br />&nbsp; &nbsp; &nbsp; &nbsp; KrbMethodK5Passwd On<br />&nbsp; &nbsp; &nbsp; &nbsp; KrbAuthRealms MUMS.COM<br />&nbsp; &nbsp; &nbsp; &nbsp; Krb5KeyTab /etc/krb5.keytab<br />&nbsp; &nbsp; &nbsp; &nbsp; Require valid-user<br />&nbsp; &nbsp; &lt;/Location&gt;<br />&lt;/Virtualhost *:443&gt;<br /></code><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4375420320293943529-3656677414731249343?l=www.prontab.com' alt='' /></div>]]></content:encoded>
			<wfw:commentRss>http://www.prontab.com/feeds/3656677414731249343/comments/default</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Systems Policy</title>
		<link>http://sts.ono.at/blog/2012/02/01/a-systems-policy</link>
		<comments>http://sts.ono.at/blog/2012/02/01/a-systems-policy#comments</comments>
		<pubDate>Wed, 01 Feb 2012 08:12:00 +0000</pubDate>
		<dc:creator>Stefan Schlesinger</dc:creator>
				<category><![CDATA[Policy]]></category>
		<category><![CDATA[infrastructure]]></category>
		<category><![CDATA[operations]]></category>

		<guid isPermaLink="false">http://sts.ono.at/blog/2012/02/01/a-systems-policy</guid>
		<description><![CDATA[Recently I talked to a couple of friends, which all wailed quite a bit about their operations or internal IT departments.

Most of these teams had to fight with some very basic things. They lacked a decent monitoring system or monitoring at all. They d...]]></description>
			<content:encoded><![CDATA[<p>Recently I talked to a couple of friends, which all wailed quite a bit about their operations or internal IT departments.</p>

<p>Most of these teams had to fight with some very basic things. They lacked a decent monitoring system or monitoring at all. They didn&#8217;t deploy systems, they installed it by hand. Systems where not documented etc.</p>

<p>So here are some guidelines, I try to aspire with my team. This is by far not a complete list of things you need to run successful operations but it should give you a fair hint about what it takes.</p>

<p>Also please note that you might want to adapt your own policy a bit to fit your needs. I&#8217;m coming from the web industry, but we still run our own hardware, so this might especially not fit a typical cloud based infrastructure.</p>

<h2 id='systems'>Systems</h2>

<blockquote>
<p>A System is considered the lowest part of our infrastructure and services. All rules defined here, should be considered in all other policies.</p>
</blockquote>

<p>A system&#8230;.</p>

<ul>
<li>is documented at a central location.</li>

<li>is monitored and being graphed.</li>

<li>is being backuped.</li>

<li>is updated regularly.</li>

<li>has a defined production level. (spare, pre-production, production)</li>

<li>has a defined owner and maintainer.</li>

<li>has a predefined maintenance level.</li>

<li>has a predefined availability.</li>

<li>has a physical location.</li>

<li>has a unique name, which is resolvable by DNS.</li>

<li>has only required software installed.</li>

<li>was installed with all currently available updates.</li>

<li>was inspected and approved by a second man before being released to production.</li>

<li>All parts are functional at any time. All Faults get documented RFN and repaired as soon as possible.</li>

<li>There are always 2+ people informed about it.</li>

<li>Network access vectors are defined.</li>

<li>Configurations are not only available locally (including scripts).</li>

<li>Sensible data gets protected.</li>
</ul>

<h2 id='hardware'>Hardware</h2>

<blockquote>
<p>A piece of hardware can be anything from a big server to a small temperature sensor in your server room.</p>
</blockquote>

<p>A piece of hardware&#8230;</p>

<ul>
<li>has a maintenance contract or spare hardware available.</li>

<li>has got an inventory number.</li>

<li>is labeled (hostname + inventory).</li>

<li>is physically secure (environmental! and mechanical access control).</li>

<li>has got a bill, which is documented at a central location.</li>

<li>should have redundant power supplies.</li>

<li>should have some kind of out of band management solution (OOB).</li>

<li>has at least one power circuit connected to an electronic circuit protected by an uninterruptible power supply (USV).</li>
</ul>

<p>All tools needed to open and repair any part of the system are available.</p>

<h2 id='servers'>Servers</h2>

<p>A server&#8230;</p>

<ul>
<li>has at least two disks configured with RAID &gt;= 1.</li>

<li>has at least two separate network interface cards (NICs).</li>

<li>has all RAID controllers backed with battery backed write caches (BBWC).</li>

<li>was dimensioned with adequate future-proof hardware.</li>

<li>has a lifetime of 2+ years.</li>
</ul>

<h2 id='switches'>Switches</h2>

<p>A switch&#8230;</p>

<ul>
<li>is manage- or configurable.</li>

<li>is supported by the configuration backup software in use (e.g. RANCID)</li>

<li>provides the following protocols: STP, SNMP, IPv6 support (mgmt+multicast), RADIUS for AAA</li>

<li>does not forward the default VLAN (1) on it&#8217;s uplink/trunk ports.</li>

<li>does have a description for every port in use (including hostname and interface, e.g.: server01#eth0, server01#oob, switch03#24)</li>

<li>does not have any enabled, unused ports: set them to disabled and remove any other configuration for this port.</li>

<li>blocks or does not forward any discovery protocols on it&#8217;s user ports.</li>

<li>is using AAA for authenticating users.</li>

<li>logs to a central syslog server.</li>
</ul>

<h2 id='operating_systems'>Operating Systems</h2>

<blockquote>
<p>An operating system (OS) is considered as everything running on a server or instance, to support a service or an application.</p>
</blockquote>

<p>An Operating System&#8230;</p>

<ul>
<li>uses <strong>OS-CHOICE-HERE/stable</strong> as default distribution on servers.</li>

<li>uses <strong>OS-CHOICE-HERE</strong> as default on clients.</li>

<li>is rebooting without any manual interventions.</li>

<li>provides access by SSH.</li>

<li>does not permit root login via SSH.</li>

<li>has a root password set.</li>

<li>has the current time, synchronized with a time server and uses <strong>TIMEZONE-CHOICE-HERE</strong> as time zone.</li>

<li>can resolve internal and internet names via DNS.</li>

<li>installs software by packages.</li>

<li>installs packages from a central internal repository and the official distribution repositories.</li>

<li>software installed by packages should conform to the FHS.</li>

<li>software not installed by packages should be installed by a reproducible deployment process.</li>

<li>has sane defaults set, for user and process environments (locales, shells, screen, got some handy tools, etc.).</li>

<li>should not provide typical compiler tools (gcc, build-essential).</li>

<li>provides a manageable AAA concept (e.g. automated provisioning and de-provisioning of staff users).</li>

<li>sends mails destinated for root to a central location.</li>

<li>provides a local mailer.</li>
</ul>

<h2 id='hostnames'>Hostnames</h2>

<blockquote>
<p>Hostnames exist to identify every part of your infrastructure uniquely. They are used to refer to systems in your configurations and in discussions. You should think about a naming convention, but here are some rough guidelines.</p>
</blockquote>

<p>Hostnames &#8230;</p>

<ul>
<li>have to be unique.</li>

<li>have to end with a number, which should never be reused and always be incremented.</li>
</ul>

<h2 id='services'>Services</h2>

<blockquote>
<p>A service is considered as everything running on a server&#8217;s operating system, to provide continuous functionality (e.g. a script or an application).</p>
</blockquote>

<p>A service&#8230;</p>

<ul>
<li>does only log errors and auditing information. Application services may as well log more information (e.g. Apache access log).</li>

<li>has defined log retention times.</li>

<li>logs to syslog unless it&#8217;s not possible.</li>

<li>is authenticating only on secure connections.</li>

<li>has an adequate and future-proof dimensioned datastore.</li>

<li>was deployed in a reproducible way.</li>
</ul>

<h2 id='networks'>Networks</h2>

<blockquote>
<p>A network is considered any part of infrastructure, which is used to interconnect servers or systems. (Layer 1,2,3,4,&#8230;)</p>
</blockquote>

<p>A Network&#8230;</p>

<ul>
<li>has clear entry and routing points.</li>

<li>has a diagram which describes access vectors, the logical and physical setup.</li>

<li>is deployed in adequate and future-proof dimensions (vlans, ip addresses, bandwidth).</li>

<li>uses structured cabling.</li>

<li>there is no cross-cabling, except for very rare situations (e.g. HA cabling).</li>

<li>should not be used for multiple purposes at least not share one of the following classifications. <table>
  <tr><th>Class</th><th>Description</th></tr>
  <tr><td>net     </td><td> Internet/upstream network </td></tr>
  <tr><td>mgmt    </td><td> Management network (monitoring, remote access)</td></tr>
  <tr><td>traffic </td><td> Site local traffic network</td></tr>
  <tr><td>backup  </td><td> Traffic network for backups</td></tr>
  <tr><td>voip    </td><td> Voip Telephony network</td></tr>
  <tr><td>clients </td><td> A network with client workstations.</td></tr>
  <tr><td>devel   </td><td> A network with development machines.</td></tr>
  <tr><td>staging </td><td> A network with staging equipment.</td></tr>
 </table> <br /> <br /></li>

<li>OOBs are easy to reach, even in case of an outage.</li>

<li>VLAN-IDs are considered global, create a list.</li>

<li>All VLAN-IDs below 99 are switch-local.</li>

<li>VLANs have a name and a location.</li>

<li>All address space is considered global (vlans, ip- and mac addresses, including RFC1918)</li>
</ul>

<p>To round up my article, here is a example checklist we use to peer review new systems:</p>

<h2 id='example_review_checklist'>Example Review Checklist</h2>

<p>Every newly deployed host or instance should undergo a peer-review process. The checklist below will provide you with a couple of base acceptance criteria and is going to ensure a certain level of quality. Give it to any other sysadmin and ask him or her to check the system, before it&#8217;s put into production.</p>
<pre>
* DNS works (including reverse dns)               :
* SSH login works                                 :
* Host+services monitored                         :
* Host+services graphed                           :
* All Filesystems backuped                        :
* Database dumps                                  :
* All Updates installed                           :
* Host in HostDoc                                 : 
* Puppet works                                    :
* Time is accurate                                :
* Root mails are being delivered                  :
* Firewall is active                              :
* No unneeded services are reachable (nmap)       :
* Network configuration works (+ipv6)             :
* Syslog/dmesg/oob logs are clean of errors       :

-- Physical Host --

* Root password documented                        :
* Root login works                                :
* OOB password documented                         :
* OOB login works                                 :
* OOB monitored                                   :
* Switch ports are labeled (+ documented)         :
* Hardware is labeled (+ documented in rack docu) :
* Firmware up to date                             :
* RAID level is > 1 and all disks OK              :
</pre>]]></content:encoded>
			<wfw:commentRss>http://infra-talk.org/2012/02/01/a-systems-policy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>#monitoringsucks hackathon  6&amp;7 february  Practical details:</title>
		<link>http://www.krisbuytaert.be/blog/monitoringsucks-hackathon-67-february-practical-details</link>
		<comments>http://www.krisbuytaert.be/blog/monitoringsucks-hackathon-67-february-practical-details#comments</comments>
		<pubDate>Wed, 01 Feb 2012 07:48:55 +0000</pubDate>
		<dc:creator>Kris Buytaert</dc:creator>
				<category><![CDATA[devops]]></category>
		<category><![CDATA[monitoringsucks]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[As announced earlier next monday and tuesday we're opening up the Inuits offices for everybody working on monitoring problems.
There's already a good number of people that have confirmed their presence and some people have asked 
As for practical detai...]]></description>
			<content:encoded><![CDATA[<p>As announced <a href="http://www.krisbuytaert.be/blog/monitoringsucks-and-well-fix-it">earlier</a> next monday and tuesday we're opening up the Inuits offices for everybody working on monitoring problems.</p>
<p>There's already a <a href="https://github.com/monitoringsucks/werefixingit/wiki">good number of people</a> that have confirmed their presence and some people have asked </p>
<p>As for practical details .. the plan is simple.<br />
I`m going to be at the place somewhere between 8:30 and 9:00 on monday.  ( Hey .. it's the day after Fosdem you know :)) </p>
<p>The only thing I've planned is to do a get to know eachother round around 10:30  after that I`m expecting the hackathon to be self organising,  </p>
<p>There will be water, coffee , etc , IP connectivity, and electricity. </p>
<p>The location is still Duboisstraat 50, Antwerp</p>
<p><img src="http://www.inuits.eu/sites/default/files/contact_inuitsmap.png" /> </p>
<p>Free parking is on the Hardenvoort or Kempenstraat ( 3minutes walk) , paid parking right in front of the door.</p>
]]></content:encoded>
			<wfw:commentRss>http://infra-talk.org/2012/02/01/monitoringsucks-hackathon-67-february-practical-details/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom Thresholding for specific nodes in OpenNMS</title>
		<link>http://yo61.com/custom-thresholding-for-specific-nodes-in-opennms.html</link>
		<comments>http://yo61.com/custom-thresholding-for-specific-nodes-in-opennms.html#comments</comments>
		<pubDate>Mon, 30 Jan 2012 10:11:15 +0000</pubDate>
		<dc:creator>Robin Bowes</dc:creator>
				<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[opennms]]></category>

		<guid isPermaLink="false">http://yo61.com/?p=262</guid>
		<description><![CDATA[OpenNMS ships with the thresholds for some events already defined. For example, there is a memory threshold defined as: &#060;group name=&#034;netsnmp-memory-nonlinux&#034; rrdRepository=&#034;/opt/opennms/share/rrd/snmp/&#034;&#062; &#060;expression type=&#034;low&#034; expression=&#034;memAvailReal / memTotalReal * 100.0&#034; ds-type=&#034;node&#034; ds-label=&#034;&#034; value=&#034;5.0&#034; rearm=&#034;10.0&#034; trigger=&#034;2&#034;/&#062; &#060;/group&#062; ie. if free memory drops below 5% then an event will be created. The alert will be cancelled automatically if [...]]]></description>
			<content:encoded><![CDATA[<p>OpenNMS ships with the thresholds for some events already defined. For example, there is a memory threshold defined as:</p>
<pre><code>&lt;group name=&quot;netsnmp-memory-nonlinux&quot; rrdRepository=&quot;/opt/opennms/share/rrd/snmp/&quot;&gt;
        &lt;expression type=&quot;low&quot; expression=&quot;memAvailReal / memTotalReal * 100.0&quot; ds-type=&quot;node&quot; ds-label=&quot;&quot; value=&quot;5.0&quot; rearm=&quot;10.0&quot; trigger=&quot;2&quot;/&gt;
&lt;/group&gt;</code></pre>
<p>ie. if free memory drops below 5% then an event will be created. The alert will be cancelled automatically if free memory subsequently rises above 10%</p>
<p>I wanted to configure some specific nodes with a different threshold, eg. generate an event when free memory drops below 2.5%.</p>
<p>Here&#39;s what I did.</p>
<p><span id="more-262"></span>Add new Surveillance Category</p>
<p>Add nodes to new Surveillance Category</p>
<p>Add a new group to thresholds.xml:</p>
<pre>    &lt;group name=&quot;netsnmp-memory-linux-2.5&quot; rrdRepository=&quot;/opt/opennms/share/rrd/snmp/&quot;&gt;
        &lt;expression type=&quot;low&quot; ds-type=&quot;node&quot; value=&quot;2.5&quot; rearm=&quot;5.0&quot;
            trigger=&quot;2&quot; filterOperator=&quot;or&quot; expression=&quot;(memAvailReal + memCached) / memTotalReal * 100.0&quot;/&gt;
    &lt;/group&gt;</pre>
<p>Update threshd-configuration.xml to modify the existing netsnmp-memory-linux package and add a new netsnmp-memory-linux-2.5 package:</p>
<pre>    &lt;package name=&quot;netsnmp-memory-linux&quot;&gt;
        &lt;filter&gt;IPADDR != &#39;0.0.0.0&#39; &amp;amp; nodeSysOID == &#39;.1.3.6.1.4.1.8072.3.2.10&#39; &amp;amp; ! ( catincNetSNMP-Mem-2_5 )&lt;/filter&gt;
        &lt;include-range begin=&quot;1.1.1.1&quot; end=&quot;254.254.254.254&quot;/&gt;
        &lt;include-range begin=&quot;::1&quot; end=&quot;ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff&quot; /&gt;
        &lt;service name=&quot;SNMP&quot; interval=&quot;300000&quot; user-defined=&quot;false&quot; status=&quot;on&quot;&gt;
            &lt;parameter key=&quot;thresholding-group&quot; value=&quot;netsnmp-memory-linux&quot;/&gt;
        &lt;/service&gt;
    &lt;/package&gt;

    &lt;package name=&quot;netsnmp-memory-linux-2.5&quot;&gt;
        &lt;filter&gt;IPADDR != &#39;0.0.0.0&#39; &amp;amp; nodeSysOID == &#39;.1.3.6.1.4.1.8072.3.2.10&#39; &amp;amp; catincNetSNMP-Mem-2_5&lt;/filter&gt;
        &lt;include-range begin=&quot;1.1.1.1&quot; end=&quot;254.254.254.254&quot;/&gt;
        &lt;include-range begin=&quot;::1&quot; end=&quot;ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff&quot; /&gt;
        &lt;service name=&quot;SNMP&quot; interval=&quot;300000&quot; user-defined=&quot;false&quot; status=&quot;on&quot;&gt;
            &lt;parameter key=&quot;thresholding-group&quot; value=&quot;netsnmp-memory-linux-2.5&quot;/&gt;
        &lt;/service&gt;
    &lt;/package&gt;</pre>
<p>The tricky bit is the &quot;catincNetSNMP-Mem-2_5&quot;. This is a function &quot;catinc&quot; which matches all nodes in the specified category ie. &quot;NetSNMP-Mem-2_5&quot; in this example. The first use of it is in the netsnmp-memory-linux category to exclude nodes in the NetSNMP-Mem-2_5 category. The second use is to include nodes in the NetSNMP-Mem-2_5 category.</p>
]]></content:encoded>
			<wfw:commentRss>http://yo61.com/custom-thresholding-for-specific-nodes-in-opennms.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DNSimple Self Registration Recipe</title>
		<link>http://jtimberman.github.com/blog/2012/01/29/dnsimple-self-registration-recipe/</link>
		<comments>http://jtimberman.github.com/blog/2012/01/29/dnsimple-self-registration-recipe/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 02:00:00 +0000</pubDate>
		<dc:creator>Joshua Timberman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jtimberman.github.com/blog/2012/01/29/dnsimple-self-registration-recipe</guid>
		<description><![CDATA[Earlier this month, I completed a
switch to DNSimple for my
domain&#8217;s DNS provider. I am still happy with the switch, and finally,
just now, got around to writing a recipe to have my systems
automatically register themselves in DNS.

In the post, ...]]></description>
			<content:encoded><![CDATA[<p>Earlier this month, I completed a
<a href="http://jtimberman.github.com/blog/2012/01/02/switching-to-dnsimple/">switch to DNSimple</a> for my
domain&#8217;s DNS provider. I am still happy with the switch, and finally,
just now, got around to writing a recipe to have my systems
automatically register themselves in DNS.</p>

<p>In the post, I described automatically adding the DNS entries with the
<a href="http://community.opscode.com/cookbooks/dnsimple">dnsimple cookbook</a>.
I did this as a proof of concept, but I didn&#8217;t add it to all my nodes,
instead using my existing data bag-driven solution.</p>

<p>That said, this post serves as a brief document on how you can mimic
this behavior with your own environment.</p>

<h1>Encrypted Data Bag</h1>

<p>I put my DNSimple credentials in an
<a href="http://wiki.opscode.com/display/chef/Encrypted+Data+Bags">encrypted data bag</a>.
Since I have to decrypt and read the entire thing anyway, I also store
the relevant data there. I keep my encrypted data bags in a bag called
secrets. The structure looks like this:</p>

<figure class=’code’><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class=’line-number’>1</span>
<span class=’line-number’>2</span>
<span class=’line-number’>3</span>
<span class=’line-number’>4</span>
<span class=’line-number’>5</span>
<span class=’line-number’>6</span>
<span class=’line-number’>7</span>
</pre></td><td class=’code’><pre><code class=’javascript’><span class=’line’><span class="p">{</span>
</span><span class=’line’>  <span class="s2">&quot;id&quot;</span><span class="o">:</span> <span class="s2">&quot;dnsimple&quot;</span><span class="p">,</span>
</span><span class=’line’>  <span class="s2">&quot;api_token&quot;</span><span class="o">:</span> <span class="s2">&quot;DNSimple API Token Here&quot;</span><span class="p">,</span>
</span><span class=’line’>  <span class="s2">&quot;domain&quot;</span><span class="o">:</span> <span class="s2">&quot;your-domain.example.com&quot;</span><span class="p">,</span>
</span><span class=’line’>  <span class="s2">&quot;username&quot;</span><span class="o">:</span> <span class="s2">&quot;DNSimple username&quot;</span><span class="p">,</span>
</span><span class=’line’>  <span class="s2">&quot;password&quot;</span><span class="o">:</span> <span class="s2">&quot;DNSimple password&quot;</span>
</span><span class=’line’><span class="p">}</span>
</span></code></pre></td></tr></table></div></figure>


<p>Replace the values with your values. Encrypting the data is optional,
but requires that you create a secret key or key file. Read my
<a href="http://jtimberman.github.com/blog/2011/08/06/encrypted-data-bag-for-postfix-sasl-authentication/">previous post on the topic</a>
for more information.</p>

<figure class=’code’><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class=’line-number’>1</span>
<span class=’line-number’>2</span>
</pre></td><td class=’code’><pre><code class=’javascript’><span class=’line’><span class="o">%</span> <span class="nx">knife</span> <span class="nx">data</span> <span class="nx">bag</span> <span class="nx">from</span> <span class="nx">file</span> <span class="nx">secrets</span> <span class="nx">dnsimple</span><span class="p">.</span><span class="nx">json</span>
</span><span class=’line’><span class="o">%</span> <span class="nx">knife</span> <span class="nx">data</span> <span class="nx">bag</span> <span class="nx">from</span> <span class="nx">file</span> <span class="nx">secrets</span> <span class="nx">dnsimple</span><span class="p">.</span><span class="nx">json</span> <span class="o">–</span><span class="nx">secret</span><span class="o">-</span><span class="nx">file</span> <span class="o">/</span><span class="nx">etc</span><span class="o">/</span><span class="nx">chef</span><span class="o">/</span><span class="nx">encrypted_data_bag_secret</span>
</span></code></pre></td></tr></table></div></figure>


<p>The first command just uploads the data bag item, the second encrypts
it. Note that I manage my workstation with Chef, so I will use the
same secret file as the Chef default. The secret file needs to be
copied to each system that will need it.</p>

<h1>Recipe</h1>

<p>The recipe looks like this:</p>

<figure class=’code’><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class=’line-number’>1</span>
<span class=’line-number’>2</span>
<span class=’line-number’>3</span>
<span class=’line-number’>4</span>
<span class=’line-number’>5</span>
<span class=’line-number’>6</span>
<span class=’line-number’>7</span>
<span class=’line-number’>8</span>
<span class=’line-number’>9</span>
</pre></td><td class=’code’><pre><code class=’ruby’><span class=’line’><span class="n">dnsimple</span> <span class="o">=</span> <span class="n">encrypted_data_bag_item</span><span class="p">(</span><span class="s2">&quot;secrets&quot;</span><span class="p">,</span> <span class="s2">&quot;dnsimple&quot;</span><span class="p">)</span>
</span><span class=’line’><span class="n">dnsimple_record</span> <span class="s2">&quot;</span><span class="si">#{</span><span class="n">node</span><span class="o">[</span><span class="s1">&#39;hostname&#39;</span><span class="o">]</span><span class="si">}</span><span class="s2">.int.</span><span class="si">#{</span><span class="n">dnsimple</span><span class="o">[</span><span class="s1">&#39;domain&#39;</span><span class="o">]</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">do</span>
</span><span class=’line’>  <span class="n">content</span> <span class="n">node</span><span class="o">[</span><span class="s1">&#39;ipaddress&#39;</span><span class="o">]</span>
</span><span class=’line’>  <span class="n">type</span> <span class="s2">&quot;A&quot;</span>
</span><span class=’line’>  <span class="n">action</span> <span class="ss">:create</span>
</span><span class=’line’>  <span class="n">username</span> <span class="n">dnsimple</span><span class="o">[</span><span class="s1">&#39;username&#39;</span><span class="o">]</span>
</span><span class=’line’>  <span class="n">password</span> <span class="n">dnsimple</span><span class="o">[</span><span class="s1">&#39;password&#39;</span><span class="o">]</span>
</span><span class=’line’>  <span class="n">domain</span> <span class="n">dnsimple</span><span class="o">[</span><span class="s1">&#39;domain&#39;</span><span class="o">]</span>
</span><span class=’line’><span class="k">end</span>
</span></code></pre></td></tr></table></div></figure>


<p>As
<a href="http://jtimberman.github.com/blog/2011/08/06/encrypted-data-bag-for-postfix-sasl-authentication/">mentioned in the previous blog post</a>,
the <code>encrypted_data_bag_item</code> method is in a library. Either add that
library to your cookbook, or use the class directly.</p>

<figure class=’code’><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class=’line-number’>1</span>
</pre></td><td class=’code’><pre><code class=’ruby’><span class=’line’><span class="n">dnsimple</span> <span class="o">=</span> <span class="no">Chef</span><span class="o">::</span><span class="no">EncryptedDataBagItem</span><span class="o">.</span><span class="n">load</span><span class="p">(</span><span class="s2">&quot;secrets&quot;</span><span class="p">,</span> <span class="s2">&quot;dnsimple&quot;</span><span class="p">)</span>
</span></code></pre></td></tr></table></div></figure>


<p>If you&#8217;re not using an encrypted data bag, then the item can be
accessed with the normal method:</p>

<figure class=’code’><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class=’line-number’>1</span>
</pre></td><td class=’code’><pre><code class=’ruby’><span class=’line’><span class="n">dnsimple</span> <span class="o">=</span> <span class="n">data_bag_item</span><span class="p">(</span><span class="s2">&quot;bagname&quot;</span><span class="p">,</span> <span class="s2">&quot;dnsimple&quot;</span><span class="p">)</span>
</span></code></pre></td></tr></table></div></figure>


<p>The real work happens in the <code>dnsimple_record</code> LWRP, which will add an
&#8220;A&#8221; record for the system running the recipe. Note that the actual
entry is going to use the <code>int</code> subdomain, and it will use the domain
stored in the data bag item. It also will use the default IP address
of the node, which means the IP for the interface with the default
route.</p>
]]></content:encoded>
			<wfw:commentRss>http://infra-talk.org/2012/01/30/dnsimple-self-registration-recipe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iTerm2 with tmux</title>
		<link>http://jtimberman.github.com/blog/2012/01/28/iterm2-with-tmux/</link>
		<comments>http://jtimberman.github.com/blog/2012/01/28/iterm2-with-tmux/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 22:03:00 +0000</pubDate>
		<dc:creator>Joshua Timberman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jtimberman.github.com/blog/2012/01/28/iterm2-with-tmux</guid>
		<description><![CDATA[A new &#8220;which tool is best&#8221; battle is raging in the internets amongst
developers and system administrators. The contestants are screen
and tmux, and the
jury is still out.
This is very much an argument over what color to paint the bikeshed,
...]]></description>
			<content:encoded><![CDATA[<p>A new &#8220;which tool is best&#8221; battle is raging in the internets amongst
developers and system administrators. The contestants are <a href="http://www.gnu.org/software/screen/">screen</a>
and <a href="http://tmux.sourceforge.net/">tmux</a>, and the
<a href="https://www.google.com/search?q=tmux+vs+screen">jury is still out</a>.
This is very much an argument over what color to paint the bikeshed,
but with the latest version of
<a href="http://www.iterm2.com/">iTerm2</a>, I think tmux is even more
compelling. Personally, I chose tmux awhile ago.</p>

<p>At my <a href="http://opscode.com">day job</a>, I worked with a customer that
uses tmux for remote pairing between developers. At the time, tmux had
better customizability, and better split-pane support (screen didn&#8217;t
yet have vertical split). I stuck with tmux ever since, and was very
pleased when an iTerm2 update announced integration with tmux.</p>

<h1>iTerm2</h1>

<p>For those who aren&#8217;t aware, iTerm2 is an alternate terminal program
for Mac OS X. It is actually an updated codebase from the original,
<a href="http://iterm.sourceforge.net/">iTerm</a>, which is effectively
<a href="http://iterm.sourceforge.net/news.shtml">unmaintained</a>. iTerm2 offers
a lot of excellent features like split panes, Growl support, and
<a href="http://www.iterm2.com/#/section/features">many more</a>.</p>

<p>One of the excellent new features is integration with tmux.</p>

<h1>iTerm2&#8217;s tmux integration</h1>

<p>If you already have iTerm2 installed, you may have seen the update
check prompt you to update. You also need to install a special version
of tmux that has the integration patched. The iTerm2 author is working
with the tmux author to get this into the latest tmux codebase, so
hopefully the custom compiled version won&#8217;t be necessary soon.</p>

<p>Using the new feature is relatively straightforward. Start up iTerm2
like normal. Then run <code>tmux -C</code> to open a new iTerm2 window that works
like tmux.</p>

<p><img src="http://img.skitch.com/20120128-cxjbh9hf9feagn5p5ieg574uce.png" alt="Launch tmux in iTerm2" /></p>

<p>Use the tmux menu in iTerm2 to open new windows in tmux. Note that there
are keyboard shortcuts for each of these, and they are not the same as
the tmux window commands.</p>

<p><img src="http://img.skitch.com/20120128-diexhy69d8t3b9da6g65yjmsum.png" alt="Use tmux menu to open buffers" /></p>

<p>You can also attach to a tmux session running in iTerm2. In the
screenshot, this is running on the same system, for example purposes.
However, since OS X has SSH, this can be useful if you want to SSH to
another system in the local network and connect to the running
session. For example, the system shown below is my wife&#8217;s iMac over
screensharing, but I wouldn&#8217;t need to use screenshare (or participate
in its lag) to connect to this anymore. The same holds true for
connecting to my work laptop if necessary.</p>

<p><img src="http://img.skitch.com/20120128-txr67q3jftmcw26n84jm5hpgm.png" alt="Attach to tmux session in iTerm2" /></p>

<p>In this final example screenshot, you can see that I have multiple
panes split in one iTerm2 tab. These correspond to the split windows
in the attached tmux in the other window. Also, the two tabs in the
iTerm2 window are separate tmux windows (<code>0:zsh</code> and <code>1:zsh</code>).</p>

<p><img src="http://img.skitch.com/20120128-miaa1dkeatt2hebxcxst8sydy1.png" alt="iTerm2 panes are panes in tmux" /></p>

<p>And now, I can SSH to that system and attach to the tmux session
started by iTerm2.</p>

<p><img src="http://img.skitch.com/20120129-gjgajqnekq93da59m4r86ewh2k.png" alt="SSH to remote and run tmux attach" /></p>

<p><img src="http://img.skitch.com/20120129-j2x4iir5557nt68n5jmr64f8dp.png" alt="tmux is attached to iTerm2 session" /></p>

<h1>Automating Installation with Chef</h1>

<p>Installing OS X apps is quite easy, but I automate them
<a href="http://jtimberman.github.com/blog/2011/04/03/managing-my-workstations-with-chef/">with Chef</a>
anyway. While it is a simple &#8220;install update and restart&#8221;, with a
couple commands to install the update, I do have three systems I want
this on. I updated my
<a href="http://community.opscode.com/cookbooks/iterm2">iterm2 cookbook</a> to
support installing the tmux integration for iTerm2. This is disabled
by default, so it needs to be enabled via a node attribute. For
example, I have this in my <code>workstation</code> role applied to my OS X
workstations.</p>

<figure class=’code’><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class=’line-number’>1</span>
<span class=’line-number’>2</span>
<span class=’line-number’>3</span>
<span class=’line-number’>4</span>
<span class=’line-number’>5</span>
<span class=’line-number’>6</span>
<span class=’line-number’>7</span>
<span class=’line-number’>8</span>
</pre></td><td class=’code’><pre><code class=’ruby’><span class=’line’><span class="nb">name</span> <span class="s2">&quot;workstation&quot;</span>
</span><span class=’line’><span class="n">description</span> <span class="s2">&quot;Mac OS X workstations&quot;</span>
</span><span class=’line’><span class="n">run_list</span><span class="p">(</span><span class="s2">&quot;recipe[tmux]&quot;</span><span class="p">)</span>
</span><span class=’line’><span class="n">default_attributes</span><span class="p">(</span>
</span><span class=’line’>  <span class="s2">&quot;iterm2&quot;</span> <span class="o">=&gt;</span> <span class="p">{</span>
</span><span class=’line’>    <span class="s2">&quot;tmux_enabled&quot;</span> <span class="o">=&gt;</span> <span class="kp">true</span>
</span><span class=’line’>  <span class="p">}</span>
</span><span class=’line’><span class="p">)</span>
</span></code></pre></td></tr></table></div></figure>


<p>Check out the iterm2 cookbook&#8217;s README for more information.</p>
]]></content:encoded>
			<wfw:commentRss>http://infra-talk.org/2012/01/28/iterm2-with-tmux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

