<?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>Lance Albertson &#187; gentoo</title>
	<atom:link href="http://www.lancealbertson.com/tag/gentoo/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lancealbertson.com</link>
	<description>Musings of a UNIX SysAdmin, jazz lover, and wine/beer snob</description>
	<lastBuildDate>Thu, 10 Jun 2010 16:37:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Installing Ganeti on Gentoo</title>
		<link>http://www.lancealbertson.com/2010/05/installing-ganeti-on-gentoo/</link>
		<comments>http://www.lancealbertson.com/2010/05/installing-ganeti-on-gentoo/#comments</comments>
		<pubDate>Sat, 22 May 2010 05:52:07 +0000</pubDate>
		<dc:creator>lance</dc:creator>
				<category><![CDATA[gentoo]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[drbd]]></category>
		<category><![CDATA[ganeti]]></category>
		<category><![CDATA[kvm]]></category>

		<guid isPermaLink="false">http://www.lancealbertson.com/?p=153</guid>
		<description><![CDATA[Installing Ganeti is a relatively simple process on Gentoo. This post will go over the basics on getting it running on Gentoo. Its based primarily on a wiki page at the OSUOSL so check it out for more detailed instructions. I also recommend you read the upstream docs on Ganeti prior to installing it on [...]]]></description>
			<content:encoded><![CDATA[<p>Installing Ganeti is a relatively simple process on Gentoo. This post will go over the basics on getting it running on Gentoo. Its based primarily on a <a href="http://dokuwiki.osuosl.org/public/ganeti_cluster_gentoo">wiki page at the OSUOSL</a> so check it out for more detailed instructions. I also recommend you read the <a href="http://ganeti-doc.googlecode.com/svn/ganeti-2.1/html/index.html">upstream docs</a> on Ganeti prior to installing it on your own. It will cover a lot more topics in detail and this post is intended just as a diff from that doc.</p>
<p>I should note that I have only installed Ganeti with KVM and have not tested it with Xen on Gentoo. I appreciate feedback if you have installed and used Xen with Ganeti on Gentoo. I'm also the current package maintainer for Ganeti and the related packages in Gentoo such as:</p>
<ul>
<li><a href="http://packages.gentoo.org/package/app-emulation/ganeti">app-emulation/ganeti</a> (primary package)</li>
<li><a href="http://packages.gentoo.org/package/app-emulation/ganeti"></a><a href="http://packages.gentoo.org/package/app-emulation/ganeti-htools">app-emulation/ganeti-htools</a> (automatic allocation)</li>
<li><a href="http://packages.gentoo.org/package/app-emulation/ganeti-htools"></a><a href="http://packages.gentoo.org/package/app-emulation/ganeti-instance-debootstrap">app-emulation/ganeti-instance-debootstrap</a> (instance creation)</li>
</ul>
<p>The first step is to install a base Gentoo system using the standard profile. You can use a hardened profile however if you intend to use ganeti-htools, it requires haskell which seems to have issues in hardened.</p>
<h2>Configuring DNS</h2>
<p>Ganeti requires the following names to resolve before you can set it up.</p>
<ul>
<li>A master name for the cluster, this IP must be available (ganeti.example.org)</li>
<li>A name for each node or Dom0 (node1.example.org)</li>
<li>A name for each instance or virtual machine (instance1.example.org)</li>
</ul>
<h2>Kernel</h2>
<p><a href="http://www.drbd.org/">DRBD</a> is optional in Ganeti so you can skip this step if you're not planning on using it. DRBD was recently included in the mainline kernel in 2.6.33 however Gentoo's DRBD packages do not currently reflect that. I hope to get that changed soon but for now you have two options.</p>
<ol>
<li>Install gentoo-sources, drbd, and drbd-kernel</li>
<li>Install gentoo-sources &amp; enable drbd, install drbd without deps</li>
</ol>
<p>For simplicity, I'll describe option #2 above below. Check out the <a href="http://dokuwiki.osuosl.org/public/ganeti_cluster_gentoo">wiki page</a> for #1.</p>
<p>DRBD requires you have the following option enabled. Make sure you've rebooted using a kernel with these options above before you continue.</p>
<pre class="brush: plain;">
Device Drivers ---&gt;
    &lt;*&gt; Connector - unified userspace &lt;-&gt; kernelspace linker
</pre>
<p>We recommend that you keyword both <code>sys-cluster/drbd</code> and <code>sys-cluster/drbd-kernel</code> so that you pull in the latest 8.3.x version.</p>
<pre class="brush: bash;">
echo &quot;sys-cluster/drbd&quot; &gt;&gt; /etc/portage/package.keywords
echo &quot;sys-cluster/drbd-kernel&quot; &gt;&gt; /etc/portage/package.keywords
</pre>
<p>Install DRBD.</p>
<pre class="brush: bash;">emerge drbd</pre>
<p>Ganeti uses DRBD in a unique way and requires the module to be loaded with specific settings. Add the autoload settings and load the module.</p>
<pre class="brush: bash;">
echo &quot;drbd minor_count=255 usermode_helper=/bin/true&quot; &gt;&gt; /etc/modules.autoload.d/kernel-2.6
modprobe drbd
</pre>
<p>If you forget this step, you will get an error similar to the one mentioned in <a href="http://groups.google.com/group/ganeti/browse_thread/thread/b811f2ba6c898570/f22f4eda4cab62ce">this email thread</a>.</p>
<h2>Install Ganeti</h2>
<p>Set the appropriate USE flags. In this case we will be using kvm with drbd.</p>
<pre class="brush: bash;">echo &quot;app-emulation/ganeti kvm drbd&quot; &gt;&gt; /etc/portage/package.use</pre>
<p>Install Ganeti (you might need to keyword other dependencies)</p>
<pre class="brush: bash;">emerge ganeti</pre>
<h2>Configure Networking</h2>
<p>There's currently two methods for <a href="http://ganeti-doc.googlecode.com/svn/ganeti-2.1/html/install.html#configuring-the-network">setting up networking</a>: <strong>bridged</strong> or <strong>routed.</strong> I picked the bridged method mainly because I'm familiar with the setup and it seemed to be the simplest.</p>
<p>Ideally you should have a <em>public</em> network that will be used for communicating with the nodes and instances from the outside, and a <em>backend</em> private network that will be used by ganeti for DRBD, migrations, etc. Assuming your <em>public</em> IP (which node1.example.org should resolve to) is 10.1.0.11 and your <em>backend</em> IP is 192.168.1.11, you should edit /etc/conf.d/net to look something like this:</p>
<pre class="brush: bash;">
bridge_br0=&quot;eth0&quot;
config_eth0=( &quot;null&quot; )

config_br0=( &quot;10.1.0.11 netmask 255.255.254.0&quot; )
routes_br0=( &quot;default gw 10.1.0.1&quot; )

# make sure eth0 is up before configuring br0
depend_br0() {
        need net.eth0
}

config_eth1=( &quot;192.168.1.11 netmask 255.255.255.0&quot; )
</pre>
<p>You can have a more complicated networking setup using VLAN tagging and bridging but I'll go over that in another blog post.</p>
<h2>Set the Hostname</h2>
<p>Ganeti is picky about hostnames, and requires that the output of hostname be fully qualified. So make sure /etc/conf.d/hostname uses the FQDN and looks like this:</p>
<pre class="brush: bash;">HOSTNAME=&quot;node1.example.org&quot;</pre>
<p><strong>NOT like this:</strong></p>
<pre class="brush: bash;">HOSTNAME=&quot;node1&quot;</pre>
<h2>Configure LVM</h2>
<p>It is recommended that you edit this line in /etc/lvm/lvm.conf</p>
<pre class="brush: bash;">filter = [ &quot;r|/dev/nbd.*|&quot;, &quot;a/.*/&quot;, &quot;r|/dev/drbd[0-9]+|&quot; ]</pre>
<p>The important part is the</p>
<pre class="brush: bash;">r|/dev/drbd[0-9]+|</pre>
<p>entry, which will prevent LVM from scanning drbd devices.</p>
<p>Now, go ahead and create an LVM volume group with the disks you plan to use for instance storage. The default name that Ganeti prefers is <em>xenvg</em> but we recommend you choose something more useful for your infrastructure (we use <em>ganeti</em>).</p>
<pre class="brush: bash;">
pvcreate /dev/sda3
lvcreate ganeti /dev/sda3
</pre>
<h2>Initialize the Cluster</h2>
<p>Now we can initialize the cluster on the first node. The command below will do the following:</p>
<ul>
<li>Set br0 as the primary interface for Ganeti communication</li>
<li>Set 192.168.1.11 as the DRBD ip for the node</li>
<li>Enable KVM</li>
<li>Set the default bridged interface for instances to br0</li>
<li>Set the default KVM settings to 2 vcpus &amp; 512M RAM</li>
<li>Set the default kernel path to /boot/guest/vmlinuz-x86_64</li>
<li>Set the master DNS name is ganeti.example.org</li>
</ul>
<pre class="brush: bash;">
gnt-cluster init --master-netdev=br0 \
  -g ganeti \
  -s 192.168.1.11 \
  --enabled-hypervisors=kvm \
  -N link=br0 \
  -B vcpus=2,memory=512M \
  -H kvm:kernel_path=/boot/guest/vmlinuz-x86_64
  ganeti.example.org
</pre>
<p>Now you have a ganeti cluster! Lets verify everything is setup correctly.</p>
<pre class="brush: bash;">
$ gnt-cluster verify
Sun May 16 22:43:00 2010 * Verifying global settings
Sun May 16 22:43:00 2010 * Gathering data (1 nodes)
Sun May 16 22:43:02 2010 * Verifying node status
Sun May 16 22:43:02 2010 * Verifying instance status
Sun May 16 22:43:02 2010 * Verifying orphan volumes
Sun May 16 22:43:02 2010 * Verifying remaining instances
Sun May 16 22:43:02 2010 * Verifying N+1 Memory redundancy
Sun May 16 22:43:02 2010 * Other Notes
Sun May 16 22:43:02 2010 * Hooks Results
</pre>
<p>Yay!</p>
<h2>SSH Keys</h2>
<p>Ganeti uses ssh to run some tasks but not for all tasks. During the initialization, it generated a new ssh key for the root user and installs it in <code>/root/.ssh/authorized_keys</code>. In our case, we manage that file with cfengine, so to work around it we copy the key as <code>/root/.ssh/authorized_keys2</code> which ssh will automatically pick up.</p>
<h2>Adding nother node</h2>
<p>To add an additional node, you duplicate the setup steps above skipping initializing the cluster. Instead run the following command:</p>
<pre class="brush: plain;">gnt-node add -s &lt;node drbd_ip&gt; &lt;node hostname&gt;</pre>
<h2>Next steps...</h2>
<p>The next steps is actually deploying new virtual machines using Ganeti. I wrote a new instance creation script called <a href="http://git.osuosl.org/?p=ganeti-instance-image.git;a=summary">ganeti-instance-image</a> which uses disk images for deployment. I'm currently working on a new project website with detailed documentation and a blog post about it as well. We're able to deploy new virtual machines (such as Ubuntu, Centos, or Gentoo) in under 30 seconds using this method!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lancealbertson.com/2010/05/installing-ganeti-on-gentoo/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>The EeePC netbooks are awesome!</title>
		<link>http://www.lancealbertson.com/2009/02/the-eeepc-netbooks-are-awesome/</link>
		<comments>http://www.lancealbertson.com/2009/02/the-eeepc-netbooks-are-awesome/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 01:36:08 +0000</pubDate>
		<dc:creator>lance</dc:creator>
				<category><![CDATA[eeepc]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[eeepc 1000]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[netbook]]></category>

		<guid isPermaLink="false">http://test.lancealbertson.com/?p=55</guid>
		<description><![CDATA[As some of you may have noticed, I usually carry around a tiny little black laptop when I'm at Beer and Blog or at a coffee shop. Since people ask about it so much, I decided to write a few blog posts about it with this being the first.
What is it? Its an EeePC 1000 [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-59" title="eeepc1000" src="http://test.lancealbertson.com/wp-content/uploads/2009/02/eeepc1000-299x300.png" alt="eeepc1000" width="246" height="246" />As some of you may have noticed, I usually carry around a tiny little black laptop when I'm at <a href="http://corvallis.beerandblog.com">Beer and Blog</a> or at a coffee shop. Since people ask about it so much, I decided to write a few blog posts about it with this being the first.</p>
<p>What is it? Its an <a href="http://eeepc.asus.com/global/product1000.html"><span><span>EeePC</span> 1000 </span></a>from <a href="http://asus.com/">ASUS</a> (the same guys that make motherboards). Its a new type of laptop that is generally referred to as a <a href="http://en.wikipedia.org/wiki/Netbook"><strong><em><span><span>netbook</span></span></em></strong></a><span> mainly because it lacks some of the features that a normal laptop has such as a <span>cdrom</span>, being heavy, a multi-core power sucking CPU, and a huge screen. Outside of that, its like any other laptop with a few other enhancements. In my case, this EeePC has these features which I love about it.</span></p>
<ul>
<li>Long battery life, claims one day computing (6+hrs)</li>
<li>Solid State Drives (<a href="http://en.wikipedia.org/wiki/Solid-state_drive">SSD</a>) - no moving parts &amp; better battery life!</li>
<li><span>Multi-touch track pad</span></li>
<li>Very usable keyboard (92% from a normal laptop)</li>
<li>Lightweight (2lbs 15oz)</li>
<li><span>Fast 1.6 <span>Ghz</span> Intel Atom processor</span></li>
<li><span>802.11n <span>Wi</span>-<span>Fi</span> and Blue-tooth</span></li>
<li><span>1.3MP web cam</span></li>
</ul>
<p><span>I've used my trusty 15" <span>PowerBook</span> for many years and I still use it, but its become more of a hassle to carry around with me. I'm a UNIX Admin, so I don't need much on my laptop (xterm, Firefox, Thunderbird, and pidgin) to get work done and the <span>EeePC</span> was a perfect fit. The </span><a href="http://en.wikipedia.org/wiki/Eeepc#History">first models</a><span> that ASUS releases for the <span>EeePC</span> didn't appeal to me since they had a screen and keyboard that was too small for me to deal with. A good friend of mine (who also has the habit of being an enabler for me :P) purchased one for himself and kept raging about it. I was actually considering getting an upgrade for my <span>PowerBook</span> but didn't want to pay $2K for a new <span>MacBook</span>, so instead I decided to get this <span>EeePC</span> forÂ  around $500 (its down to $430 now).</span></p>
<p><span><span>Asus</span> gives you two options for Operating Systems on these laptops: Windows XP or Linux (</span><a href="http://en.wikipedia.org/wiki/Xandros"><span><span>Xandros</span></span></a>). Since I'm a <a href="http://gentoo.org">Gentoo</a> developer, I decided to give it a try on this laptop. I encountered a few issues of course, but overall I have all the hardware working. The only annoying thing so far is the wireless driver not being included in the mainline kernel, but that's going to change soon I hope. There is an open source driver but its a little finicky to deal with on networks using any form of security passwords. But it <strong>does</strong> work!</p>
<p>In the upcoming posts, I plan to write about the following:</p>
<ul>
<li>How I installed Gentoo on it</li>
<li>Gentoo tweaks I use on it</li>
<li><span>Window management</span></li>
<li><span><span>Firefox</span> tweaks (yes, you need them!)</span></li>
<li><span>How <span>netbooks</span> are helping promote Linux to the masses</span></li>
</ul>
<p><span>I love my <span>EeePC</span> and you should get one too! :)</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lancealbertson.com/2009/02/the-eeepc-netbooks-are-awesome/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Switched to WordPress and here&#8217;s why</title>
		<link>http://www.lancealbertson.com/2009/01/switched-to-wordpress-and-heres-why/</link>
		<comments>http://www.lancealbertson.com/2009/01/switched-to-wordpress-and-heres-why/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 02:49:52 +0000</pubDate>
		<dc:creator>lance</dc:creator>
				<category><![CDATA[blogging]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://test.lancealbertson.com/?p=47</guid>
		<description><![CDATA[In my first post on my new blog I mentioned that I decided to use Drupal for my main blog site. As you can probably notice by the footers on this page I'm no longer using Drupal and decided to go back to WordPress. I noticed several people at the last Corvallis Beer and Blog [...]]]></description>
			<content:encoded><![CDATA[<p>In my first post on my new blog I mentioned that I decided to use <a href="http://www.drupal.org">Drupal</a> for my main blog site. As you can probably notice by the footers on this page I'm no longer using Drupal and decided to go back to <a href="http://www.wordpress.org">WordPress</a>. I noticed several people at the last <a href="http://corvallis.beerandblog.com">Corvallis Beer and Blog</a> asked me about it. That made me think I should write a blog post about my journey, or at least the short version of it.</p>
<p>There were several reasons for this but it basically boiled down to using the right tool for the right job. Drupal is an amazing platform for managing and generating dynamic html content. Its plugin and theming system is one of the best out there. Unfortunately, I'm no Drupal guru (even though we host them at the <a href="http://osuosl.org">OSL</a>) and had several issues getting some things working like I wanted.</p>
<p>So why WordPress? Well, it seems like everyone in my region raves about it plus I tried the 2.7 version and saw how simple it was to administrate and setup. The ability to install plugins without ssh'ing into the machine wasÂ  a key feature that I just loved. Here's a few of the things that I really like about WP.</p>
<ul>
<li>Installing/Upgrading plugins easily</li>
<li>Categories/Tags are easy to setup</li>
<li>TinyMCE is installed and works flawlessly</li>
<li>Comment spam is easier to handle</li>
<li>The editing flow is less busy</li>
<li>Found a theme that is simple, elegant, and easy to customize the header image</li>
</ul>
<p>While I agree Drupal can essentially do all the things above, it requires more researching, googling, tweaking, and trail and error to get it right. I spent a week or two combing the interwebs trying to find a defining site or blog post that explained everything. I found several sites that had decent information, but it wasn't explained in a manner that made sense to me. The whole concept of taxonomy is just strange to me and in WP its stupidly simple. To me Drupal is like the <a href="http://www.gentoo.org">Gentoo</a> of blog software. It's great and awesome if you know how to tweak it and use it properly, but for a blogging n00b like me, its just too much hassle for me to do deal with. I think Drupal has some great documentation, its in no comparison to the simple ones like Gentoo has (which is a large part of why people can install it).</p>
<p>So what does Drupal need to do? A few simple things would have made my life easier:</p>
<ul>
<li>Create a page or site describing in detail how to setup similar features that modern blogs like WordPress have (categories, tags, etc)</li>
<li>Implement module installation via Drupal</li>
<li>Implement module upgrades via Drupal</li>
<li>Create a Blog centric theme similar to K2</li>
<li>Make it easier for people to use Drupal but keeping it simple for normal bloggers</li>
</ul>
<p>I may go back to Drupal someday but I need to understand it more. I really think Drupal is an awesome project and its ability is far superior than any other CMS out there. But for a blog its just a bit too hardcore for the average blogger. Hopefully that will change in a few years.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lancealbertson.com/2009/01/switched-to-wordpress-and-heres-why/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
