<?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>trevoro.ca &#124; blog &#187; sysadmin</title>
	<atom:link href="http://trevoro.ca/blog/category/sysadmin/feed/" rel="self" type="application/rss+xml" />
	<link>http://trevoro.ca/blog</link>
	<description>Elegant Solutions to Complex Problems</description>
	<lastBuildDate>Tue, 12 Jul 2011 21:30:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Unfuddle Git Backups &#8211; How to Actually Use Them</title>
		<link>http://trevoro.ca/blog/2010/02/12/unfuddle-git-backups-how-to-actually-use-them/</link>
		<comments>http://trevoro.ca/blog/2010/02/12/unfuddle-git-backups-how-to-actually-use-them/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 23:25:57 +0000</pubDate>
		<dc:creator>Trevor Orsztynowicz</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://trevoro.ca/blog/?p=373</guid>
		<description><![CDATA[I really like Unfuddle. The service is easy to use, and there are a lot of great features in there. The documentation is&#8230; lacking, however. One of the things I like is the ability to get a full backup of all my project data, repositories, etc in a single tarball. You can even ask them [...]]]></description>
			<content:encoded><![CDATA[<p>I really like Unfuddle. The service is easy to use, and there are a lot of great features in there. The documentation is&#8230; lacking, however.</p>
<p>One of the things I like is the ability to get a full backup of all my project data, repositories, etc in a single tarball. You can even ask them to keep a copy in your own S3 account.</p>
<p>To create a backup do the following</p>
<p>1) log into Unfuddle and goto the Project page.<br />
2) Click the &#8216;settings&#8217; tab then<br />
3) Scroll down till you see link that says &#8216;Request a backup of this project now&#8217; link. Click it.</p>
<p>In a few moments you&#8217;ll get an email, and you&#8217;ll see a new link on the right hand side of your project settings page that includes a timestamped backup. This backup is a tarball that contains all the GIT repositories and some other files like a backup.xml file which looks like all your tickets.</p>
<p>To use the git dumps run the following</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> reponame
<span style="color: #7a0874; font-weight: bold;">cd</span> reponame
<span style="color: #c20cb9; font-weight: bold;">git</span> init
<span style="color: #c20cb9; font-weight: bold;">git</span> fast-import <span style="color: #000000; font-weight: bold;">&amp;</span>lt; ..<span style="color: #000000; font-weight: bold;">/</span>my-unfuddle-backup.git.dmp
<span style="color: #c20cb9; font-weight: bold;">git</span> checkout master</pre></div></div>

<p>You&#8217;re done!</p>
<p>If you&#8217;re using subversion repositories there is documentation on how to use these repo backups on Unfuddles website.</p>
]]></content:encoded>
			<wfw:commentRss>http://trevoro.ca/blog/2010/02/12/unfuddle-git-backups-how-to-actually-use-them/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Why Serverside Javascript Matters</title>
		<link>http://trevoro.ca/blog/2009/02/05/why-serverside-javascript-matters/</link>
		<comments>http://trevoro.ca/blog/2009/02/05/why-serverside-javascript-matters/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 19:27:01 +0000</pubDate>
		<dc:creator>Trevor Orsztynowicz</dc:creator>
				<category><![CDATA[cloud]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[ssjs javascript hosting economics cloud computing scali]]></category>

		<guid isPermaLink="false">http://trevoro.ca/blog/?p=307</guid>
		<description><![CDATA[Javascript is a popular scripting language that comes embedded in most browsers. It&#8217;s usually what&#8217;s responsible for making your browsing experience as rich as it is, and for this reason we tend to categorize it in the realm of client-side development. In fact, running javascript on the server is odd enough for the phrase &#8216;Server-side [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">Javascript</a> is a popular scripting language that comes embedded in most browsers. It&#8217;s usually what&#8217;s responsible for making your browsing experience as rich as it is, and for this reason we tend to categorize it in the realm of client-side development. In fact, running javascript on the server is odd enough for the phrase &#8216;Server-side Javascript&#8217; to have been coined in the first place, but it isn&#8217;t exactly a new idea. Livewire, Netscape&#8217;s <a href="http://blogs.sun.com/jyrivirkki/date/20090113">Enterprise Server</a> product included server-side javascript functionality in 1996. But it hasn&#8217;t really caught on. Writing server-side code in PHP, Ruby, Python and Perl, ASP.Net and Java has been the &#8220;way we do things&#8221; and javascript remained something you messed around with once you wanted to spoil your users with a  richer experience. Before I explain server-side Javascript adoption, we need one important piece of background information.</p>
<p><strong>There are economic concepts that dictate how you use services and hosting on the internet.</strong></p>
<p>Do tell.</p>
<p>Computing is really cheap. Think about all the email that Gmail handles in a day. It&#8217;s so cheap that advertising can pay for it. But the &#8220;Network is the computer&#8221; after all, so we have to think about what it takes to get that information in and our of these clusters of cheap computing, and that&#8217;s the rub. Amazon charges $0.17/gig to get your data out of EC2, which is equivalent to almost two hours of their cheapest computing instance. This is a good scenario if the task you send to your cheap compute cluster can be defined in a very small package, and yields a relatively small result but typical web services and applications don&#8217;t work this way. The point is: <strong>Its cheaper to move the computing than it is to move the data.</strong></p>
<p>So what?</p>
<p>This all clicked for me when I messed around with Freebases <a href="http://dev.freebaseapps.com/">development environment</a>, &#8220;Acre&#8221;. Acre is great. It lets you create, edit, and host your applications through a browser. Not only had I been messing around with Acre, but I&#8217;d also been toying with the idea of using Freebase as a mechanism for validating and normalizing data. The problem is asking Freebase for a bunch of information on say, &#8220;every city on the planet&#8221; is pretty expensive. Not only do you incurr a network transfer cost, but you then have to process the information. Not exactly ideal. But what if I could pose a question to an application running at Freebase? What if, instead of pulling out all the information about every movie and creating your own Freebase-based IMDB, you could host it right next to the data source. You get all the benefits of transferring the &#8216;heavy stuff&#8217; over the WAN, and the browser gets the good stuff, but only when it asks for it.</p>
<p><strong>This is why server-side javascript is perfect</strong></p>
<p>Hosting Ruby, PHP, Python, etc is kind of a pain in the ass. Well its easier than it used to be but it could be a lot better. If I had to choose something relatively lightweight to interface to my data-source and create that rich browsing experience, you&#8217;d probably pick Javascript. My initial impression is that depending on your data-source, scaling it would be easy, too. Running computing close (as in LAN close) to the data-set means a few things</p>
<p>1. You can create cheaper mashups</p>
<p>2. You can eliminate all the cruft from your data before it gets sent over the wire</p>
<p>3. You can create nifty applications and ask them short questions that yield short answers but require huge amounts of data to determine</p>
<p><strong>ZOMG How do I start?</strong></p>
<p>You&#8217;ll have to learn javascript, and as a hosting or service operator you&#8217;ll have to choose an application for running it server-side. There are a few options. Trusty Wikipedia has a <a href="http://en.wikipedia.org/wiki/Server-side_JavaScript">lengthy list</a> of Server-side Javascript implementations. I&#8217;d recommend checking out the following:</p>
<p><a href="http://www.mozilla.org/rhino/">Rhino </a></p>
<p><a href="http://www.mozilla.org/js/spidermonkey/">Spidermonkey</a></p>
<p><a href="http://code.google.com/p/v8/">V8</a></p>
<p><a href="http://appjet.com/">AppJet</a></p>
<p><a href="http://www.aptana.com/jaxer/">Jaxer</a></p>
<p>-Trevor</p>
]]></content:encoded>
			<wfw:commentRss>http://trevoro.ca/blog/2009/02/05/why-serverside-javascript-matters/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How to Monitor Usage Patterns in ActiveMQ</title>
		<link>http://trevoro.ca/blog/2008/11/16/how-to-monitor-usage-patterns-in-activemq/</link>
		<comments>http://trevoro.ca/blog/2008/11/16/how-to-monitor-usage-patterns-in-activemq/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 04:42:05 +0000</pubDate>
		<dc:creator>Trevor Orsztynowicz</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[ruby activemq code monitoring sqs]]></category>

		<guid isPermaLink="false">http://trevoro.ca/blog/?p=298</guid>
		<description><![CDATA[ActiveMQ is an enterprise message bus that&#8217;s completely open source. It&#8217;s great if you want to tie together a bunch of different services, or act as your own personal Simple Message Queue (SQS). It supports a few interface methods such as JMS, Stomp, XMPP and plain REST. You can learn more about ActiveMQ here. There [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://activemq.apache.org/">ActiveMQ</a> is an enterprise message bus that&#8217;s completely open source. It&#8217;s great if you want to tie together a bunch of different services, or act as your own personal Simple Message Queue (SQS). It supports a few interface methods such as JMS, Stomp, XMPP and plain REST. You can learn more about ActiveMQ <a href="http://activemq.apache.org/">here</a>.</p>
<p>There are a few monitoring solutions for ActiveMQ that will let you know when its broken, but I needed to grab usage patterns over time, so I would be able to automatically spin up more workers. I didn&#8217;t see anything quickly available so I threw this together:</p>
<p>#queuemonitor.rb</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># queries the activeMQ status XML file and returns relevant data.</span>
<span style="color:#008000; font-style:italic;"># I'm sure there's a more elegant way of creating method directly out of xml.</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># Rather than have each queuemonitor as a seprate class with one name, we</span>
<span style="color:#008000; font-style:italic;"># might want to be able to parse multiple queues on the same server. So we have</span>
<span style="color:#008000; font-style:italic;"># an array of queue names (@queues) that contain the names of queues we want to monitor.</span>
<span style="color:#008000; font-style:italic;"># if you want to monitor more than one queue then you'd have to create a new QueueMonitor</span>
<span style="color:#008000; font-style:italic;"># instance.</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">class</span> QueueMonitor
&nbsp;
  attr_accessor <span style="color:#ff3333; font-weight:bold;">:url</span>, <span style="color:#ff3333; font-weight:bold;">:queues</span>
&nbsp;
  <span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'net/http'</span>
  <span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'rexml/document'</span>
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">def</span> initialize
    <span style="color:#0066ff; font-weight:bold;">@url</span>=<span style="color:#996600;">&quot;http://127.0.0.1:8161/admin/xml/queues.jsp&quot;</span>
    <span style="color:#0066ff; font-weight:bold;">@queues</span> = <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  <span style="color:#008000; font-style:italic;">#add a queue to the list of queues that we'll pay attention to</span>
  <span style="color:#9966CC; font-weight:bold;">def</span> addqueue<span style="color:#006600; font-weight:bold;">&#40;</span>queue<span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#0066ff; font-weight:bold;">@queues</span>.<span style="color:#9900CC;">push</span><span style="color:#006600; font-weight:bold;">&#40;</span>queue<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">unless</span> <span style="color:#0066ff; font-weight:bold;">@queues</span>.<span style="color:#9966CC; font-weight:bold;">include</span>?<span style="color:#006600; font-weight:bold;">&#40;</span>queue<span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">def</span> delqueue<span style="color:#006600; font-weight:bold;">&#40;</span>queue<span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#0066ff; font-weight:bold;">@names</span>.<span style="color:#9900CC;">reject</span>!<span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006600; font-weight:bold;">|</span>q<span style="color:#006600; font-weight:bold;">|</span> q == queue<span style="color:#006600; font-weight:bold;">&#125;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">def</span> query
    results = <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
    date = <span style="color:#CC00FF; font-weight:bold;">Time</span>.<span style="color:#9900CC;">now</span>
    xml_data = <span style="color:#6666ff; font-weight:bold;">Net::HTTP</span>.<span style="color:#9900CC;">get_response</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC00FF; font-weight:bold;">URI</span>.<span style="color:#9900CC;">parse</span><span style="color:#006600; font-weight:bold;">&#40;</span>@url<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">body</span>
    doc = <span style="color:#6666ff; font-weight:bold;">REXML::Document</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>xml_data<span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
    doc.<span style="color:#9900CC;">elements</span>.<span style="color:#9900CC;">each</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'queues/queue'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>queue<span style="color:#006600; font-weight:bold;">|</span>
      name = queue.<span style="color:#9900CC;">attributes</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;name&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
      <span style="color:#008000; font-style:italic;"># only list from Queues listed in the '@names'</span>
      <span style="color:#9966CC; font-weight:bold;">if</span> <span style="color:#0066ff; font-weight:bold;">@queues</span>.<span style="color:#9900CC;">member</span>?<span style="color:#006600; font-weight:bold;">&#40;</span>name<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">then</span>
&nbsp;
        queue.<span style="color:#9900CC;">elements</span>.<span style="color:#9900CC;">each</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'stats'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>ele<span style="color:#006600; font-weight:bold;">|</span>
          size = ele.<span style="color:#9900CC;">attributes</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;size&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
          consumers = ele.<span style="color:#9900CC;">attributes</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;consumerCount&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
          enqueue = ele.<span style="color:#9900CC;">attributes</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;enqueueCount&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
          dequeue = ele.<span style="color:#9900CC;">attributes</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;dequeueCount&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
&nbsp;
          queue = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#996600;">'name'</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; name,
                    <span style="color:#996600;">'size'</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; size,
                    <span style="color:#996600;">'consumers'</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; consumers,
                    <span style="color:#996600;">'enqueue'</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; enqueue,
                    <span style="color:#996600;">'dequeue'</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; dequeue,
                    <span style="color:#996600;">'date'</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; date
          <span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
          results <span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#006600; font-weight:bold;">&amp;</span>lt; queue
        <span style="color:#9966CC; font-weight:bold;">end</span>
      <span style="color:#9966CC; font-weight:bold;">end</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
    <span style="color:#0000FF; font-weight:bold;">return</span> results
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>You can then start monitoring your queue servers with something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;">#!/usr/bin/env ruby</span>
&nbsp;
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'queuemonitor'</span>
&nbsp;
mfreq = <span style="color:#006666;">30</span>
<span style="color:#0066ff; font-weight:bold;">@monitor</span> = QueueMonitor.<span style="color:#9900CC;">new</span>
<span style="color:#0066ff; font-weight:bold;">@monitor</span>.<span style="color:#9900CC;">url</span> = <span style="color:#996600;">&quot;http://67.202.41.64:8161/admin/xml/queues.jsp&quot;</span>
<span style="color:#0066ff; font-weight:bold;">@monitor</span>.<span style="color:#9900CC;">addqueue</span> <span style="color:#996600;">&quot;pubsub.pings.spider&quot;</span>
&nbsp;
<span style="color:#008000; font-style:italic;">#do something interesting like write to a file</span>
<span style="color:#008000; font-style:italic;">#screen or database</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">def</span> query
  date = <span style="color:#CC00FF; font-weight:bold;">Time</span>.<span style="color:#9900CC;">now</span>
  results = <span style="color:#0066ff; font-weight:bold;">@monitor</span>.<span style="color:#9900CC;">query</span>
  results.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>q<span style="color:#006600; font-weight:bold;">|</span>
    <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;#{date} #{q[&quot;</span>name<span style="color:#996600;">&quot;]} #{q[&quot;</span>size<span style="color:#996600;">&quot;]} #{q[&quot;</span>consumers<span style="color:#996600;">&quot;]}&quot;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#008000; font-style:italic;">#You'd want to use daemonize here...</span>
&nbsp;
<span style="color:#CC0066; font-weight:bold;">loop</span> <span style="color:#9966CC; font-weight:bold;">do</span>
  query
  <span style="color:#CC0066; font-weight:bold;">sleep</span> mfreq
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>It works pretty well. Right now I&#8217;m just writing the results to a file to parse later, and so you can setup other parts of a program that would automatically spin up new workers based on a set of circumstances. The algorithm for that is the hard part and will depend on a bunch of your own rules.</p>
]]></content:encoded>
			<wfw:commentRss>http://trevoro.ca/blog/2008/11/16/how-to-monitor-usage-patterns-in-activemq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Feature as a Service</title>
		<link>http://trevoro.ca/blog/2008/07/15/feature-as-a-service/</link>
		<comments>http://trevoro.ca/blog/2008/07/15/feature-as-a-service/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 04:37:42 +0000</pubDate>
		<dc:creator>Trevor Orsztynowicz</dc:creator>
				<category><![CDATA[Brainstorming]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[Geekness]]></category>
		<category><![CDATA[Ideas]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[cloud computing faas feature service grid]]></category>
		<category><![CDATA[feature Aas service cloud computing business utility sc]]></category>

		<guid isPermaLink="false">http://trevoro.ca/blog/?p=263</guid>
		<description><![CDATA[Websites have gone from hand-typed static pages, to massive applications with every feature under the moon. Most applications have some secret sauce that does magical things in the background &#8211; whether that be the ability to handle massive amounts of volume, reduce the barrier to entry into a market, or just keep users engaged by [...]]]></description>
			<content:encoded><![CDATA[<p>Websites have gone from hand-typed static pages, to massive applications with every feature under the moon. Most applications have some secret sauce that does magical things in the background &#8211; whether that be the ability to handle massive amounts of volume, reduce the barrier to entry into a market, or just keep users engaged by providing endless amounts of quick short updates.</p>
<p>Take Amazon as an example. Amazon operates their environment as a bunch of different groups, each running different services within the same company. S3, EC2, Payment Services. They&#8217;re all independent, highly scalable functions, tied together in the application we call Amazon.com.</p>
<p>Companies and startups are starting to break this operational model open, and putting those individual functions online for everyone. They&#8217;re building services that do something really well &#8211; or rather that do <strong>one</strong> thing <em>really really</em> well. They&#8217;re companies that focus on a specific function or feature and are open enough so creative people can say &#8220;I&#8217;m going to take this, this, and this &#8211; mix it in a pot and voila!&#8221;.</p>
<p>Do you want to build your own Twitter? Find an SMS gateway, Cloud Computing Host and XMPP service provider.</p>
<p>Do you want to build an interesting RSS/ATOM service? Find an RSS aggregator service and pour on some glue &#8211; see what sticks.</p>
<p>It&#8217;s Feature as a Service world (to use an already overused description). Eventually cloud companies will realize that doing one thing really *really* well is tremendously valuable. Why does everyone have to build their own DNS service? Why does everyone have to build their own hosting system? What about Enterprise Storage, Authentication, SMS Gateways, Massively scalable XMPP services? How come I have to do that myself? Can 10,000 messages sent through a jabber server be worth a dollar? I think it can (maybe the math needs adjusting but you get my point). We&#8217;re all really just building a massive computer called the internet, only with each big trend we replace &#8216;The Internet&#8217; with something else. First it was &#8216;The Web&#8217;, then it was &#8216;Web 2.0&#8242;, and now its &#8216;The Cloud&#8217;. The fact of the matter remains &#8211; the further along we go the more tightly knit the internet becomes, and that means that theres opportunity for programmable white label services to propel us further and faster.</p>
]]></content:encoded>
			<wfw:commentRss>http://trevoro.ca/blog/2008/07/15/feature-as-a-service/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What The Cloud Isn&#8217;t</title>
		<link>http://trevoro.ca/blog/2008/07/02/what-the-cloud-isnt/</link>
		<comments>http://trevoro.ca/blog/2008/07/02/what-the-cloud-isnt/#comments</comments>
		<pubDate>Wed, 02 Jul 2008 19:01:31 +0000</pubDate>
		<dc:creator>Trevor Orsztynowicz</dc:creator>
				<category><![CDATA[cloud]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[cloud computing]]></category>

		<guid isPermaLink="false">http://trevoro.ca/blog/?p=252</guid>
		<description><![CDATA[Cloudcamp and Structure 08 had a lot of people talking about how the cloud was going to magically solve a lot of problems, and this stemmed from a major issue &#8211; we don&#8217;t really know what the cloud is yet. In its current form the young cloud can&#8217;t solve certain issues. Application Integration Just like [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://cloudcamp.com">Cloudcamp</a> and <a href="http://events.gigaom.com/structure/08/">Structure 08</a> had a lot of people talking about how the cloud was going to magically solve a lot of problems, and this stemmed from a major issue &#8211; we don&#8217;t really know what the cloud is yet. In its current form the young cloud can&#8217;t solve certain issues.</p>
<h2>Application Integration</h2>
<p><a href="http://trevoro.ca/blog/wp-content/uploads/2008/07/eai1.jpg"><img class="alignleft size-medium wp-image-253" title="Enterprise Application Integration" src="http://trevoro.ca/blog/wp-content/uploads/2008/07/eai1-300x209.jpg" alt="Spaghetti Integration. MMmm Spaghetti." width="300" height="209" /></a></p>
<p>Just like everyone thought <a href="http://www.w3.org/TR/wsdl">WSDL</a> would automagically make applications work together, people think the new ubiquitous &#8216;Cloud&#8217; will make applications work together. Unless your application was designed from the beginning to talk to and operate with other cloud stacks, then you&#8217;re going to have an application integration issue on your hands. This is why behemoths like <a href="http://www.sap.com/canada/solutions/index.epx">SAP</a> exist. Everything is one universal and translatable data format, all controlled by one vendor. If you want to be able to move data, or integrate applications that run in different clouds, then you&#8217;re going to have to do it the old way. Sit down, translate the data yourself, and emulate it where you can&#8217;t. Cloud != Application / Data Babelfish</p>
<h2>Eliminate Monitoring</h2>
<p>Monitoring is either a dirty word or a multi-million dollar business depending on who you talk to. As a sysadmin for several high-availability environments, I can&#8217;t stress it enough. Building your application and environment to be redundant is always step number one, but it&#8217;s useless if you don&#8217;t know the state of your environment at all times &#8211; especially before and after changes. Environment monitoring is like <a href="http://behaviour-driven.org/">Behaviour Driven Development</a> (see <a href="http://rspec.info/">rspec</a>) for your application. You know what&#8217;s supposed to happen, and how things are supposed to look &#8211; and if something changes you find out about it. You still need this kind of functionality, and just putting your stuff in the cloud doesn&#8217;t make issues go away. Cloud != Perfectly Reliable Environment</p>
<h2>Eliminate Lock-in</h2>
<p><a href="http://flickr.com/photos/psd/1805590643/sizes/o/"><img class="alignnone" src="http://farm3.static.flickr.com/2215/1805590643_f4889b80b5_m.jpg" alt="" /></a></p>
<p>Oh boy I said a dirty word. If you write your application for <a href="http://code.google.com/appengine/">AppEngine</a>, then you&#8217;re using AppEngine until you refactor. Period. The <a href="http://appdrop.com/">AppDrop</a> application lets you &#8220;run AppEngine on EC2&#8243; but thats kind of masking the issue. AppDrop is just the AppEngine developer tools running in an AMI &#8211; it doesn&#8217;t do anything like emulate all the necessary infrastructure that makes AppEngine appealing in the first place and the authors acknowledge this. Don&#8217;t get me wrong &#8211; AppEngine is great. Its a highly abstracted environment for writing web applications, but it&#8217;s not appropriate for a lot of different services. If you want to be able to treat the cloud like you treat a &#8220;standard&#8221; machine -&gt; LAMP stack then you should be aware of all these factors. Cloud != Universal Magical Computer</p>
<h2>Eliminate Jobs</h2>
<p>Sysadmins (and I can say this) are an odd bunch. Most of them treat their environments like children, rearing them to a specific age, but always keeping a watchful eye. Others tend to automate everything necessary in order to move on to the next best thing. The people that horde data, knowledge, useful tools, and expertise will fit right in to closed cultures, but if you want to make it in the new reality, you&#8217;re going to have to open your mind. The cloud isn&#8217;t going to make you obsolete unless you try stopping progress. If you didn&#8217;t have to worry about making system images and building back-ends all day think about all the other amazing things you could do! There are a slew of bad analogies I can use to drive this point home, but I&#8217;ll use the most cliche: Be a reed in the wind. If you&#8217;re clinging onto a job because you&#8217;re easily replaceable, then its just a matter of time. Learn a new skill. Cloud != Massive Layoffs</p>
]]></content:encoded>
			<wfw:commentRss>http://trevoro.ca/blog/2008/07/02/what-the-cloud-isnt/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Eucalyptus &#8211; Roll your own EC2</title>
		<link>http://trevoro.ca/blog/2008/06/04/eucalyptus-roll-your-own-ec2/</link>
		<comments>http://trevoro.ca/blog/2008/06/04/eucalyptus-roll-your-own-ec2/#comments</comments>
		<pubDate>Wed, 04 Jun 2008 23:53:06 +0000</pubDate>
		<dc:creator>Trevor Orsztynowicz</dc:creator>
				<category><![CDATA[cloud]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://trevoro.ca/blog/2008/06/04/eucalyptus-roll-your-own-ec2/</guid>
		<description><![CDATA[Great Scott! An aquaintance of mine just forwarded this to me today and my jaw dropped. A team working out of University of California, Santa Barbara led by Rich Wolski has reverse engineered the EC2 framework and (apparently) released it under a FreeBSD style license. They gave a demo at the Open Source Grid and [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://trevoro.ca/blog/wp-content/uploads/2008/06/eucalyptuslogotext-300px.png" alt="eucalyptus logo" /></p>
<p>Great Scott! An aquaintance of mine just forwarded this to me today and my jaw dropped. A team working out of University of California, Santa Barbara led by <a href="http://www.cs.ucsb.edu/~rich/">Rich Wolski</a> has reverse engineered the <a href="http://www.amazon.com/gp/browse.html?node=201590011">EC2</a> framework and (apparently) released it under a FreeBSD style license.</p>
<p>They gave a demo at the <a href="http://www.opensourcegridcluster.org/">Open Source Grid and Cluster Conference</a>, which was a paid conference (tsk tsk tsk)</p>
<p>From the website:</p>
<p><em>Overall, the goal of the EUCALYPTUS project is to foster community research and development of Elastic/Utility/Cloud service implementation technologies, resource allocation strategies, service level agreement (SLA) mechanisms and policies, and usage models.  The current release is version 1.0 and it includes the following features:</em></p>
<ul>
<li><em>Interface compatibility with EC2</em></li>
<li><em>Simple installation and deployment using Rocks cluster-management tools</em></li>
<li><em>Simple set of extensible cloud allocation policies</em></li>
<li><em>Overlay functionality requiring no modification to the target Linux environment</em></li>
<li><em>Basic &#8220;Cloud Administrator&#8221; tools for system management and user accounting</em></li>
<li><em>The ability to configure multiple clusters, each with private internal network addresses, into a single Cloud.</em></li>
</ul>
<p><em>The initial version of EUCALYPTUS requires <a href="http://xen.org/">Xen</a> to be installed on all nodes that can be allocated, but no modifications to the &#8220;dom0&#8243; installation or to the hypervisor itself.</em></p>
<p>This is fantastic and *exactly* what the industry needs right now. In fact, it falls in line nicely with what we&#8217;re working on at <a href="http://layerboom.com">LayerBoom.</a> I&#8217;m extremely interested to see how this works. I&#8217;m actually booting it up as I type this.</p>
<p>[<a href="http://eucalyptus.cs.ucsb.edu/wiki">link</a>] [<a href="http://ostatic.com/164044-blog/eucalyptus-an-unsung-open-source-infrastructure-for-cloud-computing#continue">link</a>]</p>
<blockquote></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://trevoro.ca/blog/2008/06/04/eucalyptus-roll-your-own-ec2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting xVM to work in Opensolaris 2008.05</title>
		<link>http://trevoro.ca/blog/2008/05/07/getting-xvm-to-work-in-opensolaris-200805/</link>
		<comments>http://trevoro.ca/blog/2008/05/07/getting-xvm-to-work-in-opensolaris-200805/#comments</comments>
		<pubDate>Wed, 07 May 2008 10:07:16 +0000</pubDate>
		<dc:creator>Trevor Orsztynowicz</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[opensolaris]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://trevoro.ca/blog/2008/05/07/getting-xvm-to-work-in-opensolaris-200805/</guid>
		<description><![CDATA[OpenSolaris 2008.05 came out the other day, and its pretty nice as far as OS&#8217;s go. One of the things that&#8217;s great about OpenSolaris is by coupling Xen with ZFS you can get a really powerful virtualization system. Unfortunately because of space constraints in a liveCD, you can&#8217;t squeeze all those &#8216;nice to have&#8217; packages [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://trevoro.ca/blog/wp-content/uploads/2008/05/os_com_logo.jpg" alt="os_com_logo.jpg" align="middle" /></p>
<p><a href="http://opensolaris.org">OpenSolaris</a> 2008.05 came out the other day, and its pretty nice as far as OS&#8217;s go. One of the things that&#8217;s great about OpenSolaris is by coupling <a href="http://xensource.com">Xen</a> with <a href="http://opensolaris.org/os/community/zfs/demos/basics/">ZFS</a> you can get a really powerful virtualization system.</p>
<p>Unfortunately because of space constraints in a liveCD, you can&#8217;t squeeze all those &#8216;nice to have&#8217; packages into one spot, so you have to download and setup xVM manually. A few things are broken, too so some minor tweaking is required. Here&#8217;s a list of steps required to get <a href="http://www.openxvm.org/">xVM</a> setup as a Dom0 in OpenSolaris</p>
<p>1) Become root and install the required packages. This will install the xen.gz kernel, as well as all the other utilities and services necessary for running a Dom0</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">pkg install SUNWxvmhvm
pkg install SUNWvirtinst
pkg install SUNWlibvirt
pkg install SUNWurlgrabber</pre></div></div>

<p>2) The package installation doesn&#8217;t support adding xvm to the default boot.lst in grub. Additionally, OpenSolaris 2008.05 has ZFS as the default filesystem, so a few things have been moved around. Specifically, the boot.lst file used by grub and <a href="http://compute.cnr.berkeley.edu/cgi-bin/man-cgi?bootadm+1">bootadm</a> has been placed on its own zfs filesystem. Unfortunately it seems that bootadm has been compiled, or at least the distribution has been put together, without the ability to gracefully handle having the boot.lst on a separate partition.</p>
<p>A workaround is to move the /boot/grub/menu.lst file (which has some explanatory text in it) to  /boot/grub/menu.lst-old, and to symlink the /rpool/boot/grub/menu.lst file to /boot/grub/menu.lst.</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">cd /boot/grub
mv menu.lst menu.lst-old
ln -s /rpool/boot/grub/menu.lst menu.lst</pre></div></div>

<p>Now we can run bootadm without any errors</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">bootadm list-menu</pre></div></div>

<p>Time to add the boot entry for our xVM kernel</p>
<p><strong>Update</strong>: <a href="http://www.kevinelliott.net/blog/">Kevin Elliot</a> said that running “bootadm -m upgrade”  added the xVM entry automatically after performing the linkage steps. You will still need to add the &#8216;boofs rpool/ROOT/opensolaris lines however. [<a href="http://trevoro.ca/blog/2008/05/07/getting-xvm-to-work-in-opensolaris-200805/#comment-4778">link</a>] [<a href="http://trevoro.ca/blog/2008/05/07/getting-xvm-to-work-in-opensolaris-200805/#comment-4795">link</a>]</p>
<p>open up the /boot/grub/menu.lst file  and add the following after the &#8216;bootadm&#8217; section</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">vim /boot/grub/menu.lst</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">title OpenSolaris 2008.05 snv_86_rc3 X86 xVM
bootfs rpool/ROOT/opensolaris
kernel$ /boot/$ISADIR/xen.gz
module$ /platform/i86xpv/kernel/$ISADIR/unix /platform/i86xpv/kernel/$ISADIR/unix -B $ZFS-BOOTFS
module$ /platform/i86pc/$ISADIR/boot_archive</pre></div></div>

<p>Note that if you&#8217;ve done a pkg upgrade, your ZFS root will more than likely be different. You&#8217;ll have to choose the ZFS root partition that you were using when you installed the packages earlier, otherwise they won&#8217;t be available</p>
<p><strong>Note</strong>: Make sure to change the default selection to the appropriate placeholder of your xVM entry. The numbering for grub starts at 0. This means that to boot the first entry in your menu.lst file, your &#8216;default&#8217; value in menu.lst should be 0, and so on and so forth.</p>
<p>Let&#8217;s run bootadm and see what our changes look like</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">bootadm list-menu</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">The location for the active GRUB menu is: /boot/grub/menu.lst
default 1
timeout 10
0 OpenSolaris 2008.05 snv_86_rc3 X86 i86pc
1 OpenSolaris 2008.05 snv_86_rc3 X86 xVM</pre></div></div>

<p>Pretty. Now its time to try it out. In order to switch kernels you have to reboot your system</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">shutdown -y -g0 -i6</pre></div></div>

<p>Your system should reboot using the xvm capable kernel. If your sytem could not boot properly then select the old kernel from the boot menu as your system starts.</p>
<p>To double-check that you&#8217;re running the proper kernel, run uname</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">uname -a</pre></div></div>

<p>it should give you something like this</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">SunOS pluto 5.11 snv_86 i86pc i386 &lt;strong&gt;i86xpv&lt;/strong&gt; Solaris</pre></div></div>

<p>The last step is to enable the proper xVM services</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">svcadm enable store
svcadm enable xend
svcadm enable console
svcadm enable domains
svcadm enable virtd</pre></div></div>

<p>Running</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">svcs | grep xvm</pre></div></div>

<p>should print the following</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">online          2:22:12 svc:/system/xvm/store:default
online          2:22:27 svc:/system/xvm/xend:default
online          2:22:27 svc:/system/xvm/console:default
online          2:22:27 svc:/system/xvm/domains:default</pre></div></div>

<p>One quick test</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">xm top</pre></div></div>

<p>Should work properly.</p>
<p>Hopefully that worked for you. I appreciate any feedback!</p>
<p><strong>Update #2</strong></p>
<p>Some people are reporting problems creating DomU&#8217;s. If you&#8217;re running into problems, try running the script below</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">BASEDIR=${BASEDIR:-/}
/usr/sbin/syseventadm list -R $BASEDIR -c EC_xendev &amp;gt; /dev/null 2&amp;gt;&amp;amp;1
if [ $? -ne 0 ]
then
/usr/sbin/syseventadm add -R $BASEDIR -c EC_xendev \
/usr/lib/xen/scripts/xpvd-event 'action=$subclass' \
'domain=$domain' 'vdev=$vdev' 'device=$device' \
'devclass=$devclass' 'febe=$fob'
fi
/usr/sbin/syseventadm list -R $BASEDIR -c EC_xpvsys &amp;gt; /dev/null 2&amp;gt;&amp;amp;1
if [ $? -ne 0 ]
then
/usr/sbin/syseventadm add -R $BASEDIR -c EC_xpvsys \
/usr/lib/xen/scripts/xpvsys-event 'subclass=$subclass' \
'shutdown=$shutdown'
fi
# restart daemon if the package is being added to the running system
if [ &quot;$BASEDIR&quot; = &quot;/&quot; -a $? -eq 0 ]
then
/usr/sbin/syseventadm restart
fi</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://trevoro.ca/blog/2008/05/07/getting-xvm-to-work-in-opensolaris-200805/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>Open Virtual Machine Format</title>
		<link>http://trevoro.ca/blog/2008/03/15/open-virtual-machine-format/</link>
		<comments>http://trevoro.ca/blog/2008/03/15/open-virtual-machine-format/#comments</comments>
		<pubDate>Sun, 16 Mar 2008 00:10:47 +0000</pubDate>
		<dc:creator>Trevor Orsztynowicz</dc:creator>
				<category><![CDATA[cloud]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[Ideas]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://trevoro.ca/blog/2008/03/15/open-virtual-machine-format/</guid>
		<description><![CDATA[Open standardized protocols are what made the Web possible. We have standards all the way up the computational stack, from agreeing on which pins mean what in a wire, to what an X button means in a user-interface. Companies who don&#8217;t embrace them are destined to isolate themselves on tiny technological islands.  Specific implementations, however, [...]]]></description>
			<content:encoded><![CDATA[<p>Open standardized protocols are what made the Web possible. We have standards all the way up the computational stack, from agreeing on which pins mean what in a wire, to what an X button means in a user-interface. Companies who don&#8217;t embrace them are destined to isolate themselves on <a href="http://en.wikipedia.org/wiki/IPX">tiny</a> <a href="http://www.networkworld.com/news/2007/102607-arguments-ethernet-token-ring.html?nwwpkg=50arguments">technological</a> <a href="http://www.sony.com">islands</a>.  Specific implementations, however, don&#8217;t <em>have</em> to be shared and open. Huge markets with tiny verticals of implementation lock out competition, but they also prevent innovation. But sometimes something beautiful happens, and people get together to support a new kind of standard. An open, extensible standard that can be written and read by anyone. One place where this is just starting to happen is with computer virtualization.</p>
<p>The Open Virtual Machine Format, or OVF is a <a href="http://www.vmware.com/pdf/ovf_spec_draft.pdf">proposed</a> universal format that aims to create a secure, extensible method of describing and packaging virtual containers. Because the standard is open, it means any environment supporting the standard can import and export those virtual machines between different hypervisor platforms. The current OVF specification includes definitions ranging from virtual machine metadata and disk format, all the way to detailed hardware specifications and logical network information. It also provides an ability for the virtual machine itself to get information from the hypervisor host, meaning that if you&#8217;re creative you could create some really nifty automated integration and deployment tools.</p>
<p>If that doesn&#8217;t mean much to you, then consider this: Industry heavy-weights like Dell, HP, IBM, Microsoft, VMware, and XenSource all took part in drafting the specification. As far support tools go, VMware has published what appears to be the first OVF container creation tool, <a href="http://www.vmware.com/download/eula/ovf_eula.html">available here</a>.</p>
<p>There IS a big problem with OVF right now, and a lot of bloggers and analysts out there are <a href="http://dcsblog.burtongroup.com/data_center_strategies/2007/09/ovf---the-new-p.html">getting it wrong</a>. OVF is not and does not define a new virtual disk format, simply a wrapper around them. This means that OVF support doesn&#8217;t enable you to drag and drop virtual machines between Xen and VMware. Some formats can be converted externally using tools, however most of the current techniques involve booting up a system, and running a migration tool to be able to convert the image &#8211; not exactly ideal. OVF does include the ability to describe your specification in an HREF, which means that you could publish your spec, and create a system that could modify containers on the fly.</p>
<p>If Vmware, Xen, and Parallels are technolgical islands, then OVF may one day be the bridge that will allow you to travel between them.</p>
<p><strong>Update</strong> It looks like OVF will be announced formally at the <a href="http://www.dmtf.org/home">Catalyst 2008</a> conference. More<a href="http://www.dmtf.org/events/catalyst2008/"> information here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://trevoro.ca/blog/2008/03/15/open-virtual-machine-format/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

