<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>FewBar.com - Make it good &#187; ubuntu</title>
	<atom:link href="http://fewbar.com/tag/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://fewbar.com</link>
	<description>Technology, life, and mischief, not in that order</description>
	<lastBuildDate>Fri, 26 Apr 2013 16:17:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>The Rocket Ship to Havana &#8211; OpenStack Summit Spring 2013</title>
		<link>http://fewbar.com/2013/04/the-rocket-ship-to-havana-openstack-summit-spring-2013/</link>
		<comments>http://fewbar.com/2013/04/the-rocket-ship-to-havana-openstack-summit-spring-2013/#comments</comments>
		<pubDate>Mon, 22 Apr 2013 21:00:58 +0000</pubDate>
		<dc:creator>clint</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[OpenStack]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[heat]]></category>
		<category><![CDATA[juju]]></category>
		<category><![CDATA[openstack]]></category>
		<category><![CDATA[tripleo]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://fewbar.com/?p=608</guid>
		<description><![CDATA[I started this blog post as &#8220;The Road to Havana&#8221;, but immediately it struck me that the term &#8220;road&#8221; just doesn&#8217;t do this summit justice. Day 1 was full of Heat for me. As a recent addition to the Heat &#8230; <a href="http://fewbar.com/2013/04/the-rocket-ship-to-havana-openstack-summit-spring-2013/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I started this blog post as &#8220;The Road to Havana&#8221;, but immediately it struck me that the term &#8220;road&#8221; just doesn&#8217;t do this summit justice.</p>
<p>Day 1 was full of <a href="http://wiki.openstack.org/Heat">Heat</a> for me. As a recent addition to the Heat core reviewer team, it was quite helpful and a pleasure to meet most of the other developers in person. This happened about 10 minutes before our first session together. It never ceases to impress me how easy it is to meet somebody in real life whom you&#8217;ve been corresponding with over only IRC and email. In this case, I felt face to face contact just added warmth and depth to already warm and friendly professional relationships.</p>
<p>Heat is on a path toward being a really great solution for managing large application deployments in OpenStack clouds. <span id="more-608"></span>Six months ago I was focused on <a href="http://juju.ubuntu.com/">Juju</a> as a part of that discussion, and Heat was just this little incubating <a href="http://aws.amazon.com/cloudformation/aws-cloudformation-templates/">AWS CloudFormation</a> compatibility engine. Juju has been focusing on a rewrite, which I think is a mistake the project will likely be regretting for a long time. Meanwhile, Heat has turned into a project to gather effort around making orchestration and high order control services built in features of OpenStack.</p>
<p>We had a few discussions about scaling and performance, including <a href="https://blueprints.launchpad.net/heat/+spec/concurrent-resource-scheduling">concurrent launching of resources</a> and <a href="https://blueprints.launchpad.net/heat/+spec/multiple-engines">scaling out the Heat engine</a>. These were pretty low level discussions involving mostly the developers already involved, and like any good summit, we had contributions of ideas from many attendees, and solutions seem clear.</p>
<p>One thing that was clear to me before the summit was that a storm was brewing with regards to how Heat users would express their application deployments.</p>
<p>From some of the larger &#8220;enterprise&#8221; focused vendors, my own employer (HP) included, comes <a href="https://blueprints.launchpad.net/heat/+spec/tosca-support">a recommendation to support TOSCA</a>. This is a really large, <a href="https://www.oasis-open.org/committees/tosca/">wide ranging standard</a> that only partially even applies to Heat&#8217;s current scope. However, it seems like a natural fit for TOSCA users to use something built into the cloud to deploy their applications.</p>
<p><a href="https://wiki.openstack.org/wiki/Heat/DSL">Rackspace contributed a spec</a> and will likely contribute some existing code for a native format that Heat users can use. This format is more narrow in focus than TOSCA, and I think has real potential. It was in need of a good name, so I dubbed it &#8220;Heat Orchestration Template&#8221; during a session. HOT seems to have stuck for at least a while, though &#8220;Heat DSL&#8221; may also end up being its name.</p>
<p>There were also some interesting discussions around auto scaling going into Heat. I think it is understood by everyone that this is a different interface to similar, but not identical, control services. Because having competing control services can be problematic, it makes sense to have them all live in Heat for now. Rackspace has committed some developers to getting the problem solved and code published during this cycle, so we are all excited to see their work.</p>
<p>On a larger scale, the &#8220;<a href="http://github.com/tripleo">TripleO</a> (OpenStack on OpenStack)&#8221; program that our team at HP has been driving under the tutelage of Robert Collins got extreme amounts of exposure. With Bare-Metal nova landing in OpenStack for grizzly, and Heat fully integrated, nearly all of our components are blessed and thus prepped for the usual community contribution fire hose that OpenStack brings. The other pieces, <a href="http://github.com/stackforge/diskimage-builder">diskimage-builder</a>, <a href="http://github.com/stackforge/os-config-applier">os-config-applier</a>, and <a href="http://github.com/stackforge/os-refresh-config">os-refresh-config</a>, are all in StackForge and will be absorbed into OpenStack as we flesh out the TripleO effort.</p>
<p>After the day 1 &#8220;Heat firehose&#8221; of sessions, I spent a lot of time just communicating to various interested parties about what it all means and where Heat and TripleO fit in with the OpenStack ecosystem. My talk about using Heat to manage OpenStack was well attended and there were some great questions. <a href="https://region-a.geo-1.objects.hpcloudsvc.com:443/v1/42841271810042/Docs/OpenStackSummit_HeatOpenStackManagement.pdf">Slides are available here</a>. <em>Update 2013-04-26: videos have been posted!</em></p>
<p><iframe width="560" height="315" src="http://www.youtube.com/embed/O-SdNaFq2CQ" frameborder="0" allowfullscreen></iframe></p>
<p>One big surprise was to see the tool chain of TripleO mentioned in the keynote by Mark Shuttleworth. The concept we have subscribed to is to copy the Unix tool method. One needs to support incremental adoption of tools and thus one tool should do one job well. To demonstrate this, I have used this image a few times:</p>
<p><img class="alignnone" src="http://spamaps.org/tripleo-gospel.svg" alt="" width="1052" height="744" /></p>
<p>This is not a controversial pattern, and has proven successful for solving large problems in computing before. So, imagine my surprise when I saw that Mark Shuttleworth was arguing against it in a slide, showing Juju trying to do all of these jobs, and suggesting this was better than our (unfinished) effort to break the problem up and write a single tool for each distinct task. I spoke with Mark afterwards, and I think we will just agree to disagree on the approach. Having been quite involved with Juju since very early in its existence, I am still rooting for Juju to accomplish what it has set out to do. However, I am troubled by the lack of focus and unclear integration path.</p>
<p>I want to end on a happy note. This was my first OpenStack summit as an employee of <a href="http://hpcloud.com">HP Cloud Services</a>. I want to thank HP for the opportunities provided to me, and also for sponsoring OpenStack. There are so many talented and focused people at HP, I think we&#8217;re going to do some really amazing work together.</p>
<p>Overall, this was a great OpenStack Summit. The Havana cycle will see OpenStack growing more features and improving the deployment story, which is good for everyone. I am particularly excited about the proposition of gathering for &#8220;OpenStack &#8216;I&#8217;&#8221;, which will be in Hong Kong! So, rock on Stackers, can&#8217;t wait to see you all again in the fall!</p>
]]></content:encoded>
			<wfw:commentRss>http://fewbar.com/2013/04/the-rocket-ship-to-havana-openstack-summit-spring-2013/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>What can Cloud do for you?</title>
		<link>http://fewbar.com/2013/01/cloud-is-transportation-not-utility/</link>
		<comments>http://fewbar.com/2013/01/cloud-is-transportation-not-utility/#comments</comments>
		<pubDate>Thu, 10 Jan 2013 23:25:59 +0000</pubDate>
		<dc:creator>clint</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Scalability]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[hpcloud]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://fewbar.com/?p=602</guid>
		<description><![CDATA[For a while now, many in the computing industry, myself included, have been referring to the cloud as &#8220;utility computing&#8221;. Why, Amazon is just the GE of the age of utility computing, right? HP Cloud is just building power plants &#8230; <a href="http://fewbar.com/2013/01/cloud-is-transportation-not-utility/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>For a while now, many in the computing industry, myself included, have been referring to the cloud as &#8220;utility computing&#8221;. Why, Amazon is just the GE of the age of utility computing, right? HP Cloud is just building power plants to compete in that marketplace. Plug in your code, and out comes computed things.. just like the light socket in your bedroom or the one out in the shop where you make custom cedar furniture in your spare time, right?</p>
<p>But let me ask you this, how much power do you put back into the grid on a regular basis? How many gallons of water have you fed back into the water supply?<span id="more-602"></span></p>
<p>When you use a compute cloud, you are not simply spinning up servers, and then sucking down compute power. You are pushing data into said cloud, and then processing it, and pushing said processed data back out of the cloud, and into the cloud again.</p>
<p>In fact, where you get value from using the cloud is that your data is your product, and thus needs to be transported to the end customer. If you make widgets, widget making is what you&#8217;re good at, not shipping. With software service, way you produce your product is by taking input data and running it through processing. The parallels to meat-space manufacturing are pretty interesting.</p>
<p>Computing seems special, because the speed with which raw materials (input data) can arrive is astronomically higher than say iron ore can arrive at a steel mill. Also, one can change the process without retooling anything physically. But these are both just variables in the same process. More liquid supply and demand simply means your process needs to be able to scale up and down elastically.</p>
<p>Cheaper process changes just means you can move into markets where the external factors change. This is why Google has dominated the search engine space by simply changing its search algorithm over and over, based on expectations of users and their own knowledge of how the web works.</p>
<p>But none of this changes what the cloud is. A steel mill needs a source of power to perform its processes. Isn&#8217;t that just what IaaS is?</p>
<p>Well again, they just consume the power, they don&#8217;t put any of the steel they generate into the power grid, do they? But in the cloud, your data ends up *in the cloud*. If the steel mill loses power, it stops the process. It does not lose the steel, and in fact, it can still ship the complete steel. Steel that is on the road is still kept on the road to customers.</p>
<p>But, if the steel mill&#8217;s transportation provider fails, that is more like a cloud component failure. The steel just sits there, and can&#8217;t get to customers.</p>
<p>It is for this reason that I think we can pull more interesting analogies (and hopefully, wisdom) from the transportation industry.</p>
<div class="wp-caption alignnone" style="width: 510px"><a href="http://www.chucklez.com/2012/01/20/cloud-in-a-box/"><img title="Cloud in a box" src="http://farm8.staticflickr.com/7167/6732179701_9783d74ce3.jpg" alt="Cloud in a box" width="500" height="374" /></a><p class="wp-caption-text">&quot;Hello? UPS? Yes do you ship clouds?&quot;</p></div>
<p>Given that, what are we doing wrong with clouds now that the transportation industry has figured out long ago?</p>
<p>Well for one thing, public clouds are really like shipping carriers, such as UPS or FedEx. They have massive markets and broad appeal. What they offer is not just fast time to delivery, but zero infrastructure, fast time to delivery. Call FedEx, they&#8217;ll come take whatever you give them and take it where you tell them to for a fee. This feels an awful lot like a private cloud provider. Last I checked, HP Cloud and EC2 were about as easy as attaching a credit card to your account. If your cloud provider isn&#8217;t as easy as this to use, why?</p>
<p>Also UPS and FedEx have spent years optimizing things internally. They&#8217;ve focused on pushing costs down and keeping SLA&#8217;s high. But externally, they&#8217;re just brown / purple&amp;white trucks. Their brand keeps it simple. At some point the two big carriers bought the Mailboxes etc. and Kinkos. PaaS anyone?</p>
<p>Anyway, before I take this analogy too far.. I&#8217;m curious what others think. Should we stop calling it &#8220;utility computing&#8221; and instead just call it something else? &#8220;outsourced infrastructure&#8221;?</p>
]]></content:encoded>
			<wfw:commentRss>http://fewbar.com/2013/01/cloud-is-transportation-not-utility/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The bitter part of the Bittersweet news</title>
		<link>http://fewbar.com/2012/11/the-bitter-part-of-the-bittersweet-news/</link>
		<comments>http://fewbar.com/2012/11/the-bitter-part-of-the-bittersweet-news/#comments</comments>
		<pubDate>Fri, 30 Nov 2012 16:42:50 +0000</pubDate>
		<dc:creator>clint</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[canonical]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://fewbar.com/?p=597</guid>
		<description><![CDATA[Excellent. That is the word that I would use to describe the work done by my fellow engineers at Canonical over the past 2.5 years. However, it is time to move on. Its not an easy thing to move on &#8230; <a href="http://fewbar.com/2012/11/the-bitter-part-of-the-bittersweet-news/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Excellent.</p>
<div id="attachment_603" class="wp-caption aligncenter" style="width: 470px"><a href="http://fewbar.com.s3.amazonaws.com/wp-content/uploads/2012/11/billandted460_excellent.jpg"><img class="size-full wp-image-603" title="billandted460_excellent" src="http://fewbar.com.s3.amazonaws.com/wp-content/uploads/2012/11/billandted460_excellent.jpg" alt="Excellent!" width="460" height="300" /></a><p class="wp-caption-text">&quot;Vest over t-shirt pwns half-shirt, Bill!&quot;</p></div>
<p>That is the word that I would use to describe the work done by my fellow engineers at Canonical over the past 2.5 years. However, it is time to move on.</p>
<div id="attachment_604" class="wp-caption aligncenter" style="width: 485px"><a href="http://fewbar.com.s3.amazonaws.com/wp-content/uploads/2012/11/bill_ted.jpg"><img class="size-full wp-image-604" title="bill_ted" src="http://fewbar.com.s3.amazonaws.com/wp-content/uploads/2012/11/bill_ted.jpg" alt="Bill and Ted say &quot;whu?&quot;" width="475" height="362" /></a><p class="wp-caption-text">&quot;I think I&#39;m gonna hurl, Bill&quot;</p></div>
<p>Its not an easy thing to move on from what is truly the best job I&#8217;ve ever had. However, it is time. I&#8217;ll discuss more here after my last day at Canonical, which will be very soon, December 5th. Suffice to say, I won&#8217;t disappear from Ubuntu, so stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://fewbar.com/2012/11/the-bitter-part-of-the-bittersweet-news/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Juju Community Survey</title>
		<link>http://fewbar.com/2012/11/juju-community-survey/</link>
		<comments>http://fewbar.com/2012/11/juju-community-survey/#comments</comments>
		<pubDate>Tue, 06 Nov 2012 22:22:24 +0000</pubDate>
		<dc:creator>clint</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Juju]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[juju]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://fewbar.com/?p=592</guid>
		<description><![CDATA[If you&#8217;ve heard of Juju (and chances are, if you&#8217;re reading my blog, you have!), take 5 minutes and go take our Juju Community Survey]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve heard of Juju (and chances are, if you&#8217;re reading my blog, you have!), take 5 minutes and go take our <a href="http://bit.ly/SyL729">Juju Community Survey</a></p>
]]></content:encoded>
			<wfw:commentRss>http://fewbar.com/2012/11/juju-community-survey/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nagios is from Mars, and MySQL is from Venus (Monitoring Part 2)</title>
		<link>http://fewbar.com/2012/09/nagios-is-from-mars-and-mysql-is-from-venus-monitoring-part-2/</link>
		<comments>http://fewbar.com/2012/09/nagios-is-from-mars-and-mysql-is-from-venus-monitoring-part-2/#comments</comments>
		<pubDate>Wed, 05 Sep 2012 05:50:07 +0000</pubDate>
		<dc:creator>clint</dc:creator>
				<category><![CDATA[Juju]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[juju]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[nagios]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://fewbar.com/?p=580</guid>
		<description><![CDATA[In my previous post about Nagios, I showed how the rich Nagios charm simplifies adding basic monitoring to Juju environments. But, we need more than that. Services know more about how to verify they are working than a monitoring system &#8230; <a href="http://fewbar.com/2012/09/nagios-is-from-mars-and-mysql-is-from-venus-monitoring-part-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In <a title="Juju and Nagios, sittin’ in a tree.. (Part 1)" href="http://fewbar.com/2012/08/juju-and-nagios-sittin-in-a-tree-polling-your-nrpe/" target="_blank">my previous post about Nagios</a>, I showed how the rich <a href="http://jujucharms.com/charms/precise/nagios" target="_blank">Nagios charm</a> simplifies adding basic monitoring to <a href="http://juju.ubuntu.com/" target="_blank">Juju</a> environments. But, we need more than that. Services know more about how to verify they are working than a monitoring system could ever guess.<span id="more-580"></span></p>
<p>So, for that, we have the &#8216;<a href="http://jujucharms.com/interfaces/monitors" target="_blank">monitors</a>&#8216; interface. Currently sparsely documented, as it is extremely new, the idea is simple.</p>
<ul>
<li>Providing charms define what monitoring systems should look at generically</li>
<li>Requiring charms monitor any of the things they can, ignoring those they cannot.</li>
</ul>
<p>This is defined through a YAML file. Here is the example.monitors.yaml included with the nagios charm:</p>
<pre># Version of the spec, mostly ignored but 0.3 is the current one
version: '0.3'
# Dict with just 'local' and 'remote' as parts
monitors:
    # local monitors need an agent to be handled. See nrpe charm for
    # some example implementations
    local:
        # procrunning checks for a running process named X (no path)
        procrunning:
            # Multiple procrunning can be defined, this is the "name" of it
            nagios3:
                min: 1
                max: 1
                executable: nagios3
    # Remote monitors can be polled directly by a remote system
    remote:
        # do a request on the HTTP protocol
        http:
            nagios:
                port: 80
                path: /nagios3/
                # expected status response (otherwise just look for 200)
                status: 'HTTP/1.1 401'
                # Use as the Host: header (the server address will still be used to connect() to)
                host: www.fewbar.com
        mysql:
            # Named basic check
            basic:
                username: monitors
                password: abcdefg123456</pre>
<p>There are two main classes of monitors: local, remote. This is in reference to the service unit&#8217;s location. Local monitors are intended to be run inside the same machine/container as the service. Remote monitors are then, quite obviously, meant to be run outside the machine/container. So, above, you see remote monitors for the mysql protocol and http, and a local monitor to see if processes are running.</p>
<p>The MySQL charm now includes some of these monitors:</p>
<pre>version: '0.3'
monitors:
    local:
        procrunning:
            mysqld:
                name: MySQL Running
                min: 1
                max: 1
                executable: mysqld
    remote:
        mysql:
            basic:
                user: monitors</pre>
<p>The remote part is fed directly to nagios, which knows how to monitor mysql remotely, and so translates it into a check_mysql command. The local bits are ignored by Nagios. But, when we also relate the subordinate charm NRPE to a MySQL service, then we&#8217;ll have an agent which understands local. It actually converts those into remote monitors of type &#8216;nrpe&#8217; which Nagios does understand. So upon relating NRPE to Nagios, each subordinate unit feeds its unique NRPE monitors back to Nagios and they are added to the target units&#8217; monitors.</p>
<p>Honestly, this all sounds very complicated. But luckily, you don&#8217;t have to really grasp it to take advantage of it in a charm. The whole point is this: <strong>All one needs to do is write a monitors.yaml, and add the monitors relation with this joined hook to your charm</strong>:</p>
<pre>#!/bin/bash
# .. Anything you need to do to enable the monitoring host to access ports/users/etc goes here
relation-set monitors="$(cat monitors.yaml)" target-id=${JUJU_UNIT_NAME//\//-} target-address=$(unit-get private-address)</pre>
<p>If you have local things you want to give to a monitoring agent, you can use the <a href="http://jujucharms.com/interfaces/local-monitors">&#8216;local-monitors&#8217; interface</a>, which is basically the same as monitors, but only ever used in container scoped relations required by subordinate charms such as NRPE or collectd.</p>
<p>Now you can easily provide monitors to any monitoring system. If Nagios doesn&#8217;t support what you want to monitor, its fairly easy to add support. And as more monitoring systems are charmed and have the monitors interface added, your charm will be more useful out of the box.</p>
<p>In the next post, which will wrap up this series on monitoring, I&#8217;ll talk about how to add monitors support to some other monitoring systems such as collectd, and also how to write a subordinate charm to communicate your monitors to an external monitoring service.</p>
]]></content:encoded>
			<wfw:commentRss>http://fewbar.com/2012/09/nagios-is-from-mars-and-mysql-is-from-venus-monitoring-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Juju and Nagios, sittin&#8217; in a tree.. (Part 1)</title>
		<link>http://fewbar.com/2012/08/juju-and-nagios-sittin-in-a-tree-polling-your-nrpe/</link>
		<comments>http://fewbar.com/2012/08/juju-and-nagios-sittin-in-a-tree-polling-your-nrpe/#comments</comments>
		<pubDate>Tue, 07 Aug 2012 23:47:44 +0000</pubDate>
		<dc:creator>clint</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Juju]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[encapsulation]]></category>
		<category><![CDATA[juju]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[nagios]]></category>
		<category><![CDATA[nrpe]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://fewbar.com/?p=547</guid>
		<description><![CDATA[Monitoring. Could it get any more nerdy than monitoring? Well I think we can make monitoring cool again&#8230; &#160; If you&#8217;re using Juju, Nagios is about to get a lot easier to leverage into your environment. Anyone who has ever &#8230; <a href="http://fewbar.com/2012/08/juju-and-nagios-sittin-in-a-tree-polling-your-nrpe/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Monitoring. Could it get any more nerdy than monitoring? Well I think we can make monitoring cool again&#8230;</p>
<p><a href="http://fewbar.com.s3.amazonaws.com/wp-content/uploads/2012/08/1010_hall_monitor_cartman.jpg"><img class="alignleft size-full wp-image-558" title="1010_hall_monitor_cartman" src="http://fewbar.com.s3.amazonaws.com/wp-content/uploads/2012/08/1010_hall_monitor_cartman.jpg" alt="" width="720" height="556" /></a></p>
<p>&nbsp;</p>
<p>If you&#8217;re using <a href="http://juju.ubuntu.com/" target="_blank">Juju</a>, <a href="http://www.nagios.org/" target="_blank">Nagios</a> is about to get a lot easier to leverage into your environment. Anyone who has ever tried to automate their Nagios configuration, knows that it can be daunting. Nagios is so flexible and has so many options, its hard to get right when doing it by hand. Automating it requires even more thought. Part of this is because monitoring itself is a bit hard to genercise. There are lots of types of monitors. Nagios really focuses on two of these:</p>
<ul>
<li><strong>Service monitoring</strong> &#8211; Make a script that pretends to be a user and see if your synthetic monitor sees what you expect.</li>
<li><strong>Resource monitoring</strong> &#8211; Look at the counters and metrics afforded a user of a normal system.</li>
</ul>
<p>The trick is, the service monitoring wants to interrogate the real services from outside of the machine, while the resource monitoring wants to see things only visible with privileged access. <span id="more-547"></span>This is why we have <a href="http://exchange.nagios.org/directory/Addons/Monitoring-Agents/NRPE--2D-Nagios-Remote-Plugin-Executor/details" target="_blank">NRPE</a>, or &#8220;Nagios Remote Plugin Executor&#8221; (and NSCA, and <a href="http://jujucharms.com/charms/precise/munin" target="_blank">munin</a>, but ignore those for now). NRPE is a little daemon that runs on a server and will run a nagios plugin script, returning the result when asked by Nagios. With this you get those privileged things like how much RAM and disk space is used. Normally when you want to use Nagios, you need to sit down and figure out how to tell it to monitor all of your stuff. This involves creating generic objects, figuring out how to get your list of hosts into nagios&#8217;s config files, and how to get the classifications for said hosts into nagios. Does anybody trying to make sure their pager goes off when things are broken actually want to learn Nagios? So, here&#8217;s how to get Nagios in your Juju environment. First lets assume you have deployed a stack of applications.</p>
<pre>juju deploy mysql wikidb                # single MySQL db server
juju deploy haproxy wikibalancer        # and single haproxy load balancer
juju deploy -n 5 mediawiki wiki-app     # 5 app-server nodes to handle mediawiki
juju deploy memcached wiki-cache        # memcached
juju add-relation wikidb:db wiki-app:db # use wikidb service as r/w db for app
juju add-relation wiki-app wikibalancer # load balance wiki-app behind haproxy
juju add-relation wiki-cache wiki-app   # use wiki-cache service for wiki-app</pre>
<p>This gives one a nice stack of services that is pretty common in most applications today, with a DB and cache for persistent and ephemeral storage and then many app nodes to scale the heavy lifting.</p>
<p><a href="http://fewbar.com.s3.amazonaws.com/wp-content/uploads/2012/08/mediawiki.png"><img class="aligncenter size-full wp-image-549" title="mediawiki" src="http://fewbar.com.s3.amazonaws.com/wp-content/uploads/2012/08/mediawiki.png" alt="" width="1024" height="435" /></a><a href="http://fewbar.com.s3.amazonaws.com/wp-content/uploads/2012/08/InstantWiki.png"><img class="alignleft size-full wp-image-550" title="InstantWiki" src="http://fewbar.com.s3.amazonaws.com/wp-content/uploads/2012/08/InstantWiki.png" alt="" width="965" height="673" /></a></p>
<p>Now you have your app running, but what about when it breaks? How will you find out? Well this is where Nagios comes in:</p>
<pre>juju deploy nagios                          # custom nagios charm
juju add-relation nagios wikidb             # monitor wikidb via nagios
juju add-relation nagios wiki-app           # ""
juju add-relation nagios wikibalancer       # ""</pre>
<p>You now should have nagios monitoring things. You can check it out by exposing it and then browsing to the hostname of the nagios instance at &#8216;http://x.x.x.x/nagios3&#8242;. You can find out the password for the &#8216;nagiosadmin&#8217; user by catting a file that the charm leaves for this purpose:</p>
<pre>juju ssh nagios/0 sudo cat /var/lib/juju/nagios.passwd</pre>
<p><a href="http://fewbar.com.s3.amazonaws.com/wp-content/uploads/2012/08/InstantNagios2.png"><img class="alignleft size-full wp-image-553" title="InstantNagios" src="http://fewbar.com.s3.amazonaws.com/wp-content/uploads/2012/08/InstantNagios2.png" alt="" width="985" height="693" /></a></p>
<p>Now, the checks are very sparse at the moment. This is because we have used the generic monitoring interface which can just monitor the basic things (SSH, ping, etc). We can add some resource monitoring by deploying NRPE:</p>
<pre>juju deploy nrpe                          # create a subordinate NRPE service
juju add-relation nrpe wikibalancer       # Put NRPE on wikibalancer
juju add-relation nrpe wiki-app           # Put NRPE on wiki-app
juju add-relation nrpe:monitors nagios:monitors # Tells Nagios to monitor all NRPEs</pre>
<p>Now we will get memory stats, root filesystem, etc.</p>
<p>You may have noticed we left off wikidb, that is because it will show you an ambiguous relation warning when you try this:</p>
<pre>juju add-relation nrpe wikidb # Put NRPE on wikidb

ERROR Ambiguous relation 'nrpe mysql'; could refer to:
  'nrpe:general-info mysql:juju-info' (juju-info client / juju-info server)
  'nrpe:local-monitors mysql:local-monitors' (local-monitors client / local-monitors server)</pre>
<p>This is because mysql has special support to be able to specify its own local monitors in addition to those in the usual basic group (more on this in part 2). To get around this we use:</p>
<pre>juju add-relation nrpe:local-monitors wikidb:local-monitors</pre>
<p><a href="http://fewbar.com.s3.amazonaws.com/wp-content/uploads/2012/08/AddNRPE.png"><img class="alignleft size-full wp-image-554" title="AddNRPE" src="http://fewbar.com.s3.amazonaws.com/wp-content/uploads/2012/08/AddNRPE.png" alt="" width="985" height="812" /></a></p>
<p>&nbsp;</p>
<p>This is a perfect example of how Juju&#8217;s encapsulation around services pays off for re-usability. By wrapping a service like Nagios in a charm, we can start to really develop a set of best practices for using that service and collaborate around making it better for everyone.</p>
<p>Of course, <a href="http://wiki.opscode.com/display/chef/Nagios+Quick+Start">Chef</a> and <a href="http://blog.gurski.org/index.php/2010/01/28/automatic-monitoring-with-puppet-and-nagios/">Puppet</a> users can get this done with existing Nagios modules. Puppet, in particular, has really great Nagios support. However, I want to take a step back and explain why I think Juju has a place along side those methods and will accelerate systems engineering in new directions.</p>
<p>While there is some level of encapsulation in the methods that Chef and Puppet put forth, they&#8217;re not <strong>fully</strong> <strong>encapsulated</strong> in the way that they interact with other components in a Chef or Puppet system. In most cases, you still have to edit your own service configs to add specific Nagios integration. This works for the custom case, but it does not make it easy for users to collaborate on the way to deploy well known systems. It will also be hard to swap out components for new, better methods as they emerge. Every time you mention Nagios in your code, you are pushing Nagios deeper into your system engineering.</p>
<p>With the method I&#8217;ve outlined above, <strong>any</strong> charmed service can be monitored for basic stats (including the <a href="http://jujucharms.com/charms/precise" target="_blank">80 or so that are in the official charm store</a>). You might ask though, what about custom Nagios plugins, or specifying more elaborate but somewhat generic service checks. That is all coming. I will show some examples in my next post about this. I will also go on later to show how Nagios + NRPE can be replaced with collectd, or some other system, without changing the charms that have implemented rich monitoring support.</p>
<p>So, while this at least starts to bring the official Nagios charm up to par with configuration management&#8217;s rich Nagios ability, it also sets the stage for replacing Nagios with other things. The key difference here is that as you&#8217;ll see in the next few parts, none of the charms will have to mention &#8220;Nagios&#8221;. They&#8217;ll just describe what things to monitor, and Nagios, Collectd, or whatever other system you have in place will find a way to interpret that and monitor it.</p>
]]></content:encoded>
			<wfw:commentRss>http://fewbar.com/2012/08/juju-and-nagios-sittin-in-a-tree-polling-your-nrpe/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Juju constraints unbinds your machines</title>
		<link>http://fewbar.com/2012/04/juju-constraints-unbinds-your-machines/</link>
		<comments>http://fewbar.com/2012/04/juju-constraints-unbinds-your-machines/#comments</comments>
		<pubDate>Mon, 16 Apr 2012 22:48:17 +0000</pubDate>
		<dc:creator>clint</dc:creator>
				<category><![CDATA[Juju]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[juju]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://fewbar.com/?p=534</guid>
		<description><![CDATA[This week, William &#8220;I code more than you will ever be able to&#8221; Reade announced that Juju has a new feature called &#8216;Constraints&#8217;. This is really, really cool and brings juju into a new area of capability for deploying big &#8230; <a href="http://fewbar.com/2012/04/juju-constraints-unbinds-your-machines/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This week, <a href="https://lists.ubuntu.com/archives/juju/2012-April/001426.html">William &#8220;I code more than you will ever be able to&#8221; Reade announced that Juju has a new feature called &#8216;Constraints&#8217;.</a></p>
<p>This is really, really cool and brings juju into a new area of capability for deploying big and little sites.</p>
<p>To be clear, this allows you to abstract things pretty effectively.</p>
<p>Consider this:</p>
<p><code>juju deploy mysql --constraints mem=10G<br />
juju deploy statusnet --constraints cpu=1</code></p>
<p>This will result in your mysql service being on an extra large instance since it has 15GB of RAM. Your statusnet instances will be m1.small&#8217;s since that will have just 1 ECU.</p>
<p>Even cooler than this is now if you want a mysql slave in a different availability zone:</p>
<p><code>juju deploy mysql --constraints ec2-zone=a mysql-a<br />
juju deploy mysql --constraints ec2-zone=b mysql-b<br />
juju add-relation mysql-a:master mysql-b:slave<br />
juju add-relation statusnet mysql-a</code></p>
<p>Now if mysql-a goes down</p>
<p><code>juju remove-relation statusnet mysql-a<br />
juju add-relation statusnet mysql-b</code></p>
<p>Much and more is possible, but this really does make juju even more compelling as a tool for simple, easy deployment. <em>Edit: fixed ec2-zone to be the single character, per William&#8217;s feedback.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://fewbar.com/2012/04/juju-constraints-unbinds-your-machines/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Configurate your juju&#8217;s</title>
		<link>http://fewbar.com/2012/03/configurate-your-jujus/</link>
		<comments>http://fewbar.com/2012/03/configurate-your-jujus/#comments</comments>
		<pubDate>Thu, 15 Mar 2012 23:46:08 +0000</pubDate>
		<dc:creator>clint</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Juju]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[juju]]></category>
		<category><![CDATA[juju-jitsu]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://fewbar.com/?p=519</guid>
		<description><![CDATA[I was reading Jorge&#8217;s Stomp Box earlier today, and somebody mentioned how it would be an even better trick if it were easier to configure juju quickly. Ask and ye shall receive. I hacked a new sub-command into the experimental &#8230; <a href="http://fewbar.com/2012/03/configurate-your-jujus/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I was reading <a href="http://www.jorgecastro.org/2012/03/13/need-a-quick-instance-easy-juju-trick/">Jorge&#8217;s Stomp Box</a> earlier today, and somebody mentioned how it would be an even better trick if it were easier to configure juju quickly.</p>
<p>Ask and ye shall receive. I hacked a new sub-command into the experimental &#8216;juju-jitsu&#8217; wrapper. I&#8217;ll let the scrape from my terminal do the talking. You can get it with:</p>
<p><code><br />
bzr branch lp:juju-jitsu<br />
</code></p>
<p>And try it with</p>
<p><code><br />
juju-jitsu/wrap-juju<br />
juju setup-environment<br />
</code><br />
<span id="more-519"></span></p>
<pre>
clint@clint-MacBookPro:~/src/juju-jitsu/juju-jitsu$ ./wrap-juju
Aliasing juju to /home/clint/src/juju-jitsu/juju-jitsu/juju-jitsu-wrapper...
(juju-jitsu) clint@clint-MacBookPro:~/src/juju-jitsu/juju-jitsu$ juju setup-environment
Name for environment name : mybox
What provider do you want to use? (ec2,local) type [local]:
Default "series", a.k.a. release codename of Ubunt default-series [precise]:
local dir to store logs/directory structure/charm data-dir [~/.juju/data]:
environments:
mybox:
data-dir: ~/.juju/data
default-series: precise
type: local

Do you want to

[s]ave this to /home/clint/.juju/environments.yaml
[d]iff with existing /home/clint/.juju/environments.yaml
[q]uit

[sdq]: d
diff: /home/clint/.juju/environments.yaml: No such file or directory
[sdq]: s
(juju-jitsu) clint@clint-MacBookPro:~/src/juju-jitsu/juju-jitsu$ cat ~/.juju/environments.yaml
environments:
mybox:
data-dir: ~/.juju/data
default-series: precise
type: local
(juju-jitsu) clint@clint-MacBookPro:~/src/juju-jitsu/juju-jitsu$ juju setup-environment
Name for environment name : mycloud
What provider do you want to use? (ec2,local) type [local]: ec2
Default "series", a.k.a. release codename of Ubunt default-series [precise]:
S3 Bucket to store data in control-bucket [juju-jitsu-D8mzlogDmvPjTpASolJnXK6HxwAW8YA8]:
Zookeeper Secret admin-secret [qUJIUiwji-jiAN-XTSC1ztxUrm2XrYys]:
(AWS_ACCESS_KEY_ID) access-key [XXXXXXXXXXXXXXXXXXXX]:
(AWS_SECRET_ACCESS_KEY) secret-key [xYxYxYxYxYxYxYxYxYxY/WvWvWvWvWvWv]:
Default Instance Type (m1.small, c1.medium, etc default-instance-type :
Default AMI default-image-id :
EC2 Region region :
EC2 URI ec2-uri :
S3 URI s3-uri :
environments:
mybox:
data-dir: ~/.juju/data
default-series: precise
type: local
mycloud:
access-key: XXXXXXXXXXXXXXXXXXXX
admin-secret: qUJIUiwji-jiAN-XTSC1ztxUrm2XrYys
control-bucket: juju-jitsu-D8mzlogDmvPjTpASolJnXK6HxwAW8YA8
default-series: precise
secret-key: xYxYxYxYxYxYxYxYxYxY/WvWvWvWvWvWv
type: ec2

Do you want to

[s]ave this to /home/clint/.juju/environments.yaml
[d]iff with existing /home/clint/.juju/environments.yaml
[q]uit

[sdq]:
[sdq]: d
--- /home/clint/.juju/environments.yaml 2012-03-15 16:36:47.939298045 -0700
+++ /home/clint/.juju/.environments.yaml.QqwCt_ 2012-03-15 16:37:20.629394484 -0700
@@ -3,3 +3,10 @@
data-dir: ~/.juju/data
default-series: precise
type: local
+ mycloud:
+ access-key: XXXXXXXXXXXXXXXXXXXX
+ admin-secret: qUJIUiwji-jiAN-XTSC1ztxUrm2XrYys
+ control-bucket: juju-jitsu-D8mzlogDmvPjTpASolJnXK6HxwAW8YA8
+ default-series: precise
+ secret-key: xYxYxYxYxYxYxYxYxYxY/WvWvWvWvWvWv
+ type: ec2
[sdq]: s
2012-03-15 16:37:23,799 juju-jitsu Backing up /home/clint/.juju/environments.yaml to /home/clint/.juju/environments.yaml.2
(juju-jitsu) clint@clint-MacBookPro:~/src/juju-jitsu/juju-jitsu$ bzr info
Repository tree (format: 2a)
Location:
shared repository: /home/clint/src/juju-jitsu
repository branch: .

Related branches:
push branch: bzr+ssh://bazaar.launchpad.net/+branch/juju-jitsu/
parent branch: bzr+ssh://bazaar.launchpad.net/+branch/juju-jitsu/
(juju-jitsu) clint@clint-MacBookPro:~/src/juju-jitsu/juju-jitsu$
</pre>
]]></content:encoded>
			<wfw:commentRss>http://fewbar.com/2012/03/configurate-your-jujus/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Precise is coming</title>
		<link>http://fewbar.com/2012/03/precise-is-coming/</link>
		<comments>http://fewbar.com/2012/03/precise-is-coming/#comments</comments>
		<pubDate>Thu, 01 Mar 2012 22:47:47 +0000</pubDate>
		<dc:creator>clint</dc:creator>
				<category><![CDATA[Juju]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[canonical]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[juju]]></category>
		<category><![CDATA[precise]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://fewbar.com/?p=517</guid>
		<description><![CDATA[Almost 2 years ago, I stepped out of my comfort zone at a &#8220;SaaS&#8221; web company and joined the Canonical Server Team to work on Ubuntu Server development full time. I didn&#8217;t really grasp what I had walked into, joining &#8230; <a href="http://fewbar.com/2012/03/precise-is-coming/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Almost 2 years ago, I stepped out of my comfort zone at a <a href="http://www.adicio.com/">&#8220;SaaS&#8221; web company</a> and joined the <a href="http://www.canonical.com/">Canonical</a> Server Team to work on <a href="http://www.ubuntu.com/">Ubuntu</a> Server development full time.</p>
<p>I didn&#8217;t really grasp what I had walked into, joining the team right after an <a href="https://wiki.ubuntu.com/LTS">LTS</a> release. The <a href="http://releases.ubuntu.com/lucid/">10.04 release</a> was a monumental effort that spanned the previous 2 years. Call me a nerd if you want, but I get excited about a Free, unified desktop and server OS built entirely in the open, out of open source components, fully supported for 5 years on the server.</p>
<div id="attachment_523" class="wp-caption alignnone" style="width: 478px"><a href="http://fewbar.com.s3.amazonaws.com/wp-content/uploads/2012/03/winter-is-coming-pangolin.jpg"><img class="size-full wp-image-523 " title="winter-is-coming-pangolin" src="http://fewbar.com.s3.amazonaws.com/wp-content/uploads/2012/03/winter-is-coming-pangolin.jpg" alt="" width="468" height="312" /></a><p class="wp-caption-text">Winter, and the Precise Pangolin, are coming</p></div>
<p>And now, we&#8217;re about to do it again. <a href="http://releases.ubuntu.com/precise/">Precise</a> beta1 is looking really solid, and I am immensely proud to have been a tiny part of that.<span id="more-517"></span></p>
<p>So, what did we do on the sever team that has led to precise&#8217;s awesomeness:</p>
<p><a href="http://releases.ubuntu.com/maverick/">Ubuntu 10.10 &#8220;Maverick Meerkat&#8221;</a> &#8211; We helped out with getting CEPH into Debian and Ubuntu for 10.10, which proved to be important as it gave users a way to try out CEPH. CEPH will ship in main, and fully supported by Canonical in 12.04, which is pretty exciting! This was also the first release to feature pieces of OpenStack.</p>
<p><a href="http://releases.ubuntu.com/natty/">Ubuntu 11.04 &#8220;Natty Narwhal&#8221;</a> &#8211; <a href="http://upstart.ubuntu.com/">Upstart</a> got a lot better for server users in 11.04 with the addition of &#8220;override&#8221; files, and the shiny new <a href="http://upstart.ubuntu.com/cookbook/">Upstart Cookbook</a>. We also finally figured out how to coordinate complicated boot sequences without having to rewrite upstart to track state. I wasn&#8217;t personally involved, but we also shipped the first really usable OpenStack release, &#8220;cactus&#8221;.</p>
<p><a href="http://releases.ubuntu.com/oneiric/">Ubuntu 11.10 &#8220;Oneiric Ocelot&#8221;</a> &#8211; It seems small, but we fixed boot-up race conditions caused by services which need their network interfaces to be up before they start. Upstart also landed full chroot support, so you can run a chroot with its own upstart services inside of it, which is important for some use cases. This release also featured the debut of <a href="http://juju.ubuntu.com/">Juju</a>, which is a new way to deploy and manage network services and applications.</p>
<p><a href="http://releases.ubuntu.com/precise/">Ubuntu 12.04 &#8220;Precise Pangolin&#8221;</a> &#8211; OpenStack Essex is huge. Full keystone integration, lots of new features, and lots of satellite projects. Juju has really grown into a useful project now (give it a spin!). We also were able to transition to MySQL 5.5, which was no small feat. The amount of <a href="http://jenkins.qa.ubuntu.com/">automated continuous integration testing</a> that has gone into the precise cycle is staggering, and continues to grow as test cases are added. We&#8217;ll never find all the bugs this way, but we&#8217;ve at least found many of them before they ever reached a stable release this time.</p>
<p>There&#8217;s so much more in each of these, its amazing how much has been improved and refined in Ubuntu Server in just 2 years.</p>
<p>I&#8217;m pumped. A new LTS is exciting for us in Ubuntu Development, as it refocuses the more conservative users on all the work we&#8217;ve been doing. I would love to hear any feedback from the greater community. This is going to be great!</p>
]]></content:encoded>
			<wfw:commentRss>http://fewbar.com/2012/03/precise-is-coming/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>But will it scale? &#8211; Taking Limesurvey horizontal with juju&#8230;</title>
		<link>http://fewbar.com/2011/12/but-will-it-scale-juju/</link>
		<comments>http://fewbar.com/2011/12/but-will-it-scale-juju/#comments</comments>
		<pubDate>Fri, 23 Dec 2011 01:41:49 +0000</pubDate>
		<dc:creator>clint</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Juju]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Scalability]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[charms]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[juju]]></category>
		<category><![CDATA[lamp]]></category>
		<category><![CDATA[limesurvey]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://fewbar.com/?p=486</guid>
		<description><![CDATA[One of the really cool things about using the cloud, and especially juju, is that it instantly enables things that often times take a lot of thought to even try out in traditional environments. While I was developing some little &#8230; <a href="http://fewbar.com/2011/12/but-will-it-scale-juju/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-487" style="border-style: initial; border-color: initial;" title="Will it Blend?" src="http://fewbar.com.s3.amazonaws.com/wp-content/uploads/2011/12/will-it-blend-300x168.jpg" alt="" width="300" height="168" /></p>
<p>One of the really cool things about using the cloud, and especially <a href="https://juju.ubuntu.com/">juju</a>, is that it instantly enables things that often times take a lot of thought to even try out in traditional environments. While I was developing some little PHP apps &#8220;back in the day&#8221;, I knew eventually they&#8217;d need to go to more than one server, but testing them for that meant, well, finding and configuring multiple servers. Even with VMs, I had to go allocate one and configure it. Oops, I&#8217;m out of time, throw it on one server, pray, move to next task.</p>
<p>This left a very serious question in my mind.. &#8220;When the time comes, will my app actually scale?&#8221;<br />
<span id="more-486"></span></p>
<p>Have I forgotten some huge piece to make sure it is stateless, or will it scale horizontally the way I intended it to? Things have changed though, and now we have the ability to start virtual machines via an API on several providers, and actually *test* whether our app will scale.</p>
<p>This brings us to our story. Recently, <a href="https://bugs.launchpad.net/charm/+bug/899849">Nick Barcet created a juju</a> <a href="https://juju.ubuntu.com/Charms">charm</a> for <a href="http://www.limesurvey.org/">Limesurvey</a>. This is a really cool little app that lets users create rich, multi faceted surveys and invite the internet to vote on things, answer questions, etc. etc. This is your standard &#8220;LAMP&#8221; application, and it seems written in a way that will allow it to scale out.</p>
<p>However, when Nick submitted the charm for the official juju charms collection, I wanted to see if it actually would scale the way I knew LAMP apps should. So, I fired up juju on ec2, threw in some haproxy, and related it to my limesurvey service, and then started adding units. This is incredibly simple with juju:</p>
<pre>juju deploy --repository charms local:mysql</pre>
<pre>juju deploy --repository charms local:limesurvey</pre>
<pre>juju deploy --repository charms local:haproxy</pre>
<pre>juju add-relation mysql limesurvey</pre>
<pre>juju add-relation limesurvey haproxy</pre>
<pre>juju add-unit limesurvey</pre>
<pre>juju expose haproxy</pre>
<p>Lo and behold, it didn&#8217;t scale. <a href="http://fewbar.com.s3.amazonaws.com/wp-content/uploads/2011/12/633325462873135493.jpg"><img class="alignright size-medium wp-image-492" title="633325462873135493" src="http://fewbar.com.s3.amazonaws.com/wp-content/uploads/2011/12/633325462873135493-300x225.jpg" alt="" width="300" height="225" /></a>There were a few issues with the default recommendations of limesurvey that Nick had encoded into the charm. These were simple things, like assuming that the local hostname would be the hostname people use to access the site.</p>
<p>Once that was solved, there were some other scaling problems immediately revealed. First on the ticket was that Limesurvey, by default, uses MyISAM for its storage engine in MySQL. This is a huge mistake, and I can&#8217;t imagine why *anybody* would use MyISAM in a modern application. MyISAM uses a &#8220;whole table&#8221; locking scheme for both reads and writes, so whenever anything writes to any part of the table, all reads and writes must wait for that to finish. InnoDB, available since MySQL 4.0, and the default storage engine for MySQL 5.5 and later, doesn&#8217;t suffer from this problem as it implements an MVCC model and row-level locks to allow concurrent reads and writes.</p>
<p>The MyISAM locks caused request timeouts when I pointed siege at the load balancer, because too many requests were stacking up waiting for updates to complete before even reading from the table. This is especially critical on something like the session storage that limesurvey does in the database, as it effectively meant that only one user can do anything at a time with the database.</p>
<p>Scalability testing in 10 minutes or less, with a server investment of about $1US. Who knew it could be this easy? Granted, I stopped at three app server nodes, and we didn&#8217;t even get to scaling out the database (something limesurvey doesn&#8217;t really have native support for). But these are things that are already solved, and that have been encoded in charms already. Now we just have to suggest small app changes to allow users to take advantage of all those well know best practices sitting in charms.</p>
<p><img class="aligncenter size-medium wp-image-495" style="border-style: initial; border-color: initial;" title="winning" src="http://fewbar.com.s3.amazonaws.com/wp-content/uploads/2011/12/winning-262x300.png" alt="" width="262" height="300" /></p>
<p>(check <a href="https://bugs.launchpad.net/charm/+bug/899849">the bug comments</a> for the results, I&#8217;d be interested if somebody wants to repeat the test).</p>
<p>So, in a situation where one needs to deploy now, and scale later, I think juju will prove quite useful. It should be on anybody&#8217;s radar who wants to get off the ground quickly.</p>
]]></content:encoded>
			<wfw:commentRss>http://fewbar.com/2011/12/but-will-it-scale-juju/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.244 seconds -->
