<?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/"
	>

<channel>
	<title>btm.geek</title>
	<atom:link href="http://blog.loftninjas.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.loftninjas.org</link>
	<description></description>
	<pubDate>Fri, 12 Feb 2010 07:56:36 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Setting a permanent Windows Hostname on EC2</title>
		<link>http://blog.loftninjas.org/2010/02/12/setting-a-permanent-windows-hostname-on-ec2/</link>
		<comments>http://blog.loftninjas.org/2010/02/12/setting-a-permanent-windows-hostname-on-ec2/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 07:56:36 +0000</pubDate>
		<dc:creator>btm</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=464</guid>
		<description><![CDATA[In less than obvious fashion, Amazon EC2 Windows Server AMIs reset their hostname on startup due to the Ec2ConfigService. To disable this feature, select &#8216;EC2ConfigService Settings&#8217; from the start menu, and uncheck the first checkbox under &#8216;Set Computer Name&#8217;
]]></description>
			<content:encoded><![CDATA[<p>In less than obvious fashion, Amazon EC2 Windows Server AMIs reset their hostname on startup due to the Ec2ConfigService. To disable this feature, select &#8216;EC2ConfigService Settings&#8217; from the start menu, and uncheck the first checkbox under &#8216;Set Computer Name&#8217;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2010/02/12/setting-a-permanent-windows-hostname-on-ec2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Configuration Management vs Meatcloud: 5 reasons CM wins</title>
		<link>http://blog.loftninjas.org/2010/01/22/configuration-management-vs-meatcloud-5-reasons-cm-wins/</link>
		<comments>http://blog.loftninjas.org/2010/01/22/configuration-management-vs-meatcloud-5-reasons-cm-wins/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 22:21:45 +0000</pubDate>
		<dc:creator>btm</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[configuration management]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=462</guid>
		<description><![CDATA[First, a bit of social commentary.
Sometimes we refer to the way something ought to be accomplished as the RightWay[tm], sarcastically noting that every best practice contains a certain degree of opinion. As we dedicate more time to doing something our way, we become invested in it being the RightWay, and risk becoming defensive about our [...]]]></description>
			<content:encoded><![CDATA[<p>First, a bit of social commentary.</p>
<p>Sometimes we refer to the way something ought to be accomplished as the RightWay<a href="http://en.wikipedia.org/wiki/Trademark">[tm]</a>, sarcastically noting that every best practice contains a certain degree of opinion. As we dedicate more time to doing something our way, we become invested in it being the RightWay, and risk becoming defensive about our choices. Adam Jacob calls this &#8220;survivorship-bias,&#8221; and I&#8217;ve spent some time listening to him think about what he feels the risks are, and considering them myself. When we make significant personal investment in a choice, it becomes a personal challenge to remain impartial about the merits of that choice over time.</p>
<p>I&#8217;ve <a href="http://blog.loftninjas.org/2009/06/20/the-configuration-management-revolution/">previously</a> said that Configuration Management is the act of programatically configuring your systems. Cloud computing says that building servers is undifferentiated heavy lifting; unless your service is building servers, you should really let someone else do it and focus on the product or service you&#8217;re actually trying to sell. Configuration Management is the first step in bringing this same ideology to configuring systems. We are not in the business of selling configured servers any more than we are in the business of providing coffee to our employees, we happen to do both.  We build our systems to enable our business to conduct business. In my case, operations is enabling our customers to use the web product that we develop.</p>
<p>We are all members of the Configuration Management community, because we believe it is ultimately a better process for building systems. We naturally have different ideas about <a href="http://stochasticresonance.wordpress.com/2010/01/20/puppet-chef-dependencies-and-worldviews/">how that process should execute</a>, which among other differentiating factors is often that &#8220;<a href="http://sysdyn.clexchange.org/sdep/Roadmaps/RM1/D-4468-2.pdf">goals are different but are left unstated</a>&#8221; in the community. The level of preference here and resulting fragmentation is not any different than holding an opinion over what open source operating system one should use for a specific task. The merits of our choices are worth discussing, but the implication that tools and libraries should all come to the same conclusions about design is like implying that the world only needs one type of <a href="http://en.wikipedia.org/wiki/Hammer">hammer</a>.</p>
<p>So, defining the <a href="http://stochasticresonance.wordpress.com/2008/04/27/shared-metaphor-gnome-cloud-meat-pastries-20/">meatcloud</a> as the established notion that having your internet presence grow forms a direct relationship with hiring more people to rack servers, <a href="http://stochasticresonance.wordpress.com/2009/04/01/meatcloud-manifesto/">install software</a>, and update configuration files; I asked around a little, why do we think Configuration Management is better?</p>
<ul>
<li><strong>Abstractation</strong></li>
<p>You don&#8217;t need to be a mechanic to drive a car, should you need to be a subject matter expert on Apache to run a webserver? <a href="http://stochasticresonance.wordpress.com/2009/07/12/infrastructure-renaissance/">Infrastructure as code</a> shows us how and <a href="http://blog.loftninjas.org/2009/10/30/opscode-cookbooks-community-announced/">the resulting communities</a> are starting to implement this. When we spend less time getting the parts working, we can spend more time innovating better solutions with the parts.</p>
<li><strong>Self-documenting</strong></li>
<p>Ever rebuild a server that someone built long ago and is no longer with the organization, and find many small parts necessary to make it work that nobody bothered to write down? Placing those small changes and required files in configuration management ensures that even if the code doesn&#8217;t run flawlessly on an upgraded operating system, you know everything that went in to making it work. Since you&#8217;re configuring the system through configuration management, a lot less falls through the cracks because documentation is often an afterthought to getting the system working.</p>
<li><strong>Consistency and Repeatability</strong></li>
<p>What is on that system? Everything you told CM to put there. &#8216;<a href="http://madstop.com/2009/02/04/golden-image-or-foil-ball/">Golden image</a>&#8216; disk images often leave you in the aforementioned situation where you don&#8217;t know how to recreate them, but often you don&#8217;t know what else ended up there. Configuration Management allows you to build many copies of the same system easily, from scratch every time.</p>
<li><strong>Agility</strong></li>
<p>Did sales tell you they had fifty customers and it turned out to be five hundred? How long will it take you to build the extra servers by hand? How many extra people do you have to put into the meatcloud to get that done in time? Business requirements always change, and slow moving businesses are at a disadvantage to dealing with this. The inability to build and deploy servers fast enough should never be a reason your business fails.</p>
<li><strong>Flexibility, or Don&#8217;t Repeat Yourself</strong></li>
<p>Three applications on one server? Or one application on three servers? Apache doing different jobs on multiple servers? Moving applications between servers and leveraging existing infrastructure code for new projects is easy. We automate tasks that are repeatable, but often scripts are written to accomplish one repeatable task. Here we say, how can we treat configuration as sets of modular tasks that we can mix and match?</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2010/01/22/configuration-management-vs-meatcloud-5-reasons-cm-wins/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Moar unofficial chef 0.7.16.2</title>
		<link>http://blog.loftninjas.org/2010/01/07/moar-unofficial-chef-07162/</link>
		<comments>http://blog.loftninjas.org/2010/01/07/moar-unofficial-chef-07162/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 01:16:30 +0000</pubDate>
		<dc:creator>btm</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=457</guid>
		<description><![CDATA[Well a couple people used the 0.7.16wt1 release, including Thom May who had issues with that version number. Consequently I took out the &#8216;wt&#8217; from the version, but this is still an unofficial, unsupported release.
I pulled in the changes on Thom&#8217;s internal branch and grabbed some more low hanging fruit. Don&#8217;t ask what methodology I [...]]]></description>
			<content:encoded><![CDATA[<p>Well a couple people used the <a href="http://blog.loftninjas.org/2009/12/29/chef-0716wt1-fork-and-more-08-alpha-notes/">0.7.16wt1 release</a>, including Thom May who had <a href="http://github.com/thommay/chef/commit/dcf8f4e723aff57fe63a3a05f2a6c662ec924893">issues</a> with that version number. Consequently I took out the &#8216;wt&#8217; from the version, but this is still <strong>an unofficial, unsupported release</strong>.</p>
<p>I pulled in the changes on Thom&#8217;s internal branch and grabbed some more low hanging fruit. Don&#8217;t ask what methodology I used. It&#8217;s magic.</p>
<p>Grab the<a href="http://github.com/btm/chef/tree/0.7.16.2"> github branch</a>, or the debs in <a href="https://launchpad.net/~btm/+archive/ppa">my launchpad ppa</a>. I&#8217;ve only tested this on Ubuntu Karmic, as it goes.</p>
<p>** Bug<br />
* [<a href="http://tickets.opscode.com/browse/CHEF-454">CHEF-454</a>] - Centos4 yum provider failure<br />
* [<a href="http://tickets.opscode.com/browse/CHEF-616">CHEF-616</a>] - rake install in chef-repo breaks if there is no git origin<br />
* [<a href="http://tickets.opscode.com/browse/CHEF-637">CHEF-637</a>] - duplicate copies of FileEdit: file_edit.rb &amp; fileedit.rb<br />
* [<a href="http://tickets.opscode.com/browse/CHEF-639">CHEF-639</a>] - git resource fails on subsequent checkouts of the same repostiry<br />
* [<a href="http://tickets.opscode.com/browse/CHEF-642">CHEF-642</a>] - Services will always issue a WARN when status is not present<br />
* [<a href="http://tickets.opscode.com/browse/CHEF-684">CHEF-684</a>] - Should be possible for roles to be created without anything in the run_list<br />
* [<a href="http://tickets.opscode.com/browse/CHEF-704">CHEF-704</a>] - Ruby block device does not have a default action<br />
* [<a href="http://tickets.opscode.com/browse/CHEF-722">CHEF-722</a>] - Link provider doesn&#8217;t understand paths requiring expansion<br />
* [<a href="http://tickets.opscode.com/browse/CHEF-843">CHEF-843</a>] - FileEdit permission issues</p>
<p>** Improvement<br />
* [<a href="http://tickets.opscode.com/browse/CHEF-598">CHEF-598</a>] - Upstart service provider<br />
* [<a href="http://tickets.opscode.com/browse/CHEF-617">CHEF-617</a>] - Install to chef repository on a remote machine<br />
* [<a href="http://tickets.opscode.com/browse/CHEF-709">CHEF-709</a>] - Support for backup up files in another directory than the original file<br />
* [<a href="http://tickets.opscode.com/browse/CHEF-752">CHEF-752</a>] - No way to pass parameters to useradd provider</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2010/01/07/moar-unofficial-chef-07162/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Got recursion not available and Cisco SSL VPN</title>
		<link>http://blog.loftninjas.org/2010/01/06/got-recursion-not-available-and-cisco-ssl-vpn/</link>
		<comments>http://blog.loftninjas.org/2010/01/06/got-recursion-not-available-and-cisco-ssl-vpn/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 21:37:12 +0000</pubDate>
		<dc:creator>btm</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=455</guid>
		<description><![CDATA[I&#8217;ve periodically been having DNS lookup issues with internal domains and isolated them to remote SSL VPN clients connecting to a Cisco ASA 5520 using the Anyconnect SSL VPN client. I eventually got frustrated and troubleshooted the issue by using the command line &#8216;vpn&#8217; client to initiate a connection on a remote Ubuntu Linux machine [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve periodically been having DNS lookup issues with internal domains and isolated them to remote SSL VPN clients connecting to a Cisco ASA 5520 using the Anyconnect SSL VPN client. I eventually got frustrated and troubleshooted the issue by using the command line &#8216;vpn&#8217; client to initiate a connection on a remote Ubuntu Linux machine while here in the office. nslookup would produce the error &#8220;Got recursion not available from x.x.x.x, trying next server&#8221; and dig would respond with &#8220;status: REFUSED&#8221; and &#8220;;; WARNING: recursion requested but not available&#8221;. I noticed traffic was not making it to the Windows Server 2008 DNS server by watching wireshark and enabling DNS debugging.</p>
<p>Having been acquired six months ago our list of internal domains increased quite a bit. I found the &#8217;split-dns&#8217; setting in the default group access policy set to the old list of internal domains and set this to &#8217;split-dns none&#8217;. This resolved the issue. Apparently the client was comparing the query to its list of split-dns domains, and the match was failing so it was sending the resolver (operating system) an error message so it would go through the list of DNS servers until it tried the local server. Rather than trying to make a list of all the possible domain names in the company, I&#8217;m going to leave this off since the internal DNS servers have recursion enabled and can handle DNS lookups just fine for the remote clients.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2010/01/06/got-recursion-not-available-and-cisco-ssl-vpn/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Chef 0.7.16wt1 fork and more 0.8 alpha notes</title>
		<link>http://blog.loftninjas.org/2009/12/29/chef-0716wt1-fork-and-more-08-alpha-notes/</link>
		<comments>http://blog.loftninjas.org/2009/12/29/chef-0716wt1-fork-and-more-08-alpha-notes/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 02:43:02 +0000</pubDate>
		<dc:creator>btm</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=452</guid>
		<description><![CDATA[I sent an email out to the chef list today about releasing an unofficial Chef 0.7.16 fork to tide some of us over until 0.8 ships as Opscode does not plan any more 0.7.x releases. I use this internally at $job and pushed it out to github by request. I have no plans to push [...]]]></description>
			<content:encoded><![CDATA[<p>I sent an <a href="http://lists.opscode.com/sympa/arc/chef/2009-12/msg00061.html">email</a> out to the chef list today about releasing an unofficial Chef 0.7.16 fork to tide some of us over until 0.8 ships as Opscode <a href="http://www.opscode.com/blog/2009/10/26/chef-0-7-14-ohai-0-3-6-releases/">does not plan</a> any more 0.7.x releases. I use this internally at $job and pushed it out to github by request. I have no plans to push another release but will if there is demand internally or externally. This includes the security patches in 0.7.16 and a couple bug fixes:</p>
<p>* [<a href="http://tickets.opscode.com/browse/CHEF-706">CHEF-706</a>] - mount provider fails to mount samba/cifs devices (Device does not exist)<br />
* [<a href="http://tickets.opscode.com/browse/CHEF-634">CHEF-634</a>] - UI fails silently when unable to save node<br />
* [<a href="http://tickets.opscode.com/browse/CHEF-659">CHEF-659</a>] - UI expands some escaped characters from JSON, then fails to encode them again</p>
<p>You can grab this tree from <a href="http://github.com/btm/chef/tree/0.7.16wt1">github</a>, or use the debs built in <a href="https://launchpad.net/~btm/+archive/ppa">my launchpad PPA</a>.</p>
<p>Rather than making additional blog posts as the build for Chef 0.8 alpha has progressed, I&#8217;ve been updating <a href="http://gist.github.com/242523">this gist</a> each time I test another build cycle. My original instructions are <a href=" http://blog.loftninjas.org/2009/11/24/installing-chef-08-alpha-on-ubuntu-karmic/">here</a>. There is another blog posts <a href="http://likens.us/articles/2009/11/05/down-the-pipe-we-go/">here</a> and some instructions for <a href="http://likens.us/articles/2009/12/14/chef-8-down-and-dirty-in-screen/">running under screen</a> as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/12/29/chef-0716wt1-fork-and-more-08-alpha-notes/feed/</wfw:commentRss>
		</item>
		<item>
		<title>knife, or, my tool is actually a library</title>
		<link>http://blog.loftninjas.org/2009/12/24/knife-or-my-tool-is-actually-a-library/</link>
		<comments>http://blog.loftninjas.org/2009/12/24/knife-or-my-tool-is-actually-a-library/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 21:26:15 +0000</pubDate>
		<dc:creator>btm</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[chef]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=447</guid>
		<description><![CDATA[The Chef site starts out with, &#8220;Chef is a systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.&#8221; There is an important point hidden in that description; Chef is not a CM tool. Of course it can be used as one, and many do, but from its beginning it [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://wiki.opscode.com/display/chef/Home">Chef site</a> starts out with, &#8220;Chef is a systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.&#8221; There is an important point hidden in that description; Chef is not a CM tool. Of course it can be used as one, and many do, but from its beginning it has been leveraged by <a href="http://www.opscode.com/adoption">others</a> such as Engine Yard inside of their own infrastructure. You can safely bet it will be an integral part of the <a href="http://www.opscode.com/blog/2009/10/07/preview-chef-0-8-and-the-opscode-platform/">Opscode platform</a> when released as well.</p>
<p>While I was off dealing with my startup&#8217;s acquisition this fall, a chef user <a href="http://gist.github.com/100837">wrote</a> <a href="http://wiki.opscode.com/display/chef/Knife">knife</a>. It was a command line client for interacting with a chef server. An impressively simple prototype, made possible and powered by the chef libraries and API. This has happened before with chef; for instance a while ago in the 0.6 era, an OS X GUI client called <a href="http://github.com/fotonauts/casserole">Casserole</a> was written by another chef user with an itch to scratch. However, something has happened with knife that is interesting enough I&#8217;d like to specifically point out; it got <a href="http://github.com/opscode/chef/blob/master/chef/lib/chef/knife.rb">mainlined</a> and heavily expanded.</p>
<p>This happened for a handful of reasons. For one, it was simply a great idea. The kind of user who would be attracted to chef as a tool is very likely to be a power user who would rather not spend their time clicking around a graphical interface. It&#8217;s much easier to script a command line tool where needed, passing data in and out for quick hacks to your infrastructure. The folks at Opscode saw this, agreed, and set out to add full functionality to it for the upcoming 0.8 release.</p>
<p>What I think is most important is the planning a full API from the start. From hearing <a href="http://twitter.com/adamhjk">Adam</a> talk about other tools being &#8220;first-class citizens&#8221; in chef-land, and knowing his experience writing <a href="http://github.com/adamhjk/iclassify/">iClassify</a> as an early open source <a href="http://reductivelabs.com/trac/puppet/wiki/ExternalNodes">external node</a> tool for <a href="http://reductivelabs.com/products/puppet/">puppet</a>, I know this design was intentional. Using iClassify to tell puppet about your nodes was great, but puppet assumed that you only wanted this tool to classify nodes in the way puppet thought about nodes. Consequentially, when you wanted to to use data in iClassify about your nodes to make decisions about your infrastructure on the fly, you were forced to do it in templates. This created the expected repetition of loading the iClassify library and accessing iClassify in many templates, but also required you at times to do some fancy footwork to get data between templates when you really wanted puppet to know about the data itself.</p>
<p>Reductive Labs recently <a href="http://reductivelabs.com/2009/12/14/a-tour-of-puppet-dashboard-0-1-0/">announced a dashboard for puppet</a>. I was hoping this meant those barriers had been removed. It certainly creates <a href="http://reductivelabs.com/wp-content/uploads/2009/12/Puppet-Dashboard.png">really nice graphs</a> from your <a href="http://reductivelabs.com/trac/puppet/wiki/ReportsAndReporting">puppet report data</a>. However from the <a href="http://github.com/reductivelabs/puppet-dashboard/blob/master/README.markdown">README</a> it looks like you&#8217;re still pushing limited data into puppet using the external node interface. Reductive is going to have to expand this interface greatly if dashboard is to have any meaningful node integration benefits that we didn&#8217;t already have two years ago with iClassify.</p>
<p>Just as you can see some concepts from other configuration management tools in chef, you can <a href="http://wiki.github.com/adamhjk/iclassify/screen-shots">see parts of iClassify</a>. It was a great start and it was disappointing that the puppet community didn&#8217;t engage it further. Perhaps it was simply before its time, but I believe it was that there were too few doors into puppet-land to let you really take advantage of and grow external tools.</p>
<p>I think this was the lesson that Opscode learned, and consequently chef was born with an API. With it we can accomplish nearly anything we dream up. What is most exciting about this is that we can <strong>do whatever everyone else dreams up</strong>. I can&#8217;t wait to see what that is.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/12/24/knife-or-my-tool-is-actually-a-library/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Error 80070005 accessing SSIS/DTS on SQL 2008 and Server 2008</title>
		<link>http://blog.loftninjas.org/2009/12/16/error-80070005-accessing-ssisdts-on-sql-2008-and-server-2008/</link>
		<comments>http://blog.loftninjas.org/2009/12/16/error-80070005-accessing-ssisdts-on-sql-2008-and-server-2008/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 16:43:37 +0000</pubDate>
		<dc:creator>btm</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=445</guid>
		<description><![CDATA[Retrieving the COM class factory for component with CLSID {BA785E28-3D7B-47AE-A4F9-4784F61B598A} failed due to the following error: 80070005. (Microsoft.SqlServer.ManagedDTS)
Trying to access SSIS (DTS) on Microsoft SQL 2008 with SSMS (SQL Server Management Studio) on Microsoft Windows Server 2008 gave the above error. Trying to create a maintenance plan provided the same error, since it uses SSIS. [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Retrieving the COM class factory for component with CLSID {BA785E28-3D7B-47AE-A4F9-4784F61B598A} failed due to the following error: 80070005. (Microsoft.SqlServer.ManagedDTS)</p></blockquote>
<p>Trying to access SSIS (DTS) on Microsoft SQL 2008 with SSMS (SQL Server Management Studio) on Microsoft Windows Server 2008 gave the above error. Trying to create a maintenance plan provided the same error, since it uses SSIS. There were indications online that I should try running SSMS with elevated permissions using the &#8216;Run as administrator&#8217; option on the context (right-click) menu, however that provided a &#8220;The parameter is incorrect&#8221; error on startup. Eventually I discovered that the disk that the SQL tools were installed on did not have default (R+X) permissions to the local users group. Once I added this group, I was able to connect to SSIS and create a maintenance plan without issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/12/16/error-80070005-accessing-ssisdts-on-sql-2008-and-server-2008/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Scripting the root password on Ubuntu 9.10 (karmic)</title>
		<link>http://blog.loftninjas.org/2009/12/07/scripting-the-root-password-on-ubuntu-910-karmic/</link>
		<comments>http://blog.loftninjas.org/2009/12/07/scripting-the-root-password-on-ubuntu-910-karmic/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 21:17:18 +0000</pubDate>
		<dc:creator>btm</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=442</guid>
		<description><![CDATA[On Ubuntu 9.04 (jaunty) I had been generating and setting the root password in a bootstrapping script using:
# Generated MD5 encrypted password
/usr/bin/openssl passwd -1
# Set the password
/bin/echo 'root:ENCRYPTED_PASSWORD' &#124; /usr/sbin/chpasswd -e
With shadow 4.1.4, chpasswd now uses PAM, and has dropped the -e option used above, as well as the -c option that I&#8217;d used to [...]]]></description>
			<content:encoded><![CDATA[<p>On Ubuntu 9.04 (jaunty) I had been generating and setting the root password in a bootstrapping script using:</p>
<p><code># Generated MD5 encrypted password<br />
/usr/bin/openssl passwd -1<br />
# Set the password<br />
/bin/echo 'root:ENCRYPTED_PASSWORD' | /usr/sbin/chpasswd -e</code></p>
<p>With shadow 4.1.4, chpasswd now uses PAM, and has dropped the -e option used above, as well as the -c option that I&#8217;d used to <a href="http://blog.loftninjas.org/2009/03/11/generating-sha512-passwords/">generate sha512 encrypted passwords</a>. You&#8217;ll want to use mkpasswd from the whois package (yeah, weird) for that now, such as:</p>
<p><code>mkpasswd -m sha-512 -s</code></p>
<p>The password can be presented to useradd / usermod in encrypted format, such as:</p>
<p><code>/usr/sbin/useradd -m -p 'ENCRYPTED_PASSWORD' -G admin -s /bin/bash toor</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/12/07/scripting-the-root-password-on-ubuntu-910-karmic/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Installing Chef 0.8 alpha on Ubuntu Karmic</title>
		<link>http://blog.loftninjas.org/2009/11/24/installing-chef-08-alpha-on-ubuntu-karmic/</link>
		<comments>http://blog.loftninjas.org/2009/11/24/installing-chef-08-alpha-on-ubuntu-karmic/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 10:42:03 +0000</pubDate>
		<dc:creator>btm</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[chef]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=435</guid>
		<description><![CDATA[Theres push to get Chef 0.8 out the door because we&#8217;re all anxious for its awesome list of features and fixes, so we&#8217;re all hunkering down on fixing bugs. Scott Likens has similar notes and theres some more to be found in Dan Deleo&#8217;s 08boot bootstrap recipe. This should help get you going.
On a fresh [...]]]></description>
			<content:encoded><![CDATA[<p>Theres push to get Chef 0.8 out the door because we&#8217;re all anxious for its awesome list of <a href="http://tickets.opscode.com/browse/CHEF/fixforversion/10013">features and fixes</a>, so we&#8217;re all hunkering down on fixing bugs. Scott Likens has <a href="http://likens.us/articles/2009/11/05/down-the-pipe-we-go/">similar notes</a> and theres some more to be found in Dan Deleo&#8217;s <a href="http://github.com/danielsdeleo/cookbooks/blob/08boot/bootstrap/recipes/server.rb">08boot bootstrap recipe</a>. This should help get you going.</p>
<p><strong>On a fresh Ubuntu Karmic install (a VM makes this easy of course):</strong><br />
# Add the Canonical Ubuntu &#8216;multiverse&#8217; repository for Java.<br />
sudo vi /etc/apt/sources.list # add multiverse to your &#8216;deb&#8217; lines if it is not there<br />
sudo apt-get update</p>
<p># Start <a href="http://wiki.opscode.com/display/chef/Bootstrap+Chef+RubyGems+Installation">Chef Gem bootstrap</a> with some notes<br />
# note that I don&#8217;t like to install rubygems from source and use the packages instead. this adds a step or two.<br />
sudo apt-get install ruby ruby1.8-dev libopenssl-ruby1.8 rdoc ri irb build-essential wget ssl-cert rubygems git-core -y<br />
sudo gem sources -a http://gems.opscode.com<br />
sudo gem sources -a http://gemcutter.org # for nanite<br />
sudo gem install ohai chef json &#8211;no-ri &#8211;no-rdoc</p>
<p><strong>We now have enough chef to bootstrap ourselves</strong><br />
# Create ~/chef.json:</p>
<pre>{
  "bootstrap": {
    "chef": {
      "url_type": "http",
      "init_style": "runit",
      "path": "/srv/chef",
      "serve_path": "/srv/chef",
      "server_fqdn": "localhost"
    }
  },
  "recipes": "bootstrap::server"
}
# End of file
</pre>
<p># Create ~/solo.rb:</p>
<pre>file_cache_path "/tmp/chef-solo"
cookbook_path "/tmp/chef-solo/cookbooks"
# End of file
</pre>
<p>mkdir /tmp/chef-solo<br />
cd /tmp/chef-solo<br />
# Get kallistec&#8217;s 08boot bootstrap cookbook<br />
git clone git://github.com/danielsdeleo/cookbooks.git<br />
cd cookbooks<br />
git checkout 08boot<br />
# Bootstrap chef<br />
sudo /var/lib/gems/1.8/bin/chef-solo -j ~/chef.json -c ~/solo.rb<br />
# If the bootstrap hangs for more than a minute after &#8220;Installing package[couchdb] version 0.10.0-0ubuntu3&#8243; then hit ctrl+c and run again</p>
<p><strong>Now prepare to install the development versions</strong><br />
# install some development tools<br />
sudo apt-get install rake librspec-ruby -y<br />
sudo gem install cucumber merb-core nanite jeweler uuidtools<br />
# install missing dependencies<br />
sudo apt-get install libxml-ruby thin -y<br />
# get chef from the repository<br />
mkdir ~/src<br />
cd ~/src<br />
git clone git://github.com/opscode/chef.git<br />
cd chef<br />
rake install<br />
# remove the old version of chef<br />
sudo gem uninstall chef -v0.7.14<br />
# patch up some runit paths<br />
sudo sed -i s_chef-_/var/lib/gems/1.8/gems/chef-solr-0.8.0/bin/chef-_ /etc/sv/chef-solr*/run<br />
# allow access to futon for development purposes (http://IPADDRESS:5984/_utils)<br />
sudo sed -i &#8217;s/;bind_address = 127.0.0.1/bind_address = 0.0.0.0/&#8217; /etc/couchdb/local.ini<br />
sudo apt-get install psmisc # for killall<br />
sudo /etc/init.d/couchdb stop<br />
sudo killall -15 couchdb # stubborn<br />
sudo killall -15 beam.smp # yup<br />
# shut it all down<br />
sudo /etc/init.d/chef-solr stop<br />
sudo /etc/init.d/chef-solr-indexer stop<br />
sudo /etc/init.d/chef-solr-client stop<br />
sudo /etc/init.d/chef-client stop<br />
sudo /etc/init.d/chef-server stop<br />
sudo killall -15 chef-server</p>
<p><strong>Build some data and start up Chef</strong><br />
# start up the integration environment<br />
cd ~/src/chef<br />
sudo rake dev:features<br />
# this will create a database<br />
# now hit ctrl+c<br />
sudo mv /var/lib/couchdb/0.10.0/chef_integration.couch /var/lib/couchdb/0.10.0/chef.couch<br />
sudo chown couchdb:couchdb /var/lib/couchdb/0.10.0/chef.couch<br />
# start it all up<br />
sudo /etc/init.d/couchdb start<br />
sudo /etc/init.d/rabbitmq-server start<br />
sudo /etc/init.d/chef-solr start<br />
sudo /etc/init.d/chef-solr-indexer start<br />
sudo /etc/init.d/chef-server start</p>
<p><strong>Start the web server</strong><br />
# the web server is now a separate application and uses the API to reach the server<br />
sudo cp /tmp/chef_integration/webui.pem /etc/chef<br />
cd ~/src/chef/chef-server-webui<br />
sudo /var/lib/gems/1.8/bin/slice -p 4002</p>
<p><strong>Using knife</strong><br />
From the user interface you can create a client keypair to use knife from the web interface. I recommend using &#8216;view source&#8217; to copy the private key, and remember to save it without any leading whitespace and run knife like so:</p>
<p>OPSCODE_USER=&#8217;btm&#8217; OPSCODE_KEY=&#8217;/home/btm/btm.key&#8217; /var/lib/gems/1.8/bin/knife</p>
<p>If you can&#8217;t get it to work, you can always use the webui&#8217;s key:</p>
<p>sudo OPSCODE_USER=&#8217;chef-webui&#8217; OPSCODE_KEY=&#8217;/etc/chef/webui.pem&#8217; /var/lib/gems/1.8/bin/knife</p>
<p>Hopefully that is enough to get you going. Jump on #chef on irc.freenode.net or join the <a href="http://lists.opscode.com/sympa/info/chef">chef list</a> if you have any problems. <a href="http://tickets.opscode.com">Tickets/bugs/features</a> are tracked in JIRA, and all sorts of other useful information is in <a href="http://wiki.opscode.com/display/chef/Home">the wiki</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/11/24/installing-chef-08-alpha-on-ubuntu-karmic/feed/</wfw:commentRss>
		</item>
		<item>
		<title>HP SMH On Ubuntu Karmic</title>
		<link>http://blog.loftninjas.org/2009/11/23/hp-smh-on-ubuntu-karmic/</link>
		<comments>http://blog.loftninjas.org/2009/11/23/hp-smh-on-ubuntu-karmic/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 20:29:02 +0000</pubDate>
		<dc:creator>btm</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=431</guid>
		<description><![CDATA[I recently had to install HP&#8217;s System Management Homepage (SMH) on Ubuntu Karmic (9.10) on hardware I had never touched for Hosted Operations to monitor. The hardware wasn&#8217;t my choice, but I&#8217;m indifferent to it. The operating system is my choice. Apparently they support Debian Lenny (5.0) and Ubuntu Jaunty (9.04), but ours was too [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had to install HP&#8217;s System Management Homepage (SMH) on Ubuntu Karmic (9.10) on hardware I had never touched for Hosted Operations to monitor. The hardware wasn&#8217;t my choice, but I&#8217;m indifferent to it. The operating system is my choice. Apparently they support Debian Lenny (5.0) and Ubuntu Jaunty (9.04), but ours was too new. However, while I commend them for building debs, they&#8217;re a little sketchy and broken. Granted, I wasn&#8217;t deploying to a supported release, but nonetheless. Here&#8217;s a link to download options for the <a href="http://h20000.www2.hp.com/bizsupport/TechSupport/DriverDownload.jsp?prodNameId=3884320&amp;lang=en&amp;cc=us&amp;taskId=135&amp;prodClassId=-1&amp;prodTypeId=15351&amp;prodSeriesId=3884319">DL360 G6</a>, that may never work because the HP site isn&#8217;t meant to be linked to.</p>
<p>Downloading the provided Ubuntu Jaunty iso and mounting it produced a standard debian repository tree for both lenny and jaunty.<br />
<code>sudo mount -o loop HP_ProLiant_Value_Add_Software-8.25-19-12.iso /mnt</code></p>
<p>I added these packages to our local respository, but you can copy them to every server and install them by hand using &#8216;dpkg -i DEB&#8217; instead of &#8216;apt-get install PACKAGE&#8217;. You&#8217;ll end up installing all of them really. The HP SMH package is mostly an apache fork and a ton of included/vendored libraries.</p>
<p>You&#8217;ll log in to HP SMH on port 2381 over HTTPS. As usual, if you get a data stream, you are likely connecting over HTTP by accident. By default a user must be in the &#8216;root&#8217; group. You can use &#8216;vigr&#8217; to add another user to the root group as you usually don&#8217;t have a root user on Ubuntu. You can edit &#8216;/opt/hp/hpsmh/conf/smhpd.xml&#8217; and put another group in the &#8216;admin-group&#8217; element. I put &#8216;domain-admins&#8217; there because we use likewise to authenticate against a windows domain. I couldn&#8217;t figure out how to have groups added via the web interface to save, but that really was a hoop anyway since I wanted to push the configuration files out via configuration management.</p>
<p>I don&#8217;t know if HP SMH reads snmpd.conf to figure out how to connect back to snmp locally, but I had to initially run &#8216;/sbin/hpsnmpconfig&#8217; to generate a few wizardy lines in /etc/snmp/snmpd.conf&#8217;. I later pushed this out via configuration management, but if you check that script it does create an &#8220;answer file&#8221; which looked like a bunch of variables you could export before you run the script non-interactively.</p>
<p>HP SMH gets its information from the HP SNMP agents, so if you log in and don&#8217;t see any data, it can not contact the SNMP source. You should see a page <a href="http://www.flickr.com/photos/btmspox/4128313405/">like this</a>. Because so many libraries are shipped in the debs rather than being required, libraries are the most common source of <a href="http://debian.catsanddogs.com/component/option,com_smf/Itemid,41/topic,15.0/">issues</a>. I had to restart &#8216;hp-snmp-agents&#8217; after installation, getting this error on the initial startup in &#8216;/var/log/hp-snmp-agents/cma.log&#8217;:</p>
<blockquote><p>libcmacommon.so.1: cannot open shared object file: No such file or directory</p></blockquote>
<p>Another way to say all of this is via my chef recipe:</p>
<pre class="syntax-highlight:ruby">
#
# Cookbook Name:: hpsmh
# Recipe:: default
#
# Copyright 2009, Webtrends
#
# Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# Restart hp-snmp-agents later. it is buggy and has issues with its own libraries when started on package installation
service &quot;hp-snmp-agents&quot; do
  action :nothing
end

package &quot;hp-health&quot;
package &quot;hpacucli&quot;
package &quot;cpqacuxe&quot;
package &quot;hp-snmp-agents&quot; do
  notifies :restart, resources(:service =&gt; &quot;hp-snmp-agents&quot;)
end
package &quot;hp-smh-templates&quot;
package &quot;hpsmh&quot;

service &quot;hpsmhd&quot; do
  action [ :start, :enable ]
end

service &quot;snmpd&quot; do
  action [ :start, :enable ]
end

remote_file &quot;/opt/hp/hpsmh/conf/smhpd.xml&quot; do
  source &quot;smhpd.xml&quot;
  owner &quot;root&quot;
  group &quot;root&quot;
  mode 0644
  notifies :restart, resources(:service =&gt; &quot;hpsmhd&quot;)
end

remote_file &quot;/etc/snmp/snmpd.conf&quot; do
  source &quot;snmpd.conf&quot;
  owner &quot;root&quot;
  group &quot;root&quot;
  mode 0644
  notifies :restart, resources(:service =&gt; &quot;snmpd&quot;)
end
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/11/23/hp-smh-on-ubuntu-karmic/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Talent is Human</title>
		<link>http://blog.loftninjas.org/2009/11/19/talent-is-human/</link>
		<comments>http://blog.loftninjas.org/2009/11/19/talent-is-human/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 04:05:15 +0000</pubDate>
		<dc:creator>btm</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=427</guid>
		<description><![CDATA[As I look back at growing up in a small town, there was a surprising lack of everyone wanting to move to the city as soon as they could. Perhaps that was because there is not a recognizible city anywhere near coastal eastern Maine. Despite, there still was a lingering belief that people were different [...]]]></description>
			<content:encoded><![CDATA[<p>As I look back at growing up in a small town, there was a surprising lack of everyone wanting to move to the city as soon as they could. Perhaps that was because there is not a recognizible city anywhere near coastal eastern Maine. Despite, there still was a lingering belief that people were different elsewhere. Granted, they&#8217;re different, but in the same ways.</p>
<p>The majority of those I consider my colleagues have not worked for the same companies that I have. While our projects are of importance to our companies, it is usually our passion and not our employment that drive them. Some days I feel certain this is commonly understood, but it only takes a personal blog policy or a social media marketing drive to remind me that I&#8217;m actually isolated on an island of like-minded individuals hiding under the radar like stowaways. You can&#8217;t escape culture, but you can find different ones.</p>
<p>In Paul Graham&#8217;s recent essay about <a href="http://paulgraham.com/apple.html">Apple</a>, he markedly warns of mistreating the developers of your platform, lest they form a distaste for your brand altogether. Before I read the essay I was feeling quite sure that it was commonly understood today that developers are your greatest asset. Perhaps more valuable than even your big idea. Likely due to being mentioned by name in the essay, I was reminded of the great Google interview algorithm; commonly known for streamlining their processes at the cost of the interviewee. This seems to only alienate the prospect, unless they happen to enjoy passing tests over creating value. As the strengths of mass-collaboration become more accepted, it strikes me odd that on the whole we&#8217;re still missing that it is made up of individual human talent.</p>
<p>The product of our creativity is no longer hidden behind towering walls of corporations. We are global citizens innovating for the sake of it. You won&#8217;t see this on a college transcript, in ones knowledge of <a href="http://www.google.com">inodes</a>, or in a six month <a href="http://www.paulgraham.com/startuplessons.html">product road map</a> of release stability. The pieces are <a href="http://www.ohloh.net/">not exactly hidden</a> either. I&#8217;m tempted to point out how slowly we&#8217;re changing by example with the United States&#8217; difficulty transitioning from educating factory workers to innovators now that globalization has helped much of the the rest of the world catch up as industrial nations. However I can&#8217;t help but remember that we&#8217;ve gotten this far  on our own.</p>
<p>Despite reminding us that we are living in a small town, the murmuring you&#8217;ve heard from pundits and rabble-rousers but could not make out sounds perfectly clear here. We are not going to wait for you to get it. The catch is that we no longer need to move to the city, because we&#8217;re building it every day. Coming?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/11/19/talent-is-human/feed/</wfw:commentRss>
		</item>
		<item>
		<title>libvirt + kvm TLS authentication on Ubuntu karmic</title>
		<link>http://blog.loftninjas.org/2009/11/17/libvirt-kvm-tls-authentication-on-ubuntu-karmic/</link>
		<comments>http://blog.loftninjas.org/2009/11/17/libvirt-kvm-tls-authentication-on-ubuntu-karmic/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 06:38:04 +0000</pubDate>
		<dc:creator>btm</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=423</guid>
		<description><![CDATA[I have a number of Windows Server 2008 hosts running under KVM in a remote datacenter and using virt-manager to access libvirt+kvm over SSH for a remote console was disappointly slow, so I set out to try libvirt+kvm over SSL/TLS for comparison. In the process of which I had to upgrade virt-manager to 0.8.0 on [...]]]></description>
			<content:encoded><![CDATA[<p>I have a number of Windows Server 2008 hosts running under KVM in a remote datacenter and using virt-manager to access libvirt+kvm over SSH for a remote console was disappointly slow, so I set out to try libvirt+kvm over SSL/TLS for comparison. In the process of which I had to upgrade virt-manager to 0.8.0 on my workstation to remove a VNC lag issue in the viewer built into virt-manager on karmic. In the end, I&#8217;m quite happy with the end result.</p>
<h2>Creating Certificates</h2>
<p>The available documentation for configuring TLS authentication for libvirt is a little daunting. My chosen references were these documents for <a href="http://libvirt.org/remote.html">libvirtd</a> and <a href="http://virt-manager.org/page/RemoteTLS">virt-manager</a>.</p>
<p>First create two certificates, one with the hostname for your server (SERVER.EXAMPLE.ORG below) and one for your workstation (CLIENT.EXAMPLE.ORG below), setting the fully qualified domain name (FQDN, the hostname including the domain name) as the Common Name, or CN, when prompted.<br />
<code>openssl genrsa -des3 -out host.example.org.tmp<br />
openssl rsa -in host.example.org.tmp -out host.example.org.key<br />
rm host.example.org.tmp<br />
openssl req -new -key host.example.org.key -out host.example.org.csr</code></p>
<p>Providing the CSR to your local CA should present you with a signed certificate (host.example.com.cer). Be sure it is in Base64 format (text) and not DER (binary) if interacting with a Microsoft CA. If you are unfamiliar with this process, you&#8217;ll want to go and <a href="http://www.openssl.org/docs/HOWTO/certificates.txt">read up</a> a bit first, it&#8217;s a useful hoop to learn to jump through.</p>
<h2>Installing Certificates</h2>
<p><code># Libvirt Server<br />
mkdir -p /etc/pki/CA<br />
mkdir -p /etc/pki/libvirt/private<br />
mkdir -p /etc/pki/libvirt-vnc<br />
cp CA.EXAMPLE.ORG /etc/pki/CA/cacert.pem<br />
cp CA.EXAMPLE.ORG /etc/pki/libvirt-vnc/ca-cert.pem<br />
cp SERVER.EXAMPLE.ORG.key /etc/pki/libvirt/private/serverkey.pem<br />
cp SERVER.EXAMPLE.ORG.key /etc/pki/libvirt-vnc/server-key.pem<br />
cp SERVER.EXAMPLE.ORG.cer /etc/pki/libvirt/servercert.pem<br />
cp SERVER.EXAMPLE.ORG.cer /etc/pki/libvirt-vnc/server-cert.pem</code></p>
<p><code> </code></p>
<p><code># Virt-manager client<br />
# notice the lack of dashes in clientcert.pem<br />
mkdir -p /etc/pki/CA<br />
mkdir -p /etc/pki/libvirt/private<br />
mkdir -p /etc/pki/libvirt-vnc<br />
cp CA.EXAMPLE.ORG /etc/pki/CA/cacert.pem<br />
cp CA.EXAMPLE.ORG /etc/pki/libvirt-vnc/ca-cert.pem<br />
cp CLIENT.EXAMPLE.ORG.key /etc/pki/libvirt/private/clientkey.pem<br />
cp CLIENT.EXAMPLE.ORG.key /etc/pki/libvirt-vnc/clientkey.pem<br />
cp CLIENT.EXAMPLE.ORG.cer /etc/pki/libvirt/clientcert.pem<br />
cp CLIENT.EXAMPLE.ORG.cer /etc/pki/libvirt-vnc/clientcert.pem</code></p>
<h2>Apparmor Fixes</h2>
<p>If libvirtd fails to start (which it likely will without these fixes) you&#8217;ll see errors in &#8216;/var/log/user.log&#8217; such as:</p>
<blockquote><p>Nov 17 17:08:09 lasvirt01 kernel: [69476.008895] type=1503 audit(1258506489.178:77): operation=&#8221;open&#8221; pid=17104 parent=1 profile=&#8221;libvirt-600d5dae-6373-107e-5f1b-5010aff3ffed&#8221; requested_mask=&#8221;r::&#8221; denied_mask=&#8221;r::&#8221; fsuid=0 ouid=0 name=&#8221;/etc/pki/libvirt-vnc/ca-cert.pem&#8221;</p></blockquote>
<p>You&#8217;ll need to patch up the apparmor definitions a little:</p>
<ul>
<li>Due to <a href="https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/462000">Bug# 462000</a>, upgrade to libvirt-bin=0.7.0-1ubuntu13.1 from karmic-proposed (unless it has made it to karmic-updates when you read this)</li>
<li>Due to <a href="https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/484562">Bug #484562</a>, Add &#8220;/etc/pki/libvirt-vnc/** r,&#8221; to &#8220;/etc/apparmor.d/abstractions/libvirt-qemu&#8221;</li>
<li>run /etc/init.d/apparmor reload</li>
</ul>
<h2>Server Configuration</h2>
<p>By default libvirt and VNC don&#8217;t allow remote connections and rely on unix sockets for connections. You&#8217;ll need to enable</p>
<ul>
<li>Add &#8220;&#8211;listen&#8221; to &#8220;libvirtd_opts&#8221; in /etc/default/libvirt-bin</li>
<li>Uncomment &#8220;vnc_tls = 1&#8243; and &#8220;vnc_tls_x509_verify = 1&#8243; in &#8220;/etc/libvirt/qemu.conf&#8221;</li>
<li>Edit your guests (virsh edit GUEST) and add &#8220;listen=&#8217;0.0.0.0&#8242;&#8221; to the <a href="http://libvirt.org/formatdomain.html#elementsGraphics">graphics element</a></li>
<li>run /etc/init.d/libvirt-bin restart</li>
<li>cold boot any running guests (full stop, not a restart, to pick up guest xml definition changes)</li>
</ul>
<h2>Virt-manager Configuration</h2>
<p>Add a new connection, choosing &#8216;QEMU/KVM&#8217; as the Hypervisor and &#8216;Remote SSL/TLS with x509 certificate&#8217; as the Connection, with the full hostname of the remote server and choose Connect. Otherwise operate like you used to.</p>
<h2>VNC Lag Caveat</h2>
<p>I had an issue where the display was lagging every view seconds on the VNC session via virt-manager, but when I connected directly using virt-viewer (virt-viewer &#8211;connect qemu://HOST.EXAMPLE.ORG/system GUEST_DOMAIN) there was no lag. Interestingly, when you kept both open at the same and ran a command like &#8216;ls -lR /&#8217; you could easily see the difference. To correct this, I had to backport virt-manager=0.8.0-2 from debian sid, including &#8216;virtinst&#8217; and &#8216;libvirt&#8217;, the latter requiring a change of &#8216;libxen3-dev&#8217; to &#8216;libxen-dev&#8217; in the Build-Depends. This is a somewhat complicated task for those unfamiliar with debian packaging.</p>
<h2>Troubleshooting</h2>
<p>I found most of my apparmor related errors by running &#8216;tail -f /var/log/user.log&#8217;. A lot of documentation recommended uncommenting &#8216;vnc_listen&#8217; in &#8216;/etc/libvirt/qemu.conf&#8217; but I found that the aforementioned listen xml attribute in the guest configuration overrode that by looking at the &#8216;-vnc&#8217; options passed to kvm by libvirt by running &#8216;ps ax&#8217;. I&#8217;ve had libvirtd on the host segfault a couple times when connecting, perusing the Changelog in the version of libvirt I backported on my desktop noted some fixes that may be relevant to that.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/11/17/libvirt-kvm-tls-authentication-on-ubuntu-karmic/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Opscode Cookbooks community announced</title>
		<link>http://blog.loftninjas.org/2009/10/30/opscode-cookbooks-community-announced/</link>
		<comments>http://blog.loftninjas.org/2009/10/30/opscode-cookbooks-community-announced/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 17:37:29 +0000</pubDate>
		<dc:creator>btm</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[configuration management]]></category>

		<category><![CDATA[opscode]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=412</guid>
		<description><![CDATA[It&#8217;s no secret that I think configuration management is epic. I spent yesterday hopping around the office in excitement due to Opscode&#8217;s alpha announcement of their new Cookbooks site. This is exactly the next step needed in the CM community. Shortly thereafter, while talking with another developer about how awesome Cookbooks is, he quipped about [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s no secret that I think <a href="http://blog.loftninjas.org/2009/06/20/the-configuration-management-revolution/">configuration management is epic</a>. I spent yesterday hopping around the office in excitement due to <a href="http://www.opscode.com/blog/2009/10/29/the-new-opscode-cookbook-site-/">Opscode&#8217;s alpha announcement</a> of their new <a href="http://cookbooks.opscode.com">Cookbooks</a> site. This is exactly <a href="http://blog.loftninjas.org/2009/06/22/infrastructure-as-a-code-sample/">the next step</a> needed in the CM community. Shortly thereafter, while talking with another developer about how awesome Cookbooks is, he quipped about it being second in awesome to chef itself. I argue that chef exists for cookbooks, not the other way around. It was later said <a href="http://twitter.com/jtimberman/statuses/5266897334">&#8220;</a><a href="http://twitter.com/jtimberman/statuses/5266897334">Chef is the tool, cookbooks are the art&#8221;</a>. Cookbooks is all about community.</p>
<p>Chef is a tool, and an open-source one, so it does have a community. A vibrant one at that; a recent <a href="http://www.ohloh.net/p/opscode-chef">ohloh</a> <a href="http://www.ohloh.net/api/reference/factoid">factoid</a> claims &#8220;This is one of the largest open-source teams in the world, and is in the top 2% of all project teams on Ohloh.&#8221; <a href="http://cookbooks.opscode.com/">Cookbooks</a> is the other way around, it is a community first and at tool second. Cookbooks has already been <a href="http://twitter.com/thesethings/status/5266293567">compared</a> to github and launchpad (with PPAs), because like these sites it brings people with a common task together around a tool like git or ubuntu. It has been noted that every configuration management project <a href="http://twitter.com/mhalligan/statuses/5272816525">needs something like Cookbooks</a>, and <a href="http://getsatisfaction.com/opscode/topics/add_support_for_other_configuration_management_systems">I agree</a>.</p>
<p>The community that builds around Cookbooks will be a vanguard of agile system administrators looking to reduce their <a href="http://www.hyperic.com/blog/undifferentiated-heavy-lifting/">undifferentiated heavy lifting</a>. These include the people who recognized that it is their product that they are selling and no longer their infrastructure, and took up cloud computing as a result. They will soon find that the configuration management community will help them continue to spend less time reinventing the operations wheel, and more time innovating it. Cookbooks will make it easier to share infrastructure-code with like-minded individuals and is the next step beyond <a href="http://wiki.opscode.com/display/chef/Cookbooks#Cookbooks-WherecanIfindsomepremadeCookbooks%3F">github</a> and <a href="http://reductivelabs.com/trac/puppet/tags/puppet,recipe">wikis</a> for this material. These models still required concerted effort to share back with the community when you finished up your recipe, but the Cookbooks site  and it&#8217;s <a href="http://www.opscode.com/community/api">open API</a> stands to change that. We are now poised to leverage the open source model to increase the rise of infrastructure as code.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/10/30/opscode-cookbooks-community-announced/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Wireshark + Winpcap beta on Windows Server 2008 R2</title>
		<link>http://blog.loftninjas.org/2009/10/14/wireshark-winpcap-beta-on-windows-server-2008-r2/</link>
		<comments>http://blog.loftninjas.org/2009/10/14/wireshark-winpcap-beta-on-windows-server-2008-r2/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 22:37:16 +0000</pubDate>
		<dc:creator>btm</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=410</guid>
		<description><![CDATA[Windows Server 2008 R2 currently requires the beta version of winpcap, and you need to run the installer in compatibility mode to install it.

Download wireshark
Down the winpcap 4.1 beta
Right click the winpcap installer, properties, compatibility mode, set to server 2008
Install wincap
Install wireshark
Open an administrative command prompt (right click, run as administrator)
&#8220;sc start npf&#8221;
Run wireshark

]]></description>
			<content:encoded><![CDATA[<p>Windows Server 2008 R2 currently requires the beta version of winpcap, and you need to run the installer in compatibility mode to install it.</p>
<ol>
<li>Download <a href="http://www.wireshark.org/download.html">wireshark</a></li>
<li>Down the <a href="http://www.winpcap.org/install/default.htm">winpcap 4.1 beta</a></li>
<li>Right click the winpcap installer, properties, compatibility mode, set to server 2008</li>
<li>Install wincap</li>
<li>Install wireshark</li>
<li>Open an administrative command prompt (right click, run as administrator)</li>
<li>&#8220;sc start npf&#8221;</li>
<li>Run wireshark</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/10/14/wireshark-winpcap-beta-on-windows-server-2008-r2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PXE booting Ubuntu KVM Guests off WDS</title>
		<link>http://blog.loftninjas.org/2009/09/25/pxe-booting-ubuntu-kvm-guests-off-wds/</link>
		<comments>http://blog.loftninjas.org/2009/09/25/pxe-booting-ubuntu-kvm-guests-off-wds/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 00:09:12 +0000</pubDate>
		<dc:creator>btm</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=395</guid>
		<description><![CDATA[Best I can tell, there is some functionality missing from traditional etherboot images that you can install on Ubuntu via the &#8216;kvm-pxe&#8217; package that prevents a KVM guest from booting off of a Windows Deployment Services (WDS) server. Perhaps UNDI or such, it isn&#8217;t clear. The guest will accept an DHCP offer, but go no [...]]]></description>
			<content:encoded><![CDATA[<p>Best I can tell, there is some functionality missing from traditional etherboot images that you can install on Ubuntu via the &#8216;kvm-pxe&#8217; package that prevents a KVM guest from booting off of a Windows Deployment Services (<a href="http://en.wikipedia.org/wiki/Windows_Deployment_Services">WDS</a>) server. Perhaps <a href="http://www.nilo.org/docs/pxeundi.html">UNDI</a> or such, it isn&#8217;t clear. The guest will accept an DHCP offer, but go no further. Occasionally looking for more offers, it obviously isn&#8217;t getting the traditional DHCP options it is looking for and I&#8217;m willing to bet that WDS doesn&#8217;t recognize it as a PXE client enough to speak up for itself.</p>
<p>Fortunately the <a href="http://etherboot.org/wiki/index.php">etherboot project</a> is alive and well under a massive rewrite coined gPXE, and there is much exciting development going on there, like iSCSI boot support. I tried creating different gPXE ROMs from <a href="http://rom-o-matic.net/">rom-o-matic</a> for the different NICs that KVM supports and replacing the roms placed in /usr/share/kvm by the kvm-pxe package, but didn&#8217;t get very far. I wasn&#8217;t sure if I had to match up the PCI id&#8217;s that KVM produced with the options on rom-o-matic or not. The e1000 ROM hit the &#8220;<a href="https://bugzilla.redhat.com/show_bug.cgi?id=473137">Too many option ROMS</a>&#8221; error, apparently common when your PXE ROM exceeds about 60k. You can toggle different KVM NIC models via libvirt by using &#8216;virsh edit guestName&#8217; and then adding a &#8220;&lt;model type=&#8217;e1000&#8242;/&gt;&#8221; line in the interface section of the guest definition. change e1000 to virtio, pcnet, whatever. There&#8217;s a list on the <a href="https://help.ubuntu.com/community/KVM/Networking">Ubuntu wiki KVM page</a> that may provide you with further help choosing a functional gPXE ROM.</p>
<p>I ended up using the <a href="http://rom-o-matic.net/gpxe/gpxe-0.9.6/contrib/rom-o-matic/build.php?version=0.9.6&amp;F=&amp;arch=i386&amp;nic=gpxe%3Aall-drivers&amp;ofmt=ISO+bootable+image+(.iso)&amp;A=Configure">gPXE ISO</a> (gPXE:all-drivers from the first pulldown) and booting off that by placing it in /var/lib/libvirt/images and adding it as an IDE CDROM storage device to the guest. Initially it gave up far two quickly when left to its own devices but I found that accessing the command prompt and running the &#8216;autoboot&#8217; commant worked for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/09/25/pxe-booting-ubuntu-kvm-guests-off-wds/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Increasing a Win7 disk/partition under KVM</title>
		<link>http://blog.loftninjas.org/2009/09/08/increasing-a-win7-diskpartition-under-kvm/</link>
		<comments>http://blog.loftninjas.org/2009/09/08/increasing-a-win7-diskpartition-under-kvm/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 00:46:03 +0000</pubDate>
		<dc:creator>btm</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=393</guid>
		<description><![CDATA[ kvm-img convert small.img small.raw # this is your old image
kvm-img create large.raw 15G # or whatever size
losetup /dev/loop0 small.raw
losetup /dev/loop1 large.raw
dd if=/dev/loop0 of=/dev/loop1
losetup -d /dev/loop0
losetup -d /dev/loop1
kvm-img convert large.raw large.qcow2

Start KVM up again with the new large image. Go to the &#8216;Computer Management&#8217; mmc applet under &#8216;Administrative Tools&#8217;. Choose &#8216;Disk Management&#8217; under &#8216;Storage&#8217;. Right [...]]]></description>
			<content:encoded><![CDATA[<p><code> kvm-img convert small.img small.raw # this is your old image<br />
kvm-img create large.raw 15G # or whatever size<br />
losetup /dev/loop0 small.raw<br />
losetup /dev/loop1 large.raw<br />
dd if=/dev/loop0 of=/dev/loop1<br />
losetup -d /dev/loop0<br />
losetup -d /dev/loop1<br />
kvm-img convert large.raw large.qcow2<br />
</code></p>
<p>Start KVM up again with the new large image. Go to the &#8216;Computer Management&#8217; mmc applet under &#8216;Administrative Tools&#8217;. Choose &#8216;Disk Management&#8217; under &#8216;Storage&#8217;. Right click your existing volume and choose extend. Step through the wizard. I got a message that made it appear it didn&#8217;t work, but I guess I didn&#8217;t read the fine print right and it did work fine enough. There&#8217;s always the old small image file if you run into problems. Speaking of which, be careful to not be dyslexic when inputting dd options.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/09/08/increasing-a-win7-diskpartition-under-kvm/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Setting password never expires&#8217; programmatically in AD</title>
		<link>http://blog.loftninjas.org/2009/09/04/setting-password-never-expires-programmatically-in-ad/</link>
		<comments>http://blog.loftninjas.org/2009/09/04/setting-password-never-expires-programmatically-in-ad/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 02:13:47 +0000</pubDate>
		<dc:creator>btm</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=389</guid>
		<description><![CDATA[Needing to set &#8216;Password Never Expires&#8217; across an entire OU in Active Directory, I managed to write a powershell script to accomplish as much. Sure is nice having scripting languages on Windows machines beyond BASIC.

# Finds all user objects in the searchroot and forces the password never expires value in user account control to set
# [...]]]></description>
			<content:encoded><![CDATA[<p>Needing to set &#8216;Password Never Expires&#8217; across an entire OU in Active Directory, I managed to write a powershell script to accomplish as much. Sure is nice having scripting languages on Windows machines beyond BASIC.</p>
<pre class="syntax-highlight:php">
# Finds all user objects in the searchroot and forces the password never expires value in user account control to set
# 2009-09-04 -- Bryan McLellan &lt;btm@loftninjas.org&gt;

$Never_Expire=0x10000

$objou = New-Object System.DirectoryServices.DirectoryEntry(&quot;LDAP://ou=test,dc=example,dc=com&quot;)
$objSearcher = New-Object System.DirectoryServices.directorySearcher
$objsearcher.searchroot = $objou
$objsearcher.filter = &#039;(&amp;(objectCategory=User)(Objectclass=user)(!isCriticalSystemObject=*))&#039;
$objsearcher.searchscope = &quot;subtree&quot;

$results = $objsearcher.findall()

foreach ($result in $results) {
  $user = [adsi]$result.path
  $value = $user.useraccountcontrol.item(0)
  $value = $value -bor $Never_Expire
  $user.useraccountcontrol = $value
  $user.name
  $user.setinfo()
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/09/04/setting-password-never-expires-programmatically-in-ad/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using openid-ldap as an OpenID provider</title>
		<link>http://blog.loftninjas.org/2009/08/10/using-openid-ldap-as-an-openid-provider/</link>
		<comments>http://blog.loftninjas.org/2009/08/10/using-openid-ldap-as-an-openid-provider/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 02:17:31 +0000</pubDate>
		<dc:creator>btm</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=377</guid>
		<description><![CDATA[The openid-ldap project provides a simple OpenID to LDAP gateway that supports Active Directory so you can leverage your existing SSO database hosted in LDAP to provide OpenID logins.
All the documentation lives in docs/README. Configuration is mostly a matter of unpacking the source into an apache hosted directory, editing ldap.php as described to contain the [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.openid-ldap.org/">openid-ldap</a> project provides a simple OpenID to LDAP gateway that supports Active Directory so you can leverage your existing SSO database hosted in LDAP to provide OpenID logins.</p>
<p>All the documentation lives in docs/README. Configuration is mostly a matter of unpacking the source into an apache hosted directory, editing ldap.php as described to contain the correct ldap URIs, and configuring apache. The LDAP configuration is relatively straight-forward if you&#8217;re familiar with setting up LDAP authentication elsewhere. The apache part took some tinkering for my setup.</p>
<p>I ran into three problems, the first was needing to modify the filter to remove &#8216;(mail=*)&#8217; since these weren&#8217;t mail enabled accounts. I used ldapsearch (example in the README) based on my settings in ldap.php to see that no accounts were getting returned and realized these accounts weren&#8217;t mail enabled.</p>
<p>The next problem was because my production webservers are behind a load balancer and the configuration wants to use mod_proxy to connect back to itself, which would try to go back out the backside of the load balancer and cause all sorts of confusion. I used an internal hostname to pass the proxied requests directly back to the server. You&#8217;ll see this in the attached apache configuration below</p>
<p>The third was because of the load balancer and I discovered this by turning debug to true in index.php and dumping a log file in /tmp. Part of the authentication request was going to different servers. Only having a single server in this particular pool resolved that.</p>
<p>The test page on openid-ldap.org didn&#8217;t work for me and failed with &#8220;Authentication error; not a valid OpenID&#8221;, but logging into <a href="http://www.livejournal.com/openid/">livejournal</a> worked okay.</p>
<pre class="syntax-highlight:bash">
&lt;VirtualHost *:80&gt;
	ServerAdmin webmaster@example.org
	ServerName openid.example.org

  RewriteEngine On

  RewriteRule ^/(.*) https://openid.example.org/$1 [R,L]
&lt;/VirtualHost&gt;

&lt;VirtualHost *:80&gt;
  ServerName openid

  RewriteEngine On

  RewriteCond %{HTTPS} !=on

  RewriteRule ^/(.*) https://openid.example.org/$1 [R,L]
&lt;/VirtualHost&gt;

&lt;VirtualHost *:443&gt;
	ServerAdmin webmaster@example.org
	ServerName openid.example.org
  ServerAlias openid

	DocumentRoot /var/www/example.org/openid

	&lt;Directory /&gt;
		Options FollowSymLinks
		AllowOverride None
	&lt;/Directory&gt;
	&lt;Directory /var/www/example.org/openid&gt;
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
		Order allow,deny
		allow from all
	&lt;/Directory&gt;

	ErrorLog /var/log/apache2/openid.example.org-error.log
	LogLevel warn

	CustomLog /var/log/apache2/openid.example.org-access.log combined

  &lt;Proxy https://openid-internal.example.org/*&gt;
    Order allow,deny
    Allow from all
  &lt;/Proxy&gt;

  ServerSignature On
  RewriteEngine On

  RewriteCond %{REQUEST_URI}      !^/(.+)\.php(.*)$
  RewriteCond %{THE_REQUEST}      ^[A-Z]{3,9}\ /([A-Za-z0-9]+)\?(.*)\ HTTP/
  RewriteRule ^/(.*)$         https://openid-internal.example.org/index.php?user=%1&amp;%2 [P]

  RewriteCond %{REQUEST_URI}         !^/(.+)\.php(.*)$
  RewriteRule ^/([A-Za-z0-9]+)$  https://openid-internal.example.org/index.php?user=$1 [P]

&lt;/VirtualHost&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/08/10/using-openid-ldap-as-an-openid-provider/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Monitoring which mysql databases are being accessed</title>
		<link>http://blog.loftninjas.org/2009/07/13/monitoring-which-mysql-databases-are-being-accessed/</link>
		<comments>http://blog.loftninjas.org/2009/07/13/monitoring-which-mysql-databases-are-being-accessed/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 18:35:37 +0000</pubDate>
		<dc:creator>btm</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=373</guid>
		<description><![CDATA[I&#8217;m migrating a number of internal web application databases off of a mysql server and I wanted a way to see which databases are being accessed and by which hosts.
# tshark -R "mysql.opcode == 2" -e ip.src -e mysql.schema -T fields port mysql
When run on the mysql server this produces a tab separated list of [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m migrating a number of internal web application databases off of a mysql server and I wanted a way to see which databases are being accessed and by which hosts.</p>
<p><code># tshark -R "mysql.opcode == 2" -e ip.src -e mysql.schema -T fields port mysql</code></p>
<p>When run on the mysql server this produces a tab separated list of values compromised of the client ip address and the database name when a mysql client specifies a database. See the man page for tshark for more information.</p>
<p><strong>Update:</strong></p>
<p>This catches the circumstance where database is set on login as well:<br />
<code># tshark -R "mysql.schema" -e ip.src -e mysql.schema -T fields port mysql</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/07/13/monitoring-which-mysql-databases-are-being-accessed/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Making sense of MySQL HA options</title>
		<link>http://blog.loftninjas.org/2009/07/10/making-sense-of-mysql-ha-options/</link>
		<comments>http://blog.loftninjas.org/2009/07/10/making-sense-of-mysql-ha-options/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 23:39:45 +0000</pubDate>
		<dc:creator>btm</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=369</guid>
		<description><![CDATA[I&#8217;ve amassed enough mysql databases that it&#8217;s time there should be some high availability. Note that this isn&#8217;t a single huge database, it&#8217;s a pile of wordpress, request-tracker, mediawiki, etc databases. Performance isn&#8217;t the goal here, it is automatic failover in case of impending doom.
I happen to have an iSCSI san, but in the efforts [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve amassed enough mysql databases that it&#8217;s time there should be some high availability. Note that this isn&#8217;t a single huge database, it&#8217;s a pile of wordpress, request-tracker, mediawiki, etc databases. Performance isn&#8217;t the goal here, it is automatic failover in case of impending doom.</p>
<p>I happen to have an iSCSI san, but in the efforts of simplicity I&#8217;m looking at Heartbeat+DRBD or Heartbeat+Replication.</p>
<p>Most <a href="http://dev.mysql.com/doc/mysql-ha-scalability/en/ha-drbd.html">tutorials</a>, and <a href="http://twitter.com/btmspox/status/2540387152">comments from colleagues</a> lean towards using Heartbeat+DRBD. There is <a href="http://www.mysqlperformanceblog.com/2008/04/28/mysql-replication-vs-drbd-battles/">good discussion of the two</a>, and more recent followup regarding <a href="http://www.mysqlperformanceblog.com/2009/07/07/is-drbd-the-right-choice-for-me/">when to use DRBD</a>. There&#8217;s a <a href="http://dev.mysql.com/doc/refman/5.0/en/ha-overview.html">nice little table at the bottom of this page</a>. If you dig deeper, there are respectable comments about using what&#8217;s appropriate to the situation, the exercise of which is left up to the reader.</p>
<p><a href="http://forums.mysql.com/read.php?144,189704,194214#msg-194214">The problem</a> is that mysql defaults to using MyISAM as the storage engine, which lacks a transactional journal. When your primary host crashes and your secondary host comes up, unless there&#8217;s a journal to replay you&#8217;re just assuming everything isn&#8217;t corrupt without some kind of through consistency check. Which sounds time consuming. So switch all your tables to a transactional storage engine like InnoDB?</p>
<p>Replication has both a slave IO and a SQL process running, which I believe avoids this, since the replication slave isn&#8217;t going to run an incomplete SQL statement if the master dies while sending it to the slave it is dropped. Which leaves you possibly behind the master, but consistent.</p>
<p>So I&#8217;m going to try to configure heartbeat with mysql running replication between two guests. The best information I&#8217;ve found so far is <a href="http://www.workboy.com/charles/mysql-heartbeat/">from Charles Bennington</a>. I&#8217;ll post a followup when I&#8217;m done with that project.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/07/10/making-sense-of-mysql-ha-options/feed/</wfw:commentRss>
		</item>
		<item>
		<title>a couple notes on drbd on ubuntu</title>
		<link>http://blog.loftninjas.org/2009/07/10/a-couple-notes-on-drbd-on-ubuntu/</link>
		<comments>http://blog.loftninjas.org/2009/07/10/a-couple-notes-on-drbd-on-ubuntu/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 19:00:26 +0000</pubDate>
		<dc:creator>btm</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=370</guid>
		<description><![CDATA[Playing with drbd8 on Ubuntu, loosely following these instructions, and I ran into a couple problems.
First, you need to use a kernel that has the drbd module as there is no drbd8-module-source, -server definitely has the drbd module, -virtual did not. Instructions about building the drbd module are old.
My secondary was also stuck in a [...]]]></description>
			<content:encoded><![CDATA[<p>Playing with drbd8 on Ubuntu, loosely <a href="http://dev.mysql.com/doc/refman/5.1/en/ha-drbd-install.html">following these instructions</a>, and I ran into a couple problems.</p>
<p>First, you need to use a kernel that has the drbd module as there is no drbd8-module-source, -server definitely has the drbd module, -virtual did not. Instructions about building the drbd module are old.</p>
<p>My secondary was also stuck in a connection state of &#8220;WFBitMapT&#8221;. I noticed the secondary was Ubuntu jaunty while the primary was Ubuntu intrepid. Upgrading the primary to jaunty resolved this.</p>
<p>I saw the error &#8220;local disk flush failed with status -95&#8243; in the logs and wasn&#8217;t entirely sure about it but eventually found an <a href="http://www.ultraviolet.org/mail-archives/drbd.2008/msg02461.html">explanation that made some sense</a> and made me not worry about it.</p>
<p>drbd (/etc/init.d/drbd) doesn&#8217;t start on startup on it&#8217;s own. Most of the debugging information you&#8217;re looking for is in /proc/drbd or in your syslog output in /var/log. The only trouble is deciphering what is good and what is bad.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/07/10/a-couple-notes-on-drbd-on-ubuntu/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Infrastructure as a code sample</title>
		<link>http://blog.loftninjas.org/2009/06/22/infrastructure-as-a-code-sample/</link>
		<comments>http://blog.loftninjas.org/2009/06/22/infrastructure-as-a-code-sample/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 18:26:56 +0000</pubDate>
		<dc:creator>btm</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[configuration management]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=360</guid>
		<description><![CDATA[Upon returning from Open Source Bridge in Portland last week, I collected my thoughts from the convergence of configuration management developers and wrote The Configuration Management Revolution, centered around the idea the something bigger is happening than we&#8217;re acknowledging.
Today Tim O&#8217;Reilly posted a blog entry about the origins of Velocity. He says &#8220;I had been [...]]]></description>
			<content:encoded><![CDATA[<p>Upon returning from Open Source Bridge in Portland last week, I collected my thoughts from the convergence of configuration management developers and wrote <a href="http://blog.loftninjas.org/2009/06/20/the-configuration-management-revolution/">The Configuration Management Revolution</a>, centered around the idea the something bigger is happening than we&#8217;re acknowledging.</p>
<p>Today Tim O&#8217;Reilly posted a <a href="http://radar.oreilly.com/2009/06/velocity-the-art-of-web-operat.html">blog entry about the origins</a> of <a href="http://en.oreilly.com/velocity2009">Velocity</a>. He says &#8220;I had been thinking in the abstract about the fact that as we move to a software as a service world, one of the big changes was that applications had people &#8220;inside&#8221; of them, managing them, tuning them, and helping them respond to constantly changing conditions.&#8221; which builds on his post <a href="http://radar.oreilly.com/2006/07/operations-the-new-secret-sauc.html">three years ago about operations</a> becoming the &#8220;elephant in the room&#8221;.</p>
<p>That article is worth revisiting. It tails off commenting on the lack of open source deployment tools. That has definitely changed, as we have a number of open source options in the operations tool space now. O&#8217;Reilly has published a few books on operations as well, although hasn&#8217;t taken the step of considering it a category in their book list yet.</p>
<p>The web is full of howtos, blog posts and assorted notes on piecing together open source software to build a server. One doesn&#8217;t have to be an expert on all of the ingredients, but rather be able to figure out how to assemble them. As time goes on, the problems of the past become easier to solve; former creative solutions become mainstream and the industry leverages those advantages. This frees up mindshare for something new. I&#8217;ll emphasize that this doesn&#8217;t mean one no longer needs to have some understanding of why the server works, but the time spent engineering that particular solution is reduced because we already have the wheel, so to speak.</p>
<p>Writing configuration management and thus infrastructure howtos may get one started, but it&#8217;s the old way of thinking. If you can write infrastructure as code, you can <strong>share infrastructure as code</strong>. It is essential that this is achieved in a format that both promotes sharing and is relatively easy. Take the <a href="http://munin.projects.linpro.no/">Munin</a> and <a href="http://ganglia.info/">Ganglia</a> plugin sites for instance. Munin is relatively easy to get started with and has a simple enough site for <a href="http://muninexchange.projects.linpro.no/">exchanging plugins</a>. While I consider Ganglia technically superior, it&#8217;s community is not. I tried submitting to <a href="http://ganglia.sourceforge.net/gmetric/">Ganglia&#8217;s plugin site</a> once and failed. This step has to be more than a site where files are dumped, it needs community support.</p>
<p>I asked Luke about this at <a href="http://opensourcebridge.org/">OSBridge</a> and he said Reductive Labs plans to have a module sharing website online soon for <a href="http://reductivelabs.com/products/puppet/">puppet</a>. For now, you can find an number of <a href="http://reductivelabs.com/trac/puppet/tags/puppet,recipe">puppet modules in the wiki</a>. Opscode is on track, with their <a href="http://wiki.opscode.com/display/chef/Home">chef</a> cookbooks available as a <a href="http://github.com/opscode/cookbooks/tree/master">git repository on github</a>, combined with a <a href="http://tickets.opscode.com/browse/COOK">ticketing system</a> allowing users to fork, modify and contribute changes. There&#8217;s even a wiki page helping to instruct <a href="http://wiki.opscode.com/display/chef/Cookbooks">how to leverage these</a>.</p>
<p>Of course, you&#8217;ll always need experienced engineers to design and tune your infrastructure. However, the time and mindshare savings from creating a LAMP stack by setting a tag or role to &#8216;lamp&#8217; is immense. As Opscode produces more open APIs between parts of their product, my mind imagines the offspring of the <a href="http://wiki.opscode.com/display/chef/Nodes">Chef UI</a> and <a href="http://virt-manager.et.redhat.com/screenshots.html">virt-manager</a>. How long until the popup touting &#8220;New features are available for your web cluster&#8221;?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/06/22/infrastructure-as-a-code-sample/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Configuration Management Revolution</title>
		<link>http://blog.loftninjas.org/2009/06/20/the-configuration-management-revolution/</link>
		<comments>http://blog.loftninjas.org/2009/06/20/the-configuration-management-revolution/#comments</comments>
		<pubDate>Sat, 20 Jun 2009 10:58:35 +0000</pubDate>
		<dc:creator>btm</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[configuration management]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=338</guid>
		<description><![CDATA[The revolution is coming, and it&#8217;s about time I wrote about it.
About a year and a half ago I was settling in to a new system administration job at a startup. I was told a consulting company would be coming in to bootstrap configuration management for us. I had previously glanced at cfengine out of [...]]]></description>
			<content:encoded><![CDATA[<p>The revolution is coming, and it&#8217;s about time I wrote about it.</p>
<p>About a year and a half ago I was settling in to a new system administration job at a startup. I was told a consulting company would be coming in to bootstrap configuration management for us. I had previously glanced at cfengine out of curiosity, but ended up spending only a couple of hours looking at it. In my mind configuration management was analogous to unattended software installation, which I was definitely in support of, but had yet to perceive how it was going to change how I viewed infrastructure.</p>
<p>That consulting company was <a href="http://www.hjksolutions.com/">HJK Solutions</a>. Some of my coworkers had previously established relationships with a couple of the partners of HJK, but I didn&#8217;t know anything about them myself. I was along for the ride. They gave us a presentation where they showed <a href="http://github.com/adamhjk/iclassify/tree/master">iClassify</a> and <a href="http://reductivelabs.com/products/puppet/">puppet</a> working together to automate infrastructure for other clients, but it wasn&#8217;t until the next meeting where we made technical decisions about the implementation that I really came to appreciate their insight. It is much more interesting why someone makes a choice than the choice itself, and this was my first of many since opportunities to incite the opinions of <a href="http://www.linkedin.com/in/adamjacob">Adam Jacob</a>.</p>
<p>A year of using puppet later, not only was I hooked but my excitement about the possibilities of configuration management had grown beyond what the software could do at the time. Both my excitement and frustration was apparent and got me a sneak peak at <a href="http://www.opscode.com/">Opscode&#8217;s</a> <a href="http://wiki.opscode.com/display/chef/Home">Chef</a>. The design of Chef embodies &#8220;the unix way&#8221; of chaining many tools together insofar that it allows us to take building blocks that are essentially simple on their own but from behind our backs present a system that is revolutionary enough we almost fail to recognize the familiar pieces of it.</p>
<blockquote><p>Chef is a systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.</p></blockquote>
<p>This is not an article about Chef, this is about the big picture. However, if you take enough steps back from that statement it becomes apparent that Opscode is building toward that picture. I want to share with you the excitement that short description garners inside of me.</p>
<p>Configuration management alone is the act of programmatically configuring your systems. Often the benefits are conveyed in support of <a href="http://www.sun.com/bigadmin/features/hub_articles/reducing_risk.jsp">process</a>, but in more agile communities different advantages are touted; such as allowing one to wrangle larger number of servers by reducing build times in the name of vertical scalability, building more maintainable infrastructures by leveraging the self-documenting side-affect of configuration languages, and reducing administrator burnout by cutting a swath in the number of repetitive tasks one must perform. These are unarguably significant boons. Nevertheless, one does not have to look hard to find a curmudgeon reluctant to change, claiming they don&#8217;t want to learn another language, that having systems run themselves will surely cause failure, or perhaps some skynet-esque doomsday scenario. History is not short of examples of luddites holding steadfast against new technology, but it is somewhat paradoxical to see this mentality held in such a technologically oriented field.</p>
<p>The recent <a href="http://opensourcebridge.org/sessions/49">Configuration Management Panel</a> at the Open Source Bridge conference in Portland amassed many relevant core developers in one city long enough to provide a good vibe for the direction of the available tools and underscore our common charge. But the focus was more about how we will get more users of configuration management tools than why they are going to have to use them. In retrospect, perhaps I should have asked of the panel their views of how configuration management will reshape systems administration.</p>
<p>Configuration management is about more than automation. Some who have foreseen this have started to convey this by discussing managing infrastructures rather than systems. In analogy, the power loom, Gutenberg press, and intermodal shipping container were not merely time saving tools of automation. These inventions reshaped more than their workforce and industry, but also the global economy.</p>
<p>I&#8217;m fully aware of the tone set by such a call of prophecy. How will a tool that helps us configure multiple machines at once make such significant ripples in our day to day lives of the future? It will because we will be enabled to solve new problems that we did not yet realize existed. As other technological advances served as a catalyst for globalization, the industrial and scientific revolutions; changing how we build our information infrastructure leaves us poised for an exciting set of challenges that do not yet exist.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/06/20/the-configuration-management-revolution/feed/</wfw:commentRss>
		</item>
		<item>
		<title>LSI mptlinux / mptsas 3.12.29 on ubuntu</title>
		<link>http://blog.loftninjas.org/2009/06/05/lsi-mptlinux-mptsas-31229-on-ubuntu/</link>
		<comments>http://blog.loftninjas.org/2009/06/05/lsi-mptlinux-mptsas-31229-on-ubuntu/#comments</comments>
		<pubDate>Sat, 06 Jun 2009 00:24:30 +0000</pubDate>
		<dc:creator>btm</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=335</guid>
		<description><![CDATA[I recently upgraded Dell OMSA to 6.0.1 on a number of Ubuntu Intrepid and Jaunty hosts using sara.dl&#8217;s packages and got a warning that the mptsas driver version 3.04.07 was below the minimum supported version. The version from &#8216;modinfo mptsas&#8217; confirmed I was on the right track looking at this driver. A quick look revealed [...]]]></description>
			<content:encoded><![CDATA[<p>I recently upgraded Dell OMSA to 6.0.1 on a number of Ubuntu Intrepid and Jaunty hosts using <a href="https://subtrac.sara.nl/oss/omsa_2_deb">sara.dl&#8217;s packages</a> and got a warning that the mptsas driver version 3.04.07 was below the minimum supported version. The version from &#8216;modinfo mptsas&#8217; confirmed I was on the right track looking at this driver. A quick look revealed no update in 2.6.29.4 or 2.6.30-rc8, so I went searching for the drivers source.</p>
<p>LSI&#8217;s site is terrible. I have Dell 1955 blades, and the Dell SAS5/iR chipsets are really LSI SAS1068s. I searched the drivers page for SAS1068 eventually and found the right <a href="http://www.lsi.com/storage_home/products_home/standard_product_ics/sas_ics/lsisas1068/index.html?remote=1&amp;locale=EN">download page</a>. I grabbed the 4.18.00 archive file.</p>
<p>After decompressing it I found a dkms folder and rpm. I eventually gave up and used this to build a dkms deb with the following commands:<br />
<code><br />
sudo apt-get install dkms<br />
sudo rpm -i mptlinux-4.18.00.00-1dkms.noarch.rpm --no-deps<br />
sudo dkms mkdeb -m mptlinux -v 4.18.00.00<br />
scp /var/lib/dkms/mptlinux/4.18.00.00/deb/mptlinux-dkms_4.18.00.00_all.deb OTHERHOST:<br />
</code></p>
<p>Then install that deb on the otherhost (with the LSI based chipset) and it will install the correct modules via dkms. I rebooted and used modinfo to verify that mptsas was now version 4.18.00 and &#8216;omreport storage controller&#8217; now reports &#8216;Ok&#8217; instead of &#8216;Degraded&#8217; again.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/06/05/lsi-mptlinux-mptsas-31229-on-ubuntu/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Recovering from a Windows Server 2003 mirrored dynamic disk failure</title>
		<link>http://blog.loftninjas.org/2009/06/02/recovering-from-a-windows-server-2003-mirrored-dynamic-disk-failure/</link>
		<comments>http://blog.loftninjas.org/2009/06/02/recovering-from-a-windows-server-2003-mirrored-dynamic-disk-failure/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 07:27:46 +0000</pubDate>
		<dc:creator>btm</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=333</guid>
		<description><![CDATA[I&#8217;m no fan of software raid. Pretty much, ever. At my last job, for whom I still consult, my predecessor was really into technology creep. All of the workstations used that awesome fake raid that is actually implemented in the mass storage driver and is therefore pretty useless and can actually reduce your paths to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m no fan of software raid. Pretty much, ever. At my last job, for whom I still consult, my predecessor was really into technology creep. All of the workstations used that awesome fake raid that is actually implemented in the mass storage driver and is therefore pretty useless and can actually reduce your paths to recovery from disk failure. I&#8217;ll leave out the list of arguments against software raid. It just simply isn&#8217;t worth it.</p>
<p>I showed up to a call with a server with an 0&#215;7b error. Of course, Microsoft has this cool feature by default where servers automatically reboot when they blue screen. So nobody knew this was the error until I showed up and tried the &#8220;don&#8217;t automatically restart on BSOD&#8221; option under the F8 startup menu. I&#8217;m used to this error from moving system images between hardware, especially with virtual machines. <a href="http://blogs.technet.com/asksbs/archive/2008/03/30/how-to-troubleshoot-the-stop-error-0x0000007b.aspx">As it turns out</a>, the other values inside the parenthesis are actually useful. If the second value inside the parenthesis is <a href="http://support.microsoft.com/kb/822052">0&#215;00000010</a>, then you&#8217;re likely dealing with a disk in a software raid mirror set (dynamic disk) that Windows has marked as failed, and <a href="http://support.microsoft.com/kb/167045">thus won&#8217;t start from</a>.</p>
<p>The trick, which took me a while to nail down, is getting a boot.ini setup to boot from another disk. Since you can&#8217;t actually access this partition even in the Recovery Console, you can&#8217;t edit the boot.ini to tell it to start from the other disk. In the end, I formated a floppy using simply &#8216;format A:&#8217; on an XP desktop (would you believe this entire data center lacks a Windows server with a floppy drive?), then copied ntldr, ntdetect.com and boot.ini from another Server 2003 machine with the same service pack to this floppy. Then I changed the boot.ini to contain:<br />
<code><br />
[boot loader]<br />
timeout=60<br />
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS<br />
[operating systems]<br />
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS=&#8221;DISK 0&#8243; /noexecute=optout /fastdetect /3GB<br />
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS=&#8221;DISK 1&#8243; /noexecute=optout /fastdetect /3GB<br />
multi(0)disk(0)rdisk(2)partition(1)\WINDOWS=&#8221;DISK 2&#8243; /noexecute=optout /fastdetect /3GB<br />
multi(0)disk(0)rdisk(3)partition(1)\WINDOWS=&#8221;DISK 3&#8243; /noexecute=optout /fastdetect /3GB<br />
</code></p>
<p>If you&#8217;re not familiar with this file, you may want to read about <a href="http://support.microsoft.com/kb/102873">ARC paths</a>. Remember that ntldr and ntdetect.com are hidden, system and read-only by default, although it&#8217;s fine to leave this options unset. &#8216;attrib -s -h -r C:\ntldr&#8217; will make the file accessible so you can copy it to a floppy. I have to assume when you format a floppy from an NT based operating system it puts a bit of code in the bootsector to look for these files.</p>
<p>I then booted from the floppy and for me I then chose &#8216;DISK 1&#8242; and the system started up fine. I went pulled the failed disk (carefully guessed which disk it was by the disk order in disk management and the scsi id jumper settings) and replaced it. In disk management, right click the good disk, &#8220;remove mirror&#8221; and choose the missing disk. Then right click again, &#8220;add mirror&#8221; and choose the new disk. Drink coffee.</p>
<p>It&#8217;s late and I can&#8217;t figure out how to run &#8216;fixboot&#8217; and &#8216;fixmbr&#8217; with a disk mirror, so I&#8217;m still using the floppy disk to boot and choose either disk to start from.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/06/02/recovering-from-a-windows-server-2003-mirrored-dynamic-disk-failure/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
