<?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</title>
	<atom:link href="http://fewbar.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://fewbar.com</link>
	<description>Technology, life, and mischief, not in that order</description>
	<lastBuildDate>Wed, 18 Apr 2012 00:55:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<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;<p class="read-more"><a href="http://fewbar.com/2012/04/juju-constraints-unbinds-your-machines/">Read more &#187;</a></p>]]></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>11</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;<p class="read-more"><a href="http://fewbar.com/2012/03/configurate-your-jujus/">Read more &#187;</a></p>]]></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>1</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;<p class="read-more"><a href="http://fewbar.com/2012/03/precise-is-coming/">Read more &#187;</a></p>]]></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>5</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;<p class="read-more"><a href="http://fewbar.com/2011/12/but-will-it-scale-juju/">Read more &#187;</a></p>]]></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>
		<item>
		<title>&#8216;service foo restart&#8217; on Ubuntu 12.04 will &#8220;Do the right thing&#8221;</title>
		<link>http://fewbar.com/2011/11/service-restart-on-ubuntu-12-04-will-do-the-right-thing/</link>
		<comments>http://fewbar.com/2011/11/service-restart-on-ubuntu-12-04-will-do-the-right-thing/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 01:38:46 +0000</pubDate>
		<dc:creator>clint</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[boot]]></category>
		<category><![CDATA[precise]]></category>
		<category><![CDATA[upstart]]></category>
		<category><![CDATA[wtf]]></category>

		<guid isPermaLink="false">http://fewbar.com/?p=461</guid>
		<description><![CDATA[Just a quick note.. I was watching Artur Bergman&#8217;s rant about Full Stack awareness at Velocity Europe with glee, until I saw how we, the Ubuntu devs, had drawn his ire for breaking something so simple, &#8216;restart&#8217;. I&#8217;ve heard this &#8230;<p class="read-more"><a href="http://fewbar.com/2011/11/service-restart-on-ubuntu-12-04-will-do-the-right-thing/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Just a quick note.. I was watching <a href="http://www.youtube.com/watch?v=oebqlzblfyo&amp;feature=autoshare">Artur Bergman&#8217;s rant about Full Stack awareness</a> at Velocity Europe with glee, until I saw how we, the Ubuntu devs, had drawn his ire for breaking something so simple, &#8216;restart&#8217;.</p>
<p><iframe width="620" height="349" src="http://www.youtube.com/embed/oebqlzblfyo?fs=1&#038;feature=oembed" frameborder="0" allowfullscreen></iframe></p>
<p>I&#8217;ve heard this before, and I realized that its true! Restart should ignore that the service is stopped, and just start it, otherwise just restart it as I requested.</p>
<p>So, first off, instead of:</p>
<pre>
/etc/init.d/apache2 restart
</pre>
<p>or (for upstart controlled services)</p>
<pre>
restart mysql
</pre>
<p> get in the habit of doing:</p>
<pre>
service apache2 restart
</pre>
<p>This command will do the right thing more often than not (including clearing out the environment for sysvinit jobs, which can help solve the &#8220;why does the service only work when I restart it manually&#8221;). And as of 12.04, it will start doing the right thing with restart too.</p>
<p>Its not perfect, and there are still bugs in upstart, but<a href="https://launchpad.net/ubuntu/+source/sysvinit/2.88dsf-13.10ubuntu5"> the version of &#8216;sysvinit&#8217; that I just uploaded</a> to Precise Pangolin (the future 12.04 / LTS release of Ubuntu) at least gives scripters and sysadmins a chance at uniformity by making upstart jobs and sysvinit scripts do the same thing with restart. I don&#8217;t think we can backport this all the way to 10.04, so sorry for that. However, please, users, keep the rants coming.. we need them!</p>
]]></content:encoded>
			<wfw:commentRss>http://fewbar.com/2011/11/service-restart-on-ubuntu-12-04-will-do-the-right-thing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Juju ODS Demo &#8211; The Home Version</title>
		<link>http://fewbar.com/2011/10/juju-ods-demo-the-home-version/</link>
		<comments>http://fewbar.com/2011/10/juju-ods-demo-the-home-version/#comments</comments>
		<pubDate>Sat, 22 Oct 2011 00:03:23 +0000</pubDate>
		<dc:creator>clint</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Juju]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[gource]]></category>
		<category><![CDATA[hadoop]]></category>
		<category><![CDATA[juju]]></category>
		<category><![CDATA[openstack]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[ubuntu-cloud]]></category>

		<guid isPermaLink="false">http://fewbar.com/?p=454</guid>
		<description><![CDATA[A few weeks ago I gave a live demo during Canonical CEO Jane Silber&#8217;s keynote at the Essex OpenStack Conference, which was held in Boston October 4-7 (See my previous post for details of the conference and summit). The demo was meant &#8230;<p class="read-more"><a href="http://fewbar.com/2011/10/juju-ods-demo-the-home-version/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago I gave a live demo during Canonical CEO Jane Silber&#8217;s keynote at the <a href="http://www.openstack.org/community/events/openstack-conference-fall-2011/">Essex OpenStack Conference</a>, which was held in Boston October 4-7 (See <a href="http://fewbar.com/2011/10/openstack-an-amoeba-on-a-mission/">my previous post for details of the conference and summit</a>). The demo was meant to showcase our new favorite cloud technology at Canonical, juju. In order to do this, we deployed hadoop on top of our private OpenStack cloud (also deployed earlier in the week via juju and Ubuntu Orchestra) and fed it a &#8220;real&#8221; workload (a big giant chunk of data to sort) in less than 5 minutes.</p>
<p>I&#8217;ve had a few requests to explain how it works, so, here is a step by step on how to repeat said demo.</p>
<p>First, you need to setup juju to be able to talk to your cloud. The simplest way to do this is to sign up for an AWS account on Amazon, and get EC2 credentials (a secret key and a key ID is needed).</p>
<p>If you install juju in Ubuntu 11.10, or from the <a href="https://launchpad.net/~juju/+archive/pkgs">daily build PPA</a> in any other release, you&#8217;ll get a skeleton environments.yaml just by running &#8216;juju&#8217;.</p>
<p>Once this is done, edit ~/.juju/environments.yaml to add your access-key: and secret-key:. Optionally, you can set them in AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in the environment.</p>
<p>Now, you need the &#8220;magic&#8221; bit that turns juju status changes into commands for the &#8220;gource&#8221; source code visualization tool. Its available here:</p>
<p>http://bazaar.launchpad.net/~clint-fewbar/juju/gource-output/view/head:/misc/status2gource.py</p>
<p>(wgettable here)</p>
<p><code></p>
<p>http://bazaar.launchpad.net/~clint-fewbar/juju/gource-output/download/head:/status2gource.py-20110908235607-pfnddi4d114nl8qd-1/status2gource.py</p>
<p></code></p>
<p>You&#8217;ll also need to install the &#8216;gource&#8217; visualization tool. I only tried this on Ubuntu 11.10, but it is available on other releases as well.</p>
<p>Make sure your desired target environment is either the only one in .juju/environments.yaml, or set to be the default with &#8216;default: xxxx&#8217; at the root of the file. You need &#8216;juju status&#8217; to return something meaningful (after bootstrap) for status2gource.py to work.</p>
<p>Now, in its own terminal, run this, note that cof_orange_hex.png is part of the official Ubuntu logo packs, but I forget where I got that. You may omit that commandline argument if you like, and a generic &#8220;person&#8221; image will be used.</p>
<p><code>python -u status2gource.py | gource --highlight-dirs \<br />
--file-idle-time 1000000 \<br />
--log-format custom \<br />
--default-user-image cof_orange_hex.png \<br />
--user-friction 0.5 \<br />
-</code></p>
<p>This will not show anything until juju bootstrap is done and &#8216;juju status&#8217; shows the machine 0 running. If you already have services deployed, it should build the tree rapidly.</p>
<p>So next if you haven&#8217;t done it already</p>
<p><code>juju bootstrap<br />
</code><br />
Once your instance starts up, you should see a gource window pop up and the first two bits, the bootstrap node and the machine 0 node, will be added.</p>
<p><a href="http://fewbar.com.s3.amazonaws.com/wp-content/uploads/2011/10/Screenshot-at-2011-10-21-1539421.png"><img class="size-medium wp-image-460 alignnone" title="Screenshot at 2011-10-21 15:39:42" src="http://fewbar.com.s3.amazonaws.com/wp-content/uploads/2011/10/Screenshot-at-2011-10-21-1539421-300x233.png" alt="" width="300" height="233" /></a></p>
<p><span id="more-454"></span></p>
<p>Once this is done, you can just deploy/add-relation/etc. to your heart&#8217;s content.</p>
<p>To setup a local repo of charms, we did this:</p>
<p><code>mkdir charms<br />
bzr init-repo charms/oneiric<br />
cd charms/oneiric<br />
bzr branch lp:~mark-mims/+junk/charm-hadoop-master hadoop-master<br />
bzr branch lp:~mark-mims/+junk/charm-hadoop-slave hadoop-slave<br />
bzr branch lp:~mark-mims/+junk/charm-ganglia ganglia</code></p>
<p>Those particular charms were specifically made for the demo, but most of the changes have been folded back in to the main &#8220;charm collection&#8221;, so you can probabl change lp:~mark-mims/+junk/charm- to lp:charm/.</p>
<p>You will also need a file in your current directory called &#8216;config.yaml&#8217; with this content:</p>
<pre><code>namenode: job_size: 100000 job_maps: 10 job_reduces: 10 job_data_dir: in_one job_output_dir: out_one </code></pre>
<pre>These numbers heavily control how the job runs with 1 or 100 hadoop instances. If you want to spend a couple of bucks in Amazon, and fire up 20 nodes, then raise job_maps to 100 and job_reduces to 100. Also job_size to 10000000. Otherwise its over very fast!</pre>
<p>We started the demo after bootstrap was already done, so the next step is to deploy Hadoop/HDFS and ganglia to keep an eye on the nodes as they came up.</p>
<p><code>juju deploy --repository . --config config.yaml hadoop-master namenode<br />
juju deploy --repository . hadoop-slave datacluster<br />
juju deploy --repository . ganglia jobmonitor<br />
juju add-relation namenode datacluster<br />
juju add-relation datacluster jobmonitor<br />
juju expose jobmonitor</code></p>
<p>This should get you a tree in gource showing all of the machines, services, and relations that are setup.</p>
<p><a href="http://fewbar.com.s3.amazonaws.com/wp-content/uploads/2011/10/Screenshot-at-2011-10-21-164343.png"><img class="size-medium wp-image-462 alignnone" title="Screenshot at 2011-10-21 16:43:43" src="http://fewbar.com.s3.amazonaws.com/wp-content/uploads/2011/10/Screenshot-at-2011-10-21-164343-300x233.png" alt="" width="300" height="233" /></a></p>
<p>You can scale out hadoop next with this command. Here I only create 4, but it could be 100.. depending on how fast you need your data map/reduced.</p>
<p>for i in 1 2 3 4 ; do juju add-unit datacluster ; done</p>
<p><a href="http://fewbar.com.s3.amazonaws.com/wp-content/uploads/2011/10/Screenshot-at-2011-10-21-164623.png"><img class="size-medium wp-image-463 alignnone" title="Screenshot at 2011-10-21 16:46:23" src="http://fewbar.com.s3.amazonaws.com/wp-content/uploads/2011/10/Screenshot-at-2011-10-21-164623-300x233.png" alt="" width="300" height="233" /></a></p>
<p>Finally, to start the teragen/terasort:</p>
<p><code>juju ssh namenode/0</code></p>
<p><code>$ sudo su -u hdfs sh /usr/lib/hadoop/terasort.sh<br />
</code><br />
You may also want to note the hostname of the machine assigned to the jobmonitor node so you can bring it up in a browser. You will be able to see it in &#8216;juju status&#8217;.</p>
<p><a href="http://fewbar.com.s3.amazonaws.com/wp-content/uploads/2011/10/Screenshot-at-2011-10-21-165030.png"><img class="size-medium wp-image-464 alignnone" title="Screenshot at 2011-10-21 16:50:30" src="http://fewbar.com.s3.amazonaws.com/wp-content/uploads/2011/10/Screenshot-at-2011-10-21-165030-300x217.png" alt="" width="300" height="217" /></a></p>
<p>Its worth noting that we had a fail rate of about 1 in 20 tries while practicing the demo because of this bug:</p>
<p><a href="https://bugs.launchpad.net/juju/+bug/872378">https://bugs.launchpad.net/juju/+bug/872378</a></p>
<p>This causes the &#8220;juju expose jobmonitor&#8221; to fail, which means you may not be able to reach the ganglia instance. You can fix this by stopping/starting the provisioning agent on the bootstrap node. That is easier said than done, but can be scripted. Its fixed in juju&#8217;s trunk, so if you are using the daily build, not the distro version, you shouldn&#8217;t see that issue.</p>
<p>So once you&#8217;re done, you&#8217;ll probably want to get rid of all these nodes you&#8217;ve created. Juju has a tool that strips everything down that it has brought up, which can be dangerous if you have data on the nodes, so be careful!</p>
<p><code><br />
juju destroy-environment<br />
</code></p>
<p>It does not have a &#8216;&#8211;force&#8217; or &#8216;-y&#8217;, by design. Make sure to keep the gource running when you do this. Say &#8216;y&#8217;, and then enjoy the show at the end. <img src='http://fewbar.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I&#8217;d be interested to hear from anybody who is brave enough to try this how their experience is!</p>
]]></content:encoded>
			<wfw:commentRss>http://fewbar.com/2011/10/juju-ods-demo-the-home-version/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>OpenStack &#8211; an amoeba on a mission</title>
		<link>http://fewbar.com/2011/10/openstack-an-amoeba-on-a-mission/</link>
		<comments>http://fewbar.com/2011/10/openstack-an-amoeba-on-a-mission/#comments</comments>
		<pubDate>Sun, 09 Oct 2011 06:07:57 +0000</pubDate>
		<dc:creator>clint</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Ensemble]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[juju]]></category>
		<category><![CDATA[openstack]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://fewbar.com/?p=448</guid>
		<description><![CDATA[According to NASA, 70% of the earth is covered by clouds. Apparently, at least 70% of our computing needs can be covered by clouds as well. That seems to be the shared belief by the rather large crowd that gathered &#8230;<p class="read-more"><a href="http://fewbar.com/2011/10/openstack-an-amoeba-on-a-mission/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>According to NASA, 70% of the earth is covered by clouds. Apparently, at least 70% of our computing needs can be covered by clouds as well. That seems to be the shared belief by the rather large crowd that gathered in Boston last week for the Essex edition of the <a href="http://www.openstack.org/community/events/openstack-conference-fall-2011/">OpenStack Design Summit</a> and subsequent OpenStack Conference.</p>
<p>The amount of energy and corporate investment in OpenStack is staggering when one considers that it didn&#8217;t exist 2 years ago, and didn&#8217;t really do much more than spawn VM&#8217;s and store objects until this month with the Diablo release, which added some more capabilities, but from my point of view, mostly just refined those abilities and set the stage for the future.<br />
<span id="more-448"></span><br />
Attending as a member of the Ubuntu Server team and a Canonical employee was quite a gratifying experience. Ubuntu Server has been the platform of choice for OpenStack&#8217;s development, and that has definitely led to a lot of people running OpenStack on Ubuntu Server. Its always nice to hear that your work is part of something greater.</p>
<p>On the surface, one might be concerned at a lack of vision in the OpenStack project. With so many competing interests, it may appear that it has no clear vision and is just growing toward the latest source of funding or food, much like an amoeba swallowing up its next meal. But the leadership of the project seems to understand that there is still a much greater mission here, that without intense focus the project will expend enormous energy and accomplish little more than falling a little less behind established players in the marketplace.</p>
<p>Its a bit vindicating for one of my more intense current interests, <a href="http://juju.ubuntu.com">Juju</a>, that others who are close to this discussion, like OpenStackers, are thinking along the same lines. In talking with Puppet and Chef guys and with people who are using the cloud, its clear to me that my hunch is right; chef and puppet are not really the same thing as Juju. The new project from Cisco, <a href="https://launchpad.net/donabe">Donabe</a>, seems to be thinking exactly like Juju, wanting to encapsulate and describe each service in what they call &#8220;Network Containers&#8221;. Also I&#8217;m told the desires of the Neutronium PaaS project are pretty similar as well.</p>
<p>Ultimately we don&#8217;t think that the current limitations of known PaaS stacks are always worth the effort to integrate with them. We do want to have a lot of the same capabilities without having to duplicate all the effort to set them up. We want to be able to make use of well understood technologies without having to understand every detail of their deployment and configuration. If I want to make use of MySQL or memcached, I should understand how they work, but I shouldn&#8217;t have to duplicate the effort that others have had to put in to make them work.</p>
<p>Chef and Puppet have made some inroads into this by making such things highly repeatable and getting them all into source control. However, its my belief that their implementations both limit the network effect that they can have to build up a full set of sharable services. Juju, I think, will really be a boost to those who have spent a lot on solid config management, as that config management will be easy to chop up into Juju charms, and then that will open up all the other existing charms for immediate use in such a shop.</p>
<p>Getting back to how this relates to OpenStack, it was also quite exhilarating to do a live keynote demo of Juju in all of its alpha glory. To raise the tightrope a little higher, it was driving OpenStack Diablo, which some might call beta-quality. We also got rid of the safety nets entirely, and had it running on top of Ubuntu 11.10 (pre-release). We had a few kinks through the week, but the awesome team I had around me was able to iron them all out and made both our CEO, Jane Silber, and me look very good up there. That includes my fellow server team members, the OpenStack developers, Canonical IS pro&#8217;s, the Juju dev team, and my main collaborator in the whole thing, Jorge Castro.</p>
<p>I hope to attend the next ODS, to see how much closer OpenStack is to completing its mission in 6 months. What is that mission currently? Quite simple really.. the mission is, figure out the mission.</p>
]]></content:encoded>
			<wfw:commentRss>http://fewbar.com/2011/10/openstack-an-amoeba-on-a-mission/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>CloudCamp San Diego &#8211; Wake up and smell the Enterprise</title>
		<link>http://fewbar.com/2011/06/cloudcamp-san-diego-wake-up-and-smell-the-enterprise/</link>
		<comments>http://fewbar.com/2011/06/cloudcamp-san-diego-wake-up-and-smell-the-enterprise/#comments</comments>
		<pubDate>Wed, 15 Jun 2011 20:25:28 +0000</pubDate>
		<dc:creator>clint</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[azure]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[cloudcamp]]></category>
		<category><![CDATA[cloudcampsan]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[ensemble]]></category>
		<category><![CDATA[nosql]]></category>

		<guid isPermaLink="false">http://fewbar.com/?p=443</guid>
		<description><![CDATA[I took a little trip down to San Diego yesterday to see what these CloudCamp events are all about. There are so many, and they&#8217;re all over, I figure its a good chance to take a look at what might &#8230;<p class="read-more"><a href="http://fewbar.com/2011/06/cloudcamp-san-diego-wake-up-and-smell-the-enterprise/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>I took a little trip down to San Diego yesterday to see what these <a href="http://cloudcamp-sandiego-2011.eventbrite.com/">CloudCamp</a> events are all about. There are so many, and they&#8217;re all over, I figure its a good chance to take a look at what might be the &#8220;Common man&#8217;s&#8221; view of the cloud. I spend so much time talking to people at a really deep level about what the cloud is, why we like it, why we hate it, etc. This &#8220;un-conference&#8221; was more about bringing a lot of that information, distilled for business owners and professionals who need to learn more about &#8220;this cloud thing&#8221;.<br />
<span id="more-443"></span><br />
The lightning talks were quite basic. The most interesting one was given by a former lawyer who now runs IT for a medium sized law firm. Private cloud saves him money because he can now make a direct charge back to a client when they are taking up storage and computing space. This also allows him to keep his infrastructure more managable because they tend to give up resources more readily when there is a direct chargeback as opposed to just general service fees that try to cover this.</p>
<p>There was a breakout session about SQL vs. NoSQL. I joined and was shocked at how dominant the Microsoft representative was. She certainly tried to convince us &#8220;this isn&#8217;t about SQL Azure, its about SQL vs. NoSQL&#8221; but it was pretty much about all the things that suck more than SQL Azure, and about not mentioning anything that might compete directly with it. I brought up things like Drizzle, Cassandra, HDFS, Xeround, MongoDB, and MogileFS. These were all swiftly moved past, and not written on the white board. Her focus was on how SimpleDB differs from Amazon RDS, and how Microsoft Azure has its own key/value/column store for their cloud. The room was overpowered into silence for the most part.. there were about 20 developers and IT manager types in the room and they had no idea how this was going to help them take advantage of IaaS or PaaS clouds. I felt the session was interesting, but ultimately, completely pwned by the Microsoft rep. She ended by showing off 3D effects in their Silverlight based management tool. Anybody impressed deserves what they get, quite honestly.</p>
<p>One good thing that did come out of that session was the ensuing discussion for it where I ended up talking with a gentleman from a local San Diego startup that was just acquired. This is a startup of 3 people that is 100% in Amazon EC2 on Ubuntu with PHP and MySQL. They have their services spread accross 3 regions and were not affected at all by the recent outtages in us-east-1. Their feeling on the SQL Azure folks is that its for people who have money to burn. For him, he spends $3000 a month and it is entirely on EC2 instances and S3/EBS storage. The audience was stunned that it was so cheap, and that it was so easy to scale up and down as they add/remove clients. He echoed something that the MS guys said too.. that because their app was architected this way from the beginning, it was extremely cost effective, and wouldn&#8217;t even really save much money if they leased or owned servers instead of leasing instances, since they can calculate the costs and pass them directly on to the clients with this model, and their commitment is zero.</p>
<p>Later on I proposed a breakout session on how repeatable is your infrastructure (basically, infrastructure as code). There was almost no interest, as this was a very business oriented un-conference. The few people who attended were just using AMI&#8217;s to do everything. When something breaks, they fix it with parallel-ssh. For the one person who was using Windows in the cloud, he had no SSH, so fixing any system problems meant re-deploying his new AMI over and over.</p>
<p>Overall I thought it was interesting to see where the non-webops world is with knowledge of the cloud. I think the work we&#8217;re doing with <a href="http://ensemble.ubuntu.com/">Ensemble</a> is really going to help people to deploy open source applications into private and public clouds so they don&#8217;t need 3D enabled silverlight interfaces to manage a simple database or a bug tracking system for their internal developers.</p>
]]></content:encoded>
			<wfw:commentRss>http://fewbar.com/2011/06/cloudcamp-san-diego-wake-up-and-smell-the-enterprise/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>So what is Ensemble anyway?</title>
		<link>http://fewbar.com/2011/06/so-what-is-ensemble-anyway/</link>
		<comments>http://fewbar.com/2011/06/so-what-is-ensemble-anyway/#comments</comments>
		<pubDate>Fri, 03 Jun 2011 18:53:08 +0000</pubDate>
		<dc:creator>clint</dc:creator>
				<category><![CDATA[Ensemble]]></category>
		<category><![CDATA[Scalability]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[chef]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[config management]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[ensemble]]></category>
		<category><![CDATA[mediawiki]]></category>
		<category><![CDATA[orchestration]]></category>
		<category><![CDATA[principia]]></category>
		<category><![CDATA[puppet]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://fewbar.com/?p=414</guid>
		<description><![CDATA[Have you heard of Ensemble? Are you excited about Cloud/Service Orchestration? What? Ok you&#8217;re not alone if you are scratching your head. Ensemble is an implementation of a new idea that has been taking shape the last couple of years. &#8230;<p class="read-more"><a href="http://fewbar.com/2011/06/so-what-is-ensemble-anyway/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Have you heard of <a href="http://ensemble.ubuntu.com/">Ensemble</a>? Are you excited about Cloud/Service Orchestration? What? Ok you&#8217;re not alone if you are scratching your head.</p>
<p>Ensemble is an implementation of a new idea that has been taking shape the last couple of years. Ever since Amazon hooked up a remote API to thousands of machines to provide access to their virtual infrastructure (and called it macaroni? err.. AWS), people have been dreaming up ways to take advantage of what is basically a robotic &#8220;NOC guy&#8221;. No longer do you have to pre-rack servers or call your vendor frantically to get servers sent next-day to your colo. Right?</p>
<p>Naturally, the system administrators that would normally be in charge of racking servers, applied their existing tools to the job, to mixed success. Config management is really good at modelling identical hosts. But with virtual hosts instantly available, this left those thinking at a higher level wanting more. Chef in particular implemented a nice set of tools and functionality to allow this high level &#8220;service&#8221; definition with their knife tools and simple ruby API.</p>
<p>But how easy are Chef&#8217;s cookbooks to share and use without modification?<span id="more-414"></span> How easy are they to integrate together? Puppet has modules that are also capable of similar functionality, and the recent integration of Mcollective, plus puppet Faces, has certainly added a lot of the same things Chef had to support this kind of application modelling, but again, the modules seem to require a lot of convention and assumption, and tweaking to get useful.</p>
<p>Its my opinion, that this is very much like the way tarballs+autoconf became the de-facto standard for distributing free software. It was *so much* better than writing a Makefile by hand, and it achieved an enormous amount of portability, so developers adopted it rapidly. In fact, it is still the dominant way to distribute portable open source applications.</p>
<p>But at some point, the limitations of this became clear. There was a need for something more concise, that could distribute both the source, and binaries, built for a platform. There was some limited<a href="http://slackware.org"> early success with tarballs</a> built by convention. But then, Enter RPM and DPKG. These included ways to express facts about software, like its dependencies, architecture, and the revisions made to it to work on the target platform. This allowed distributors of software to more easily maintain their systems, and enabled users to manage the software in their environments.</p>
<p>At that point, some smart guy figured out that we should be able to download and automatically configure all of the software needed for one application to work properly, just from its packaging information. To my mind, apt-get was my first experience with this, though FreeBSD ports authors may disagree there. Either way, this made it very easy for admins and users to install software without spending hours in the 7 levels of dependency hell.</p>
<p>In many ways, Service Orchestration is a way of bringing the benefits of packaging to the cloud. It should allow us to build out our cloud in a sane way, taking advantage of the knowledge that has been gained by others. For the bits that we need to finely tune, it should step aside and allow that without compromising the system.</p>
<p>Ensemble is an implementation of this idea, and <a href="https://launchpad.net/principia">Principia</a> is a collection of &#8220;<a href="https://ensemble.ubuntu.com/docs/formula.html">Formulas</a>&#8221; for Ensemble. They are tightly coupled to Ubuntu, as they are in many ways meant to be the dpkg and apt-get for Ubuntu in the cloud.</p>
<p>Its pretty easy to try out Ensemble and Principia on Ubuntu. Right now you&#8217;ll need an EC2 account with an access key setup, though we&#8217;re working on making this work with just your local machine for rapid development.</p>
<p><em><strong>Its been pointed out to me that the version of principia-tools that was available at the time of this writing didn&#8217;t include /usr/share/principia-tools/tests. I&#8217;ve uploaded a fixed version to the ensemble PPA, so if you tried these instructions and failed, please try updating principia-tools. If that fails, you can get the tests with bzr branch lp:principia-tools.</strong><br />
</em></p>
<p><code><br />
sudo add-apt-repository ppa:ensemble/ppa<br />
sudo apt-get update<br />
sudo apt-get install principia-tools<br />
export AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxx<br />
export AWS_SECRET_KEY_ID=0123456789ABCDEF<br />
ensemble bootstrap<br />
principia getall /some/path/for/formulas<br />
/usr/share/principia-tools/tests/mediawiki.sh /some/path/for/formulas<br />
</code></p>
<p>What does this give you, well it should give you a 7 node mediawiki cluster of t1.micro&#8217;s in the us-east-1 region of EC2. I just ran it and now I have this:</p>
<pre>machines:
  0: {dns-name: ec2-50-19-158-109.compute-1.amazonaws.com, instance-id: i-215dd84f}
  1: {dns-name: ec2-50-17-16-228.compute-1.amazonaws.com, instance-id: i-8d58dde3}
  2: {dns-name: ec2-72-44-49-114.compute-1.amazonaws.com, instance-id: i-9558ddfb}
  3: {dns-name: ec2-50-19-47-106.compute-1.amazonaws.com, instance-id: i-6d5bde03}
  4: {dns-name: ec2-174-129-132-248.compute-1.amazonaws.com, instance-id: i-7f5bde11}
  5: {dns-name: ec2-50-19-152-136.compute-1.amazonaws.com, instance-id: i-755bde1b}
  6: {dns-name: '', instance-id: i-4b5bde25}
services:
  demo-wiki:
    formula: local:mediawiki-62
    relations: {cache: wiki-cache, db: wiki-db, website: wiki-balancer}
    units:
      demo-wiki/0:
        machine: 2
        relations: {}
        state: null
      demo-wiki/1:
        machine: 6
        relations: {}
        state: null
  wiki-balancer:
    formula: local:haproxy-13
    relations: {reverseproxy: demo-wiki}
    units:
      wiki-balancer/0:
        machine: 4
        relations: {}
        state: null
  wiki-cache:
    formula: local:memcached-10
    relations: {cache: demo-wiki}
    units:
      wiki-cache/0:
        machine: 3
        relations: {}
        state: null
      wiki-cache/1:
        machine: 5
        relations: {}
        state: null
  wiki-db:
    formula: local:mysql-93
    relations: {db: demo-wiki}
    units:
      wiki-db/0:
        machine: 1
        relations: {}
        state: null</pre>
<p>At the top you see the machines that ensemble spun up in EC2 in the &#8216;machines&#8217; section. The numbers there correspond to the &#8216;machine: #&#8217; in the service/units definitions below. If you look through, you&#8217;ll see above that wiki-balancer is machine 4, which has a hostname of ec2-174-129-132-248.compute-1.amazonaws.com. If you go to that hostname, once all relations are up (I like to use &#8216;watch ensemble status&#8217; to see when this happens), you should see a working mediawiki. But not just a working mediawiki, a scalable one. If you want to pour on the traffic, spin up 3 more demo-wiki&#8217;s to handle the app server load:</p>
<p><code><br />
ensemble add-unit demo-wiki<br />
ensemble add-unit demo-wiki<br />
ensemble add-unit demo-wiki<br />
</code></p>
<p>These will of course take a minute or two to spin up. Once they&#8217;re ready they&#8217;ll show up in the status output:</p>
<pre>services:
  demo-wiki:
    formula: local:mediawiki-62
    relations: {cache: wiki-cache, db: wiki-db, website: wiki-balancer}
    units:
      demo-wiki/0:
        machine: 2
        relations:
          cache: {state: up}
          db: {state: up}
          website: {state: up}
        state: started
      demo-wiki/1:
        machine: 6
        relations:
          cache: {state: up}
          db: {state: up}
          website: {state: up}
        state: started
      demo-wiki/2:
        machine: 7
        relations:
          cache: {state: up}
          db: {state: up}
          website: {state: up}
        state: started
      demo-wiki/3:
        machine: 8
        relations:
          cache: {state: up}
          db: {state: up}
          website: {state: up}
        state: started
      demo-wiki/4:
        machine: 9
        relations:
          cache: {state: up}
          db: {state: up}
          website: {state: up}
        state: started
</pre>
<p>How about a little test then? After I got to this point, I logged in as WikiSysop (change the password folks! its change-me) and imported the Wikipedia exports for &#8220;Ubuntu&#8221; and &#8220;EC2&#8243;. After that I used harvestman to spider the site and then saved all the urls in a file, urls.txt. Alright! Now lets fire up *siege* from a machine outside the cluster, but in the same availability zone / security group (so at least we&#8217;re only dealing with EC2&#8242;s latency and not my net connection), and see if we can take this cluster down!</p>
<p><code><br />
$ siege -i -c 5 -f urls.txt<br />
...<br />
Transactions:		         563 hits<br />
Availability:		      100.00 %<br />
Elapsed time:		       95.58 secs<br />
Data transferred:	        2.64 MB<br />
Response time:		        0.35 secs<br />
Transaction rate:	        5.89 trans/sec<br />
Throughput:		        0.03 MB/sec<br />
Concurrency:		        2.04<br />
Successful transactions:         544<br />
Failed transactions:	           0<br />
Longest transaction:	       13.54<br />
Shortest transaction:	        0.00<br />
</code></p>
<p>This is, btw, the best run I got out of t1.micro&#8217;s. Sometimes it would get quite ugly:</p>
<p><code><br />
Transactions:		         892 hits<br />
Availability:		       99.55 %<br />
Elapsed time:		      221.69 secs<br />
Data transferred:	        3.64 MB<br />
Response time:		        0.61 secs<br />
Transaction rate:	        4.02 trans/sec<br />
Throughput:		        0.02 MB/sec<br />
Concurrency:		        2.45<br />
Successful transactions:         849<br />
Failed transactions:	           4<br />
Longest transaction:	       27.41<br />
Shortest transaction:	        0.00<br />
</code></p>
<p>Lets try the whole thing over with m1.small. First I edit ~/.ensemble/environments.yaml and add an override for the default-instance-type:</p>
<p><code><br />
ensemble: environments</code></p>
<pre>
environments:
  sample:
    type: ec2
    default-instance-type: m1.small
    control-bucket: ensemble-12345678901234567890
    admin-secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
</pre>
<p>Then I re-run the whole test:</p>
<p><code><br />
Transactions:		         290 hits<br />
Availability:		       98.98 %<br />
Elapsed time:		       81.79 secs<br />
Data transferred:	        0.78 MB<br />
Response time:		        0.53 secs<br />
Transaction rate:	        3.55 trans/sec<br />
Throughput:		        0.01 MB/sec<br />
Concurrency:		        1.89<br />
Successful transactions:         277<br />
Failed transactions:	           3<br />
Longest transaction:	        1.50<br />
Shortest transaction:	        0.00<br />
</code></p>
<p>Oops! I forgot to add my 3 extra nodes. Note that these two m1.smalls are already almost keeping up. Now as I add these, I keep siege running. Its pretty cool to watch the response times drop as nodes come online to carry some of the load.</p>
<p>Now with 5 m1.small&#8217;s:</p>
<p><code><br />
Transactions:		         273 hits<br />
Availability:		      100.00 %<br />
Elapsed time:		       54.27 secs<br />
Data transferred:	        0.99 MB<br />
Response time:		        0.47 secs<br />
Transaction rate:	        5.03 trans/sec<br />
Throughput:		        0.02 MB/sec<br />
Concurrency:		        2.38<br />
Successful transactions:         260<br />
Failed transactions:	           0<br />
Longest transaction:	       19.92<br />
Shortest transaction:	        0.00<br />
</code></p>
<p>And with higher concurrency raised from 5 to 10:</p>
<p><code><br />
Transactions:		         327 hits<br />
Availability:		      100.00 %<br />
Elapsed time:		       42.20 secs<br />
Data transferred:	        1.30 MB<br />
Response time:		        0.66 secs<br />
Transaction rate:	        7.75 trans/sec<br />
Throughput:		        0.03 MB/sec<br />
Concurrency:		        5.12<br />
Successful transactions:         318<br />
Failed transactions:	           0<br />
Longest transaction:	       25.51<br />
Shortest transaction:	        0.00<br />
</code></p>
<p>And now if we add 2 more, for a total of 7 nodes, concurrency of 10 gets even better:</p>
<p><code><br />
Transactions:		         531 hits<br />
Availability:		      100.00 %<br />
Elapsed time:		       53.37 secs<br />
Data transferred:	        1.75 MB<br />
Response time:		        0.44 secs<br />
Transaction rate:	        9.95 trans/sec<br />
Throughput:		        0.03 MB/sec<br />
Concurrency:		        4.35<br />
Successful transactions:         507<br />
Failed transactions:	           0<br />
Longest transaction:	       15.49<br />
Shortest transaction:	        0.00<br />
</code></p>
<p>And with 2 more (total of 9 units in demo-wiki serving the app):</p>
<p><code><br />
Transactions:		         354 hits<br />
Availability:		      100.00 %<br />
Elapsed time:		       34.41 secs<br />
Data transferred:	        1.23 MB<br />
Response time:		        0.41 secs<br />
Transaction rate:	       10.29 trans/sec<br />
Throughput:		        0.04 MB/sec<br />
Concurrency:		        4.22<br />
Successful transactions:         337<br />
Failed transactions:	           0<br />
Longest transaction:	       11.45<br />
Shortest transaction:	        0.00<br />
</code></p>
<p>Anyway, this isn&#8217;t a Mediawiki benchmark. This is to show you how easy it is to scale up and down in response to load with Ensemble. We all know that scaling out works, these graphs show it nicely:</p>
<p><img src="http://fewbar.com.s3.amazonaws.com/wp-content/uploads/2011/06/resptime.png" alt="Response Time" /><br />
<img src="http://fewbar.com.s3.amazonaws.com/wp-content/uploads/2011/06/tps.png" alt="Transactions per Second" /></p>
<p>Notice how the transactions/second went up all the time, but the response time went up drastically with the jump in concurrency. This is where you need to have the ability to scale quickly, and where, if you can live with the other limitations of EC2 or any other IaaS provider, the cloud should actually win you business, since better response time means more happy users.</p>
<p>Now that my siege is over, I can safely remove the unnecessary units one by one with &#8216;ensemble remove-unit demo-wiki/9&#8242;, etc. etc. There&#8217;s still a lot of room for sugar to be added. We could say &#8220;ensemble resize-service demo-wiki 5&#8243; and it might just pick 5 to keep and remove the rest, or add 3 to fulfill the request. There are also a ton of other ideas just bubbling up that are really exciting.</p>
<p>Come say hi and hack on ensemble with us in Freenode, #ubuntu-ensemble and on the mailing list on <a href="https://lists.ubuntu.com/mailman/listinfo/ensemble">the mailing list</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://fewbar.com/2011/06/so-what-is-ensemble-anyway/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Twitter Weekly Updates for 2011-06-02</title>
		<link>http://fewbar.com/2011/06/twitter-weekly-updates-for-2011-06-02-2/</link>
		<comments>http://fewbar.com/2011/06/twitter-weekly-updates-for-2011-06-02-2/#comments</comments>
		<pubDate>Thu, 02 Jun 2011 07:00:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://fewbar.com/2011/06/twitter-weekly-updates-for-2011-06-02-2/</guid>
		<description><![CDATA[@urbansoot The chefs of Capistrano typically cook salmon before the puppet show at Ruby&#039;s house. in reply to urbansoot # Powered by Twitter Tools]]></description>
			<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
<li>@<a href="http://twitter.com/urbansoot" class="aktt_username">urbansoot</a> The chefs of Capistrano typically cook salmon before the puppet show at Ruby&#039;s house. <img src='http://fewbar.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  <a href="http://twitter.com/urbansoot/statuses/74665094998536193" class="aktt_tweet_reply">in reply to urbansoot</a> <a href="http://twitter.com/spamaps/statuses/74869176157732864" class="aktt_tweet_time">#</a></li>
</ul>
<p class="aktt_credit">Powered by <a href="http://alexking.org/projects/wordpress">Twitter Tools</a></p>
]]></content:encoded>
			<wfw:commentRss>http://fewbar.com/2011/06/twitter-weekly-updates-for-2011-06-02-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.264 seconds -->
<!-- Cached page served by WP-Cache -->

