<?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>Ubuntu Cloud Portal</title>
	<atom:link href="http://cloud.ubuntu.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://cloud.ubuntu.com</link>
	<description>Ubuntu Cloud Portal</description>
	<lastBuildDate>Wed, 28 Nov 2012 23:46:54 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
		<item>
		<title>Juju and Nagios, sittin’ 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[featured]]></category>
		<category><![CDATA[juju]]></category>
		<category><![CDATA[monitoring]]></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>&#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/" >Juju</a>, <a href="http://www.nagios.org/" >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" >NRPE</a>, or &#8220;Nagios Remote Plugin Executor&#8221; (and NSCA, and <a href="http://jujucharms.com/charms/precise/munin" >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" >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://cloud.ubuntu.com/2012/08/juju-and-nagios-sittin-in-a-tree-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Juju Java Cluster – Part 3</title>
		<link>http://voices.canonical.com/robert.ayres/2012/08/03/juju-java-cluster-part-3/</link>
		<comments>http://voices.canonical.com/robert.ayres/2012/08/03/juju-java-cluster-part-3/#comments</comments>
		<pubDate>Fri, 03 Aug 2012 16:55:28 +0000</pubDate>
		<dc:creator>Robert Ayres</dc:creator>
				<category><![CDATA[featured]]></category>
		<category><![CDATA[juju]]></category>

		<guid isPermaLink="false">http://voices.canonical.com/robert.ayres/?p=83</guid>
		<description><![CDATA[In my previous post, we added Memcached to our cluster.  In this post, I&#8217;ll write a bit more about the Tomcat configuration options that are available including JMX monitoring.  I&#8217;ll also show how easy it is to enable session clustering. &#8230; <a href="http://voices.canonical.com/robert.ayres/2012/08/03/juju-java-cluster-part-3/">Continue reading <span>&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In my <a href="http://voices.canonical.com/robert.ayres/2012/08/01/juju-java-cluster-part-2/">previous post</a>, we added Memcached to our cluster.  In this post, I&#8217;ll write a bit more about the Tomcat configuration options that are available including JMX monitoring.  I&#8217;ll also show how easy it is to enable session clustering.</p>
<h2><a href="http://voices.canonical.com/robert.ayres/files/2012/08/juju-jmx-session.png"><img class="aligncenter size-full wp-image-82" src="http://voices.canonical.com/robert.ayres/files/2012/08/juju-jmx-session.png" alt="Java cluster with JMX and session clustering" width="891" height="542" /></a>Configuration and Monitoring</h2>
<p>All charms come with many options available for configuration.  Each is selected to allow the same tuning you would typically perform on a manually deployed machine.  Configuration options are shown per charm when browsing the Charm Store (<a href="http://jujucharms.com/charms/precise">jujucharms.com/charms/precise</a>).  The Tomcat charm provides numerous options.  For example, to tweak the JVM options of a running service:</p>
<pre>juju set tomcat "java_opts=-Xms768M -Xmx1024M"</pre>
<p>This sets the Java heap to a miminum and maximum of 768Mb and 1024Mb respectively.  If you are debugging an application, you may also set:</p>
<pre>juju set tomcat "java_opts=-Xms768M -Xmx1024M -XX:-HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=webapps"</pre>
<p>To create a &#8216;.hprof&#8217; Java heap dump you can inspect with VisualVM or jhat each time an OutOfMemoryError occurs.</p>
<p>To open a remote debugger:</p>
<pre>juju set tomcat debug_enabled=True</pre>
<p>This will open a JDWP debugger on port 8000 you can use to step-through code from Eclipse, Netbeans etc.  <em>(Note: The debugger is never exposed to the Internet, so you need to access it through a ssh tunnel &#8211; &#8216;ssh -L 8000:localhost:8000 ubuntu@xxx.computer.amazonaws.com&#8217;, then connect your IDE to localhost port 8000).</em></p>
<p>A useful part of the JVM is JMX monitoring.  To enable JMX:</p>
<pre>juju set tomcat jmx_enabled=True
juju set tomcat "jmx_control_password=&lt;password&gt;"
juju set tomcat "jmx_monitor_password=&lt;password&gt;"</pre>
<p>This will start a remote JMX listener on ports 10001, 10002 and set passwords for the &#8216;monitorRole&#8217; and &#8216;controlRole&#8217; users (not setting a password disables that account).  You can now open VisualVM or JConsole to connect to the remote JMX instance (screenshot below).  <em>(Note: JMX is never exposed to the Internet, so you need to access it through a ssh tunnel &#8211; &#8216;ssh -L 10001:localhost:10001 -L 10002:localhost:10002 ubuntu@xxx.computer.amazonaws.com&#8217;, then connect your JMX client to port 10001).</em>  You can easily expose your own application specific MBeans for monitoring by adding them to the platform MBeanServer.</p>
<p><a href="http://voices.canonical.com/robert.ayres/files/2012/08/juju-jmx.png"><img class="aligncenter size-full wp-image-86" src="http://voices.canonical.com/robert.ayres/files/2012/08/juju-jmx.png" alt="Juju JMX monitoring" width="700" height="461" /></a>Options are applied to services and to all units under a service.  It isn&#8217;t possible to apply options to a specific unit.  So if you enable debugging, you enable it for all Tomcat units.  Same with Java options.</p>
<p>Options may also be applied at deployment time.  For example, to use Tomcat 6 (rather than the default Tomcat 7), create a &#8216;config.yaml&#8217; file containing the following:</p>
<pre>tomcat:
  tomcat_version: tomcat6</pre>
<p>Then deploy:</p>
<pre>juju deploy --config config.yaml cs:~robert-ayres/precise/tomcat</pre>
<p>All units added via &#8216;add-unit&#8217; will also be Tomcat 6.</p>
<h2>Session Clustering</h2>
<p>Previously, we setup a Juju cluster consisting of two Tomcat units behind HAProxy.  In this configuration, HTTP sessions exist only on individual Tomcat units.  For many production setups, the use of load balancer sticky sessions and a non-replicated session is the most performant where HTTP sessions are either not required or expendable in the event of unit failure.  For setups concerned about availability of sessions, you can enable Tomcat session clustering on your Juju service which will replicate session data between all units in the service.  Should a unit fail, any of the remaining units can pickup the subsequent requests with the previous session state.  To enable session clustering:</p>
<pre>juju set tomcat cluster_enabled=True</pre>
<p>We have two choices of how the cluster manages membership.  The preferred choice is using multicast traffic, but as EC2 doesn&#8217;t allow this, we must use static configuration.  This is the default, but you can switch between either method by changing the value of the &#8216;multicast&#8217; option.  Like everything else Juju deployed, any new units added or removed via &#8216;add-unit&#8217; or &#8216;remove-unit&#8217; are automatically included/excluded from the cluster membership.  This easily allows you to toggle clustering so that you can benchmark precisely what latency/throughput cost you have by using replicated sessions.</p>
<p>In summary, I&#8217;ve shown how you can tweak Tomcat configuration including enabling JMX monitoring.  We&#8217;ve also seen how to enable session clustering.  In my final post of the series, I shall show how you can add Solr indexing to your application.</p>
]]></content:encoded>
			<wfw:commentRss>http://cloud.ubuntu.com/2012/08/juju-java-cluster-part-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Juju Java Cluster – Part 2</title>
		<link>http://voices.canonical.com/robert.ayres/2012/08/01/juju-java-cluster-part-2/</link>
		<comments>http://voices.canonical.com/robert.ayres/2012/08/01/juju-java-cluster-part-2/#comments</comments>
		<pubDate>Wed, 01 Aug 2012 14:44:23 +0000</pubDate>
		<dc:creator>Robert Ayres</dc:creator>
				<category><![CDATA[featured]]></category>
		<category><![CDATA[juju]]></category>

		<guid isPermaLink="false">http://voices.canonical.com/robert.ayres/?p=66</guid>
		<description><![CDATA[In my previous post, I demonstrated deploying a Juju cluster with a sample Grails application.  Let&#8217;s expand our cluster by adding Memcached (see diagram below). Deploy a Memcached service: juju deploy memcached Configure Tomcat to map Memcached location under a &#8230; <a href="http://voices.canonical.com/robert.ayres/2012/08/01/juju-java-cluster-part-2/">Continue reading <span>&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In my <a href="http://voices.canonical.com/robert.ayres/2012/08/01/juju-java-cluster-part-1/">previous post</a>, I demonstrated deploying a Juju cluster with a sample Grails application.  Let&#8217;s expand our cluster by adding Memcached (see diagram below).</p>
<p><a href="http://voices.canonical.com/robert.ayres/files/2012/08/juju-memcached.png"><img class="aligncenter size-full wp-image-65" src="http://voices.canonical.com/robert.ayres/files/2012/08/juju-memcached.png" alt="Java memcached cluster" width="881" height="532" /></a>Deploy a Memcached service:</p>
<pre>juju deploy memcached</pre>
<p>Configure Tomcat to map Memcached location under a JNDI name:</p>
<pre>juju set tomcat "jndi_memcached_config=param/Memcached:memcached"</pre>
<p>This will map the &#8216;memcached&#8217; service under the JNDI name &#8216;param/Memcached&#8217;.  Whilst Memcached is deploying, you can add the relation ahead of time:</p>
<pre>juju add-relation tomcat memcached</pre>
<p>We will use the excellent Java Memcached library Spy Memcached (<a href="http://code.google.com/p/spymemcached/">code.google.com/p/spymemcached/</a>) in our application.  Download the &#8216;spymemcached-x.x.x.jar&#8217; and copy it to &#8216;juju-example/lib&#8217;.<br />
Now edit &#8216;juju-example/grails-app/conf/spring/resources.groovy&#8217; so it contains the following:</p>
<pre>import net.spy.memcached.spring.MemcachedClientFactoryBean
import org.springframework.jndi.JndiObjectFactoryBean

beans = {

    memcachedClient(MemcachedClientFactoryBean) {
        servers = { JndiObjectFactoryBean jndi -&gt;
            jndiName = 'param/Memcached'
            resourceRef = true
        }
    }
}</pre>
<p>To make use of our Memcached client, let&#8217;s create a simple page counter:</p>
<pre>(within 'juju-example' directory)
grails create-controller memcached-count</pre>
<p>This will create &#8216;juju-example/grails-app/controllers/juju/example/MemcachedCountController.groovy&#8217;.  Edit it so it contains the following:</p>
<pre>package juju.example

class MemcachedCountController {

    def memcachedClient

    def index() {
        def count = memcachedClient.incr('juju-example-count', 1, 1)
        render count
    }
}</pre>
<p>When Memcached is deployed and associated with Tomcat, redeploy our application:</p>
<pre>(within juju-example directory)
grails clean
grails war

(within parent directory)
cp juju-example/target/juju-example-0.1.war precise/j2ee-deployer/deploy
juju upgrade-charm --repository . juju-example</pre>
<p>Once redeployed, you should be able to open <em>http://xxx.compute.amazonaws.com/juju/memcachedCount</em> and refresh the page to an incrementing counter, stored in Memcached.</p>
<p>As with our datasource connection, we utilise a JNDI lookup to instantiate our Memcached client using runtime configuration provided by Juju (a space separated list of Memcached units, provided as a JNDI environment parameter).  With this structure, the developer has total control over integrating external services into their application.  If they want to use a different Memcached library, they can use the Juju configuration to instantiate a different class.</p>
<p>If we want to increase our cache capacity, we can add more units:</p>
<pre>juju add-unit -n 2 memcached</pre>
<p>This will deploy another 2 Memcached units.  Our Tomcats will update to reflect the new units and restart.<br />
<em>(Note: As you add Memcached units, our example counter may appear to reset as its Memcached key is hashed to another server).</em></p>
<p>We&#8217;ve added Memcached to our Juju cluster and seen how you can integrate external services within your application using JNDI values.<br />
In my <a href="http://voices.canonical.com/robert.ayres/2012/08/03/juju-java-cluster-part-3/">next post</a>, I&#8217;ll write about how we can enable features of our existing cluster like JMX and utilise Tomcat session clustering.</p>
]]></content:encoded>
			<wfw:commentRss>http://cloud.ubuntu.com/2012/08/juju-java-cluster-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Juju Java Cluster – Part 1</title>
		<link>http://voices.canonical.com/robert.ayres/2012/08/01/juju-java-cluster-part-1/</link>
		<comments>http://voices.canonical.com/robert.ayres/2012/08/01/juju-java-cluster-part-1/#comments</comments>
		<pubDate>Wed, 01 Aug 2012 14:12:32 +0000</pubDate>
		<dc:creator>Robert Ayres</dc:creator>
				<category><![CDATA[featured]]></category>
		<category><![CDATA[juju]]></category>

		<guid isPermaLink="false">http://voices.canonical.com/robert.ayres/?p=35</guid>
		<description><![CDATA[In my previous post I gave an introduction to Juju, the new deployment tool in Ubuntu 12.04 Precise Pangolin.  This post is the first of four demonstrating how you can deploy a typical Java web application into your own Juju &#8230; <a href="http://voices.canonical.com/robert.ayres/2012/08/01/juju-java-cluster-part-1/">Continue reading <span>&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In my <a href="http://voices.canonical.com/robert.ayres/2012/07/27/java-meet-juju/">previous post</a> I gave an introduction to Juju, the new deployment tool in Ubuntu 12.04 Precise Pangolin.  This post is the first of four demonstrating how you can deploy a typical Java web application into your own Juju cluster.  I&#8217;ll start the series by deploying an initial cluster of HAProxy, Tomcat and MySQL to Amazon EC2, shown in the diagram below.  You can always deploy to a different environment than EC2 such as MAAS or locally using LXC.  The Juju commands are equivalent.</p>
<p><a href="http://voices.canonical.com/robert.ayres/files/2012/08/juju-tomcat.png"><img class="aligncenter size-full wp-image-37" src="http://voices.canonical.com/robert.ayres/files/2012/08/juju-tomcat.png" alt="Java web application cluster" width="881" height="532" /></a></p>
<p>For this demo I&#8217;ll build a sample application using the excellent Grails framework (<a href="http://grails.org">grails.org</a>).  You can of course use traditional tools of Maven, Ant, etc. to produce your final WAR file.  If you want to try the demo yourself, you&#8217;ll need to install Grails and Bazaar.</p>
<p>Firstly let&#8217;s demonstrate how to deploy Tomcat using Juju (<a href="http://jujucharms.com/~robert-ayres/precise/tomcat">jujucharms.com/~robert-ayres/precise/tomcat</a>).</p>
<p>Open a terminal on any Ubuntu Precise machine and follow the instructions for bootstrapping a Juju cluster &#8211; <a href="http://juju.ubuntu.com/docs/getting-started.html">juju.ubuntu.com/docs/getting-started.html</a>.</p>
<p>With a bootstrapped cluster, let&#8217;s deploy a Tomcat service:</p>
<pre>juju deploy cs:~robert-ayres/precise/tomcat</pre>
<p>This will deploy a Tomcat unit under the service name &#8216;tomcat&#8217;.  Like the bootstrap instance, it will take a short time to launch a new instance, install Tomcat, configure defaults and start.  You can check the progress with &#8216;juju status&#8217;.  When deployed you should see the following output (&#8216;machines&#8217; information purposely removed):</p>
<pre>services:
  tomcat:
    charm: cs:~robert-ayres/precise/tomcat-1
    relations:
      cluster:
      - tomcat
    units:
      tomcat/0:
        agent-state: started
        machine: 1
        public-address: xxx.compute.amazonaws.com</pre>
<p>Should you wish to investigate the details of any unit you can ssh in &#8211; &#8216;ssh ubuntu@xxx.compute.amazonaws.com&#8217; (Juju will have transferred your public key).</p>
<p>The Tomcat manager applications are installed and secured by default, requiring an admin password to be set.  We can apply configuration to Juju services using &#8216;juju set &lt;service&gt; &#8220;&lt;key&gt;=&lt;value&gt;&#8221; &#8230;&#8217;.  To set the &#8216;admin&#8217; user password on our Tomcat unit:</p>
<pre>juju set tomcat "admin_password=&lt;password&gt;"</pre>
<p>Our Tomcat unit isn&#8217;t initially exposed to the Internet, we can only access it over a ssh tunnel (see ssh &#8216;-L&#8217; option).  To expose our Tomcat unit to the Internet:</p>
<pre>juju expose tomcat</pre>
<p>Now you should be able to open your web browser at <em>http://xxx.computer.amazonaws.com:8080/manager</em> and login to Tomcat&#8217;s manager using the credentials we just set.<br />
If we prefer our unit to run on a more traditional web port:</p>
<pre>juju set tomcat http_port=80</pre>
<p>After a small time of configuration you should now be able to access <em>http://xxx.computer.amazonaws.com/manager</em> with the same credentials.<br />
Over HTTP, our credentials aren&#8217;t transmitted securely, so let&#8217;s enable HTTPS:</p>
<pre>juju set tomcat https_enabled=True https_port=443 <a href="http://voices.canonical.com/robert.ayres/2012/08/01/juju-java-cluster-part-1/#f1">[1]</a></pre>
<p>Our Tomcat unit will listen for HTTPS connections on the traditional 443 port using a generated self-signed certificate (to use CA signed certificates, see the Tomcat charm README).  Now we can securely access our manager application at <em>https://xxx.computer.amazonaws.com/manager</em> (you need to ignore any browser warning about a self-signed certificate).  We now have a deployed Tomcat optimised and secured for production use!</p>
<p>Now let&#8217;s turn our attention to evolving a simple Grails application to demonstrate further Juju abilities.</p>
<p>With a working Grails installation, create &#8216;juju-example&#8217; application:</p>
<pre>grails create-app juju-example</pre>
<p>This will create your application in a directory &#8216;juju-example&#8217;.  Inside is a shell of a Grails application, enough for demonstration purposes.</p>
<p>To suit the directory layout of our deployed Tomcat, we should adjust our application to store stacktrace logs in a designated, writable directory.  Edit &#8216;juju-example/grails-app/conf/Config.groovy&#8217; and inside the &#8216;log4j&#8217; block add the following &#8216;appenders&#8217; block:</p>
<pre>log4j = {
    ...
    appenders {
        rollingFile name: "stacktrace", maxFileSize: 1024,
                    file: "logs/juju-example-stacktrace.log"
    }
    ...
}</pre>
<p>To build a WAR file run:</p>
<pre>(within 'juju-example' directory)
grails dev war</pre>
<p>This will build a deployable WAR file &#8216;juju-example/target/juju-example-0.1.war&#8217;.</p>
<p>You have secure access to deploy WAR files directly using the Tomcat manager, but there is a better way &#8211; using the J2EE Deployer charm.</p>
<p>The J2EE Deployer charm is a subordinate charm that essentially provides a Juju controlled wrapper around deploying your WAR file into a Juju cluster.  This has the distinct advantage of allowing you to upgrade multiple units using a single command as is shown later.  To use the J2EE Deployer, first download a copy of the wrapper for our example application using bzr:</p>
<pre>mkdir precise
bzr export precise/j2ee-deployer lp:~robert-ayres/charms/precise/j2ee-deployer/trunk</pre>
<p>This will create a local copy of the wrapper under a directory &#8216;precise/j2ee-deployer&#8217;.  The &#8216;precise&#8217; parent directory is necessary for Juju when using locally deployed charms.<br />
Copy our war file to the &#8216;deploy&#8217; directory within:</p>
<pre>cp juju-example/target/juju-example-0.1.war precise/j2ee-deployer/deploy</pre>
<p>Now deploy our application into Juju:</p>
<pre>juju deploy --repository . local:j2ee-deployer juju-example</pre>
<p>As with other charms, this will securely upload our application into S3 storage for use by any of our Juju services.  Once the deploy command returns, our application should be available within the cluster under the service name &#8216;juju-example&#8217;.  To deploy to Tomcat, we relate the services:</p>
<pre>juju add-relation tomcat juju-example</pre>
<p>Our Tomcat unit will download our application locally, stop Tomcat, deploy the application and then start Tomcat.<br />
Issue &#8216;juju status&#8217; commands to check progress.  Once deployment is complete, you can access <em>http://xxx.computer.amazonaws.com/juju-example-0.1/</em> and see the default Grails welcome page (screenshot below).</p>
<p><a href="http://voices.canonical.com/robert.ayres/files/2012/08/grails.png"><img class="aligncenter size-full wp-image-41" src="http://voices.canonical.com/robert.ayres/files/2012/08/grails.png" alt="juju-example application" width="500" height="434" /></a></p>
<p>We can use &#8216;juju set&#8217; to change configuration of our application as we did with the Tomcat service.  For example, to change the deployed path to something simpler:</p>
<pre>juju set juju-example war-config=juju-example-0.1:/</pre>
<p>Our application will now be redeployed and Tomcat restarted so we can access our application at <em>http://xxx.computer.amazonaws.com/</em>.  Now we have a deployed application!</p>
<p>A web application typically requires access to a RDBMS, so let&#8217;s demonstrate how we can connect our application to MySQL.<br />
Firstly, deploy a MySQL service:</p>
<pre>juju deploy mysql</pre>
<p>Whilst this is deploying, we can set the configuration of the imminent relation between Tomcat and MySQL:</p>
<pre>juju set tomcat "jndi_db_config=jdbc/JujuDB:mysql:juju:initialSize=20;maxActive=20;maxIdle=20"</pre>
<p>This is a colon separated value that maps the requested database &#8216;juju&#8217; of the &#8216;mysql&#8217; service under a JNDI name of &#8216;jdbc/JujuDB&#8217;.  The set of values after the final colon set DBCP connection pooling options.  Here we specify a dedicated pool of 20 connections.<br />
Once our MySQL unit is deployed, we relate our Tomcat service:</p>
<pre>juju add-relation tomcat mysql</pre>
<p>During this process, our Tomcat unit will request the use of database juju.  Our MySQL unit will create the database and return a set of generated credentials for Tomcat to use.  Once complete, our pooled datasource connection is available to our Tomcat application under JNDI &#8211; &#8216;java:comp/env/jdbc/JujuDB&#8217;.  To demonstrate its use within our application, firstly configure Grails to use JNDI for its datasource connection.  Within &#8216;juju-example/grails-app/conf/DataSource.groovy&#8217;, inside the &#8216;production&#8217;/'dataSource&#8217; block, add &#8216;jndiName = &#8220;java:comp/env/jdbc/JujuDB&#8221;&#8216; so it reads as follows:</p>
<pre>production {
    dataSource {
        dbCreate = "update"
        jndiName = "java:comp/env/jdbc/JujuDB"
    }
}</pre>
<p>Next create a domain class which will serve as an example database object:</p>
<pre>(within 'juju-example' directory)
grails create-domain-class Book</pre>
<p>Edit &#8216;juju-example/grails-app/domain/juju/example/Book.groovy&#8217; so it contains the following:</p>
<pre>package juju.example

class Book {

    static constraints = {
    }

    String author
    String isbn
    Integer pages
    Date published
    String title
}</pre>
<p>Now we can use Grails &#8216;scaffolding&#8217; to generate pages that allow us to insert Books into our database:</p>
<pre>grails generate-all Book</pre>
<p>Recompile our application to produce a new WAR file:</p>
<pre>grails clean
grails war
(Note: 'grails war' now, no 'dev' option)</pre>
<p>Now upgrade our application in Juju:</p>
<pre># copy across new war file
cp juju-example/target/juju-example-0.1.war precise/j2ee-deployer/deploy
# upgrade Juju deployment
juju upgrade-charm --repository . juju-example</pre>
<p>This will upload our revised application into S3 again and then deploy to all related services, restarting them in the process.<br />
With our newly deployed application utilising its local JNDI datasource, we can now open our web browser at <em>http://xxx.compute.amazonaws.com/juju/book/list</em> and use the generated page to perform CRUD operations on our Book objects, all persisted to our MySQL database.</p>
<p>A key point to be made is how you should develop your application to be cloud deployable.  If the application is developed to utilise external resources via runtime lookups, the application may be deployed to any number of Juju clusters.  You can observe this yourself by adding a relation between your application and any other Tomcat services.</p>
<p>For this post&#8217;s finale, let&#8217;s show how we can scale Tomcat.<br />
First, deploy the HAProxy load balancer:</p>
<pre>juju deploy haproxy</pre>
<p>And associate with Tomcat:</p>
<pre>juju add-relation haproxy tomcat</pre>
<p>Unexpose Tomcat and expose HAProxy:</p>
<pre>juju unexpose tomcat
juju expose haproxy</pre>
<p>We can now use the public address of HAProxy to access our application.<br />
Now we&#8217;re behind a load balancer, its simple to bolster our web traffic capacity by adding a further Tomcat unit:</p>
<pre>juju add-unit tomcat</pre>
<p>A second Tomcat unit will be deployed and configured as the first.  Same open ports, same MySQL connection, same web application.  Once deployed, HAProxy will serve traffic to both instances in round robin fashion.  Any future application upgrades will occur on both Tomcat units.  If we want to remove a unit:</p>
<pre>juju remove-unit tomcat/&lt;n&gt;</pre>
<p>where &#8216;&lt;n&gt;&#8217; is the unit number (shown in status output).</p>
<p>That&#8217;s the end of the demo.  Should you wish to destroy your cluster, run:</p>
<pre>juju destroy-environment</pre>
<p>This will terminate all EC2 instances including the bootstrap instance.</p>
<p>To summarise, I&#8217;ve shown how you can create a Juju cluster containing a load balanced Tomcat with MySQL, serving your web application.  We&#8217;ve seen how important it is for the application to be cloud deployable allowing it to utilise managed relations.  I&#8217;ve also demonstrated how you can upgrade your application once deployed.</p>
<p>In my <a href="http://voices.canonical.com/robert.ayres/2012/08/01/juju-java-cluster-part-2/">next post</a> I shall write about adding Memcached to our cluster.</p>
<p><a name="f1"></a><br />
<strong>[1]</strong> Due to a current Juju bug (<a href="https://bugs.launchpad.net/juju/+bug/979859">https://bugs.launchpad.net/juju/+bug/979859</a>) with command line boolean variables, you may need to create a separate &#8216;config.yaml&#8217; file containing the contents:</p>
<pre>tomcat:
 https_enabled=True
 https_port=443</pre>
<p>and then use:</p>
<pre>juju set --config config.yaml tomcat</pre>
]]></content:encoded>
			<wfw:commentRss>http://cloud.ubuntu.com/2012/08/juju-java-cluster-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Democratizing the Cloud &#8211; Here comes native OpenStack support for Juju</title>
		<link>http://www.jorgecastro.org/2012/07/20/democratizing-the-cloud-here-comes-native-openstack-support-for-juju/</link>
		<comments>http://www.jorgecastro.org/2012/07/20/democratizing-the-cloud-here-comes-native-openstack-support-for-juju/#comments</comments>
		<pubDate>Fri, 20 Jul 2012 20:00:00 +0000</pubDate>
		<dc:creator>Jorge O. Castro</dc:creator>
				<category><![CDATA[featured]]></category>

		<guid isPermaLink="false">http://www.jorgecastro.org/2012/07/20/democratizing-the-cloud-here-comes-native-openstack-support-for-juju</guid>
		<description><![CDATA[

If you were at OSCON you might have seen Mark Shuttleworth demo the newly landed native OpenStack provider for Juju on HP Cloud. This further expands people&#8217;s choices on where they want to deploy their environments. We&#8217;ll provide the tool...]]></description>
			<content:encoded><![CDATA[<p><img class="middle" src="http://www.jorgecastro.org/images/openstack.png"></p>

<p>If you were at OSCON you might have seen Mark Shuttleworth demo the newly landed native OpenStack provider for Juju on HP Cloud. This further expands people&#8217;s choices on where they want to deploy their environments. We&#8217;ll provide the tools and OS, you choose your providers; Amazon, HP Cloud, Rackspace, Microsoft Azure, your own OpenStack, or just your pile of bare metal.</p>

<p>Not happy with your cloud provider? Export your environment and import it into your new cloud provider, all with the same tools. Providers will compete on things like price, performance, reliability, service, and all the things we love about consumer choice.</p>

<pre><code>jitsu export -e aws | jitsu import -e hpcloud -
</code></pre>

<p>Your three tier architecture with database replication, caching, load balancers, all the things that makes up your scalabale architecture. Export out of one environment and into another.</p>

<p>Yeah, really.</p>

<p>It doesn&#8217;t make your coffee or do data migration (yet), but this is just the beginning. The fact that this is even possible has us really excited about providing people choice on how they want to run their infrastructure. In the past our OpenStack support was through the EC2 compatible API, but now we support OpenStack natively. This opens the door to deploy on OpenStack-based clouds, starting with HP Cloud.</p>

<p><img class="middle" src="http://www.jorgecastro.org/images/hp.png"></p>

<p>Here&#8217;s <a href="http://jujucharms.com/docs/provider-configuration-openstack.html">the docs</a> if you want to start browsing it now. You&#8217;ll find the new provider in the <a href="https://launchpad.net/~juju/+archive/pkgs">Juju PPA</a> if you want to dive in and get started. Thanks to Martin Packman for working on this highly-requested feature. This feature is still under rapid development, so some of the configuration options will change, but you can certainly play with it now.</p>

<p>Looking for some examples? Our mighty community contributors Brandon Holtsclaw and Marco Ceppi have added some example configs for you to get started with right away:</p>

<ul>
<li><a href="http://askubuntu.com/q/116174/235">How can I configure Juju for deployment on HP Cloud?</a></li>
</ul>


<p>Looking for help? Join us in #juju on Freenode if you want to get deploying! And don&#8217;t worry, we&#8217;re working on Rackspace Cloud still, so look forward to that. We&#8217;re supporting Essex and HP&#8217;s cloud, we&#8217;re just waiting for Folsom to solidify a bit more.</p>

<p>And what are you going to deploy on these clouds? Well that&#8217;s really up to you, but we have <a href="http://jujucharms.com">90 services ready to go</a> for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://cloud.ubuntu.com/2012/07/democratizing-the-cloud-here-comes-native-openstack-support-for-juju/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EC2 S3 Mirrors globally available</title>
		<link>http://utlemming.azurewebsites.net/?p=451</link>
		<comments>http://utlemming.azurewebsites.net/?p=451#comments</comments>
		<pubDate>Fri, 06 Jul 2012 20:05:12 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[ec2]]></category>
		<category><![CDATA[featured]]></category>

		<guid isPermaLink="false">http://utlemming.azurewebsites.net/?p=451</guid>
		<description><![CDATA[In an effort to improve reliability of the Ubuntu archive mirrors, Canonical undertook a project to host the archives utilized by EC2 instances with Amazon&#8217;s S3. We announced in April [1] that we would be switching over to the new mirrors and asked users to make preparations. On June 13th we announced that the us-east-1 [...]]]></description>
			<content:encoded><![CDATA[<p>In an effort to improve reliability of the Ubuntu archive mirrors, Canonical undertook a project to host the archives utilized by EC2 instances with Amazon&#8217;s S3. We announced in April [1] that we would be switching over to the new mirrors and asked users to make preparations.</p>
<p>On June 13th we announced that the us-east-1 region has been switched over to S3 [2]. As of July 5th, 2012, all remaining EC2 regions have been migrated to S3. The immediate effect of this change is that AWS VPC instances will no longer experience bug 615545 [3] and will have access to the default selected Ubuntu mirrors.</p>
<p>Due to a bug in S3&#8242;s HTTP implementation, users may experience 403, 404 and 416 HTTP errors during update or installation in some EC2 regions. Notably, Ubuntu 11.04 users will see 403 errors while updating the apt meta-data and Ubuntu 10.04, 11.10 and 12.04 users may see hashsum or size mismatches. If you have not applied software updates, then you will need to manually disable http pipelining usage in apt. This can be done simply with:<br />
$ echo &#8216;Acquire::http::Pipeline-Depth &#8220;0&#8243;;&#8217; |<br />
sudo tee /etc/apt/apt.conf.d/99-no-pipelining</p>
<p>Amazon has informed us that the S3 http pipelining bug has been fixed in us-east-1 and is being rolled out across the remaining EC2 regions.</p>
<p>We would like to thank all our beta testers that helped to test these new mirrors and provided valuable feedback.</p>
<p>If you experience any issues with the EC2 mirrors please file a bug against Ubuntu at [4].</p>
<p>Thank you,<br />
Ben Howard</p>
<p>[1] <a href="https://lists.ubuntu.com/archives/ubuntu-cloud/2012-April/000752.html">https://lists.ubuntu.com/archives/ubuntu-cloud/2012-April/000752.html</a><br />
[2] <a href="https://lists.ubuntu.com/archives/ubuntu-cloud-announce/2012-June/000026.html">https://lists.ubuntu.com/archives/ubuntu-cloud-announce/2012-June/000026.html</a><br />
[3] <a href="https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/615545">https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/615545</a><br />
[4] <a href="https://bugs.launchpad.net/ubuntu/+filebug">https://bugs.launchpad.net/ubuntu/+filebug</a></p>
]]></content:encoded>
			<wfw:commentRss>http://cloud.ubuntu.com/2012/07/ec2-s3-mirrors-globally-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AWS S3 Slow for small files</title>
		<link>http://utlemming.azurewebsites.net/?p=411</link>
		<comments>http://utlemming.azurewebsites.net/?p=411#comments</comments>
		<pubDate>Fri, 06 Jul 2012 19:02:35 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[featured]]></category>

		<guid isPermaLink="false">http://utlemming.azurewebsites.net/?p=411</guid>
		<description><![CDATA[Sigh. S3 is great for hosting large, big files. But if you have small files, well, you had better find another place. S3 is orders of magnitude faster for large files compared to small files. Take this example: ubuntu@ip-10-4-41-125:~$ ab -k -n10000 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/pool/main/c/cup/cup_0.11a+20060608-2.diff.gzThis is ApacheBench, Version 2.3 Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ [...]]]></description>
			<content:encoded><![CDATA[<p>Sigh. S3 is great for hosting large, big files. But if you have small files, well, you had better find another place. S3 is orders of magnitude faster for large files compared to small files.</p>
<p>Take this example:</p>
<pre>ubuntu@ip-10-4-41-125:~$ ab -k -n10000 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/pool/main/c/cup/cup_0.11a+20060608-2.diff.gzThis is ApacheBench, Version 2.3 
    Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
    Licensed to The Apache Software Foundation, http://www.apache.org/

    Benchmarking us-east-1.ec2.archive.ubuntu.com (be patient)
    Completed 1000 requests
    Completed 2000 requests
    Completed 3000 requests
    Completed 4000 requests
    Completed 5000 requests
    Completed 6000 requests
    Completed 7000 requests
    Completed 8000 requests
    Completed 9000 requests
    Completed 10000 requests
    Finished 10000 requests

    Server Software:        AmazonS3
    Server Hostname:        us-east-1.ec2.archive.ubuntu.com
    Server Port:            80

    Document Path:          /ubuntu/pool/main/c/cup/cup_0.11a+20060608-2.diff.gz
    Document Length:        4416 bytes

    Concurrency Level:      1
    Time taken for tests:   201.732 seconds
    Complete requests:      10000
    Failed requests:        0
    Write errors:           0
    Keep-Alive requests:    10000
    Total transferred:      47940000 bytes
    HTML transferred:       44160000 bytes
    Requests per second:    49.57 [#/sec] (mean)
    Time per request:       20.173 [ms] (mean)
    Time per request:       20.173 [ms] (mean, across all concurrent requests)
    Transfer rate:          232.07 [Kbytes/sec] received

    Connection Times (ms)
                  min  mean[+/-sd] median   max
    Connect:        0    0   0.0      0       1
    Processing:     8   20  49.3     14    3013
    Waiting:        8   19  38.8     14    2559
    Total:          8   20  49.3     14    3013

    Percentage of the requests served within a certain time (ms)
      50%     14
      66%     16
      75%     17
      80%     18
      90%     24
      95%     36
      98%     72
      99%    201
     100%   3013 (longest request)</pre>
<p>The following is a test suite for a 21MB file requested 100 times sequentially to illustrate the difference between large and small files:</p>
<pre>ubuntu@ip-10-4-41-125:~$ ab -k -n100 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/pool/main/libr/libreoffice/libreoffice-common_3.5.2-2ubuntu1_all.deb
    This is ApacheBench, Version 2.3 
    Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
    Licensed to The Apache Software Foundation, http://www.apache.org/

    Benchmarking us-east-1.ec2.archive.ubuntu.com (be patient).....done

    Server Software:        AmazonS3
    Server Hostname:        us-east-1.ec2.archive.ubuntu.com
    Server Port:            80

    Document Path:          /ubuntu/pool/main/libr/libreoffice/libreoffice-common_3.5.2-2ubuntu1_all.deb
    Document Length:        21500700 bytes

    Concurrency Level:      1
    Time taken for tests:   67.119 seconds
    Complete requests:      100
    Failed requests:        0
    Write errors:           0
    Keep-Alive requests:    100
    Total transferred:      2150109200 bytes
    HTML transferred:       2150070000 bytes
    Requests per second:    1.49 [#/sec] (mean)
    Time per request:       671.192 [ms] (mean)
    Time per request:       671.192 [ms] (mean, across all concurrent requests)
    Transfer rate:          31283.38 [Kbytes/sec] received

    Connection Times (ms)
                  min  mean[+/-sd] median   max
    Connect:        0    0   0.1      0       1
    Processing:   407  671 384.9    574    3172
    Waiting:       16   25  21.9     20     220
    Total:        407  671 384.9    574    3172

    Percentage of the requests served within a certain time (ms)
      50%    574
      66%    653
      75%    711
      80%    726
      90%    926
      95%   1089
      98%   2509
      99%   3172
     100%   3172 (longest request)</pre>
]]></content:encoded>
			<wfw:commentRss>http://cloud.ubuntu.com/2012/07/aws-s3-slow-for-small-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PSA: Is your Ubuntu Server IaaS Guest Image Authentic?</title>
		<link>http://undacuvabrutha.wordpress.com/2012/06/26/psa-is-your-ubuntu-server-iaas-guest-image-authentic/</link>
		<comments>http://undacuvabrutha.wordpress.com/2012/06/26/psa-is-your-ubuntu-server-iaas-guest-image-authentic/#comments</comments>
		<pubDate>Tue, 26 Jun 2012 20:11:47 +0000</pubDate>
		<dc:creator>Robbie</dc:creator>
				<category><![CDATA[canonical]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://undacuvabrutha.wordpress.com/?p=550</guid>
		<description><![CDATA[The amount of uptake seen with Ubuntu Server over the past year has been extremely rewarding and simply amazing.  Infrastructure as a Service (IaaS), a.k.a. Public Cloud, providers are popping up left and right, all wanting to provide Ubuntu Server&#8230;all helping to further cement Ubuntu Server&#8217;s position as the OS for the cloud. With that [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=undacuvabrutha.wordpress.com&#38;blog=8749449&#38;post=550&#38;subd=undacuvabrutha&#38;ref=&#38;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://undacuvabrutha.files.wordpress.com/2012/06/psa.jpg"><img class="aligncenter size-full wp-image-592" title="PSA" src="http://undacuvabrutha.files.wordpress.com/2012/06/psa.jpg?w=497" alt=""   /></a></p>
<p>The amount of uptake seen with Ubuntu Server over the past year has been extremely rewarding and simply amazing.  Infrastructure as a Service (IaaS), a.k.a. Public Cloud, providers are popping up left and right, all wanting to provide Ubuntu Server&#8230;all helping to further cement Ubuntu Server&#8217;s position as the OS for the cloud.</p>
<p>With that said, I&#8217;ve started to become concerned about the way in which some of these IaaS providers distribute Ubuntu.  Ubuntu developers create, publish, and regularly update <a href="http://cloud-images.ubuntu.com/" >images</a> on <a href="http://aws.amazon.com/ec2/#os" >Amazon Web Services</a> and <a href="http://www.windowsazure.com/en-us/manage/linux/" >Microsoft Azure</a>.  Canonical hosts and maintains internal archive mirrors in these clouds to provide a low-latency, low-cost update mechanism to users.  Finally, Canonical engineers purposely designed in a pluggable cloud provider API approach to Ubuntu&#8217;s service orchestration application, <a href="http://juju.ubuntu.com/">Juju</a>, to lower the operational barriers that often place limitations on cross-cloud workload and service migrations.  We do all this to help ensure cross-platform consistency for Ubuntu Server users, i.e. workloads and applications ran on Ubuntu Server behave in the same manner on bare metal machines and across IaaS providers.</p>
<p>Some IaaS providers and users have decided to produce and host their own Ubuntu Server images without the involvement of the Ubuntu Project or Canonical.  I won&#8217;t go into the legal aspects of this, because I&#8217;m no lawyer.  However, I believe there is a real risk to users when these images are modified in some way, but still presented as &#8220;official&#8221; Ubuntu Server images.  Whether the changes are minor, like redirecting fixes and security updates to internal unofficial mirrors, or major, like making changes to OS and/or applications provided in the images themselves, labeling the images as &#8220;official&#8221;Ubuntu Server is a misrepresentation of the project and the product.  There is a real and legitimate risk of users losing out on the cross-platform assurance that the Ubuntu project and Canonical work so hard to provide due to the images having untested code or simply being out of sync on fixes and updates.  Furthermore, there&#8217;s no guarantee that bug fixes made to these modified images will ever make it into the official distro, thus creating a further fork between expected behavior across both bare metal and cloud platforms.  All of this has the potential to lead to poor user experience that&#8217;s very damaging to the reputation of Ubuntu the project and product, not to mention Canonical as it&#8217;s sponsor.</p>
<p>We ,within the Ubuntu Server team, work <strong>extremely</strong> hard to ensure our community can depend on having the same user experience and application execution results across all supported platforms, bare metal or cloud.  So&#8230;if you are a IaaS provider, and you elect to produce and distribute modified Ubuntu Server images, please&#8230;<span style="text-decoration:underline;"><strong>please</strong></span> ensure your users are aware of this by labeling them as <a href="http://wiki.ubuntu.com/DerivativeTeam/Derivatives" >customized derivatives</a>.  Let them know that by using these modified images they potentially run the risk of being delayed in getting bug fixes and security updates&#8230;and that differences in OS and application behavior from your changes can lead to higher levels of complexity if/when they have a need to move workloads and services to/from other official Ubuntu Server deployments.</p>
<p>Thanks&#8230;we now return you to your regularly scheduled program. <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/undacuvabrutha.wordpress.com/550/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/undacuvabrutha.wordpress.com/550/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=undacuvabrutha.wordpress.com&#038;blog=8749449&%23038;post=550&%23038;subd=undacuvabrutha&%23038;ref=&%23038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cloud.ubuntu.com/2012/06/psa-is-your-ubuntu-server-iaas-guest-image-authentic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://undacuvabrutha.files.wordpress.com/2012/06/psa.jpg" length="" type="" />
<enclosure url="http://0.gravatar.com/avatar/c732abad5d7b56a10a2367739d9fe2fd?s=96&amp;amp;d=http://s0.wp.com/i/mu.gif&amp;amp;r=PG" length="" type="" />
		</item>
		<item>
		<title>us-east-1 Ubuntu mirrors switch to S3</title>
		<link>http://utlemming.azurewebsites.net/?p=231</link>
		<comments>http://utlemming.azurewebsites.net/?p=231#comments</comments>
		<pubDate>Wed, 13 Jun 2012 23:28:08 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[ec2]]></category>
		<category><![CDATA[featured]]></category>

		<guid isPermaLink="false">http://utlemming.azurewebsites.net/?p=231</guid>
		<description><![CDATA[Over 8 months ago the decision to switch to S3 to back the Ubuntu mirrors in EC2 was made. And it has been an interest&#8230;okay adventerous ride. But all the work has paid off. As of this afternoon (Mountain time), Canonical&#8217;s IS department made a simple change: ben@padfoot:~/Desktop$ host us-east-1.ec2.archive.ubuntu.com us-east-1.ec2.archive.ubuntu.com is an alias for [...]]]></description>
			<content:encoded><![CDATA[<p>Over 8 months ago the decision to switch to S3 to back the Ubuntu mirrors in EC2 was made. And it has been an interest&#8230;okay adventerous ride. But all the work has paid off. As of this afternoon (Mountain time), Canonical&#8217;s IS department made a simple change:</p>
<pre>   ben@padfoot:~/Desktop$ host us-east-1.ec2.archive.ubuntu.com
   us-east-1.ec2.archive.ubuntu.com is an alias for us-east-1.ec2.archive.ubuntu.com.s3.amazonaws.com.
   us-east-1.ec2.archive.ubuntu.com.s3.amazonaws.com is an alias for s3-1-w.amazonaws.com.
   s3-1-w.amazonaws.com has address 72.21.214.200</pre>
<p>Yes, that&#8217;s right. If you are running an instance in Amazon&#8217;s us-east-1 region, your EC2 instance is now being served by a higher-speed, hopefully more robust mirror. </p>
<p>One of the changes that comes with this is that VPC in us-east-1 now has access to the Ubuntu Mirrors; that annoying bug is now cleared.</p>
<p>Some of our users are going to hit some problems, although we have made every effort to address this reasonably. <a title="https://lists.ubuntu.com/archives/ubuntu-cloud-announce/2012-April/000022.html" href="https://lists.ubuntu.com/archives/ubuntu-cloud-announce/2012-April/000022.html">If you see 403&#8242;s and 404 errors while running &#8220;apt-get update&#8221; then you need to read the following:</a></p>
<pre>Hello,

As mentioned earlier [1,2], and in an effort to improve on reliability
of the Ubuntu archive mirrors for EC2 instances, Canonical is replacing
the existing EC2 archive mirrors with mirrors backed by Amazon S3. This
change itself will be done via modification of DNS entries and will be
transparent to users.

However, due to a bug in the http pipelining implementation in S3 [3],
a change to apt configuration needs to be made to avoid download errors.
We have chosen to deliver this change via a package upgrade in cloud-init.

The *action required* is one of the following:
a.) upgrade cloud-init:
$ sudo apt-get update ; sudo apt-get install -y cloud-init
b.) launch official AMI's released after 2012-04-01, which will
have the fix included. Please see
http://cloud-images.ubuntu.com/release for the latest AMI's.
Additionally, the Amazon EC2 Quickstart has been updated with
the latest AMI's. At this time we are still in the process of
updating AMIs for Ubuntu 8.04 LTS and Ubuntu 10.10[4].
Announcements will be sent out when they are available.
c.) manually disable http pipeline use in apt
$ echo 'Acquire::http::Pipeline-Depth "0";' |
sudo tee /etc/apt/apt.conf.d/99-no-pipelining

Should you choose not to take appropriate action, you will likely
experience transient apt downloading errors after the change is
implemented. In order to give appropriate time to apply the change, this
transition will not occur before April 18, 2012.

For users of Ubuntu 8.04 LTS AMIs, you will need to take
options 'b' or 'c'. There is not a package update deliverable fix at this
time. For Ubuntu 10.10, the update will be released on its end-of-life,
which is April 10th, 2012.

If you have any questions, please feel free to follow up to this email
thread.

Thanks,
Ben Howard

--
[1] https://lists.ubuntu.com/archives/ubuntu-cloud/2012-January/000715.html
[2] https://lists.ubuntu.com/archives/ubuntu-cloud/2012-March/000744.html
[3] https://bugs.launchpad.net/ubuntu/+source/apt/+bug/948461</pre>
<p>&#8211;</p>
]]></content:encoded>
			<wfw:commentRss>http://cloud.ubuntu.com/2012/06/us-east-1-ubuntu-mirrors-switch-to-s3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>juju now in Debian unstable</title>
		<link>http://www.jorgecastro.org/2012/06/13/juju-now-in-debian-unstable/</link>
		<comments>http://www.jorgecastro.org/2012/06/13/juju-now-in-debian-unstable/#comments</comments>
		<pubDate>Wed, 13 Jun 2012 16:25:00 +0000</pubDate>
		<dc:creator>Jorge O. Castro</dc:creator>
				<category><![CDATA[featured]]></category>

		<guid isPermaLink="false">http://www.jorgecastro.org/2012/06/13/juju-now-in-debian-unstable</guid>
		<description><![CDATA[Thanks to Clint Byrum juju is now available in Debian Sid.


http://packages.debian.org/sid/juju



In case you missed it, Brandon Holtsclaw has also announced the first cut of RPM packages. You might remember Brandon from such hits as the OSX Client.
...]]></description>
			<content:encoded><![CDATA[<p>Thanks to <a href="http://fewbar.com/">Clint Byrum</a> juju is now available in Debian Sid.</p>

<ul>
<li><a href="http://packages.debian.org/sid/juju">http://packages.debian.org/sid/juju</a></li>
</ul>


<p>In case you missed it, Brandon Holtsclaw has also announced the first cut of <a href="https://github.com/jujutools/rpm-juju">RPM packages</a>. You might remember Brandon from such hits as the <a href="https://juju.ubuntu.com/OSXClient">OSX Client</a>.</p>

<p>Do note that this is the juju client, lots of things need to happen in order for juju to spawn other distributions, like they need to support cloud-init, generate cloud-init enabled images and publish those as AMIs, etc. We won&#8217;t be pursuing that work for other distributions as it requires knowledge of build and image systems and that sort of stuff. However Clint will be publishing a wiki page with the work needed to accomplish this if another distribution wants to take that work and run with it, we think it should be straightforward.</p>

<p>Thanks to Mark Terranova from Fedora for his help, and to the Debian Developers and ftpmasters who processed it in Debian.</p>

<p>You can find us in #juju on Freenode if you have any feedback on the packages.</p>
]]></content:encoded>
			<wfw:commentRss>http://cloud.ubuntu.com/2012/06/juju-now-in-debian-unstable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
