<?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>Linux2Go &#187; Uncategorized</title>
	<atom:link href="http://blog.linux2go.dk/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.linux2go.dk</link>
	<description>The blog of Soren Hansen (not the golfer)</description>
	<lastBuildDate>Tue, 17 Jan 2012 15:09:32 +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>All the things wrong with monitoring today &#8211; Part 3</title>
		<link>http://blog.linux2go.dk/2012/01/17/all-the-things-wrong-with-monitoring-today-part-3/</link>
		<comments>http://blog.linux2go.dk/2012/01/17/all-the-things-wrong-with-monitoring-today-part-3/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 14:05:09 +0000</pubDate>
		<dc:creator>Soren</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.linux2go.dk/?p=703</guid>
		<description><![CDATA[Erk. I found this sitting around as a draft: Today&#8217;s normality is tomorrow&#8217;s abnormality Last time, we looked at a disk usage graph. This week, we&#8217;ll look at CPU usage or something else that goes up and down instead of just up, up, up. What&#8217;s the problem here? The problem is that it&#8217;s very hard [...]]]></description>
			<content:encoded><![CDATA[<p>Erk. I found this sitting around as a draft:</p>
<h2>Today&#8217;s normality is tomorrow&#8217;s abnormality<a href="http://c3174882.r82.cf0.rackcdn.com/2012/01/iStock_000016731878XSmall-1.jpg"><img class=" wp-image-806 alignright" title="Facepalm" src="http://c3174882.r82.cf0.rackcdn.com/2012/01/iStock_000016731878XSmall-1.jpg" alt="" width="131" height="212" /></a></h2>
<p>Last time, we looked at a disk usage graph. This week, we&#8217;ll look at CPU usage or something else that goes up and down instead of just up, up, up.</p>
<p><a href="http://c3174882.r82.cf0.rackcdn.com/2011/10/cpuusage1.png"><img class="alignnone size-full wp-image-799" title="CPU usage (fake)" src="http://c3174882.r82.cf0.rackcdn.com/2011/10/cpuusage1.png" alt="" width="640" height="400" /></a></p>
<p>What&#8217;s the problem here? The problem is that it&#8217;s very hard to set up an alert for this. Some things are simply spiky by nature. Sometimes, that&#8217;s perfectly fine. Perhaps the load on this particular application is evenly distributed throughout the day, but at night it runs a bunch of batch processing jobs that pegs the CPU for a couple of hours. For this sort of thing, you have a couple of options in terms of monitoring/alerting.</p>
<ul>
<li>Don&#8217;t monitor CPU load.</li>
<li>Accept being alerted about this every single night.</li>
<li>Ignore CPU load during the time of day when this job runs.</li>
</ul>
<p>All of these options suck.</p>
<ul>
<li>You can&#8217;t just not monitor the CPU load. If you&#8217;re suddenly at 100% for an hour during the day, something&#8217;s wrong!</li>
<li>You don&#8217;t want to be alerted by something that is normal. That&#8217;s silly. You want your monitoring system to only alert you about stuff that&#8217;s worth waking up over.</li>
<li>Ignoring the CPU load based on the time of day is a step in the right direction, but this is not an isolated case. You probably have many different services, all with different usage patterns. I also don&#8217;t really want to think about what it will do to your configuration files if you had to specify different thresholds for every hour of the day (and every day of the week, etc).</li>
</ul>
<p>Think about that last option a bit.. What would you use to define expected/acceptable levels? Pure guesswork? Of course not. You&#8217;ll use the data you already have. Maybe you&#8217;ve run this for a while and have cute graphs that can tell you what is expected. But seriously&#8230; Looking at graphs <strong>from</strong> your monitoring system and using them to type configuration <strong>back into</strong> your monitoring system? That&#8217;s the most ridiculous thing I&#8217;ve ever heard (yes, I should probably get out more).</p>
<p>Why can&#8217;t the monitoring system just tell me when something is out of the ordinary? It has all the data in the world to make that call. If a metric is unusual for that time of day, on that day of week, at that time of year, let me know. If it&#8217;s <strong>very</strong> unusual, send me a text message. Otherwise, I probably don&#8217;t care.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.linux2go.dk/2012/01/17/all-the-things-wrong-with-monitoring-today-part-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Openstack Nova in Maverick</title>
		<link>http://blog.linux2go.dk/2010/10/11/openstack-nova-in-maverick/</link>
		<comments>http://blog.linux2go.dk/2010/10/11/openstack-nova-in-maverick/#comments</comments>
		<pubDate>Mon, 11 Oct 2010 12:40:41 +0000</pubDate>
		<dc:creator>Soren</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[planetopenstack]]></category>
		<category><![CDATA[PlanetUbuntu]]></category>

		<guid isPermaLink="false">http://blog.warma.dk/?p=587</guid>
		<description><![CDATA[Ubuntu Maverick was released yesterday. Big congrats to the Ubuntu team for another release well out the door. As you may know, both Openstack storage (Swift) and compute (Nova) are available in the Ubuntu repositories. We haven&#8217;t made a proper release of Nova yet, so that&#8217;s a development snapshot, but it&#8217;s in reasonably good shape. [...]]]></description>
			<content:encoded><![CDATA[<p>Ubuntu Maverick was released yesterday. Big congrats to the Ubuntu team for another release well out the door.</p>
<p>As you may know, both Openstack storage (Swift) and compute (Nova) are available in the Ubuntu repositories. We haven&#8217;t made a proper release of Nova yet, so that&#8217;s a development snapshot, but it&#8217;s in reasonably good shape. Swift, on the other hand, should be in very good shape and be production ready. I&#8217;ve worked mostly on Nova, so that&#8217;s what I&#8217;ll focus on.</p>
<p>So, to get to play with Nova in Maverick on a single machine, here are the instructions:</p>
<pre>sudo apt-get install rabbitmq-server redis-server</pre>
<pre>sudo apt-get install nova-api nova-objectstore nova-compute \
                nova-scheduler nova-network euca2ools unzip</pre>
<p>rabbitmq-server and redis-server are not stated as dependencies of Nova in the packages, because they don&#8217;t need to live on the same host. In fact, as soon as you add the next compute node (or API node or whatever), you&#8217;ll want to use a remote rabbitmq server and a remote database, too. But, for our small experiment here, we need a rabbitmq server and a redis server (it&#8217;s very likely that the final release of Nova will not require Redis, but for now, we need it).</p>
<p>A quick explanation of the different components:</p>
<dl>
<dt>RabbitMQ</dt>
<dd>is a messaging system the implements AMQP.  Basically, it&#8217;s a server that passes messages around between the other components that make up Nova.</dd>
<dt>nova-api</dt>
<dd>is the API server (I was schocked to learn this, too!) . It implements a subset of the Amazon EC2. We&#8217;re working on adding the rest, but it takes time. It also implements a subset of the Rackspace API.</dd>
<dt>nova-objectstore</dt>
<dd>stores objects. It implements the S3 API. It&#8217;s quite crude. If you&#8217;re serious about storing objects, Swift is what you want. Really.</dd>
<dt>nova-compute</dt>
<dd>the component that runs virtual machines.</dd>
<dt>nova-network</dt>
<dd>the network worker. Depending on configuration, it may just assign IP&#8217;s or it could work as the gateway for a bunch of NAT&#8217;ed VM&#8217;s.</dd>
<dt>nova-scheduler</dt>
<dd>the scheduler (another schocker). When a user wants to run a virtual machine, they send a request to the API server. The API server asks the network worker for an IP and then passes off handling to the scheduler. The scheduler decides which host gets to run the VM.</dd>
</dl>
<p>Once it&#8217;s done installing (which should be a breeze), you can create an admin user (I name mine &#8220;soren&#8221; for obvious reasons):</p>
<pre>sudo nova-manage user admin soren</pre>
<p>and create a project (also named soren) with the above user as the project admin:</p>
<pre>sudo nova-manage project create soren soren</pre>
<p>Now, you&#8217;ll want to get a hold of your credentials:</p>
<pre>sudo nova-manage project zipfile soren soren</pre>
<p>This yields a nova.zip in the current working directory. Unzip it..</p>
<pre>unzip nova.zip</pre>
<p>and source the rc file:</p>
<pre>. novarc</pre>
<p>And now you&#8217;re ready to go!</p>
<p>Let&#8217;s just repeat all that in one go, shall we?</p>
<pre>sudo apt-get install rabbitmq-server redis-server
sudo apt-get install nova-api nova-objectstore nova-compute \
                nova-scheduler nova-network euca2ools unzip
sudo nova-manage user admin soren
sudo nova-manage project create soren soren
sudo nova-manage project zipfile soren soren
unzip nova.zip
. novarc</pre>
<p>That&#8217;s pretty much it. Now your cloud is up and running, you&#8217;ve created an admin user and retrieved the corresponding credentials and put them in your environment.<br />
This is not much fun without any VM&#8217;s to run, so you need to add some images. We have some small images we use for testing that you can download <a href="http://c2477062.cdn.cloudfiles.rackspacecloud.com/images.tgz">here</a>:</p>
<pre>wget http://c2477062.cdn.cloudfiles.rackspacecloud.com/images.tgz</pre>
<p>Extract that file:</p>
<pre>tar xvzf images.tgz</pre>
<p>This gives you a directory tree like this:</p>
<pre>images
|-- aki-lucid
|   |-- image
|   `-- info.json
|-- ami-tiny
|   |-- image
|   `-- info.json
`-- ari-lucid
    |-- image
    `-- info.json</pre>
<p>As a shortcut, you could just extract this directly in /var/lib/nova and change the permisssions appropriately, but to get the full experience, we&#8217;ll use euca-* to get these images uploaded.</p>
<pre>euca-bundle-image -i images/aki-lucid/image -p kernel --kernel true
euca-bundle-image -i images/ari-lucid/image -p ramdisk --ramdisk true
euca-upload-bundle -m /tmp/kernel.manifest.xml -b mybucket
euca-upload-bundle -m /tmp/ramdisk.manifest.xml -b mybucket
out=$(euca-register mybucket/kernel.manifest.xml)
[ $? -eq 0 ] &amp;&amp; kernel=$(echo $out | awk -- '{ print $2 }') || echo $out

out=$(euca-register mybucket/ramdisk.manifest.xml)
[ $? -eq 0 ] &amp;&amp; ramdisk=$(echo $out | awk -- '{ print $2 }') || echo $out

euca-bundle-image -i images/ami-tiny/image -p machine  --kernel $kernel --ramdisk $ramdisk
euca-upload-bundle -m /tmp/machine.manifest.xml -b mybucket
out=$(euca-register mybucket/machine.manifest.xml)
[ $? -eq 0 ] &#038;&#038; machine=$(echo $out | awk -- '{ print $2 }') || echo $out
echo kernel: $kernel, ramdisk: $ramdisk, machine: $machine
</pre>
<p>Alright, so we have images!</p>
<p>Now, we just need a keypair:</p>
<pre>
euca-add-keypair mykey > mykey.priv
chmod 600 mykey.priv
</pre>
<p>Let&#8217;s run a VM!</p>
<pre>
euca-run-instances $machine --kernel $kernel --ramdisk $ramdisk -k mykey
</pre>
<p>This should respond with some info about the VM, among other things, the IP.</p>
<p>In my case, it was 10.0.0.5:</p>
<pre>
ssh -i mykey.priv root@10.0.0.5
</pre>
<p>YAY!</p>
<p>I&#8217;ll leave it to someone else to provide similar instructions for Swift</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.linux2go.dk/2010/10/11/openstack-nova-in-maverick/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
	</channel>
</rss>

