<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>serverascode.com rss feed</title>
 <link href="http://serverascode.com/atom.xml" rel="self"/>
 <link href="http://serverascode.com/"/>
 <updated>2013-04-25T12:16:06-07:00</updated>
 <id>http://serverascode.com/</id>
 <author>
   <name>curtisgithub</name>
   <email>curtis@serverascode.com</email>
 </author>

 
 <entry>
   <title>Where to find vagrant boxes</title>
   <link href="http://serverascode.com//2013/04/25/where-to-find-vagrant-boxes.html"/>
   <updated>2013-04-25T00:00:00-07:00</updated>
   <id>http://serverascode.com/2013/04/25/where-to-find-vagrant-boxes</id>
   <content type="html">&lt;p&gt;&lt;img src=&quot;https://raw.github.com/curtisgithub/curtisgithub.github.com/master/img/IMG_0665_600px.jpg&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
(won&amp;#8217;t find any vagrant boxes in the yellowhead brewery in downtown edmonton, just beer)&lt;/p&gt;
&lt;p class=&quot;meta&quot;&gt;25 April &amp;#8211; 2013 &amp;#8211; Edmonton!&lt;/p&gt;
&lt;h1&gt;Where to find vagrant boxes&lt;/h1&gt;
&lt;p&gt;This is just a quick post on a couple of places I know to find &lt;a href=&quot;htp://vagrantup.com&quot;&gt;vagrant&lt;/a&gt; boxes.&lt;/p&gt;
&lt;h2&gt;Ubuntu cloud images&lt;/h2&gt;
&lt;p&gt;Today ubuntu 13.04, aka raring ringtail, was &lt;a href=&quot;https://wiki.ubuntu.com/RaringRingtail/ReleaseNotes?action=show&amp;amp;redirect=RaringRingtail%2FTechnicalOverview&quot;&gt;released&lt;/a&gt; But did you know that ubuntu actually provides vagrant specific boxes, ones that are built every day? They sure do!&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://cloud-images.ubuntu.com/vagrant/raring/current/&quot;&gt;http://cloud-images.ubuntu.com/vagrant/raring/current/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So it&amp;#8217;s quite simple to try out raring just by using vagrant and ubuntu&amp;#8217;s cloud images.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ mkdir raring; cd raring
$ vagrant init
# Edit Vagrantfile and add the below
$ grep box Vagrantfile | grep -v &quot;#&quot;
  config.vm.box = &quot;raring&quot;
  config.vm.box_url = &quot;http://cloud-images.ubuntu.com/vagrant/raring/current/raring-server-cloudimg-amd64-vagrant-disk1.box&quot;

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
SNIP!

#
# Now we can ssh into the box
#

$ vagrant ssh
Welcome to Ubuntu 13.04 (GNU/Linux 3.8.0-19-generic x86_64)
SNIP!
vagrant@vagrant-ubuntu-raring-64:~$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=13.04
DISTRIB_CODENAME=raring
DISTRIB_DESCRIPTION=&quot;Ubuntu 13.04&quot;
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Nice. That was easy.&lt;/p&gt;
&lt;h2&gt;Vagrantbox.es&lt;/h2&gt;
&lt;p&gt;Most vagrant users will know about this site, but I add it here for completeness.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.vagrantbox.es/&quot;&gt;http://www.vagrantbox.es/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Obviously for testing/development using these images is just fine, but most shops will want to build their own production images. I think.&lt;/p&gt;
&lt;h2&gt;Make your own&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/jedi4ever/veewee&quot;&gt;Veewee&lt;/a&gt; is a good way to automate image creation. I&amp;#8217;ve used it quite a bit, but that was a few months ago. It can take a bit of work to get it up and running.&lt;/p&gt;
&lt;p&gt;Puppet labs also &lt;a href=&quot;https://github.com/puppetlabs/puppet-vagrant-boxes&quot;&gt;publishes&lt;/a&gt; some information on creating vagrant boxes, as well as &lt;a href=&quot;http://puppet-vagrant-boxes.puppetlabs.com/&quot;&gt;several pre-built boxes&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Fedora&lt;/h2&gt;
&lt;p&gt;Unfortunately I can&amp;#8217;t seem to find official fedora or redhat vagrant boxes, which is too bad.&lt;/p&gt;
&lt;p&gt;But, fedora is working on it!&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://fedoraproject.org/wiki/Features/FirstClassCloudImages&quot;&gt;http://fedoraproject.org/wiki/Features/FirstClassCloudImages&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I&amp;#8217;ll try to update this page as I find more resources. Please feel free to comment with suggestions. :)&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;
Curtis.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>More over committing with kvm</title>
   <link href="http://serverascode.com//2013/04/12/more-overcommitting-kvm.html"/>
   <updated>2013-04-12T00:00:00-07:00</updated>
   <id>http://serverascode.com/2013/04/12/more-overcommitting-kvm</id>
   <content type="html">&lt;p&gt;&lt;img src=&quot;https://raw.github.com/curtisgithub/curtisgithub.github.com/master/img/devils_tower_living_room.jpg&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
(very similar to one of my graphs below&amp;#8230;coincidence?)&lt;/p&gt;
&lt;p class=&quot;meta&quot;&gt;12 April &amp;#8211; 2013 &amp;#8211; Edmonton!&lt;/p&gt;
&lt;h1&gt;More over committing with kvm&lt;/h1&gt;
&lt;p&gt;Previously I wrote about &lt;a href=&quot;http://serverascode.com/2013/02/20/overcommitting-with-kvm.html&quot;&gt;overcommiting with kvm&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In this post I&amp;#8217;m still doing the exact same thing, but now I&amp;#8217;m keep track of load and iops.&lt;/p&gt;
&lt;h2&gt;Basic environment&lt;/h2&gt;
&lt;p&gt;What we have is:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;a single Dell C6220 node
	&lt;ul&gt;
		&lt;li&gt;32 threads&lt;/li&gt;
		&lt;li&gt;128GB of memory&lt;/li&gt;
		&lt;li&gt;two Intel 520 SSDs in a stripe&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;ubuntu precise64 cloud image&lt;/li&gt;
	&lt;li&gt;qcow2 image snapshots&lt;/li&gt;
	&lt;li&gt;open vSsitch&lt;/li&gt;
	&lt;li&gt;dnsmasq providing ip addresses&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;ansible.cc&quot;&gt;ansible&lt;/a&gt; for running stress tests&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;What we&amp;#8217;re going to do is boot 300 2GB instances based off the same image.&lt;/p&gt;
&lt;h2&gt;Get setup&lt;/h2&gt;
&lt;p&gt;First thing we do is reboot, just to start fresh. It doesn&amp;#8217;t really matter, but I like to start with no swap being used, just to show exactly what happens when we boot hundreds of vms.&lt;/p&gt;
&lt;p&gt;First set ksm to do more scanning faster.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
root# echo &quot;20000&quot; &amp;gt; /sys/kernel/mm/ksm/pages_to_scan
root# echo &quot;20&quot; &amp;gt; /sys/kernel/mm/ksm/sleep_millisecs
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Next&amp;#8212;re-setup vswitch, as I have a kind of &lt;a href=&quot;http://serverascode.com/2013/02/21/openvswitch.html&quot;&gt;rigged-up configuration&lt;/a&gt; going, which needs some care after a reboot, so obviously this is just for testing, not production. :)&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ sudo ifconfig br-int
$ sudo ifconfig br-int up
$ sudo ifconfig br-int 192.168.100.10 netmask 255.255.255.0
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;That ip is what dnsmasq is set to listen on.&lt;/p&gt;
&lt;p&gt;I was running into an error where some taps existed already, and the boot script would start failing. I&amp;#8217;m not sure why, and I just ended up deleting all the ports in the switch for that particular bridge, br-int.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
#
# Show/count all the ports
# 

$ sudo ovs-vsctl list-ports br-int | wc -l
300

#
# Delete some ports
#

$ sudo for i in $(seq 1 300); do ovs-vsctl del-port br-int tap$i; done
# This takes a while...
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Now restart to make sure dnsmasq is listening on 102.168.100.10.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ sudo service dnsmasq stop  
 * Stopping DNS forwarder and DHCP server dnsmasq
 [ OK ] 

#
# Now with the right br-int config
#

$ sudo dnsmasq start
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Next&amp;#8212;time to start hundreds of vms!&lt;/p&gt;
&lt;h2&gt;Start virtual machines&lt;/h2&gt;
&lt;p&gt;Ok, now that we have networking (hopefully) all set up, we&amp;#8217;re going to boot 300 vms, 10 seconds apart.&lt;/p&gt;
&lt;p&gt;Thankfully these are linux vms so they don&amp;#8217;t really cause a boot storm, unlike windows 7.&lt;/p&gt;
&lt;p&gt;If I booted 30 (note: 30, not 300) windows 7 vms the server&amp;#8217;s load would get so high that the system would grind to a halt. I know because I&amp;#8217;ve tried it. Even though this is an ubuntu cloud image, which hopefully is specifically setup to use less iops, and knowing that is perhaps an unfair advantage, I still have no problem saying that windows images use more resources than linux images.&lt;/p&gt;
&lt;p&gt;Start instances!&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
root# ./kvm_ubuntu_openvswitch.sh 
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;After that completes there are ~300 vms running.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ ps ax | grep &quot;kvm -drive&quot; | wc -l
301
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;We can run tests on those vms.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;span class=&quot;caps&quot;&gt;NOTE&lt;/span&gt;: I haven&amp;#8217;t taken the time to tell dnsmasq to send dhcp information for more than a /24, so we only have 240 vms with an ip address.&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ wc -l /var/lib/misc/dnsmasq.leases 
240 /var/lib/misc/dnsmasq.leases
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;So when I run the stress test with ansible, we can only run it across 240 vms, even though 300 are running, it&amp;#8217;s just that 60 of them don&amp;#8217;t have ips.&lt;/p&gt;
&lt;h2&gt;Stress test&lt;/h2&gt;
&lt;p&gt;In my previous post a commenter suggested running &lt;em&gt;stress&lt;/em&gt;, so that&amp;#8217;s what I&amp;#8217;m doing.&lt;/p&gt;
&lt;p&gt;Using ansible, I&amp;#8217;ll run this stress command:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
shell stress --cpu 1 --io 1 --vm 1 --vm-bytes 1024M --timeout 10s
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;across 20 vms at a time, running over all the vms that are reported by an inventory script that looks at the ips in the dnsmasq.leases file.&lt;/p&gt;
&lt;p&gt;Here&amp;#8217;s an example of running ansible&amp;#8217;s ping module across all those hosts.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
 $ ansible all -c ssh -i ./inventory.py -m ping -u ubuntu
 SNIP!
 192.168.100.98 | success &amp;gt;&amp;gt; {
    &quot;changed&quot;: false, 
    &quot;ping&quot;: &quot;pong&quot;
}

192.168.100.99 | success &amp;gt;&amp;gt; {
    &quot;changed&quot;: false, 
    &quot;ping&quot;: &quot;pong&quot;
}

192.168.100.97 | success &amp;gt;&amp;gt; {
    &quot;changed&quot;: false, 
    &quot;ping&quot;: &quot;pong&quot;
}
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Note that the ips aren&amp;#8217;t in order, so .97 is the last host in this run. Suffice it to say that all 240 hosts &amp;#8220;ponged&amp;#8221; back. :)&lt;/p&gt;
&lt;p&gt;Here&amp;#8217;s the simple ansible playbook I&amp;#8217;ll be running. These vms don&amp;#8217;t have access to the internet, and don&amp;#8217;t have stress installed, so I&amp;#8217;m just copying over the package and installing it &amp;#8220;manually&amp;#8221;, and then running the stress command.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ cat load.yml 
---
- hosts: all
  user: ubuntu
  sudo: yes
  tasks:
  - name: check if stress is already installed
    action: shell which stress
    register: stress_installed
    ignore_errors: True
  - name: copy stress deb to server
    action: copy src=files/stress_1.0.1-1build1_amd64.deb \
    dest=/tmp/stress_1.0.1-1build1_amd64.deb
    only_if: ${stress_installed.rc} &amp;gt; 0
  - name: install stress
    action: shell dpkg -i /tmp/stress_1.0.1-1build1_amd64.deb
    only_if: ${stress_installed.rc} &amp;gt; 0
  - name: run stress
    action: shell stress --cpu 1 --io 1 --vm 1 --vm-bytes 1024M --timeout 10s
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Let&amp;#8217;s run it across 20 vms at a time and see what happens.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ ansible-playbook -u ubuntu -c ssh -i ./inventory.py -f 20 ./load.yml

PLAY [all] ********************* 

GATHERING FACTS ********************* 
ok: [192.168.100.110]
ok: [192.168.100.113]
ok: [192.168.100.117]
SNIP!    
192.168.100.97                 : ok=3    changed=2    unreachable=0    failed=0    
192.168.100.98                 : ok=3    changed=2    unreachable=0    failed=0    
192.168.100.99                 : ok=3    changed=2    unreachable=0    failed=0  

# Done!
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Ansible can be fun. :)&lt;/p&gt;
&lt;h2&gt;Graphs&lt;/h2&gt;
&lt;p&gt;Below are a rather poor set of graphs. Forgive me as I&amp;#8217;m a newbie with gnuplot.&lt;/p&gt;
&lt;p&gt;As soon as the load starts going up, that is when the test starts, and as soon as it&amp;#8217;s on its way down, that&amp;#8217;s when it ends. :)&lt;/p&gt;
&lt;p&gt;First run:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://raw.github.com/curtisgithub/curtisgithub.github.com/master/img/kvm_overcommitting_load_1.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Second run:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://raw.github.com/curtisgithub/curtisgithub.github.com/master/img/kvm_overcommitting_load_2.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Last load run:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://raw.github.com/curtisgithub/curtisgithub.github.com/master/img/kvm_overcommitting_load_3.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;So with three runs we see a load of about 30, where a load of 32 would be Ok with me, given we have 32 threads in this server.&lt;/p&gt;
&lt;p&gt;Also, let&amp;#8217;s watch some iops.&lt;/p&gt;
&lt;p&gt;I gathered iops data using &lt;em&gt;iostat&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://raw.github.com/curtisgithub/curtisgithub.github.com/master/img/kvm_overcommitting_io_1.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Ooof, that&amp;#8217;s a misleading graph, isn&amp;#8217;t it? An increase of one iop is absolutely nothing. A rounding error perhaps.&lt;/p&gt;
&lt;p&gt;So&amp;#8212;the iops don&amp;#8217;t change during the test run, I guess because stress isn&amp;#8217;t running any io test, even though we are running with &lt;em&gt;&amp;#8212;io 1&lt;/em&gt;. That said, I&amp;#8217;m not sure what an io setting of 1 with stress does, something to look into. Perhaps running some tests with &lt;a href=&quot;http://freecode.com/projects/fio&quot;&gt;fio&lt;/a&gt; is something to do in the future.&lt;/p&gt;
&lt;p&gt;But that graph sure &lt;em&gt;looks&lt;/em&gt; like something&amp;#8217;s happening, even though the iops only increase by one. I probably shouldn&amp;#8217;t include that graph here, but part of what I&amp;#8217;m doing is learning about how to display the results of a performance test.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;First off, I&amp;#8217;m not a scientist, didn&amp;#8217;t take statistics, etc. So I&amp;#8217;m not sure what kind of conclusions can be made here. All I can say for sure is that fours runs of the stress command across 20 virtual machines in parallel, over a total of 240 vms all running on the same &lt;span class=&quot;caps&quot;&gt;KVM&lt;/span&gt;-based host, seems to bring load up to somewhere around 30 to 35, which is acceptable to me.&lt;/p&gt;
&lt;p&gt;Mostly this has generated more questions&amp;#8212;such as what exactly is stress doing? How do we know when the vms are too unresponsive? What kind of overcommitting numbers do we want? What would happen if we used fio instead of &lt;em&gt;&amp;#8212;io 1&lt;/em&gt; with stress? Do red lines in a graph make things seem worse? :)&lt;/p&gt;
&lt;p&gt;As usual, if anyone has any suggestions, questions, or critiques let me know in the comments!&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;
Curtis.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Vagrant and vmware</title>
   <link href="http://serverascode.com//2013/04/11/vagrant-and-vmware.html"/>
   <updated>2013-04-11T00:00:00-07:00</updated>
   <id>http://serverascode.com/2013/04/11/vagrant-and-vmware</id>
   <content type="html">&lt;p&gt;&lt;img src=&quot;https://raw.github.com/curtisgithub/curtisgithub.github.com/master/img/edmonton_pin.jpg&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
&lt;em&gt;(close up of an old map with many pin holes in edmonton, can barely even read it! Look, Barrhead too!)&lt;/em&gt;&lt;/p&gt;
&lt;p class=&quot;meta&quot;&gt;11 April &amp;#8211; 2013 &amp;#8211; Edmonton!&lt;/p&gt;
&lt;h1&gt;Vagrant and vmware&lt;/h1&gt;
&lt;p&gt;After &lt;span class=&quot;caps&quot;&gt;IRC&lt;/span&gt;, &lt;a href=&quot;http://vagrantup.com&quot;&gt;vagrant&lt;/a&gt; is probably my most important development tool, mostly because I like to use and investigate openstack, which means using a lot of virtual machines.&lt;/p&gt;
&lt;p&gt;Recently Hashicorp released &lt;a href=&quot;http://www.hashicorp.com/blog&quot;&gt;Vagrant 1.1&lt;/a&gt; which introduces the idea of &lt;a href=&quot;http://docs.vagrantup.com/v2/providers/index.html&quot;&gt;providers&lt;/a&gt;. Previously vagrant only supported virtualbox, but now, with 1.1, plugins can be written to support almost any virtualization system that has a command line or &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; interface of some sort.&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://docs.vagrantup.com/v2/vmware-fusion/index.html&quot;&gt;VMWare Fusion&lt;/a&gt; (note that this is a paid plugin)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://gigaom.com/2013/02/13/developers-rejoice-vagrant-finds-a-home-in-the-amazon-cloud/&quot;&gt;&lt;span class=&quot;caps&quot;&gt;AWS&lt;/span&gt;&lt;/a&gt; (&lt;a href=&quot;https://github.com/mitchellh/vagrant-aws&quot;&gt;github repo&lt;/a&gt;)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/mitchellh/vagrant-rackspace&quot;&gt;RackSpace&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/cloudbau/vagrant-openstack&quot;&gt;OpenStack&lt;/a&gt; (based on the rackspace plugin)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The provider I&amp;#8217;m going to focus on here is vmware fusion.&lt;/p&gt;
&lt;h2&gt;vmware_fusion&lt;/h2&gt;
&lt;p&gt;One of the things I&amp;#8217;ve learned about using brand new technologies is that they often don&amp;#8217;t work and/or don&amp;#8217;t have any documentation, which frankly are about the same thing to me. That sounds like a kind of grumpy thing to say, but I&amp;#8217;m kind of grumpy today. :)&lt;/p&gt;
&lt;p&gt;Regardless, I went ahead and bought vmware fusion (which is cheap, &lt;span class=&quot;caps&quot;&gt;BTW&lt;/span&gt;, at $49) and also the &lt;a href=&quot;http://www.vagrantup.com/vmware&quot;&gt;vagrant vmware_fusion plugin&lt;/a&gt; (which is $79).&lt;/p&gt;
&lt;p&gt;I think this is the first time that I&amp;#8217;ve encountered a plugin that was more expensive than the actual application it was plugging into, but I can understand the pricing because Fusion is probably under-valued, or at least under-priced. Plus the $79 goes towards the development of vagrant, which I use &lt;em&gt;a lot&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Recently I deployed &lt;a href=&quot;http://serverascode.com/2013/03/13/first-look-packstack.html&quot;&gt;packstack&lt;/a&gt; via vagrant and &lt;strong&gt;virtualbox&lt;/strong&gt;, and I wanted to do the same with vmware_fusion, but I ran into a few problems, which I&amp;#8217;m going to spend the rest of the post detailing.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;span class=&quot;caps&quot;&gt;NOTE&lt;/span&gt;: I should say that nothing here is the vmware_fusion plugins fault. I&amp;#8217;m not blaming the plugin at all. Rather just detailing some of the pain points I&amp;#8217;ve encountered, which will no doubt disappear as more people use vmware fusion and vagrant together, and as I get my act together. I&amp;#8217;ll try to update this post as I find out new information. :)&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;Routes collide!&lt;/h2&gt;
&lt;p&gt;I have both vmware fusion and virtualbox installed on my macbook retina. Unfortunately, virtualbox has an iron grip on its networks.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;VirtualBox hangs on to its network devices (&amp;#8220;vboxnet&amp;#8221;) for dear life. I haven&amp;#8217;t figured out yet how to actually get rid of them except restarting your computer. &amp;#8212; &lt;a href=&quot;https://groups.google.com/d/msg/vagrant-up/DKxnHU4_aOg/68JzFjJ-14sJ&quot;&gt;Mitchell Hashimoto&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If you encounter the below error, either change subnets (perhaps in virtualbox, perhaps in the vagrantfile, not sure) or reboot.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ vagrant up apis --provider=vmware_fusion
Bringing machine 'apis' up with 'vmware_fusion' provider...

[apis] Verifying vmnet devices are healthy...
The VMware network device 'vmnet2' can't be started because
its routes collide with another device: 'vboxnet'. Please

either fix the settings of the VMware network device or stop the
colliding device. Your machine can't be started while VMware
networking is broken.
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Again, not vmware_fusion&amp;#8217;s fault, but still a pain. I can&amp;#8217;t simply un-install virtualbox&amp;#8230;yet.&lt;/p&gt;
&lt;h2&gt;vmx settings&lt;/h2&gt;
&lt;p&gt;Often we want to change the settings in the virtual machine, settings such as memory, number of cpus, etc.&lt;/p&gt;
&lt;p&gt;Unfortunately vmx is an undocumented format.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;VMX&lt;/span&gt; is an undocumented format. You&amp;#8217;ll have to google, unfortunately. :) &amp;#8212; &lt;a href=&quot;https://groups.google.com/d/msg/vagrant-up/DKxnHU4_aOg/68JzFjJ-14sJ&quot;&gt;Mitchell Hashimoto&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;But at the very least here is how to set memory:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
config.vm.provider :vmware_fusion do |p|
  p.vmx['memsize'] = '2048'
end
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;As more people use vmware_fusion there will be better documentation on vmx settings.&lt;/p&gt;
&lt;h2&gt;Centos6 box&lt;/h2&gt;
&lt;p&gt;While Hashicorp has conveniently provided a &lt;a href=&quot;http://files.vagrantup.com/precise64.box&quot;&gt;base precise64&lt;/a&gt; box for vagrant, there isn&amp;#8217;t an official centos box. I have previously tried to create a centos6 box for vagrant, but haven&amp;#8217;t had much luck, and that was with vagrant &amp;lt; 1.1 and there is even less documentation on the process now.&lt;/p&gt;
&lt;p&gt;Then I noticed that &lt;a href=&quot;http://www.vagrantbox.es/&quot;&gt;vagrantbox.es&lt;/a&gt; (which is a very handy site!) has a centos6 box for vmware_fusion, so I grabbed that:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://dl.dropbox.com/u/5721940/vagrant-boxes/vagrant-centos-6.4-x86_64-vmware_fusion.box&quot; title=&quot;VMware Tools, Chef 11.4.0, Puppet 3.1.1&quot;&gt;CentOS 6.4 x86_64 Minimal VMware Fusion&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Unfortunately it doesn&amp;#8217;t seem to work when multiple interfaces are specified in the vagrantfile, so that doesn&amp;#8217;t help me much on my quest to run packstack in vmware_fusion. If anyone knows of a good centos6 box, or notices that I&amp;#8217;m doing something wrong, please let me know!&lt;/p&gt;
&lt;p&gt;Here&amp;#8217;s the networking part of the config:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
config.vm.network :private_network, ip: &quot;172.10.0.200&quot;, :netmask =&amp;gt; &quot;255.255.0.0&quot;
config.vm.network :private_network, ip: &quot;10.10.0.200&quot;, :netmask =&amp;gt; &quot;255.255.0.0&quot; 
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Let&amp;#8217;s boot it:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ vagrant up --provider=vmware_fusion
Bringing machine 'default' up with 'vmware_fusion' provider...
[default] Cloning Fusion VM: 'centos65fusion'. This can take some time...
[default] Verifying vmnet devices are healthy...
[default] Preparing network adapters...
[default] Starting the VMware VM...
[default] Waiting for the VM to finish booting...
[default] The machine is booted and ready!
[default] Forwarding ports...
[default] -- 22 =&amp;gt; 2222
[default] Configuring network adapters within the VM...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

/sbin/ifup eth1 2&amp;gt; /dev/null
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Ooops, shouldn&amp;#8217;t be seeing the failed command.&lt;/p&gt;
&lt;p&gt;What&amp;#8217;s the networking like?&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ vagrant ssh
[vagrant@vagrant-centos-6 ~]$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:24:6A:AD  
          inet addr:192.168.134.146  Bcast:192.168.134.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe24:6aad/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:432 errors:426 dropped:0 overruns:0 frame:0
          TX packets:293 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:48690 (47.5 KiB)  TX bytes:38046 (37.1 KiB)
          Interrupt:19 Base address:0x2024 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Nope that&amp;#8217;s not what I wanted at all.&lt;/p&gt;
&lt;p&gt;Ok, now let&amp;#8217;s use the exact same vagrantfile but with the offical vmware_fusion ubuntu box.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
config.vm.box = &quot;precise64&quot;
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Vagrant up!&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;

#
# Destroy the old one
# 

$ vagrant destroy
[default] Stopping the VMware VM...
[default] Deleting the VM...

#
# Edit the vagrantfile to use precise64 basebox
#

$ vi Vagrantfile

#
# Boot it
# 

$ vagrant up --provider=vmware_fusion
Bringing machine 'default' up with 'vmware_fusion' provider...
[default] Cloning Fusion VM: 'precise64'. This can take some time...
[default] Verifying vmnet devices are healthy...
[default] Preparing network adapters...
[default] Starting the VMware VM...
[default] Waiting for the VM to finish booting...
[default] The machine is booted and ready!
[default] Forwarding ports...
[default] -- 22 =&amp;gt; 2222
[default] Configuring network adapters within the VM...
[default] Enabling and configuring shared folders...
[default] -- vagrant-root: /Users/curtis/working/vagrant/grizzly

#
# SSH into the box...
# 

$ vagrant ssh
Welcome to Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-29-virtual x86_64)

 * Documentation:  https://help.ubuntu.com/
Last login: Thu Jan 31 13:48:53 2013
vagrant@precise64:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0c:29:29:dc:aa  
          inet addr:192.168.134.139  Bcast:192.168.134.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe29:dcaa/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:375 errors:367 dropped:0 overruns:0 frame:0
          TX packets:241 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:41473 (41.4 KB)  TX bytes:33220 (33.2 KB)
          Interrupt:18 Base address:0x2024 

eth1      Link encap:Ethernet  HWaddr 00:0c:29:29:dc:b4  
          inet addr:172.10.0.200  Bcast:172.10.255.255  Mask:255.255.0.0
          inet6 addr: fe80::20c:29ff:fe29:dcb4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1 errors:1 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:209 (209.0 B)  TX bytes:468 (468.0 B)
          Interrupt:16 Base address:0x20a4 

eth2      Link encap:Ethernet  HWaddr 00:0c:29:29:dc:be  
          inet addr:10.10.0.200  Bcast:10.10.255.255  Mask:255.255.0.0
          inet6 addr: fe80::20c:29ff:fe29:dcbe/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1 errors:1 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:209 (209.0 B)  TX bytes:468 (468.0 B)
          Interrupt:17 Base address:0x2424 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;That&amp;#8217;s what I expect to see.&lt;/p&gt;
&lt;h2&gt;Example vagrantfiles&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;&lt;span class=&quot;caps&quot;&gt;UPDATE&lt;/span&gt; (April 18th, 2013): This Vagrantfile now doesn&amp;#8217;t seem to work with Vagrant 1.2&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I have been searching for good examples of vagrantfiles that use vmware_fusion.&lt;/p&gt;
&lt;p&gt;So far I&amp;#8217;ve just found this one:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/uksysadmin/OpenStackCookBook-1/blob/master/Vagrantfile&quot;&gt;https://github.com/uksysadmin/OpenStackCookBook-1/blob/master/Vagrantfile&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But I will keep an eye out for other examples.&lt;/p&gt;
&lt;h2&gt;&lt;span class=&quot;caps&quot;&gt;UPDATE&lt;/span&gt; (April 18th, 2013): New network problem&lt;/h2&gt;
&lt;p&gt;This is a new one&amp;#8230;now this can&amp;#8217;t be virtualbox&amp;#8217;s fault.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ vagrant up --provider=vmware_fusion
Bringing machine 'percona0' up with 'vmware_fusion' provider...
Bringing machine 'percona1' up with 'vmware_fusion' provider...
Bringing machine 'percona2' up with 'vmware_fusion' provider...
Bringing machine 'haproxy0' up with 'vmware_fusion' provider...
Bringing machine 'haproxy1' up with 'vmware_fusion' provider...
[percona0] Cloning Fusion VM: 'precise64'. This can take some time...
[percona0] Verifying vmnet devices are healthy...
The VMware network device 'vmnet1' can't be started because
its routes collide with another device: 'vmnet13'. Please
either fix the settings of the VMware network device or stop the
colliding device. Your machine can't be started while VMware
networking is broken.
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Instructions from Mitchell, edit &lt;em&gt;/Library/Preferences/VMware\ Fusion/networking&lt;/em&gt; and:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Get rid of all the lines in that file &lt;em&gt;except&lt;/em&gt; the ones that start with &amp;#8220;answer VNET_1_&amp;#8221; or &amp;#8220;answer VNET_8_&amp;#8221;. We want to keep those, as they&amp;#8217;re the default networks that ship with Fusion. After that, open VMware Fusion.app, then run these commands in a separate terminal:&lt;/p&gt;
&lt;p&gt;sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli &amp;#8212;stop&lt;br /&gt;
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli &amp;#8212;configure&lt;br /&gt;
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli &amp;#8212;start&lt;/p&gt;
&lt;p&gt;Then run&lt;/p&gt;
&lt;p&gt;sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli &amp;#8212;status&lt;/p&gt;
&lt;p&gt;And tell me the output. Should only have the vmnet1/vmnet8 devices. After&lt;br /&gt;
&lt;span class=&quot;caps&quot;&gt;THAT&lt;/span&gt; you shoudl be good to go again.&lt;/p&gt;
&lt;p&gt;VMware networking is an absolute nightmare. &amp;#8211; &lt;a href=&quot;https://mail.google.com/mail/u/2/?ui=2&amp;amp;ik=7b53664106&amp;amp;view=om&amp;amp;th=13e1f0d872dd857b&quot;&gt;Mitchell&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It sucks that it&amp;#8217;s an edge case, but I still hope that there is some code added to help in situations like this. Thanks to Mitchell for responding on the mailing list, as now I can continue on with other problems. :)&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;I love vagrant, but am having a heck of a time with vmware_fusion and centos6. Having said that, I &lt;strong&gt;&lt;span class=&quot;caps&quot;&gt;KNOW&lt;/span&gt;&lt;/strong&gt; that things are going to get better as I learn and as more people start using vagrant and vmware_fusion.&lt;/p&gt;
&lt;p&gt;Hats off to Mitchell for creating a great development tool, one that I use every day!&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;
Curtis.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Vagrant and openstack</title>
   <link href="http://serverascode.com//2013/04/11/vagrant-and-openstack.html"/>
   <updated>2013-04-11T00:00:00-07:00</updated>
   <id>http://serverascode.com/2013/04/11/vagrant-and-openstack</id>
   <content type="html">&lt;p&gt;&lt;img src=&quot;https://raw.github.com/curtisgithub/curtisgithub.github.com/master/img/inception.jpg&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
&lt;em&gt;(it&amp;#8217;s ok, we know the &lt;a href=&quot;http://en.wikipedia.org/wiki/Holographic_principle&quot;&gt;universe is a hologram&lt;/a&gt; anyways)&lt;/em&gt;&lt;/p&gt;
&lt;p class=&quot;meta&quot;&gt;11 April &amp;#8211; 2013 &amp;#8211; Edmonton!&lt;/p&gt;
&lt;h1&gt;Vagrant and openstack&lt;/h1&gt;
&lt;p&gt;Earlier I wrote a post on using &lt;a href=&quot;http://serverascode.com/2013/04/11/vagrant-and-vmware.html&quot;&gt;vmware fusion and vagrant&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Now I&amp;#8217;m going to use vagrant and the vmware_fusion plugin to create a precise64 virtual machine, in which I will install &lt;a href=&quot;http://devstack.org&quot;&gt;devstack&lt;/a&gt;, and then I will use the vagrant and openstack plugin to boot a cirros vm inside the devstack vm. Meta&amp;#8230;inception&amp;#8230;whatever you want to call it. :)&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;span class=&quot;caps&quot;&gt;NOTE&lt;/span&gt;: Make sure your precise64 vm has more than the default memory of 512&amp;#8212;I set mine to 2048. A bit more memory might be nice too, if you&amp;#8217;ve got it available.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;span class=&quot;caps&quot;&gt;NOTE&lt;/span&gt;: &lt;a href=&quot;http://blog.aaronorosen.com/building-a-multi-tier-application-with-openstack/&quot;&gt;Here is a great post&lt;/a&gt; to follow on using devstack and grizzly and quantum, much of which I am reusing here.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;Why?&lt;/h2&gt;
&lt;p&gt;There is no spoon.&lt;/p&gt;
&lt;h2&gt;Install devstack&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://devstack.org&quot;&gt;Devstack&lt;/a&gt; is a really useful development environment for openstack. If you want to try out the new features in openstack grizzly, this is an easy way.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
#
# Create the vm
#

$ vagrant up --provider=vmware_fusion
Bringing machine 'default' up with 'vmware_fusion' provider...
SNIP!

#
# Login to the vm
#

$ vagrant ssh
Welcome to Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-29-virtual x86_64)
 * Documentation:  https://help.ubuntu.com/
Last login: Thu Apr 11 10:14:43 2013 from 192.168.134.1
vagrant@precise64:~$ sudo apt-get update
Ign http://security.ubuntu.com precise-security InRelease
Ign http://us.archive.ubuntu.com precise InRelease
Ign http://us.archive.ubuntu.com precise-updates InRelease
SNIP!
$ sudo apt-get install git
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  git-man libcurl3-gnutls liberror-perl librtmp0 rsync
SNIP!
$ git clone git://github.com/openstack-dev/devstack.git
Cloning into 'devstack'...

#
# Setup devstack with a localrc file
# 

vagrant@precise64:~$ cd devstack
vagrant@precise64:~/devstack$ cat localrc
ENABLED_SERVICES=g-api,g-reg,key,n-api,n-crt,n-obj,n-cpu,n-sch,n-cauth, \
horizon,mysql,rabbit,sysstat,cinder,c-api,c-vol,c-sch,n-cond,quantum,q-svc, \
q-agt,q-dhcp,q-l3,q-meta,q-lbaas,n-novnc,n-xvnc,q-lbaas
DATABASE_PASSWORD=password
RABBIT_PASSWORD=password
SERVICE_TOKEN=password
SERVICE_PASSWORD=password
ADMIN_PASSWORD=password

#
# Run stack.sh
# 

vagrant@precise64:~/devstack$ ./stack.sh
Traceback (most recent call last):
  File &quot;&amp;lt;string&amp;gt;&quot;, line 2, in &amp;lt;module&amp;gt;
ImportError: No module named netaddr
Traceback (most recent call last):
  File &quot;&amp;lt;string&amp;gt;&quot;, line 2, in &amp;lt;module&amp;gt;
ImportError: No module named netaddr
SNIP!

# That error doesn't look good...oh well let's continue...

# hit enter a few times
# Go for a walk, get a coffee, do some vacuuming...

Horizon is now available at http://192.168.134.139/
Keystone is serving at http://192.168.134.139:5000/v2.0/
Examples on using novaclient command line is in exercise.sh
The default users are: admin and demo
The password: ed5cb213364bb0fd15a9
This is your host ip: 192.168.134.139
stack.sh completed in 694 seconds.

&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Now that devstack seems to have completed the install, check and see if basic openstack commands are working.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
# 
# Source the user, password file generated by devstack
#

vagrant@precise64:~/devstack$ source openrc 

#
# And lets see what's running and is available
#

vagrant@precise64:~/devstack$ nova list
+----+------+--------+----------+
| ID | Name | Status | Networks |
+----+------+--------+----------+
+----+------+--------+----------+
vagrant@precise64:~/devstack$ nova image-list
+--------------------------------------+---------------------------------+--------+--------+
| ID                                   | Name                            | Status | Server |
+--------------------------------------+---------------------------------+--------+--------+
| 73f320dd-5769-4ec2-a0e7-e44979070e8c | cirros-0.3.1-x86_64-uec         | ACTIVE |        |
| 4af449b1-a70b-4857-93ea-9690bc5db779 | cirros-0.3.1-x86_64-uec-kernel  | ACTIVE |        |
| 017e58df-27bc-4bb4-89d3-f133760a3f0e | cirros-0.3.1-x86_64-uec-ramdisk | ACTIVE |        |
+--------------------------------------+---------------------------------+--------+--------+

#
# Oooh, we have quantum too!
#

vagrant@precise64:~$ quantum net-list
+--------------------------------------+---------+--------------------------------------------------+
| id                                   | name    | subnets                                          |
+--------------------------------------+---------+--------------------------------------------------+
| 5a39203e-3d83-4d47-a75e-9ec98f5ed595 | private | dae29b88-1562-42e4-8e30-0ecce7b40f47 10.0.0.0/24 |
| a608d79d-ace8-4335-81c3-3490393d7700 | public  | cc058059-b342-41d9-8c68-98d6feedcfbd             |
+--------------------------------------+---------+--------------------------------------------------+
vagrant@precise64:~$ quantum subnet-list
+--------------------------------------+------+-------------+--------------------------------------------+
| id                                   | name | cidr        | allocation_pools                           |
+--------------------------------------+------+-------------+--------------------------------------------+
| dae29b88-1562-42e4-8e30-0ecce7b40f47 |      | 10.0.0.0/24 | {&quot;start&quot;: &quot;10.0.0.2&quot;, &quot;end&quot;: &quot;10.0.0.254&quot;} |
+--------------------------------------+------+-------------+--------------------------------------------+

&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Cool beans.&lt;/p&gt;
&lt;h2&gt;Using vagrant with openstack&lt;/h2&gt;
&lt;p&gt;First, get the vagrant-openstack plugin.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ vagrant plugin install vagrant-openstack
Installing the 'vagrant-openstack' plugin. This can take a few minutes...
Installed the plugin 'vagrant-openstack (0.0.2)'!
$ vagrant plugin list
vagrant-openstack (0.0.2)
vagrant-vmware-fusion (0.4.2)
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Before we get too far, let&amp;#8217;s create a keypair in devstack.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
vagrant@precise64:~$ source ~/devstack/openrc 
vagrant@precise64:~$ nova keypair-add --pub-key ~/.ssh/authorized_keys vagrant
vagrant@precise64:~$ nova keypair-list
+---------+-------------------------------------------------+
| Name    | Fingerprint                                     |
+---------+-------------------------------------------------+
| vagrant | dd:3b:b8:2e:85:04:06:e9:ab:ff:a8:0a:c0:04:6e:d6 |
+---------+-------------------------------------------------+
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;I&amp;#8217;m going to create a new local directory to work with vagrant out of.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ cd ~/working/vagrant
$ mkdir vagrant-openstack
$ cd vagrant-openstack
$ vagrant init
$ vi Vagrantfile
# Add config information...
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;We need to insert some information into the vagrantfile for openstack.&lt;/p&gt;
&lt;p&gt;First get the image ID. Devstack automatically adds an image, but each time devstack is run the ID will be different.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
vagrant@precise64:~$ nova image-list
+--------------------------------------+---------------------------------+--------+--------+
| ID                                   | Name                            | Status | Server |
+--------------------------------------+---------------------------------+--------+--------+
| 0cf481ad-482e-441c-b8a6-49e792ae0dfb | cirros-0.3.1-x86_64-uec         | ACTIVE |        |
| 2630cd9e-c375-49d0-81bd-ffbfc638e752 | cirros-0.3.1-x86_64-uec-kernel  | ACTIVE |        |
| 7375ddbc-51c7-4492-bd2b-de30f10210db | cirros-0.3.1-x86_64-uec-ramdisk | ACTIVE |        |
+--------------------------------------+---------------------------------+--------+--------+
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;In this example we want the &lt;em&gt;0cf481ad-482e-441c-b8a6-49e792ae0dfb&lt;/em&gt; image ID.&lt;/p&gt;
&lt;p&gt;Also, we probably want to add a smaller flavor for the cirros image. By default the smallest flavor uses 512MB of ram.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
#
# Default flavors
#

vagrant@precise64:~$ nova flavor-list
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
| ID | Name      | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public | extra_specs |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
| 1  | m1.tiny   | 512       | 0    | 0         |      | 1     | 1.0         | True      | {}          |
| 2  | m1.small  | 2048      | 20   | 0         |      | 1     | 1.0         | True      | {}          |
| 3  | m1.medium | 4096      | 40   | 0         |      | 2     | 1.0         | True      | {}          |
| 4  | m1.large  | 8192      | 80   | 0         |      | 4     | 1.0         | True      | {}          |
| 5  | m1.xlarge | 16384     | 160  | 0         |      | 8     | 1.0         | True      | {}          |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+-------------+

#
# Add a smaller flavor
#  

vagrant@precise64:~$ nova-manage flavor create --name=m1.teeny --memory=64 \
--cpu=1 --root_gb=0 --ephemeral_gb=0 --flavor=6 --swap=0 --is_public yes
2013-04-11 11:36:08    DEBUG [nova.openstack.common.lockutils] Got semaphore \
&quot;dbapi_backend&quot; for method &quot;__get_backend&quot;...
m1.teeny created

#
# Now we have a 6th flavor!
# 

vagrant@precise64:~$ nova flavor-list
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
| ID | Name      | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public | extra_specs |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
| 1  | m1.tiny   | 512       | 0    | 0         |      | 1     | 1.0         | True      | {}          |
| 2  | m1.small  | 2048      | 20   | 0         |      | 1     | 1.0         | True      | {}          |
| 3  | m1.medium | 4096      | 40   | 0         |      | 2     | 1.0         | True      | {}          |
| 4  | m1.large  | 8192      | 80   | 0         |      | 4     | 1.0         | True      | {}          |
| 5  | m1.xlarge | 16384     | 160  | 0         |      | 8     | 1.0         | True      | {}          |
| 6  | m1.teeny  | 64        | 0    | 0         |      | 1     | 1.0         | True      | {}          |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+-------------+

&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Flavor 6 is what we&amp;#8217;ll use.&lt;/p&gt;
&lt;p&gt;Next, check the OS vars in devstack to see what to put into the vagrantfile:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
vagrant@precise64:~$ env | grep &quot;^OS&quot;
OS_PASSWORD=password
OS_AUTH_URL=http://192.168.134.139:5000/v2.0
OS_USERNAME=demo
OS_TENANT_NAME=demo
OS_CACERT=/opt/stack/data/CA/int-ca/ca-chain.pem
OS_NO_CACHE=1
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Now with all that information we can fill out the vagrantfile. Mine looks like this:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ cat Vagrantfile 
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure(&quot;2&quot;) do |config|
  # All Vagrant configuration is done here. The most common configuration
  # options are documented and commented below. For a complete reference,
  # please see the online documentation at vagrantup.com.

  # Every Vagrant virtual environment requires a box to build off of.
  config.vm.box = &quot;base&quot;
  
  config.vm.provider :openstack do |os|

    os.url = &quot;http://192.168.134.139:5000/v2.0&quot;
    os.tenant = &quot;demo&quot;
    os.user = &quot;demo&quot;
    os.password = &quot;password&quot;

    os.flavor = &quot;6&quot;
    os.keypair = &quot;vagrant&quot;
    os.image = &quot;0cf481ad-482e-441c-b8a6-49e792ae0dfb&quot;

    # Not sure why but I feel like calling this vm whitney
    os.name = &quot;whitney&quot;

    os.ssh_username = &quot;cirros&quot;
    os.ssh_private_key = &quot;~/.ssh/id_dsa.pub&quot;
  end

end
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Using vagrant, boot the vm.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
#
# Boot it
# 

$ vagrant up --provider=openstack
Bringing machine 'default' up with 'openstack' provider...
[default] New VM created 419e5940-e068-42a4-bb28-68ad72f85d8a =&amp;gt; whitney

#
# Check status
#

$ vagrant status
Current machine states:

default                  running (openstack)

The nova instance is running. To stop this machine, you can run
`vagrant halt`. To destroy the machine, you can run `vagrant destroy`.

&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Let&amp;#8217;s see what&amp;#8217;s happening in devstack.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
#
# What does virsh know?
# 

vagrant@precise64:~$ sudo virsh list
 Id Name                 State
----------------------------------
  1 instance-00000001    running

#
# And lets ask openstack... 
#

vagrant@precise64:~$ source ~/devstack/openrc 
vagrant@precise64:~$ nova list
+--------------------------------------+---------+--------+------------------+
| ID                                   | Name    | Status | Networks         |
+--------------------------------------+---------+--------+------------------+
| 419e5940-e068-42a4-bb28-68ad72f85d8a | whitney | ACTIVE | private=10.0.0.3 |
+--------------------------------------+---------+--------+------------------+
vagrant@precise64:~$ nova show 419e5940-e068-42a4-bb28-68ad72f85d8a
+-----------------------------+----------------------------------------------------------------+
| Property                    | Value                                                          |
+-----------------------------+----------------------------------------------------------------+
| status                      | ACTIVE                                                         |
| updated                     | 2013-04-11T18:40:43Z                                           |
| OS-EXT-STS:task_state       | None                                                           |
| private network             | 10.0.0.3                                                       |
| key_name                    | vagrant                                                        |
| image                       | cirros-0.3.1-x86_64-uec (0cf481ad-482e-441c-b8a6-49e792ae0dfb) |
| hostId                      | cbfc5a689eaff0c72de8f66161efb06270322d48baf6d9120f612c42       |
| OS-EXT-STS:vm_state         | active                                                         |
| flavor                      | m1.teeny (6)                                                   |
| id                          | 419e5940-e068-42a4-bb28-68ad72f85d8a                           |
| security_groups             | [{u'name': u'default'}]                                        |
| user_id                     | 26c0f9a23e9c44f6b660557122119171                               |
| name                        | whitney                                                        |
| created                     | 2013-04-11T18:40:31Z                                           |
| tenant_id                   | bb54c65c4aba482f8f6d363e0730df95                               |
| OS-DCF:diskConfig           | MANUAL                                                         |
| metadata                    | {}                                                             |
| accessIPv4                  |                                                                |
| accessIPv6                  |                                                                |
| progress                    | 0                                                              |
| OS-EXT-STS:power_state      | 1                                                              |
| OS-EXT-AZ:availability_zone | nova                                                           |
| config_drive                |                                                                |
+-----------------------------+----------------------------------------------------------------+
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Nice.&lt;/p&gt;
&lt;p&gt;Now, unless we give this vm a &amp;#8220;public ip&amp;#8221; we won&amp;#8217;t be able to ssh in without hopping into the devstack host first.&lt;/p&gt;
&lt;p&gt;But first&amp;#8230;one. More. Step.&lt;/p&gt;
&lt;p&gt;By default, with devstack, it seems the default security group is pretty restrictive. So we need to add a couple rules.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
#
# Default secgroup rules
#

vagrant@precise64:~$ nova secgroup-list-rules default
+-------------+-----------+---------+----------+--------------+
| IP Protocol | From Port | To Port | IP Range | Source Group |
+-------------+-----------+---------+----------+--------------+
|             | -1        | -1      |          | default      |
|             | -1        | -1      |          | default      |
+-------------+-----------+---------+----------+--------------+

#
# Add ping
# 

vagrant@precise64:~$ nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
+-------------+-----------+---------+-----------+--------------+
| IP Protocol | From Port | To Port | IP Range  | Source Group |
+-------------+-----------+---------+-----------+--------------+
| icmp        | -1        | -1      | 0.0.0.0/0 |              |
+-------------+-----------+---------+-----------+--------------+

#
# Add ssh
# 

vagrant@precise64:~$ nova secgroup-add-rule default tcp 22 22 0.0.0.0/0
+-------------+-----------+---------+-----------+--------------+
| IP Protocol | From Port | To Port | IP Range  | Source Group |
+-------------+-----------+---------+-----------+--------------+
| tcp         | 22        | 22      | 0.0.0.0/0 |              |
+-------------+-----------+---------+-----------+--------------+

#
# New secgroup rules
#

vagrant@precise64:~$ nova secgroup-list-rules default
+-------------+-----------+---------+-----------+--------------+
| IP Protocol | From Port | To Port | IP Range  | Source Group |
+-------------+-----------+---------+-----------+--------------+
|             | -1        | -1      |           | default      |
|             | -1        | -1      |           | default      |
| icmp        | -1        | -1      | 0.0.0.0/0 |              |
| tcp         | 22        | 22      | 0.0.0.0/0 |              |
+-------------+-----------+---------+-----------+--------------+

#
# And now we should be able to ping and ssh in to whitney
# 

vagrant@precise64:~$ ping -c 1 -w 1 10.0.0.3
PING 10.0.0.3 (10.0.0.3) 56(84) bytes of data.
64 bytes from 10.0.0.3: icmp_req=1 ttl=63 time=72.2 ms

--- 10.0.0.3 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 72.261/72.261/72.261/0.000 ms
vagrant@precise64:~$ ssh cirros@10.0.0.3
cirros@10.0.0.3's password: # enter &quot;cubswin:)&quot;
$ uname -a
Linux cirros 3.2.0-37-virtual #58-Ubuntu SMP Thu Jan 24 15:48:03 UTC 2013 x86_64 GNU/Linux
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;&lt;span class=&quot;caps&quot;&gt;NOTE&lt;/span&gt;: I&amp;#8217;m skipping the part about using the authorized_keys file cirros sets up for itself based on the keypair specified. But you can ssh into the cirros instance without a password if everything is setup right, ssh -A, ssh-agent, etc.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;And that concludes our brief look at booting a vm inside of vm, using:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;macbook retina&lt;/li&gt;
	&lt;li&gt;vagrant&lt;/li&gt;
	&lt;li&gt;vmware fusion&lt;/li&gt;
	&lt;li&gt;vagrant-openstack&lt;/li&gt;
	&lt;li&gt;devstack&lt;/li&gt;
	&lt;li&gt;cirros&lt;/li&gt;
	&lt;li&gt;openstack grizzly&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Everything works!&lt;/p&gt;
&lt;p&gt;We can even delete the vm we just created:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ vagrant destroy
[default] Deleting the instance...
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Check in with openstack&amp;#8230;&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
#
# vm gone!
# 

vagrant@precise64:~$ nova list
+----+------+--------+----------+
| ID | Name | Status | Networks |
+----+------+--------+----------+
+----+------+--------+----------+
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Thanks,&lt;br /&gt;
Curtis.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Thoughts on "no reliable cloud"</title>
   <link href="http://serverascode.com//2013/04/10/no-reliable-cloud.html"/>
   <updated>2013-04-10T00:00:00-07:00</updated>
   <id>http://serverascode.com/2013/04/10/no-reliable-cloud</id>
   <content type="html">&lt;p&gt;&lt;img src=&quot;https://raw.github.com/curtisgithub/curtisgithub.github.com/master/img/pishell.png&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
&lt;em&gt;(my pishell server&amp;#8212;maybe this could be part of a reliable cloud)&lt;/em&gt;&lt;/p&gt;
&lt;p class=&quot;meta&quot;&gt;10 April &amp;#8211; 2013 &amp;#8211; Edmonton!&lt;/p&gt;
&lt;h1&gt;Thoughts on &amp;#8220;no reliable cloud&amp;#8221;&lt;/h1&gt;
&lt;p&gt;Recently &lt;a href=&quot;http://blog.hendrikvolkmer.de/about/&quot;&gt;Hendrik Volkmer&lt;/a&gt; put up a blog post entitled &lt;a href=&quot;http://blog.hendrikvolkmer.de/2013/04/03/there-will-be-no-reliable-cloud-part-1/&quot;&gt;There will be no reliable cloud&lt;/a&gt;. Part of it was based on a &lt;a href=&quot;http://engineering.cloudscaling.com/2013/03/service-resiliency-doesnt-always-mean-ha-or-cluster/&quot;&gt;presentation&lt;/a&gt; I watched at the last OpenStack summit (wish I was going to the Portland summit, but alas is not to be).&lt;/p&gt;
&lt;p&gt;The Cloud Scaling presentation was one I enjoyed and considered thought provoking. I wrote a &lt;a href=&quot;http://serverascode.com/2012/10/17/openstack-summit-day-3.html&quot;&gt;few notes&lt;/a&gt; on that presentation last year.&lt;/p&gt;
&lt;h2&gt;No reliable cloud&lt;/h2&gt;
&lt;p&gt;Here&amp;#8217;s a quote from the top of the &lt;a href=&quot;http://blog.hendrikvolkmer.de/2013/04/03/there-will-be-no-reliable-cloud-part-1/&quot;&gt;first post&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Stop wasting your time trying to [find a reliable cloud]. Stop wasting your time (and money) trying to build one. If you find a service provider that claims that they have it: Maybe question their understanding of cloud &amp;#8211; and business.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I put that there to remind me of the point of the series of posts, and because it essentially defines the attention grabbing headline. :)&lt;/p&gt;
&lt;h2&gt;tl;dr&lt;/h2&gt;
&lt;p&gt;My thoughts on these posts come down to this:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;He&amp;#8217;s mostly talking web-scale applications&lt;/li&gt;
	&lt;li&gt;A single zone will not be reliable&lt;/li&gt;
	&lt;li&gt;But still have to make zones as reasonably reliable as possible (where&amp;#8217;s the line?)&lt;/li&gt;
	&lt;li&gt;We should design reliable applications on top of unreliable zones (but how?)&lt;/li&gt;
	&lt;li&gt;Contain failure!&lt;/li&gt;
	&lt;li&gt;HA pairs are probably not the direction to go in to gain reliability&lt;/li&gt;
	&lt;li&gt;Clustering software often brings in complexity that can destroy reliability gains&lt;/li&gt;
	&lt;li&gt;Stateless systems are a lot more fun :)&lt;/li&gt;
	&lt;li&gt;Keep the stateful part of an application or system small&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thinking about reliability in a cloud, especially an OpenStack cloud, is an interesting thought experiment. Fortunately, the OpenStack cloud I help to run, which is the back-end for a single application, is actually mostly stateless&amp;#8212;except for machine images, the OpenStack database, and the application database. Not a lot of stateful information, except those darn windows images that are many tens of times the size of a standard Linux cloud image.&lt;/p&gt;
&lt;h2&gt;Notes from the part one post&lt;/h2&gt;
&lt;p&gt;For a &lt;a href=&quot;http://blog.hendrikvolkmer.de/2013/04/03/there-will-be-no-reliable-cloud-part-1/&quot;&gt;short post&lt;/a&gt; it sure goes over a lot of information and links!&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;HA pairs
	&lt;ul&gt;
		&lt;li&gt;HA pairs fail catastrophically&lt;/li&gt;
		&lt;li&gt;HA pairs don&amp;#8217;t scale&lt;/li&gt;
		&lt;li&gt;Classic HA example: &lt;span class=&quot;caps&quot;&gt;NFS&lt;/span&gt; + &lt;span class=&quot;caps&quot;&gt;DRBD&lt;/span&gt; and clustering, such as Pacemaker&amp;#8230;then problems?&lt;/li&gt;
		&lt;li&gt;HA pairs often end up cheating &lt;span class=&quot;caps&quot;&gt;CAP&lt;/span&gt; theorem&lt;/li&gt;
		&lt;li&gt;Cluster software causes more system outages than hardware failures of software bugs (this I can attend to having used clustered &lt;span class=&quot;caps&quot;&gt;LVM&lt;/span&gt;)&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Distributed systems
	&lt;ul&gt;
		&lt;li&gt;Eg. Percona Xtradb Cluster&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Availability vs reliability
	&lt;ul&gt;
		&lt;li&gt;HA systems that need to go down for maintenance are a joke&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;How to build a reliable cloud
	&lt;ul&gt;
		&lt;li&gt;A cloud is a distributed system&lt;/li&gt;
		&lt;li&gt;Use the stateless (from &lt;a href=&quot;http://www.cloudscaling.com/&quot;&gt;Cloud Scaling&lt;/a&gt; presentation) approach for stateless parts&lt;/li&gt;
		&lt;li&gt;Distributed data stores for the stateful parts (eg. distributed mysql, distributed file systems such as ceph)&lt;/li&gt;
		&lt;li&gt;But the distributed stateful part is often what fails (eg. &lt;span class=&quot;caps&quot;&gt;EBS&lt;/span&gt; in Amazon)&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Notes from blog post comments (notably Randy Bias of Cloud Scaling)
	&lt;ul&gt;
		&lt;li&gt;On OpenStack
		&lt;ul&gt;
			&lt;li&gt;Move to MySQL Cluster with the NBDEngine running 2-4 mysql instances, and load balancing across them&lt;/li&gt;
			&lt;li&gt;Or perhaps OpenStack will get rid of the &lt;span class=&quot;caps&quot;&gt;RDBMS&lt;/span&gt; and replace with K/V store&lt;/li&gt;
			&lt;li&gt;Even with 1000s of nodes, metadata use is still low in OpenStack, could be put in memory and persist data using any appropriate back-end&lt;/li&gt;
		&lt;/ul&gt;&lt;/li&gt;
		&lt;li&gt;No point in having highly redundant hardware for stateless services&lt;/li&gt;
		&lt;li&gt;Build reliable applications on unreliable clouds&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Ok, now on to part two.&lt;/p&gt;
&lt;h2&gt;Notes from part two&lt;/h2&gt;
&lt;p&gt;The &lt;a href=&quot;http://blog.hendrikvolkmer.de/2013/04/09/there-will-be-no-reliable-cloud-part-2/&quot;&gt;second post&lt;/a&gt; builds on the basic information provided in the first.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Complexity + Scale =&amp;gt; Reduced Reliability + Increased Chance of catastrophic failures&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ul&gt;
	&lt;li&gt;Complexity
	&lt;ul&gt;
		&lt;li&gt;Complex system fail catastrophically&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Failure domains
	&lt;ul&gt;
		&lt;li&gt;OpenStack example
		&lt;ul&gt;
			&lt;li&gt;Single controller, single cloud (or zone)&lt;/li&gt;
			&lt;li&gt;HA setup &amp;#8212; two controllers in an HA mode of some kind&lt;/li&gt;
			&lt;li&gt;Single controller, multiple cloud (or multiple zones)&lt;/li&gt;
		&lt;/ul&gt;&lt;/li&gt;
		&lt;li&gt;A single zone is unreliable&lt;/li&gt;
		&lt;li&gt;If both HA nodes fail, still unreliable, and HA is more complex&lt;/li&gt;
		&lt;li&gt;Two zones is two failure domains, which is more reliable than a single HA-enabled zone&lt;/li&gt;
		&lt;li&gt;(But of course you should make each zone as reliable as possible)&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Reliability engineering (aka math)
	&lt;ul&gt;
		&lt;li&gt;&lt;a href=&quot;http://www.infoq.com/presentations/Reliability-Engineering-Matters-Except-When-It-Doesnt&quot;&gt;Reliability engineering matters except when it doesn&amp;#8217;t&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&amp;#8220;The higher the number of dependent components =&amp;gt; the lower the overall availability and the bigger the impact of failure&amp;#8221;&lt;/li&gt;
		&lt;li&gt;In a cloud with many nodes, adding the ability for live migration will actually decrease reliability, because all nodes are now tied together&lt;/li&gt;
		&lt;li&gt;Many reliability calculations come from mechanical engineering, which is much different than software engineering&lt;/li&gt;
		&lt;li&gt;Many complex systems fail by cascading, failure starts small and grows big, until it engulfs the entire system&lt;/li&gt;
		&lt;li&gt;General approach is to make failure local and contained&lt;/li&gt;
		&lt;li&gt;Partial failure is desirable&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Business side
	&lt;ul&gt;
		&lt;li&gt;Software reliability is cheaper&lt;/li&gt;
		&lt;li&gt;Most web scale applications consist of a large stateless part and a small stateful piece&lt;/li&gt;
		&lt;li&gt;It does not make business sense to  provide a super-reliable cloud&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;A single compute node or even zone will never be reliable&lt;/li&gt;
	&lt;li&gt;Best not to consider virtual machines, such as those in EC2, &lt;a href=&quot;http://www.jamiebegin.com/why-an-ec2-instance-isnt-a-server/&quot;&gt;as servers&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;NOTE&lt;/span&gt;: There will eventually be a part three post, but as of this writing it&amp;#8217;s not up yet.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;To me, it boils down to building reliable applications on unreliable clouds, which I think is what a lot of people are doing, and is what seems to come out every time &lt;span class=&quot;caps&quot;&gt;AWS&lt;/span&gt; fails.&lt;/p&gt;
&lt;p&gt;The first issue that pops into my mind though is &lt;span class=&quot;caps&quot;&gt;RDBMS&lt;/span&gt; systems, and how to replicate data between zones, which is often a network concern. Actually, replicating any data between zones could be a problem, which is why, I&amp;#8217;m guessing, that he&amp;#8217;s (perhaps) suggesting to keep stateful pieces small.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>First look at PackStack</title>
   <link href="http://serverascode.com//2013/03/13/first-look-packstack.html"/>
   <updated>2013-03-13T00:00:00-07:00</updated>
   <id>http://serverascode.com/2013/03/13/first-look-packstack</id>
   <content type="html">&lt;p&gt;&lt;img src=&quot;https://raw.github.com/curtisgithub/curtisgithub.github.com/master/img/garish_bike.jpg&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
&lt;em&gt;(Yup&amp;#8212;an instagram picture of my garish orange single speed summer bike. But it&amp;#8217;s a summer bike!)&lt;/em&gt;&lt;/p&gt;
&lt;p class=&quot;meta&quot;&gt;13 March &amp;#8211; 2013 &amp;#8211; Edmonton!&lt;/p&gt;
&lt;h1&gt;First look at PackStack&lt;/h1&gt;
&lt;p&gt;I am a big fan, and user, of &lt;a href=&quot;http://openstack.org&quot;&gt;OpenStack&lt;/a&gt;. I also really like the &lt;a href=&quot;http://ansible.cc&quot;&gt;Ansible&lt;/a&gt; configuration management and orchestration system. In fact, I use Ansible to deploy OpenStack, and all kinds of &lt;a href=&quot;https://github.com/curtisgithub/ansible_playbooks&quot;&gt;other things&lt;/a&gt; as well.&lt;/p&gt;
&lt;p&gt;Recently on the Ansible mailing list the lead developer (and now &lt;span class=&quot;caps&quot;&gt;CTO&lt;/span&gt; of &lt;a href=&quot;http://ansibleworks.com&quot;&gt;Ansibleworks&lt;/a&gt;) &lt;a href=&quot;https://groups.google.com/forum/?fromgroups=#!topic/ansible-project/eNlPwjIHGGs&quot;&gt;suggested that it was time to bring together&lt;/a&gt; everyone who is working, or wants to work with, both Ansible and OpenStack.&lt;/p&gt;
&lt;p&gt;One of the suggestions was to follow what &lt;a href=&quot;https://github.com/stackforge/packstack&quot;&gt;PackStack&lt;/a&gt; has done&amp;#8212;it&amp;#8217;s based on puppet&amp;#8212;and port it over to Ansible. (&lt;span class=&quot;caps&quot;&gt;NOTE&lt;/span&gt;: I&amp;#8217;m not even sure that&amp;#8217;s the right git repo, things are moving so fast!)&lt;/p&gt;
&lt;p&gt;While I had heard of PackStack before, I had never used it, so I decided it was time I took a look so that I can perhaps help with the OpenStack + Ansible project. Frankly, it was on my list of technology to check out because I always need to have some virtual machines running OpenStack, and it would be nice if there was an easy way to quickly build a multi-host OpenStack install (especially if I would like to contribute code back to the community at some point).&lt;/p&gt;
&lt;p&gt;Also&amp;#8212;I&amp;#8217;m sure Ansible will soon be one of Vagrants supported deployment systems, and when that happens it will be very easy to deploy OpenStack with Vagrant.&lt;/p&gt;
&lt;p&gt;So I spent a couple hours creating an &lt;a href=&quot;https://github.com/curtisgithub/ansible_playbooks/tree/master/packstack&quot;&gt;Ansible playbook&lt;/a&gt; that would simply fire off the PackStack command with a generic answer file. So I haven&amp;#8217;t ported anything from PackStack to Ansible&amp;#8212;I&amp;#8217;m simply using Ansible and Vagrant to create an environment for PackStack to do it&amp;#8217;s work.&lt;/p&gt;
&lt;h2&gt;RedHat/CentOS&lt;/h2&gt;
&lt;p&gt;One big note&amp;#8212;PackStack currently only supports RedHat/CentOS. I&amp;#8217;m using CentOS 6.&lt;/p&gt;
&lt;h2&gt;Host organization&lt;/h2&gt;
&lt;p&gt;That repository also contains a Vagrant file, and an Ansible hosts file. I have four virtual machines making up a small OpenStack cluster:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ cat ansible_hosts 
[openstack]
apis ansible_ssh_host=192.168.100.130
scheduler ansible_ssh_host=192.168.100.131
compute01 ansible_ssh_host=192.168.100.132
compute02 ansible_ssh_host=192.168.100.133
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;And all of those IPs and names are reflected in the &lt;code&gt;PackStack.yml&lt;/code&gt;, &lt;code&gt;files/packstack.cfg&lt;/code&gt;, and &lt;code&gt;Vagrantfile&lt;/code&gt; files. I don&amp;#8217;t know if they are the most descriptive names, but this is how I&amp;#8217;ve currently organized it.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ grep &quot;100\.13&quot; Vagrantfile 
apis_config.vm.network :hostonly, &quot;192.168.100.130&quot; # nic3
scheduler_config.vm.network :hostonly, &quot;192.168.100.131&quot; # nic3
compute01_config.vm.network :hostonly, &quot;192.168.100.132&quot; # nic3
compute02_config.vm.network :hostonly, &quot;192.168.100.133&quot; # nic3
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;The &lt;code&gt;apis&lt;/code&gt; host is going to run horizon (not that I need it) and the front-facing APIs, and the scheduler will run the mysql server and nova-scheduler&amp;#8230;and some cinder related services as well (which likely need more investigation as I have really only have experience thus far with OpenStack Essex&amp;#8212;but at least I can experiment with other versions of OpenStack now, thanks to PackStack).&lt;/p&gt;
&lt;p&gt;For example, here is what nova services are running where:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@apis packstack(keystone_admin)]$ nova-manage service list
Binary           Host       Zone  Status     State Updated_At
nova-scheduler   scheduler  nova  enabled    :-)   2013-03-13 21:15:11
nova-cert        apis       nova  enabled    :-)   2013-03-13 21:15:15
nova-consoleauth apis       nova  enabled    :-)   2013-03-13 21:15:15
nova-compute     compute01  nova  enabled    :-)   2013-03-13 21:15:13
nova-compute     compute02  nova  enabled    :-)   2013-03-13 21:15:12
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Smiley faces are good. :-)&lt;/p&gt;
&lt;h2&gt;Deploying PackStack&lt;/h2&gt;
&lt;p&gt;Deploying this specific example only requires a couple of commands (I&amp;#8217;m running &lt;span class=&quot;caps&quot;&gt;OSX&lt;/span&gt;, and using Virtualbox).&lt;/p&gt;
&lt;p&gt;First, tell Vagrant to build the servers.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span class=&quot;caps&quot;&gt;NOTE&lt;/span&gt;:&lt;/strong&gt; You could have IP collisions if you have other virtual machines running&amp;#8212;the IPs used here are hard-coded.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ vagrant up
[apis] Importing base box 'centos6'...
[apis] The guest additions on this VM do not match the install version of
VirtualBox! This may cause things such as forwarded ports, shared
folders, and more to not work properly. If any of those things fail on
this machine, please update the guest additions and repackage the
box.

Guest Additions Version: 4.1.6
VirtualBox Version: 4.2.6
[apis] Matching MAC address for NAT networking...
[apis] Clearing any previously set forwarded ports...
[apis] Fixed port collision for 22 =&amp;gt; 2222. Now on port 2200.
SNIP!
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Once those are built you should have four vms running:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ vagrant status
Current VM states:

apis                     running
scheduler                running
compute01                running
compute02                running

This environment represents multiple VMs. The VMs are all listed
above with their current state. For more information about a specific
VM, run `vagrant status NAME`.
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Once that&amp;#8217;s done, you can simply run the &lt;code&gt;packstack.yml&lt;/code&gt; playbook.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ ansible-playbook -k -u root PackStack.yml 
SSH password: #enter the vagrant password of 'vagrant', just have to do this once

PLAY [openstack] ********************* 

GATHERING FACTS ********************* 
ok: [compute01]
ok: [scheduler]
ok: [compute02]
ok: [apis]

SNIP! #Tons of stuff happens here, mostly done by PackStack

TASK: [run PackStack] ********************* 
skipping: [compute01]
skipping: [compute02]
skipping: [scheduler]
changed: [apis]

PLAY RECAP ********************* 
apis                           : ok=13   changed=11   unreachable=0    failed=0    
compute01                      : ok=7    changed=5    unreachable=0    failed=0    
compute02                      : ok=7    changed=5    unreachable=0    failed=0    
scheduler                      : ok=7    changed=5    unreachable=0    failed=0  
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;When it completes, there should be a multi-server OpenStack cluster running!&lt;/p&gt;
&lt;p&gt;Login to the &lt;code&gt;apis&lt;/code&gt; server:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ ssh root@192.168.100.130
root@192.168.100.130's password: #vagrant password again
Last login: Wed Mar 13 16:34:03 2013 from 192.168.100.1            
[root@apis ~]# source keystonerc_admin 
[root@apis ~(keystone_admin)]$ nova list
# nothing will appear here, but at least you should get no error messages
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Because the Ansible playbook downloaded and installed the Cirros image, &lt;code&gt;nova image-list&lt;/code&gt; should give some output:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@apis ~(keystone_admin)]$ nova image-list
+--------------------------------------+--------+--------+--------+
| ID                                   | Name   | Status | Server |
+--------------------------------------+--------+--------+--------+
| 84eebd30-953f-4ffe-b9f9-afb7099f1e75 | cirros | ACTIVE |        |
+--------------------------------------+--------+--------+--------+
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;At any rate, it&amp;#8217;s a good start.&lt;/p&gt;
&lt;p&gt;Once Vagrant supports Ansible and VMWare Fusion, it will be crazy easy to create a working OpenStack cluster on my laptop.&lt;/p&gt;
&lt;h2&gt;Acknowledgments&lt;/h2&gt;
&lt;p&gt;Nothing I ever do is novel, and this blog post is no different. I based this work off the following: &lt;a href=&quot;https://www.berrange.com/tags/packstack/&quot;&gt;Installing a 4 node Fedora 18 OpenStack Folsom cluster with PackStack&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Issues/Caveats/Questions&lt;/h2&gt;
&lt;ul&gt;
	&lt;li&gt;I had at least one problem getting this going&amp;#8230;PackStack doesn&amp;#8217;t seem to want to install puppet on CentOS 6. I had to make sure the Ansible playbook setup the &lt;span class=&quot;caps&quot;&gt;EPEL&lt;/span&gt; repository so that the puppet RPMs were available.&lt;/li&gt;
	&lt;li&gt;&lt;span class=&quot;caps&quot;&gt;AFAIK&lt;/span&gt;, Virtualbox doesn&amp;#8217;t support &lt;a href=&quot;https://www.virtualbox.org/ticket/4032&quot;&gt;nested virtualization&lt;/a&gt;, so you won&amp;#8217;t be able to boot any &lt;a href=&quot;http://www.imdb.com/title/tt1375666/&quot;&gt;Inception&lt;/a&gt; styled OpenStack instances, ie. vms within vms. Though, again &lt;span class=&quot;caps&quot;&gt;AFAIK&lt;/span&gt;, VMWare Fusion on &lt;span class=&quot;caps&quot;&gt;OSX&lt;/span&gt; does supported nested virtualization, which is why I&amp;#8217;m excited about Vagrant supporting Fusion. I&amp;#8217;d prefer to use &lt;span class=&quot;caps&quot;&gt;KVM&lt;/span&gt;, but I need to run &lt;span class=&quot;caps&quot;&gt;OSX&lt;/span&gt; for work.&lt;/li&gt;
	&lt;li&gt;Don&amp;#8217;t think &lt;a href=&quot;https://wiki.openstack.org/wiki/Cinder&quot;&gt;Cinder&lt;/a&gt; is working.&lt;/li&gt;
	&lt;li&gt;It can take a good 20 to 30 minutes for this entire build process to complete, mostly because there are a ton of puppet modules to download.&lt;/li&gt;
	&lt;li&gt;I&amp;#8217;m not even sure what version of OpenStack this installs&amp;#8230;something to look into. Might have to jump to a more recent version of Fedora to get something like OpenStack Grizzly.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;
&lt;code&gt;
[root@apis ~(keystone_admin)]$ yum info openstack-nova-common
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
 * base: www.muug.mb.ca
 * epel: www.muug.mb.ca
 * extras: mirror.its.sfu.ca
 * updates: www.muug.mb.ca
Installed Packages
Name       : openstack-nova-common
Arch       : noarch
Version    : 2012.2.2
Release    : 1.el6
Size       : 115 k
Repo       : installed
From repo  : epel
Summary    : Components common to all OpenStack Nova services
URL        : http://openstack.org/projects/compute/
License    : ASL 2.0
Description: OpenStack Compute (codename Nova) is open source software designed to
           : provision and manage large networks of virtual machines, creating a
           : redundant and scalable cloud computing platform. It gives you the
           : software, control panels, and APIs required to orchestrate a cloud,
           : including running instances, managing networks, and controlling access
           : through users and projects. OpenStack Compute strives to be both
           : hardware and hypervisor agnostic, currently supporting a variety of
           : standard hardware configurations and seven major hypervisors.
           : 
           : This package contains scripts, config and dependencies shared
           : between all the OpenStack nova services.
&lt;/code&gt;
&lt;/pre&gt;</content>
 </entry>
 
 <entry>
   <title>Software defined networking, Openvswitch, and Ubuntu 12.04</title>
   <link href="http://serverascode.com//2013/02/21/openvswitch.html"/>
   <updated>2013-02-21T00:00:00-08:00</updated>
   <id>http://serverascode.com/2013/02/21/openvswitch</id>
   <content type="html">&lt;p&gt;&lt;img src=&quot;https://raw.github.com/curtisgithub/curtisgithub.github.com/master/img/winter_uofa_campus.jpg&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
&lt;em&gt;(sunny with snow as usual)&lt;/em&gt;&lt;/p&gt;
&lt;p class=&quot;meta&quot;&gt;21 February &amp;#8211; 2013 &amp;#8211; Edmonton!&lt;/p&gt;
&lt;h1&gt;Software defined networking, Openvswitch, and Ubuntu 12.04&lt;/h1&gt;
&lt;p&gt;Recently I&amp;#8217;ve been testing over committing on &lt;span class=&quot;caps&quot;&gt;KVM&lt;/span&gt;. Once I started running hundreds of virtual machines (vms) on a single node, I realized that in order to get them to do anything I have to access them over the network to run something like &lt;a href=&quot;http://ansible.cc&quot;&gt;Ansible&lt;/a&gt; playbooks designed to test load.&lt;/p&gt;
&lt;p&gt;In order to provide networking resources to the vms, I decided to take a look at &lt;a href=&quot;http://openvswitch.org&quot;&gt;Openvswitch&lt;/a&gt; and what it takes to get it up and running with &lt;span class=&quot;caps&quot;&gt;KVM&lt;/span&gt; and Ubuntu 12.04/Precise.&lt;/p&gt;
&lt;h2&gt;Software defined networking&lt;/h2&gt;
&lt;p&gt;Like cloud and big-data, &lt;a href=&quot;http://en.wikipedia.org/wiki/Software-defined_networking&quot;&gt;software defined networking&lt;/a&gt; (&lt;span class=&quot;caps&quot;&gt;SDN&lt;/span&gt;) is a loaded term. But, like those terms, I feel I need to at least try to get a grasp of what it means.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;#8220;A good working definition of &lt;span class=&quot;caps&quot;&gt;SDN&lt;/span&gt; is the separation of the data and control functions of today&amp;#8217;s routers and other layer two networking infrastructure with a well-defined programming interface between the two.&amp;#8221; &amp;#8212; Via &lt;a href=&quot;http://arstechnica.com/information-technology/2013/02/100gbps-and-beyond-what-lies-ahead-in-the-world-of-networking/2/&quot;&gt;Arstechnica&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;SDN&lt;/span&gt; is a big part of &lt;a href=&quot;http://docs.openstack.org/trunk/openstack-network/admin/content/&quot;&gt;OpenStack&lt;/a&gt; as well. Starting with the &lt;a href=&quot;http://www.openstack.org/software/folsom/&quot;&gt;Folsom&lt;/a&gt; release, networking was split out into it&amp;#8217;s own &lt;em&gt;*as-a-Service&lt;/em&gt; capability called &lt;a href=&quot;https://wiki.openstack.org/wiki/Quantum&quot;&gt;Quantum&lt;/a&gt;, whereas previously it was a sub-component of Nova. So given I&amp;#8217;m a big fan, and user, of OpenStack, it&amp;#8217;s important for me to get a good grasp of &lt;span class=&quot;caps&quot;&gt;SDN&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.openflow.org/wk/index.php/OpenFlow_Tutorial&quot;&gt;Openflow&lt;/a&gt; is also an important technology in &lt;span class=&quot;caps&quot;&gt;SDN&lt;/span&gt; that requires some research time.&lt;/p&gt;
&lt;p&gt;But, having said all that, basically I&amp;#8217;m just going to install and use Openvswitch on a single compute node. :)&lt;/p&gt;
&lt;h2&gt;Building on other&amp;#8217;s work&lt;/h2&gt;
&lt;p&gt;I followed these blog posts on configuring Openvswitch on Ubuntu 12.04/Precise:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://networkstatic.net/how-to-build-an-sdn-lab-without-needing-openflow-hardware/&quot;&gt;How to build a &lt;span class=&quot;caps&quot;&gt;SDN&lt;/span&gt; Lab without needing Openflow hardware&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://en.community.dell.com/techcenter/networking/w/wiki/3820.openvswitch-openflow-lets-get-started.aspx&quot;&gt;Openvswitch and OpenFlow: Let&amp;#8217;s get started&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://blog.scottlowe.org/2012/08/17/installing-kvm-and-open-vswitch-on-ubuntu/&quot;&gt;Installing &lt;span class=&quot;caps&quot;&gt;KVM&lt;/span&gt; and Openvswtich on Ubuntu&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I&amp;#8217;m not really doing anything new here&amp;#8212;though I hope to at some point&amp;#8230; :)&lt;/p&gt;
&lt;h2&gt;Installation&lt;/h2&gt;
&lt;p&gt;I put together an &lt;a href=&quot;https://github.com/curtisgithub/ansible_playbooks/blob/master/sdn/tasks/setup.yml&quot;&gt;ansible playbook&lt;/a&gt; to install Openvswitch in Ubuntu 12.04. There is no easy, direct way (that I&amp;#8217;m aware of) to install Openvswitch in Precise&amp;#8230;unfortunately I just can&amp;#8217;t do &lt;code&gt;apt-get install openvswitch&lt;/code&gt; and have everything work like magic. I guess building the module is the only unusual thing, and this will disappear in future versions of Ubuntu&amp;#8212;perhaps it&amp;#8217;s already not necessary in 12.10, not sure, haven&amp;#8217;t looked it up.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m not going to directly cut and paste my &lt;a href=&quot;https://github.com/curtisgithub/ansible_playbooks/blob/master/sdn/tasks/setup.yml&quot;&gt;ansible playbook&lt;/a&gt; into this post, but suffice it to say that most dependencies can be installed via &lt;code&gt;apt-get&lt;/code&gt;, but there is one step required to build and module.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
# Install these packages:
#   - openvswitch-datapath-source 
#   - bridge-utils
#   - module-assistant  
#   - openvswitch-brcompat
#   - openvswitch-common
#   - openvswitch-switch
#   - linux-headers-3.2.0-23-generic
#   - linux-headers-generic-pae
# Then build the module:
$ module-assistant auto-install openvswitch-datapath
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Next we set &lt;code&gt;BRCOMPAT=yes&lt;/code&gt; in &lt;code&gt;/etc/default/openvswitch-switch&lt;/code&gt; and restart &lt;code&gt;openvswitch-switch&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Pox&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://www.noxrepo.org/pox/about-pox/&quot;&gt;Pox&lt;/a&gt;, among other things, is an Openflow controller.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;#8220;At its core, it’s a platform for the rapid development and prototyping of network control software using Python.  Meaning, at a very basic level, it’s one of a growing number of frameworks&amp;#8230;for helping you write an OpenFlow controller.&amp;#8221; &amp;#8212; Via &lt;a href=&quot;http://www.noxrepo.org/pox/about-pox/&quot;&gt;Pox website&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hey, it&amp;#8217;s Python, it&amp;#8217;s Openflow&amp;#8230;what else do I need. Sign me up. :)&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ cd /usr/local/src
$ git clone http://github.com/noxrepo/pox
$ zdaemon -p 'python /usr/local/src/pox/pox.py \
--no-cli forwarding.l2_learning' -d start
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;And now Pox should be listening on port 6633:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ netstat -ant | grep 6633
tcp        0      0 0.0.0.0:6633            0.0.0.0:*               LISTEN     
$ sudo lsof -i | grep 6633
python   34150   root    3u  IPv4 39211055      0t0  TCP *:6633 (LISTEN)
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;More information about pox can be found on the &lt;a href=&quot;http://www.openflow.org/wk/index.php/OpenFlow_Tutorial#Controller_Choice:_POX_.28Python.29&quot;&gt;Openflow site&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Configure the bridge&lt;/h2&gt;
&lt;p&gt;Now we can add a bridge to the openv switch.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ ovs-vsctl add-br br-int
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;And then configure br-int (or whatever you&amp;#8217;ve called the bridge), and I&amp;#8217;m using the eth2 interface in this example.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ ovs-vsctl add-port br-int eth2; ifconfig eth2 0; ifconfig br-int &amp;lt;IPv4 Address&amp;gt; \
netmask 255.255.255.0
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Let&amp;#8217;s tell Openvswitch to use the Pox controller that is running.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ ovs-vsctl set-controller br-int tcp:&amp;lt;IPv4 Address&amp;gt;:6633
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Finally we need interface up and down scripts.&lt;/p&gt;
&lt;p&gt;ifdown:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ cat /sbin/ovs-ifdown
#!/bin/sh 
switch='br-int' 
/sbin/ifconfig $1 0.0.0.0 down 
ovs-vsctl del-port ${switch} $1
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;ifup:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ cat /sbin/ovs-ifup
#!/bin/sh switch='br-int' 
/sbin/ifconfig $1 0.0.0.0 up
 ovs-vsctl add-port ${switch} $1
 &lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Now we can boot some vms!&lt;/p&gt;
&lt;h2&gt;Booting a vm&lt;/h2&gt;
&lt;p&gt;I&amp;#8217;m booting vms via a script, and part of the &lt;code&gt;kvm&lt;/code&gt; command line options is the network tap, which uses the ifup/ifdown scripts:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
  -net tap,script=/sbin/ovs-ifup,downscript=/sbin/ovs-ifdown
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;And, here is a running instance:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ ps ax | grep &quot;kvm -drive&quot; | head -1
  9831 ?        Sl    21:01 kvm -drive if=virtio,file=/mnt/intel/1.img -m 2048 \
  -boot a -net nic,macaddr=52:54:00:a1:c0:fd \
  -net tap,script=/sbin/ovs-ifup,downscript=/sbin/ovs-ifdown -nographic -vnc :1 \
   -chardev file,id=charserial0,path=/mnt/intel/1.console.log \
   -device isa-serial,chardev=charserial0,id=serial0 -chardev pty,id=charserial1 \
   -device isa-serial,chardev=charserial1,id=serial1 \
   -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Right now there&amp;#8217;s about 300 vms running on this single compute node.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ ps ax  |grep &quot;kvm -drive&quot; | wc -l
301
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Fun stuff. :)&lt;/p&gt;
&lt;h2&gt;What now?&lt;/h2&gt;
&lt;p&gt;Well, I&amp;#8217;ve achieved my goal of getting Openvswitch up and running to enable networking between vms on a single compute node.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
ubuntu@ubuntu:~$ ifconfig eth0 | grep 192
          inet addr:192.168.100.111  Bcast:192.168.100.255  Mask:255.255.255.0
ubuntu@ubuntu:~$ ping -c 1 192.168.100.23
PING 192.168.100.23 (192.168.100.23) 56(84) bytes of data.
64 bytes from 192.168.100.23: icmp_req=1 ttl=64 time=0.452 ms

--- 192.168.100.23 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.452/0.452/0.452/0.000 ms
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;I think my next step will be to work in multiple virtual machines to see if I can do some of the interesting and useful things that Openflow is capable of, and to find out how I can work with the Pox system to learn more about &lt;span class=&quot;caps&quot;&gt;SDN&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Another important thing to do is to get a test environment of OpenStack Folsom (or Grizzly) up and running to see how Quantum utilizes Openflow and &lt;span class=&quot;caps&quot;&gt;SDN&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m hoping to spend the next few days learning about &lt;a href=&quot;http://www.noxrepo.org/pox/about-pox/&quot;&gt;Pox&lt;/a&gt;. Wish me luck. :)&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;
Curtis.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Over committing with KVM</title>
   <link href="http://serverascode.com//2013/02/20/overcommitting-with-kvm.html"/>
   <updated>2013-02-20T00:00:00-08:00</updated>
   <id>http://serverascode.com/2013/02/20/overcommitting-with-kvm</id>
   <content type="html">&lt;p&gt;&lt;img src=&quot;https://raw.github.com/curtisgithub/curtisgithub.github.com/master/img/winter_cs.jpg&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
&lt;em&gt;(Still winter in Edmonton, will have to blog a lot more in the summer)&lt;/em&gt;&lt;/p&gt;
&lt;p class=&quot;meta&quot;&gt;20 February &amp;#8211; 2013 &amp;#8211; Edmonton!&lt;/p&gt;
&lt;h1&gt;Over committing with &lt;span class=&quot;caps&quot;&gt;KVM&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;It&amp;#8217;s quite possible to over commit resources with the &lt;span class=&quot;caps&quot;&gt;KVM&lt;/span&gt; hypervisor.&lt;/p&gt;
&lt;p&gt;I should say first that most of the work I&amp;#8217;ve been doing around over committing in &lt;span class=&quot;caps&quot;&gt;KVM&lt;/span&gt; is based on a project I am working in where the virtual machines are stateless. This makes over committing easier because if we run out of resources on a compute node and this causes a vm to crash, it&amp;#8217;s not the end of the world&amp;#8212;the end-user can just restart their session.&lt;/p&gt;
&lt;p&gt;To me over committing means having virtual machines running on a node where the total &lt;span class=&quot;caps&quot;&gt;CPU&lt;/span&gt;, main memory (ie. ram), and disk that is available to the virtual machines is much larger than the actual physical resources available on the node. Hopefully five or ten times larger.&lt;/p&gt;
&lt;h2&gt;Hardware&lt;/h2&gt;
&lt;p&gt;I am running these tests on a single Dell C6220 node. It has 32 cores (including hyperthreading), 128GB of main memory, and &lt;span class=&quot;caps&quot;&gt;SSD&lt;/span&gt; drives.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
test_host:~$ cat /proc/cpuinfo | grep processor | wc -l
32
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;The &lt;span class=&quot;caps&quot;&gt;SSD&lt;/span&gt; drive types we are testing with are:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;2x Standard Dell 300GB &lt;span class=&quot;caps&quot;&gt;SSD&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;2x Samsung 830 512GB&lt;/li&gt;
	&lt;li&gt;2x Intel 520 480GB&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each of them is in a stripe/RAID0 configuration, so we have three striped devices, md2 (Samsung) and the poorly named md126 (Intel) and md127 (Dell).&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
test_host:~$ cat /proc/mdstat 
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4]
[raid10] 
md0 : active raid1 sdb1[1] sda1[0]
      307136 blocks [2/2] [UU]
      
md2 : active raid0 sdb5[1] sda5[0]
      882155520 blocks super 1.2 512k chunks
      
md1 : active raid1 sdb2[1] sda2[0]
      41910144 blocks super 1.2 [2/2] [UU]
      
md126 : active raid0 sdd[1] sdc[0]
      937702400 blocks super 1.2 512k chunks
      
md127 : active raid0 sdf[1] sde[0]
      586072064 blocks super 1.2 512k chunks
      
unused devices: &amp;lt;none&amp;gt;
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;The striped Samsungs are really fast&amp;#8212;84K &lt;span class=&quot;caps&quot;&gt;IOPS&lt;/span&gt; from the stripe!&lt;/p&gt;
&lt;h2&gt;Memory over committing: &lt;span class=&quot;caps&quot;&gt;KSM&lt;/span&gt; (not &lt;span class=&quot;caps&quot;&gt;KVM&lt;/span&gt;)&lt;/h2&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;KSM&lt;/span&gt;, or Kernel Samepage Merging, is a memory de-duplication feature that is present in most Linux systems that support &lt;span class=&quot;caps&quot;&gt;KVM&lt;/span&gt;. I wrote a bit about it in a &lt;a href=&quot;http://serverascode.com/2012/11/11/ksm-kvm.html&quot;&gt;previous blog post&lt;/a&gt;. Basically if you up the scanning rate it will de-duplicate more memory. This means if I&amp;#8217;m running 300 Ubuntu Precise images there is a lot of memory that can be de-duplicated.&lt;/p&gt;
&lt;h2&gt;&lt;span class=&quot;caps&quot;&gt;CPU&lt;/span&gt; over committing&lt;/h2&gt;
&lt;p&gt;I don&amp;#8217;t have a lot of information on how over committing &lt;span class=&quot;caps&quot;&gt;CPU&lt;/span&gt; works in &lt;span class=&quot;caps&quot;&gt;KVM&lt;/span&gt;, but there are some best practices documented by a couple organizations, which I have listed below. This is an area I need to do more research in.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://publib.boulder.ibm.com/infocenter/lnxinfo/v3r0m0/index.jsp?topic=%2Fliaat%2Fliaatbpprocmem.htm&quot;&gt;&lt;span class=&quot;caps&quot;&gt;IBM&lt;/span&gt; says:&lt;/a&gt;
	&lt;ul&gt;
		&lt;li&gt;Target system use at max 80%&amp;#8212;ie. each vm shouldn&amp;#8217;t be using 100% of their &lt;span class=&quot;caps&quot;&gt;CPU&lt;/span&gt;, and in fact should max out at 80%&lt;/li&gt;
		&lt;li&gt;Allocate minimum VCPUs per vm&amp;#8212;ie. if the vm doesn&amp;#8217;t need four CPUs, rather say, only one, then just give it one&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization_Administration_Guide/sect-Virtualization-Tips_and_tricks-Overcommitting_with_KVM.html&quot;&gt;RedHat says&lt;/a&gt;:
	&lt;ul&gt;
		&lt;li&gt;&lt;em&gt;Virtualized CPUs are over committed best when each guest only has a single &lt;span class=&quot;caps&quot;&gt;VCPU&lt;/span&gt;. The Linux scheduler is very efficient with this type of load. &lt;span class=&quot;caps&quot;&gt;KVM&lt;/span&gt; should safely support guests with loads under 100% at a ratio of five VCPUs. Over committing single &lt;span class=&quot;caps&quot;&gt;VCPU&lt;/span&gt; guests is not an issue.&lt;/em&gt;&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Notice that RedHat is saying a 5:1 ratio for &lt;span class=&quot;caps&quot;&gt;CPU&lt;/span&gt; over committing.&lt;/p&gt;
&lt;h2&gt;Disk space over committing&lt;/h2&gt;
&lt;p&gt;This is straight forward: image snapshots. qcow2 images can be created as snapshots of a backing file.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
test_host:/mnt/intel$ file 263.img 
263.img: QEMU QCOW Image (v2), has backing file 
(path /mnt/intel/precise-server-cloudimg-amd64-disk1.qcow2), 2147483648 bytes
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;This is also how OpenStack handles images. It puts one base image on the compute node and each instance based on that same image is backed by a qcow2 snapshot. I suppose we could do the same with &lt;span class=&quot;caps&quot;&gt;LVM&lt;/span&gt;, if desired, using snapshots.&lt;/p&gt;
&lt;h2&gt;Can&amp;#8217;t over commit &lt;span class=&quot;caps&quot;&gt;IOPS&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;The part that is difficult in terms of running hundreds of vms on a single node is the amount of &lt;span class=&quot;caps&quot;&gt;IOPS&lt;/span&gt; each vm takes up. In my experiments the Ubuntu cloud image doesn&amp;#8217;t really do anything at all in terms of &lt;span class=&quot;caps&quot;&gt;IOPS&lt;/span&gt;&amp;#8212;maybe one or two &lt;span class=&quot;caps&quot;&gt;IOPS&lt;/span&gt; per image when they are idle. So if I&amp;#8217;m running 300 images, they don&amp;#8217;t even use 300 &lt;span class=&quot;caps&quot;&gt;IOPS&lt;/span&gt; when idle. Even during boot they hardly do anything. (Of course when they are working they could be using a lot of &lt;span class=&quot;caps&quot;&gt;IOPS&lt;/span&gt;.)&lt;/p&gt;
&lt;p&gt;But, if I boot 100 Windows 7 images five minutes apart, I need 5000 &lt;span class=&quot;caps&quot;&gt;IOPS&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Yup: &lt;strong&gt;5000 &lt;span class=&quot;caps&quot;&gt;IOPS&lt;/span&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Six &lt;span class=&quot;caps&quot;&gt;SATA&lt;/span&gt; drives in RAID10 are going to barely provide 400 &lt;span class=&quot;caps&quot;&gt;IOPS&lt;/span&gt; let alone 5000. So, SSDs, or at least some kind of faster storage, are required. Pretty much any &lt;span class=&quot;caps&quot;&gt;SSD&lt;/span&gt; is capable of 5000 &lt;span class=&quot;caps&quot;&gt;IOPS&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;IMHO&lt;/span&gt;, it&amp;#8217;s a lot more efficient to run the Ubuntu cloud image than a standard Windows image.&lt;/p&gt;
&lt;h2&gt;Load&lt;/h2&gt;
&lt;p&gt;Right now I have 300 Ubuntu images running, each being given 2048MB of memory.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
test_host:~$ ps ax | grep &quot;kvm -drive&quot; | wc -l
300
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;And load and memory usage are just fine. A bit of swapping, but that&amp;#8217;s Ok.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
top - 10:58:13 up 8 days, 23:55,  2 users,  load average: 1.35, 1.29, 1.92
Tasks: 845 total,   2 running, 843 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.8%us,  3.1%sy,  0.0%ni, 95.9%id,  0.1%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  131997760k total, 122223236k used,  9774524k free,   142448k buffers
Swap: 33554424k total,   242172k used, 33312252k free, 42323472k cached
SNIP!
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;They have been running for a few days, and are not using much in terms of &lt;span class=&quot;caps&quot;&gt;IOPS&lt;/span&gt; as they are completely idle. Below is the output from &lt;a href=&quot;http://linuxcommand.org/man_pages/iostat1.html&quot;&gt;iostat&lt;/a&gt;. All the vms are running off qcow2 images on the Intel 520 based stripe, md126.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.67    0.00    3.08    0.05    0.00   96.20

Device:            tps    MB_read/s    MB_wrtn/s    MB_read    MB_wrtn
sda              16.40         0.00         0.17          0          1
sdb              16.40         0.00         0.17          0          1
sdc              44.70         0.00         0.16          0          1
sde               0.00         0.00         0.00          0          0
sdd              44.20         0.00         0.15          0          1
sdf               0.00         0.00         0.00          0          0
md127             0.00         0.00         0.00          0          0
md126            60.10         0.00         0.31          0          3
md1              35.20         0.00         0.17          0          1
md2               0.00         0.00         0.00          0          0
md0               0.00         0.00         0.00          0          0
dm-0              0.00         0.00         0.00          0          0
nb0               0.00         0.00         0.00          0          0
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;It would be great to have &lt;span class=&quot;caps&quot;&gt;IOPS&lt;/span&gt; usage on a per-process basis, but I couldn&amp;#8217;t find a tool that would do that. The best I could do is iostat with &lt;span class=&quot;caps&quot;&gt;IOPS&lt;/span&gt; per storage device.&lt;/p&gt;
&lt;h2&gt;Running tests&lt;/h2&gt;
&lt;p&gt;Each vm gets its IPs from dnsmasq running on an &lt;a href=&quot;http://openvswitch.org/&quot;&gt;Openvswitch&lt;/a&gt; bridge (topic of a future blog post). So we have 300 tap devices.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
test_host:~/performance_testing$ sudo ovs-vsctl show
SNIP!
        Port &quot;tap166&quot;
            Interface &quot;tap166&quot;
        Port &quot;tap0&quot;
            Interface &quot;tap0&quot;
    ovs_version: &quot;1.4.0+build0&quot;

test_host:~/performance_testing$ ifconfig | grep tap | wc -l
300
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;I like using the &lt;a href=&quot;http://ansible.cc&quot;&gt;Ansible&lt;/a&gt; configuration management system. I&amp;#8217;ve written a custom inventory script that pulls the IPs out of the dnsmasq lease file.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
test_host:~/performance_testing$ ansible all -c ssh -i ./inventory.py \
-m ping -u ubuntu
SNIP 298 hosts!
192.168.100.98 | success &amp;gt;&amp;gt; {
    &quot;changed&quot;: false, 
    &quot;ping&quot;: &quot;pong&quot;
}

192.168.100.99 | success &amp;gt;&amp;gt; {
    &quot;changed&quot;: false, 
    &quot;ping&quot;: &quot;pong&quot;
}
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Then, using that inventory and Ansible I can run whatever load tests I want across however many virtual instances I want. For example I could run &lt;a href=&quot;http://linux.die.net/man/1/fio&quot;&gt;fio&lt;/a&gt; tests across 10% of the vms and watch the &lt;span class=&quot;caps&quot;&gt;IOPS&lt;/span&gt; usage on the compute node.&lt;/p&gt;
&lt;p&gt;If you have any questions, criticisms or concerns, please let me know by posting in the comments. :)&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;
Curtis.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Canadian OpenStack Users Group - CanStack!</title>
   <link href="http://serverascode.com//2013/02/20/canstack.html"/>
   <updated>2013-02-20T00:00:00-08:00</updated>
   <id>http://serverascode.com/2013/02/20/canstack</id>
   <content type="html">&lt;p&gt;&lt;img src=&quot;https://raw.github.com/curtisgithub/curtisgithub.github.com/master/img/canstack_logo.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p class=&quot;meta&quot;&gt;20 February &amp;#8211; 2013 &amp;#8211; Edmonton!&lt;/p&gt;
&lt;h1&gt;Canadian OpenStack Users Group &amp;#8211; CanStack!&lt;/h1&gt;
&lt;p&gt;Recently I have started helping out the &lt;a href=&quot;http://www.meetup.com/Canadian-OpenStack-Users-Group/&quot;&gt;Canadian OpenStack Users Group&lt;/a&gt;. With the support of my employer, I&amp;#8217;ve put up a website called &lt;a href=&quot;http://canstack.ca&quot;&gt;CanStack&lt;/a&gt; and a &lt;a href=&quot;http://blog.canstack.ca&quot;&gt;blog&lt;/a&gt; for that site as well. And, of course, the obligatory &lt;a href=&quot;http://twitter.com/canstack&quot;&gt;twitter account&lt;/a&gt;. There is even a github repository for the &lt;a href=&quot;http://github.com/canstack/blog_posts&quot;&gt;blog posts&lt;/a&gt;, so contributing a post is only a git commit away! :)&lt;/p&gt;
&lt;p&gt;The fun thing about the website and blog is that the website is hosted in a beta Canadian OpenStack-based cloud, and the blog is hosted in &lt;a href=&quot;http://aws.amazon.com/s3/&quot;&gt;Amazon S3&lt;/a&gt;. I am a big proponent of object storage systems such as S3 and OpenStack Swift, so it was a good experience to get a static blog up on S3.&lt;/p&gt;
&lt;p&gt;I use &lt;a href=&quot;http://jekyllrb.com&quot;&gt;jekyll&lt;/a&gt; to generate the blog, just like I do this site, though &lt;a href=&quot;http://serverascode.com&quot;&gt;serverascode.com&lt;/a&gt; is hosted by &lt;a href=&quot;http://github.com&quot;&gt;github&lt;/a&gt;. Thanks github!&lt;/p&gt;
&lt;p&gt;My hope with the CanStack website and blog is that they will help to find more members to bring together in our monthly meetings, and that hopefully we can provide some useful information about OpenStack as well.&lt;/p&gt;
&lt;p&gt;I just put up a &lt;a href=&quot;http://blog.canstack.ca/2013/02/14/vcl-openstack-reference-architecture.html&quot;&gt;blog post&lt;/a&gt; on how we are using OpenStack in a virtual classroom project, complete with what server and network hardware we are using, and even what data center!&lt;/p&gt;
&lt;p&gt;So, if you are interested in what Canadians are doing with OpenStack, &lt;a href=&quot;http://canstack.ca&quot;&gt;canstack.ca&lt;/a&gt; might be a good place to start.&lt;/p&gt;
&lt;p&gt;As always, comments, suggestions, and criticisms are welcome. :)&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;
Curtis.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>tcpflow</title>
   <link href="http://serverascode.com//2013/02/08/tcpflow.html"/>
   <updated>2013-02-08T00:00:00-08:00</updated>
   <id>http://serverascode.com/2013/02/08/tcpflow</id>
   <content type="html">&lt;p class=&quot;meta&quot;&gt;8 February &amp;#8211; 2013 &amp;#8211; Edmonton!&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://raw.github.com/curtisgithub/curtisgithub.github.com/master/img/winter_ales.jpg&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
&lt;em&gt;(winter on the UofA campus, nice sunny day though)&lt;/em&gt;&lt;/p&gt;
&lt;h1&gt;tcpflow&lt;/h1&gt;
&lt;p&gt;This is just a quick little post on tcpflow.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ve been using &lt;a href=&quot;http://graphite.wikidot.com/start&quot;&gt;graphite&lt;/a&gt; as a a graphing solution for system statistics. I&amp;#8217;ve also been using &lt;a href=&quot;https://github.com/rcrowley/carbon-relay-ng&quot;&gt;carbon-relay-ng&lt;/a&gt; to relay packets from different OpenStack projects to a central graphite server.&lt;/p&gt;
&lt;p&gt;However, I&amp;#8217;ve been having an issue (and am still having an issue actually) with concatenated packets arriving at the graphite server, despite the fact that the clients aren&amp;#8217;t sending them.&lt;/p&gt;
&lt;p&gt;In order to troubleshoot this I eventually started running tcpflow because it gave me cleaner output than tcpdump did&amp;#8230;at least by default anyways. I&amp;#8217;m sure that tcpdump can give me pretty much any output I need, but I liked the symplicity of tcpflow, for example:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@stats ~]# tcpflow -c port 2003
tcpflow[11791]: listening on eth0
010.000.000.001.39216-010.000.000.006.02003: debbuild.cputotals.user 0 1360364000
010.000.000.001.39216-010.000.000.006.02003: debbuild.cputotals.nice 0 1360364000
010.000.000.001.39216-010.000.000.006.02003: debbuild.cputotals.sys 0 1360364000
010.000.000.001.39216-010.000.000.006.02003: debbuild.cputotals.wait 0 1360364000
010.000.000.001.39216-010.000.000.006.02003: debbuild.cputotals.idle 99 1360364000
010.000.000.001.39216-010.000.000.006.02003: debbuild.cputotals.irq 0 1360364000
010.000.000.001.39216-010.000.000.006.02003: debbuild.cputotals.soft 0 1360364000
010.000.000.001.39216-010.000.000.006.02003: debbuild.cputotals.steal 0 1360364000
SNIP!
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;vs.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@stats ~]# tcpdump -nnvvXSs 1514 -i eth0 port 2003
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 1514 bytes
22:59:32.650673 IP (tos 0x0, ttl 64, id 41032, offset 0, flags [DF], 
proto TCP (6), length 103)
    10.0.0.1.39216 &amp;gt; 10.0.0.6.2003: Flags [P.], cksum 0xab18 (correct), 
    seq 1882211360:1882211411, ack 2847074948, win 115, options 
    [nop,nop,TS val 804219404 ecr 2428141312], length 51
	0x0000:  4500 0067 a048 4000 4006 8642 0a00 0001  E..g.H@.@..B....
	0x0010:  0a00 0006 9930 07d3 7030 4420 a9b2 ea84  .....0..p0D.....
	0x0020:  8018 0073 ab18 0000 0101 080a 2fef 6a0c  ...s......../.j.
	0x0030:  90ba 7f00 636f 6c6c 6563 7464 3031 2d63  ....collectd01-c
	0x0040:  6c69 656e 742d 7465 7374 2e74 6573 742e  lient-test.test.
	0x0050:  6669 7273 7420 2033 3530 3420 3133 3630  first..3504.1360
	0x0060:  3336 3433 3733 0a                        364373.
22:59:32.650750 IP (tos 0x0, ttl 64, id 53955, offset 0, flags [DF], 
proto TCP (6), length 52)
    10.0.0.6.2003 &amp;gt; 10.0.0.1.39216: Flags [.], cksum 0xc56c (correct), 
    seq 2847074948, ack 1882211411, win 501, options [nop,nop,TS val 
    2428143328 ecr 804219404], length 0
	0x0000:  4500 0034 d2c3 4000 4006 53fa 0a00 0006  E..4..@.@.S.....
	0x0010:  0a00 0001 07d3 9930 a9b2 ea84 7030 4453  .......0....p0DS
	0x0020:  8010 01f5 c56c 0000 0101 080a 90ba 86e0  .....l..........
	0x0030:  2fef 6a0c                                /.j.
SNIP!
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;One thing to note is the -c switch on tcpflow, it means print to the console instead of files in the local directory.&lt;/p&gt;
&lt;p&gt;I would love to hear about other uses of tcpflow or ways to alter the output of tcpdump, so please let me know of anything interesting by commenting. :)&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;
Curtis.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Converting VMWare Windows images to OpenStack with virt-v2v</title>
   <link href="http://serverascode.com//2012/11/26/converting-vmware-windows-to-openstack.html"/>
   <updated>2012-11-26T00:00:00-08:00</updated>
   <id>http://serverascode.com/2012/11/26/converting-vmware-windows-to-openstack</id>
   <content type="html">&lt;p class=&quot;meta&quot;&gt;26 November &amp;#8211; 2012 &amp;#8211; Edmonton!&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://raw.github.com/curtisgithub/curtisgithub.github.com/master/img/IMG_0329_600x600.jpg&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
&lt;em&gt;(some robot)&lt;/em&gt;&lt;/p&gt;
&lt;h1&gt;Converting VMWare Windows images to OpenStack with virt-v2v&lt;/h1&gt;
&lt;p&gt;As I&amp;#8217;ve mentioned in previous posts, I&amp;#8217;m currently working on a project that uses Apache &lt;span class=&quot;caps&quot;&gt;VCL&lt;/span&gt; to provide university students with the ability to remotely login to a virtual machine and use specialized software to complete their classwork&amp;#8212;a virtual computer lab if you will.&lt;/p&gt;
&lt;p&gt;Because we are moving off our current backend to OpenStack, we need to convert Windows images from VMWare to something that will work in OpenStack/&lt;span class=&quot;caps&quot;&gt;KVM&lt;/span&gt;.&lt;/p&gt;
&lt;h2&gt;Note about Windows&amp;#8230;&lt;/h2&gt;
&lt;p&gt;Let me note that I am not a &amp;#8220;windows guy&amp;#8221;&amp;#8212;I haven&amp;#8217;t really used windows in the last 10 years. Because I have usually been employed as a Unix/Linux admin, I&amp;#8217;ve always either ran OpenBSD, Linux, or &lt;span class=&quot;caps&quot;&gt;OSX&lt;/span&gt; on my desktop, and literally never had to work with Windows. Until now of course. ;)&lt;/p&gt;
&lt;h2&gt;Moving the backend to OpenStack&lt;/h2&gt;
&lt;p&gt;Currently we are in the process of moving the backend of our &lt;span class=&quot;caps&quot;&gt;VCL&lt;/span&gt; system from a VMWare ESXi based cluster to OpenStack (Essex to be precise.) There are a lot of reasons for this move, and I won&amp;#8217;t get into them here.&lt;/p&gt;
&lt;p&gt;Unfortunately you can&amp;#8217;t just take an ESXi image and drop it into OpenStack and have it work. Certainly we can actually import the image into glance, as vmdk images are supported, but the OS on the image will not have the virtio drivers for disk and network installed, drivers that OpenStack uses by default.&lt;/p&gt;
&lt;p&gt;Neither is it as easy as just installing the drivers into the OS image while it&amp;#8217;s running in ESXi. While I believe it&amp;#8217;s possible to do this in Windows Server 2008, I don&amp;#8217;t believe you can install drivers into Windows 7 without having the actual &amp;#8220;hardware&amp;#8221; accessible to the image (please correct me if I&amp;#8217;m wrong&amp;#8212;I&amp;#8217;d love to hear that I am), not without some registry and other hacks outside of my purview.&lt;/p&gt;
&lt;p&gt;This means we needed to find a way to convert the images from ones that work in VMWare ESXi, to ones that will work in OpenStack + &lt;span class=&quot;caps&quot;&gt;KVM&lt;/span&gt;, preferably a way that doesn&amp;#8217;t require me to learn anything about the Windows registry. ;)&lt;/p&gt;
&lt;h2&gt;virt-v2v to the rescue&lt;/h2&gt;
&lt;p&gt;Fortunately RedHat provides a system called virt-v2v. This allows the cross-conversion of images for several different types of hypervisors.&lt;/p&gt;
&lt;p&gt;The main things I found out about RedHat and virt-v2v are:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Some of the packages are not available in CentOS, or at least I couldn&amp;#8217;t find them, so you need a RedHat license. If you are converting images from VMWare ESXi to OpenStack, then you probably have enough money in the project to buy a RedHat license. ;)&lt;/li&gt;
	&lt;li&gt;It doesn&amp;#8217;t work in a virtual machine&amp;#8212;it expects hardware virtualization, so you need a hardware server. You don&amp;#8217;t need much, just enough to support hardware virtualization with &lt;span class=&quot;caps&quot;&gt;KVM&lt;/span&gt;.&lt;/li&gt;
	&lt;li&gt;Currently, and this might change, you have to download the image from the ESXi server each time you try a conversion, so if it takes a long time to download, then the conversion will also take a long time to finish.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I&amp;#8217;m sure most of the above could be changed with a bit of Perl hacking, but as far as I can tell, without changing any of the RedHat code you do need to meet those requirements.&lt;/p&gt;
&lt;p&gt;Note&amp;#8212;RedHat has pretty good &lt;a href=&quot;https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Virtualization_for_Desktops/2.2/html/Administration_Guide/virt-v2v-scripts.html&quot;&gt;documentation&lt;/a&gt; on the subject, a few quick google searches will tell you as much as I know. :)&lt;/p&gt;
&lt;h2&gt;Installing virt-v2v&lt;/h2&gt;
&lt;p&gt;First, as I&amp;#8217;ve mentioned, you need a hardware server with RedHat Enterprise 6.x on it.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@localhost ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.3 (Santiago)
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;It needs to be registered with the RedHat Network and have the &amp;#8220;&lt;span class=&quot;caps&quot;&gt;RHEL&lt;/span&gt; Server Supplementary&amp;#8221; and &amp;#8220;&lt;span class=&quot;caps&quot;&gt;RHEL&lt;/span&gt; V2VWIN&amp;#8221; channels enabled, as per the below image.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://raw.github.com/curtisgithub/curtisgithub.github.com/master/img/rhn_entitlements_virt-v2v.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@localhost ~]# yum repolist
Loaded plugins: product-id, rhnplugin, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
repo id       repo name     status
rhel-x86_64-server-6 Red Hat Enterprise Linux Server (v. 6 for 64-bit x86_64) 8,712
rhel-x86_64-server-supplementary-6 RHEL Server Supplementary (v. 6 64-bit x86_64) 311
rhel-x86_64-server-v2vwin-6 RHEL V2VWIN (v. 6 for 64-bit x86_64) 2
repolist: 9,025
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Once those are configured, install the following packages.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@localhost ~]# yum install virt-v2v virtio-win libguestfs-winsupport libvirt
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;And then reboot.&lt;/p&gt;
&lt;p&gt;Once the server has rebooted, start libvirtd if it isn&amp;#8217;t already.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@localhost ~]# service libvirtd start
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Next we need to add a storage pool to libvirt. In this example, just because of the way &lt;span class=&quot;caps&quot;&gt;RHEL&lt;/span&gt; defaulted my temporary install, we have a huge /home/images directory in which to put the converted images.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@localhost ~]# df -h /home
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_home
                      5.4T  235G  4.9T   5% /home
[root@localhost ~]# cat pool.xml 
  &amp;lt;pool type=&quot;dir&quot;&amp;gt;
        &amp;lt;name&amp;gt;virtimages&amp;lt;/name&amp;gt;
        &amp;lt;target&amp;gt;
          &amp;lt;path&amp;gt;/home/images&amp;lt;/path&amp;gt;
        &amp;lt;/target&amp;gt;
      &amp;lt;/pool&amp;gt;
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Using that pool.xml file, we&amp;#8217;ll configure the pool.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@localhost ~]# virsh pool-create --file pool.xml
[root@localhost ~]# virsh pool-list
Name                 State      Autostart 
-----------------------------------------
virtimages           active     no        

&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Finally, we configure a .netrc file, obviously entering the proper ESXi host, login, and password.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@localhost ~]# cat .netrc
machine &amp;lt;esxi host&amp;gt; login &amp;lt;login&amp;gt; password &amp;lt;password&amp;gt;
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Now we can run virt-v2v!&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@localhost images]# virt-v2v -ic esx://&amp;lt;esxi host&amp;gt;/?no_verify=1 -o libvirt
 -os virtimages &amp;lt;exsi vm name&amp;gt;
&amp;lt;esxi vm name&amp;gt;: 100% [========================]D 0h51m16s
virt-v2v: WARNING: No mapping found for bridge interface public in config file. 
The converted guest may not start until its network interface is updated.
virt-v2v: &amp;lt;esxi vm name&amp;gt; configured with virtio drivers.
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;I don&amp;#8217;t worry about the &amp;#8220;No mapping&amp;#8221; message.&lt;/p&gt;
&lt;h2&gt;Bring that image into OpenStack&lt;/h2&gt;
&lt;p&gt;Now that we have an image in the libvirt pool we configured, it&amp;#8217;s time to:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Convert the raw/vmdk image to qcow2 using &amp;#8220;qemu-img&amp;#8221;.&lt;/li&gt;
	&lt;li&gt;Import the converted qcow2 image into glance.&lt;/li&gt;
	&lt;li&gt;Boot the image once and manually login to finish off virt-v2v&amp;#8217;s &amp;#8220;firstboot&amp;#8221; scripts. This means you need an admin login to the image.&lt;/li&gt;
	&lt;li&gt;&amp;#8220;Set&amp;#8221; the hardware, make any changes to the instance such as updating and the like.&lt;/li&gt;
	&lt;li&gt;Shut down the instance.&lt;/li&gt;
	&lt;li&gt;Create a new OpenStack image from that instance using &lt;em&gt;nova image-create&lt;/em&gt;.&lt;/li&gt;
	&lt;li&gt;Then delete the original image, and instance booted from it, if you want. It&amp;#8217;s not much use except for archival purposes.&lt;/li&gt;
	&lt;li&gt;Boot a new instance from the new image, the one created with &lt;em&gt;nova image-create&lt;/em&gt;, just to make sure it all works out Ok.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;At this point you should, hopefully, have a working Windows image, one that was converted from VMWare ESXi!&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;
Curtis.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>KSM and KVM</title>
   <link href="http://serverascode.com//2012/11/11/ksm-kvm.html"/>
   <updated>2012-11-11T00:00:00-08:00</updated>
   <id>http://serverascode.com/2012/11/11/ksm-kvm</id>
   <content type="html">&lt;h1&gt;&lt;span class=&quot;caps&quot;&gt;KSM&lt;/span&gt; and &lt;span class=&quot;caps&quot;&gt;KVM&lt;/span&gt;&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;11 November &amp;#8211; 2012 &amp;#8211; Edmonton!&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://raw.github.com/curtisgithub/curtisgithub.github.com/master/img/winter_edmonton.jpg&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
&lt;em&gt;(Winter in Edmonton. It&amp;#8217;s not that cold&amp;#8230;yet.)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;span class=&quot;caps&quot;&gt;UPDATE&lt;/span&gt;: I did some more research and have a better idea of what pages_saved and pages_saving means. So we are saving quite a bit of memory!&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;&lt;span class=&quot;caps&quot;&gt;KSM&lt;/span&gt; and &lt;span class=&quot;caps&quot;&gt;KVM&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;I recently found out about the &lt;a href=&quot;http://www.linux-kvm.org/page/KSM&quot;&gt;ksm&lt;/a&gt; technology that is in Ubuntu 12.04 + kvm by default. ksm is a memory de-duplication process. As far as I understand it, ksm can allow virtual machines (actually any application, not just virtualization) to share memory pages&amp;#8212;it finds all duplicated memory pages and merges them, thereby saving memory in some situations.&lt;/p&gt;
&lt;p&gt;One of the projects I am working on is a classroom as a service, or virtual classrooms. Students can login to a web gui and request a reservation to a virtual machine image which they can then access with a &lt;span class=&quot;caps&quot;&gt;RDP&lt;/span&gt; client.&lt;/p&gt;
&lt;p&gt;In this project all of the images are based on&amp;#8212;unfortunately&amp;#8212;Windows 7. One would think that if we are running many similar Windows 7 images ksm could do a lot of de-duplication.&lt;/p&gt;
&lt;p&gt;I have been doing a few experiments in my spare time to see if ksm can help to over-commit memory. If I can I&amp;#8217;d rather be able to run 400 virtual machines than 200. If we can over-commit on memory 1:2 or 1:4 there could be substantial cost savings for the project.&lt;/p&gt;
&lt;h2&gt;The Test&lt;/h2&gt;
&lt;p&gt;I have a basic Windows 7 image in qcow2 format.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
root@ksm_test:/mnt/ksm-test$ file win7-base.qcow2
win7-base.qcow2: QEMU QCOW Image (v2), 21474836480 bytes
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;I am going to run 30 Windows 7 images with four gigs of ram and two virtual cpus each, based off a qcow2 snapshot from the original backing image.&lt;/p&gt;
&lt;p&gt;The server I am running this test on is a &lt;a href=&quot;http://www.dell.com/us/enterprise/p/poweredge-c6220/pd&quot;&gt;Dell c6220&lt;/a&gt; with 32 HT cores and 128 gigs of main memory.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;span class=&quot;caps&quot;&gt;ASIDE&lt;/span&gt;: /mnt/ksm-test is an xfs file system. I found that this test on a ext4 based filesystem used considerably more IOPs than xfs because the jdb2 process was doing a lot of journaling. There are likely some settings I should be using with ext4 to get better performance, but instead I just hopped over to xfs and haven&amp;#8217;t gone back to ext4 yet.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;This is the little script I use to boot the vms:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
root@ksm_test:~$ cat test_ksm.sh 
#!/bin/bash

# How much memory to boot with
MEM=4048
BACKING_DIR=/mnt/ksm-test
BACKING_FILE=win7-base.qcow2
SLEEP=60

pushd $BACKING_DIR

for i in {1..30}; do
	echo &quot;====&amp;gt; Starting a new instance...&quot;
	# Remove the old backing file
	rm -f win7-$i.qcow2

	# Create a new backing file that is a qcow2 snapshot of the original file
	qemu-img create -f qcow2 -b $BACKING_FILE win7-$i.qcow2

	# Actually start the intstance
	/usr/bin/kvm \
	-M pc-1.0 \
	-smp 2,sockets=2,cores=1,threads=1 \
	-enable-kvm \
	-m $MEM \
	-drive file=win7-$i.qcow2,if=virtio \
	-boot d \
	-net nic,model=virtio \
	-net user \
	-nographic \
	-vnc :$i \
	-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 \
	-daemonize

	# Let's just sleep for a few seconds...
	echo &quot;====&amp;gt; Sleeping for $SLEEP...&quot;
	sleep $SLEEP 
done

popd

exit 0
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;After that script runs we have 30 kvm Win7 instances running:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
root@ksm_test:/mnt/ksm-test$ ps ax  |grep &quot;bin\/kvm&quot; | wc -l
30
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;For the first while things are a little crazy on the host because 30 Windows 7 vms just booted in 30 minutes. After a few hours, or rather overnight, the vms settle down quite a bit to just doing a few IOPs each.&lt;/p&gt;
&lt;p&gt;As far as what these vms are doing&amp;#8212;I login to a couple every once and a while just to make sure they are up, but otherwise they are doing nothing but whatever they do by default.&lt;/p&gt;
&lt;h2&gt;The Defaults&lt;/h2&gt;
&lt;p&gt;ksm is enabled in Ubuntu by default when using kvm. However, the defaults are fairly conservative:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
root@ksm_host:~$ cat /sys/kernel/mm/ksm/pages_to_scan 
100
root@ksm_host:~$ cat /sys/kernel/mm/ksm/sleep_millisecs 
200
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;ksm will scan 100 pages, sleep for 200 milliseconds and then scan 100 more, and so on. But with millions of pages it will take a long, long time to scan all of them.&lt;/p&gt;
&lt;p&gt;I set the pages_to_scan to 20000 and sleep_millisecs to 20&amp;#8212;I&amp;#8217;m guessing these are pretty aggressive settings.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
root@ksm_host:~$  echo &quot;20000&quot; &amp;gt; /sys/kernel/mm/ksm/pages_to_scan
root@ksm_host:~$  echo &quot;20&quot; &amp;gt; /sys/kernel/mm/ksm/sleep_millisecs
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;h2&gt;The Results&lt;/h2&gt;
&lt;p&gt;I suppose saying &amp;#8220;results&amp;#8221; sounds scientific. :)&lt;/p&gt;
&lt;p&gt;The reality is that I&amp;#8217;m really just cutting and pasting the ksm information that has been recorded after several days of running 30 Windows 7 virtual machines that should all be very close in terms of memory use.&lt;/p&gt;
&lt;p&gt;From the &lt;a href=&quot;http://www.kernel.org/doc/Documentation/vm/ksm.txt&quot;&gt;ksm.txt&lt;/a&gt; file:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
A high ratio of pages_sharing to pages_shared indicates good sharing,
but a high ratio of pages_unshared to pages_sharing indicates wasted 
effort. pages_volatile embraces several different kinds of activity, 
but a high proportion there would also indicate poor use of madvise 
MADV_MERGEABLE.
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;And the results of ksm after a few days of running 30 vms&amp;#8230;&lt;/p&gt;
&lt;p&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
root@ksm_test:~$ for i in `ls -1 /sys/kernel/mm/ksm`; \
do echo &quot;===&amp;gt; $i&quot;; cat /sys/kernel/mm/ksm/$i;  done
===&amp;gt; full_scans
5417
===&amp;gt; pages_shared
443355
===&amp;gt; pages_sharing
26704343
===&amp;gt; pages_to_scan
20000
===&amp;gt; pages_unshared
3164064
===&amp;gt; pages_volatile
183552
===&amp;gt; run
1
===&amp;gt; sleep_millisecs
20
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;So, if I understand these numbers correctly, pages_shared is the amound of memory ksk is actually using. Thus in this example, ksm is using 1.7GB of memory:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
root@ksm_test:~$ getconf PAGESIZE
4096
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;So if we have 443355 pages shared, ksm is using this many bytes:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
root@ksm_test:~$ echo &quot;443355 * 4096&quot; | bc
1815982080
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;which is about 1.7GB.&lt;/p&gt;
&lt;p&gt;However, saved memory, ie. pages_sharing, is quite high! So this is good. :)&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
root@ksm_test:~$ echo $((26704343*`getconf PAGE_SIZE`/1024/1024/1024)) GB
101 GB
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;I&amp;#8217;m not sure how this equates to all the memory being used on the machine, but as far as ksm is concerned it&amp;#8217;s saving us about 100 gigs. Nice.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
root@ksm_test:~$ free
             total       used       free     shared    buffers     cached
Mem:     131997772  131556896     440876          0     108448  108129628
-/+ buffers/cache:   23318820  108678952
Swap:     41943032     302836   41640196
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Update: Now that I have a better understanding of what ksm is doing and what it&amp;#8217;s numbers mean, using a modified version of &lt;a href=&quot;http://aionica.computerlink.ro/2011/08/ksm-kernel-samepage-merging-status/&quot;&gt;this script&lt;/a&gt; we can see some interesting results, though in the below example I am running 60 2 gig 1 vcpu instances instead of 30 4 gig 2 vcpu instances like the rest of this post:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
root@ksm_test:~$ ./ksm_stat.sh 
Shared memory is 2071 MB
Saved memory is 95514 MB
Unshared memory is 21336 MB
Volatile memory is 2549 MB
Shared pages usage ratio is 46.11
Unshared pages usage ratio is .22
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;So thanks for reading, and if you have any suggestions as to what I might be doing incorrectly, be it settings or my math or my general assumptions about ksm :), please let me know in the comments.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;
Curtis.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>OpenStack 2012 Summit Day &#35;4</title>
   <link href="http://serverascode.com//2012/10/18/openstack-summit-day-4.html"/>
   <updated>2012-10-18T00:00:00-07:00</updated>
   <id>http://serverascode.com/2012/10/18/openstack-summit-day-4</id>
   <content type="html">&lt;h1&gt;OpenStack 2012 Summit Day &amp;#35;4&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;18 October &amp;#8211; 2012 &amp;#8211; San Diego&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://raw.github.com/curtisgithub/curtisgithub.github.com/master/img/openstack_summit_2012_security.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;Security Track!&lt;/h2&gt;
&lt;p&gt;Having been a security administrator at a medium sized University; having taking fairly extensive education in Information Security; having attended security conferences like CanSec West and H.O.P.E I am happy that all of Thursday has a dedicated security track. Unfortunately I can only attend a couple of sessions, but at least I can do that much. :)&lt;/p&gt;
&lt;h2&gt;Creating an OpenStack Security Group&lt;/h2&gt;
&lt;p&gt;Bryan D. Payne from Neubula and Robert Clark from HP talk about the need for a OpenStack Security Group. The &lt;a href=&quot;https://launchpad.net/~openstack-ossg&quot;&gt;&lt;span class=&quot;caps&quot;&gt;OSSG&lt;/span&gt;&lt;/a&gt; is &amp;#8220;hiring&amp;#8221;, ie. need volunteers especially security engineers, technical writers, and security experts that operate OpenStack clouds.&lt;/p&gt;
&lt;p&gt;Computer Security&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Design for security from the start&lt;/li&gt;
	&lt;li&gt;Understand your threats&lt;/li&gt;
	&lt;li&gt;Understand your goals&lt;/li&gt;
	&lt;li&gt;Pervasive security culture (not just &amp;#8220;that paranoid guy has it under control&amp;#8221;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Security Challenges for OpenStack&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Security as an afterthought&lt;/li&gt;
	&lt;li&gt;Security as silos&lt;/li&gt;
	&lt;li&gt;Security by non-experts&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There was some mention of the &lt;a href=&quot;https://cloudsecurityalliance.org&quot;&gt;Cloud Security Alliance&lt;/a&gt; which Bryan is a co-lead on a workgroup for and that the &lt;span class=&quot;caps&quot;&gt;CSA&lt;/span&gt; is a more oriented to high-level theory whereas the &lt;span class=&quot;caps&quot;&gt;OSSG&lt;/span&gt; will need to be directed at applied security.&lt;/p&gt;
&lt;h2&gt;Delivering Secure OpenStack IaaS for SaaS Products&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;&amp;#8220;Everyone has a great plan until they get punched in the mouth&amp;#8221;&lt;/em&gt;&amp;#8212;Mike Tyson&lt;/p&gt;
&lt;p&gt;Andrew Hay, is the Chief Evangelist at CloudPassage, Inc. where he serves as the public face of the company and its cloud server security product portfolio.&lt;/p&gt;
&lt;p&gt;Three places to &amp;#8220;put security&amp;#8221; in OpenStack&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Quantum
	&lt;ul&gt;
		&lt;li&gt;Coolest thing about Quantum is the ability to inject 3rd party products&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Keystone&lt;/li&gt;
	&lt;li&gt;Nova
	&lt;ul&gt;
		&lt;li&gt;Security groups/firewalling with iptables&lt;/li&gt;
		&lt;li&gt;&lt;span class=&quot;caps&quot;&gt;VLANS&lt;/span&gt;&lt;/li&gt;
		&lt;li&gt;Initial configuration of nova&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Issues in Cloud Security&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Host security&lt;/li&gt;
	&lt;li&gt;Security of images
	&lt;ul&gt;
		&lt;li&gt;Network-based security is only so good in multitenant cloud&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;The ultimate target is the endpoint&amp;#8212;so secure it&lt;/li&gt;
	&lt;li&gt;Cloud servers are more exposed&lt;/li&gt;
	&lt;li&gt;De-provisioning of servers releases public IPs that might have the wrong firewall rules&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;He then went over some basic host security concepts, quite a few of which I disagree with, or at least he wasn&amp;#8217;t able to really go into depth with what he actually meant by them.&lt;/p&gt;
&lt;p&gt;Generally speaking I think host security has been reduced mostly because in OpenStack most people use images that have already been provided to them and don&amp;#8217;t run any specific configuration management (ie. chef/puppet/&lt;a href=&quot;http://ansible.cc/&quot;&gt;ansible&lt;/a&gt;) &amp;#8220;hardening&amp;#8221; processes.&lt;/p&gt;
&lt;p&gt;Nor do people usually build their own OpenStack images, which I think is an important skill to have. Though if more OS vendors provided base OpenStack images things would be a little easier. As far as I know, at this time, only Ubuntu publishes OpenStack compatible &lt;a href=&quot;http://docs.openstack.org/trunk/openstack-compute/admin/content/starting-images.html&quot;&gt;cloud&lt;/a&gt; &lt;a href=&quot;http://cloud-images.ubuntu.com/&quot;&gt;images&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;&lt;span class=&quot;caps&quot;&gt;SDSC&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Unfortunately, or fortunately, depending on your perspective, that was all the OpenStack security talks I was able to attend on Thursday because I had to go to a meeting at the San Digeo Super Computing Center, or the &lt;a href=&quot;http://www.sdsc.edu/&quot;&gt;&lt;span class=&quot;caps&quot;&gt;SDSC&lt;/span&gt;&lt;/a&gt;, and wasn&amp;#8217;t able to come back to the summit.&lt;/p&gt;
&lt;p&gt;I was excited to go to find out more about what they are doing, especially because they have one of the largest &lt;a href=&quot;https://cloud.sdsc.edu/hp/index.php&quot;&gt;OpenStack Swift installations&lt;/a&gt; in the world. I think about five petabytes worth.&lt;/p&gt;
&lt;p&gt;They were also very excieted about their new supercomputer &lt;a href=&quot;http://www.sdsc.edu/News%20Items/PR030512_gordon.html&quot;&gt;Gordon&lt;/a&gt;, which has a ton of &lt;span class=&quot;caps&quot;&gt;SSD&lt;/span&gt; storage (ie. flash&amp;#8212;get it&amp;#8230;gordon + flash).&lt;/p&gt;
&lt;p&gt;Also they had some old tape systems they were retiring. Tape is not dead yet though!&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://raw.github.com/curtisgithub/curtisgithub.github.com/master/img/sdsc_tape_silo.jpg&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
&lt;em&gt;(old tape silo being retired; sad to see it go)&lt;/em&gt;&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>OpenStack 2012 Summit Day &#35;3</title>
   <link href="http://serverascode.com//2012/10/17/openstack-summit-day-3.html"/>
   <updated>2012-10-17T00:00:00-07:00</updated>
   <id>http://serverascode.com/2012/10/17/openstack-summit-day-3</id>
   <content type="html">&lt;h1&gt;OpenStack 2012 Summit Day &amp;#35;3&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;17 October &amp;#8211; 2012 &amp;#8211; San Diego&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://raw.github.com/curtisgithub/curtisgithub.github.com/master/img/openstack_summit_2012_building.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;Keynotes&lt;/h2&gt;
&lt;p&gt;HP says something enterprise business-like. Not too sure. 100s of billions of &amp;#8220;spend&amp;#8221; available. Capex &amp;#8594; Opex. Many, many slides with business pictographs.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://twitter.com/troytoman&quot;&gt;Troy Toman&lt;/a&gt; from Rackspace talks about how proud they are of OpenStack. Brags about how Rackspace&amp;#8217;s contribution percentage has actually reduced from 54% in Essex and 30% in Folsom and how that is a good thing, which it is. :)&lt;/p&gt;
&lt;p&gt;Notes from Rackspace&amp;#8217;s production usage of OpenStack:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;They have Quantum and &lt;a href=&quot;http://wiki.openstack.org/Melange&quot;&gt;Melange&lt;/a&gt; in production&lt;/li&gt;
	&lt;li&gt;Glance is backed by Swift&lt;/li&gt;
	&lt;li&gt;They have deployed the Cells code; at least three cells in each regon&lt;/li&gt;
	&lt;li&gt;Three regions worldwide&lt;/li&gt;
	&lt;li&gt;All of the &amp;#8220;control&amp;#8221; pieces, eg. &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; servers, are running on a private OpenStack cloud; an internal infrastructure called &lt;em&gt;inova&lt;/em&gt;&lt;/li&gt;
	&lt;li&gt;Continuous delivery model for building and deploying to cloud&amp;#8212;they pull from trunk at least once a day, and do this in under and hour, and have been deploying this once a week or so.&lt;/li&gt;
	&lt;li&gt;Fail fast fix fast&lt;/li&gt;
	&lt;li&gt;Coming soon: block storage and network products&lt;/li&gt;
	&lt;li&gt;Releasing &lt;span class=&quot;caps&quot;&gt;PHP&lt;/span&gt; and Java cloud SDKs&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Cisco Webex talks about what they do. Lots of open source technologies&amp;#8230;puppet, salt, cobbler, etc to run a private cloud so they have &amp;#8220;one throat to choke&amp;#8221;.&lt;/p&gt;
&lt;h2&gt;Service Resiliency Doesn&amp;#8217;t Always mean &amp;#8220;HA&amp;#8221; or &amp;#8220;Cluster&amp;#8221;&lt;/h2&gt;
&lt;p&gt;The guys from CloudScaling talk about redundancy patterns. This was actually pretty fascinating, and looks like they have taken care of a lot of scale-out redundancy, specifically not &amp;#8220;HA-mmer&amp;#8221; pairs, all the way up to the DB level, at which part they fall back to &lt;span class=&quot;caps&quot;&gt;MMR&lt;/span&gt; MySQL.&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;&amp;#8220;HA&amp;#8221; pairs are not the only type of redundancy
	&lt;ul&gt;
		&lt;li&gt;Airplanes require seven catastrophic failures to fall out of the sky, whereas with HA pairs you just need one layer to fail&lt;/li&gt;
		&lt;li&gt;Create small failure domains that don&amp;#8217;t propagate = scale up&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Alternative redundancy patterns&lt;/li&gt;
	&lt;li&gt;Redundancy patterns in Open Source Cloud Software&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;CloudScaling have come up with a methodology for &amp;#8220;HA&amp;#8221; they call Service Distribution.&lt;/p&gt;
&lt;p&gt;Service Distribution&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Resilient&lt;/li&gt;
	&lt;li&gt;Stateless&lt;/li&gt;
	&lt;li&gt;Scale-out&lt;/li&gt;
	&lt;li&gt;Implementation
	&lt;ul&gt;
		&lt;li&gt;&lt;span class=&quot;caps&quot;&gt;OSPF&lt;/span&gt; (quagga), Anycast (zebra), Load-balancing proxy (pound)&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Perfect for site resiliency
	&lt;ul&gt;
		&lt;li&gt;Traditional HA pairs don&amp;#8217;t support this&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Use ZeroMQ (peer-to-peer) vs RabittMQ and CloudScaling contributed the code back to OpenStack for ZeroMQ&lt;/li&gt;
	&lt;li&gt;Making data centers look like &lt;span class=&quot;caps&quot;&gt;ISP&lt;/span&gt; backbones&lt;br /&gt;
&lt;p&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;CirrOS, cloud-init: the future of cloud guests&lt;/h2&gt;
&lt;p&gt;I think the dev sessions are really about starting conversations that will be finished elsewhere, and if you aren&amp;#8217;t fairly deep into the topic there&amp;#8217;s not a lot of ways to get your head into the session. I&amp;#8217;ve felt the pain of the lack of Cloud-init in Redhat. I&amp;#8217;m surprised that there is just one person creating Cirros.&lt;/p&gt;
&lt;p&gt;Topics Covered&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Cirros&lt;/li&gt;
	&lt;li&gt;Cloud-init&lt;/li&gt;
	&lt;li&gt;Config drive 2&lt;/li&gt;
	&lt;li&gt;Execute code from metadata in various ways&lt;br /&gt;
&lt;p&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Adding OpenVZ support to Nova&lt;/h2&gt;
&lt;p&gt;Rackspace has code that will eventually make it&amp;#8217;s way into trunk for using OpenVZ in OpenStack. The session leader, Devananda van der Veen,  has created a way to build an OpenVZ kernel on Ubuntu. Rackspace uses OpenVZ to run their cloud database system because they get better performance than using something like &lt;span class=&quot;caps&quot;&gt;KVM&lt;/span&gt; for virtualization.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/openstack-ci/devstack-gate&quot;&gt;devstack-gate&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://etherpad.openstack.org/grizzly-nova-openvz&quot;&gt;Etherpad for this session&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Most of the discussion was about how to get the OpenVZ driver into the OpenStack continuous integration system.&lt;/p&gt;
&lt;h2&gt;Cloud Hosted Desktops and OpenStack&lt;/h2&gt;
&lt;p&gt;Ken Ringdahl, Vice President Engineering, Desktone discusses Desktop as a Service. I&amp;#8217;m interested in this topic not because I&amp;#8217;m interested in the topic, but because the project I&amp;#8217;m currently working on is essentially desktop in the cloud via &lt;a href=&quot;https://cwiki.apache.org/VCL/apache-vcl.html&quot;&gt;Apache &lt;span class=&quot;caps&quot;&gt;VCL&lt;/span&gt;&lt;/a&gt; and I&amp;#8217;m constantly thinking about how to get off &lt;span class=&quot;caps&quot;&gt;VCL&lt;/span&gt; and away from it&amp;#8217;s 40k lines of perl, and just use OpenStack with a thin layer on top of it. The reality is that OpenStack has 95% of the code required to implement a service similar to &lt;span class=&quot;caps&quot;&gt;VCL&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;So Ken goes through his slides. Mentions &lt;span class=&quot;caps&quot;&gt;VDI&lt;/span&gt; and that &lt;span class=&quot;caps&quot;&gt;VDI&lt;/span&gt; is hard! Capex, buy more hardware, can&amp;#8217;t fit it in their data center, &lt;span class=&quot;caps&quot;&gt;SAN&lt;/span&gt; administrators, etc. &lt;span class=&quot;caps&quot;&gt;VDI&lt;/span&gt; is tough. But DaaS is not &lt;span class=&quot;caps&quot;&gt;VDI&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;The point of the session is that DaaS is a three billion dollar market and is a new business area that OpenStack can access. Further he talks about the fact that running a desktop resource manager/broker on top of OpenStack can create operational and other cost savings. It also allows and organization like Desktone to focus on user experience versus running infrastructure.&lt;/p&gt;
&lt;p&gt;Desktops are Different&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Storage is key
	&lt;ul&gt;
		&lt;li&gt;Random IO&lt;/li&gt;
		&lt;li&gt;Write intensive IO&lt;/li&gt;
		&lt;li&gt;Scale: 500 servers is a lot, 500 desktops is not&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Optimize OpenStack for DaaS
	&lt;ul&gt;
		&lt;li&gt;HA for desktops is different from servers&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;The future of &lt;span class=&quot;caps&quot;&gt;VDI&lt;/span&gt; is non-persistence&amp;#8230;nothing stored in VMs&lt;/li&gt;
	&lt;li&gt;# of VMs under management requires a different approach
	&lt;ul&gt;
		&lt;li&gt;Eg. VM and guest state changes&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Monitoring is critically important&lt;/li&gt;
	&lt;li&gt;DaaS encompasses all parts of OpenStack&lt;/li&gt;
&lt;/ul&gt;</content>
 </entry>
 
 <entry>
   <title>OpenStack 2012 Summit Day &#35;2</title>
   <link href="http://serverascode.com//2012/10/16/openstack-summit-day-2.html"/>
   <updated>2012-10-16T00:00:00-07:00</updated>
   <id>http://serverascode.com/2012/10/16/openstack-summit-day-2</id>
   <content type="html">&lt;h1&gt;OpenStack 2012 Summit Day &amp;#35;2&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;16 October &amp;#8211; 2012 &amp;#8211; San Diego&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://raw.github.com/curtisgithub/curtisgithub.github.com/master/img/openstack_summit_hotel2.jpg&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
&lt;em&gt;(Another picture of the hotel&amp;#8230;can you tell I just got Instagram?)&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;Keynotes&lt;/h2&gt;
&lt;p&gt;The keynotes mostly focused on the increased sized of the OpenStack community and the creation of the foundation that now runs OpenStack. Except Shuttleworth&amp;#8217;s in which he used Juju to live upgrade from Essex to Folsom which turned some heads. It&amp;#8217;s the first time I&amp;#8217;ve heard him speak, and he seemed exactly like the kind of person that can sit in-between business and open source. Chris Kemp was good, and took a couple of shots at VMWare which I always think is fun. ;)&lt;/p&gt;
&lt;h2&gt;High Availability&lt;/h2&gt;
&lt;p&gt;Florian Haas of &lt;a href=&quot;http://www.hastexo.com/&quot;&gt;Hastexo&lt;/a&gt; presented an update on high-availability with OpenStack. The company I currently work for has, in the past, contracted Florian/Hastexo to consult on OpenStack deployments and I like the things that he says. He&amp;#8217;s the go to person for HA + OpenStack.&lt;/p&gt;
&lt;p&gt;He talked at length about &lt;a href=&quot;http://clusterlabs.org/wiki/Pacemaker&quot;&gt;Pacemaker&lt;/a&gt; which is a cluster resource manager. Interestingly he notes that it runs air traffic control systems. Also he mentions that it is extremely friendly to 3rd party functionality via plugins/resource agents,&lt;/p&gt;
&lt;p&gt;He also went through the OpenStack High Availability Guide which he was largely responsible for creating, and mentioned that it is in &lt;a href=&quot;https://github.com/openstack/openstack-manuals/tree/master/doc/src/docbkx/openstack-ha&quot;&gt;source control&lt;/a&gt; and thus people can contribute patches.&lt;/p&gt;
&lt;p&gt;The slides for this talk are &lt;a href=&quot;http://www.hastexo.com//resources/presentations/high-availability-update&quot;&gt;online&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Frameworks and APIs for Advanced Service Insertion&lt;/h2&gt;
&lt;p&gt;This was a developer session on the future methodologies of inserting things like firewalls, load balancers and such into Quantum. It was interesting to hear some of the thoughts on the topologies of Quantum and how OpenStack is trying not just to replicate existing networking technologies, but create something new. It was nice to hear the word router with an Italian accent. OpenStack is a global project.&lt;/p&gt;
&lt;h2&gt;Lunch&lt;/h2&gt;
&lt;p&gt;Not much to say, on this. There was tortilla soup though. :)&lt;/p&gt;
&lt;h2&gt;The Future of Infrastructure Automation&lt;/h2&gt;
&lt;p&gt;This session was not what I thought it was going to be. I didn&amp;#8217;t realize it was part of the strategy track until I was sitting down listening, and so before knowing that I figured it would be about what comes after puppet/chef/etc&amp;#8230;which it was not.&lt;/p&gt;
&lt;p&gt;I don&amp;#8217;t have a lot to say about this session, other than the speaker liked &lt;a href=&quot;http://www.webhooks.org/&quot;&gt;webhooks&lt;/a&gt; and push notifications, that it would be nice to for a guest in OpenStack to be able to write metadata instead of just reading, and that some organizations are working on this functionality. I definitely would like to be able to write metadata from guests so that was good to hear.&lt;/p&gt;
&lt;h2&gt;Surviving your first check-in: An engineers guide to contributing to OpenStack&lt;/h2&gt;
&lt;p&gt;This was a great session on lessons learned by an engineer (specifically not a developer), &lt;a href=&quot;http://www.colinmcnamara.com/&quot;&gt;Collin McNamera&lt;/a&gt;, who wanted to contribute code to OpenStack. To get his code into OpenStack he had a ratio of 100:1 in terms of time spent figuring out how to contribute and waiting for answers vs actually coding. That was for his first contribution so the ratio is better now, but it was a tough slog at first.&lt;/p&gt;
&lt;p&gt;Lessons learned:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Join, or start, a local meetup group&lt;/li&gt;
	&lt;li&gt;Make sure that according to your employer you can contribute code to OpenSource projects&lt;/li&gt;
	&lt;li&gt;Execute your OpenStack &lt;span class=&quot;caps&quot;&gt;CLA&lt;/span&gt; (contributor license agreement)&lt;/li&gt;
	&lt;li&gt;Setup your dev environment, probably using virtual machines
	&lt;ul&gt;
		&lt;li&gt;&lt;a href=&quot;http://devstack.org/&quot;&gt;Devstack&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;With devstack you can point it to a different OpenStack git repo if you want&lt;/li&gt;
		&lt;li&gt;Use vm snapshotting to help you keep using your dev environment&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Configure git with your name, email, etc and this will save time in the future. Do it right first!&lt;/li&gt;
	&lt;li&gt;Install git-review&lt;/li&gt;
	&lt;li&gt;Clone a project, or use the directories that came with Devstack&lt;/li&gt;
	&lt;li&gt;Add your ssh key to OpenStack Code Review&lt;/li&gt;
	&lt;li&gt;Create a topic branch&lt;/li&gt;
	&lt;li&gt;Change code&lt;/li&gt;
	&lt;li&gt;Test code: run_tests.sh&lt;/li&gt;
	&lt;li&gt;Commit changes &amp;#8211; make sure to put a bug id or blueprint # in the first line&lt;/li&gt;
	&lt;li&gt;Then give back to the community by teaching others! :)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;While it&amp;#8217;s disappointing to hear how hard it is to contribute code, Collin was a great speaker is obviously passionate about doing good open source work and contributing back to the community.&lt;/p&gt;
&lt;h2&gt;Swift Project Update&lt;/h2&gt;
&lt;p&gt;As I mentioned in my &lt;a href=&quot;http://serverascode.com/2012/10/15/openstack-summit-day-1.html&quot;&gt;previous post&lt;/a&gt; I am a big fan of object storage, so Swift is an important project to me. :)&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;New features in the last six months
	&lt;ul&gt;
		&lt;li&gt;Folsom version of Swift is 1.7.4&lt;/li&gt;
		&lt;li&gt;Unique-as-possible &amp;#8211; Allows more flexible growth, and more harddrives as hand-off nodes&lt;/li&gt;
		&lt;li&gt;Deep statsd integration &amp;#8211; Enables notifications that things like graphite can graph&lt;/li&gt;
		&lt;li&gt;&lt;span class=&quot;caps&quot;&gt;SSD&lt;/span&gt; optimization &amp;#8211; It turns out that in large clusters the account and container servers can become limited by IOPs.&lt;/li&gt;
		&lt;li&gt;Versioned writes &amp;#8211; This feature is &amp;#8220;almost&amp;#8221; there&lt;/li&gt;
		&lt;li&gt;Moved swift client into it&amp;#8217;s own project&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Code golf for the last six months
	&lt;ul&gt;
		&lt;li&gt;37 people have contributed&lt;/li&gt;
		&lt;li&gt;20 have provided their first patch&lt;/li&gt;
		&lt;li&gt;Three new core developers&lt;/li&gt;
		&lt;li&gt;170 total commits&lt;/li&gt;
		&lt;li&gt;17 is the most files touched by a single commit (statsd integration)&lt;/li&gt;
		&lt;li&gt;3466 is the most lines removed in a single patch (moving swift-client out to a new project)&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;What&amp;#8217;s next?
	&lt;ul&gt;
		&lt;li&gt;Global clusters &amp;#8211; ie. Geographic replication, will hopefully be in Grizzly&lt;/li&gt;
		&lt;li&gt;&lt;span class=&quot;caps&quot;&gt;CORS&lt;/span&gt; Support &amp;#8211; Better integrate with the browser security model&lt;/li&gt;
		&lt;li&gt;Optimize concurrent reads&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://raw.github.com/curtisgithub/curtisgithub.github.com/master/img/nebula_pool.jpg&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
&lt;em&gt;(Nebula logo projected on the pool at the club)&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;Parties&lt;/h2&gt;
&lt;p&gt;This night I went to both the Rackspace and Nebula parties, though I came back to the hotel pretty early. At the Rackspace party I learned that Miramar, the location of the flight school in Top Gun, is only a few minutes away and actually watched some military jets maneuvering out over the ocean. Surprised no one sang &lt;em&gt;You&amp;#8217;ve Lost That Loving Feeling&lt;/em&gt;. ;)&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://raw.github.com/curtisgithub/curtisgithub.github.com/master/img/topgun.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>ipmitool and BIOS Access</title>
   <link href="http://serverascode.com//2012/10/16/dell-ipmi-bios.html"/>
   <updated>2012-10-16T00:00:00-07:00</updated>
   <id>http://serverascode.com/2012/10/16/dell-ipmi-bios</id>
   <content type="html">&lt;h1&gt;ipmitool and &lt;span class=&quot;caps&quot;&gt;BIOS&lt;/span&gt; Access&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;16 October &amp;#8211; 2012 &amp;#8211; San Diego&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://raw.github.com/curtisgithub/curtisgithub.github.com/master/img/sol_bios.png&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
&lt;em&gt;(&lt;span class=&quot;caps&quot;&gt;BIOS&lt;/span&gt; access via the terminal)&lt;/em&gt;&lt;/p&gt;
&lt;h1&gt;Accessing the &lt;span class=&quot;caps&quot;&gt;BIOS&lt;/span&gt; in a terminal with ipmitool&lt;/h1&gt;
&lt;p&gt;When I put my systems administrator hat on one of the things that bothers me is getting remote access to the &lt;span class=&quot;caps&quot;&gt;BIOS&lt;/span&gt;. I love to use the command line, and any time I have to fire up a &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt; of some kind to do work I get an icky feeling.&lt;/p&gt;
&lt;p&gt;So when I had to remotely access some Dell C6220s to turn on virtualization, which is off by default in these Dell servers, I didn&amp;#8217;t want to have to go through the rigamarole of getting the right OS configuration that would allow me to remotely access the console via a web-based Java &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt; run out of Firefox. Even writing that sentence takes too long. So I thought I would try out serial over lan (&lt;span class=&quot;caps&quot;&gt;SOL&lt;/span&gt;) access.&lt;/p&gt;
&lt;p&gt;And it works!&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
server2 $ ipmitool -I lanplus -H server1-ipmi -U root -P password sol activate
[SOL Session operational.  Use ~? for help]

Ubuntu 12.04.1 LTS server1 ttyS1

server1 login: 
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;If we reboot the server we can see all the usual boot screens and can access them all without having to fire up the Java based console, instead I can just ssh into a second server that has access to the ipmi network and connect with ipmitool.&lt;/p&gt;
&lt;p&gt;Here are some of the key mappings that will help to use ipmitool. The main thing to note is how to exit from the &lt;span class=&quot;caps&quot;&gt;SOL&lt;/span&gt; session, and to do that you basically hit &lt;span class=&quot;caps&quot;&gt;ENTER&lt;/span&gt; the a tilde, then a period. (For some reason this will usually log me not only out of the &lt;span class=&quot;caps&quot;&gt;SOL&lt;/span&gt; session, but also the ssh session. Something to look into.)&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
server2 $ ipmitool -I lanplus -H 10.10.10.10 -U username -P password sol activate
[SOL Session operational.  Use ~? for help]
Here are some useful commands:
        KEY MAPPING FOR CONSOLE REDIRECTION:
         Use the &amp;lt;ESC&amp;gt;&amp;lt;0&amp;gt; key sequence for &amp;lt;F10&amp;gt;
    	Use the &amp;lt;ESC&amp;gt;&amp;lt;!&amp;gt; key sequence for &amp;lt;F11&amp;gt;
    	Use the &amp;lt;ESC&amp;gt;&amp;lt;@&amp;gt; key sequence for &amp;lt;F12&amp;gt;
        Use the &amp;lt;ESC&amp;gt;&amp;lt;Ctrl&amp;gt;&amp;lt;M&amp;gt; key sequence for &amp;lt;Ctrl&amp;gt;&amp;lt;M&amp;gt;
    	Use the &amp;lt;ESC&amp;gt;&amp;lt;Ctrl&amp;gt;&amp;lt;H&amp;gt; key sequence for &amp;lt;Ctrl&amp;gt;&amp;lt;H&amp;gt;
    	Use the &amp;lt;ESC&amp;gt;&amp;lt;Ctrl&amp;gt;&amp;lt;I&amp;gt; key sequence for &amp;lt;Ctrl&amp;gt;&amp;lt;I&amp;gt;
    	Use the &amp;lt;ESC&amp;gt;&amp;lt;Ctrl&amp;gt;&amp;lt;J&amp;gt; key sequence for &amp;lt;Ctrl&amp;gt;&amp;lt;J&amp;gt;
        Use the &amp;lt;ESC&amp;gt;&amp;lt;X&amp;gt;&amp;lt;X&amp;gt; key sequence for &amp;lt;Alt&amp;gt;&amp;lt;x&amp;gt;, where x is any letter
    	key, and X is the upper case of that key
        Use the &amp;lt;ESC&amp;gt;&amp;lt;R&amp;gt;&amp;lt;ESC&amp;gt;&amp;lt;r&amp;gt;&amp;lt;ESC&amp;gt;&amp;lt;R&amp;gt; key sequence for &amp;lt;Ctrl&amp;gt;&amp;lt;Alt&amp;gt;&amp;lt;Del&amp;gt;
Help commands from ~?:
Supported escape sequences:
    	~.  - terminate connection
    	~^Z - suspend ipmitool
    	~^X - suspend ipmitool, but don't restore tty on restart
    	~B  - send break
    	~?  - this message
    	~~  - send the escape character by typing it twice
    	(Note that escapes are only recognized immediately after newline.)
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;There are all kinds of things one can do with ipmitool other than terminal based &lt;span class=&quot;caps&quot;&gt;BIOS&lt;/span&gt; access, and I won&amp;#8217;t list all of them here, but one nice thing is the ability to set the boot device, for example setting the boot device to disk and doing so for all future reboots.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
server2 $ ipmitool -H 10.10.10.10 -U root -P password chassis bootdev disk \
options=persistent
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Here are the kernel configs I used to tell Ubuntu to use serial. Note that I added the &amp;#8220;\&amp;#8221; in the text below, so you can&amp;#8217;t just cut and paste it; needs to be all on one line.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
pxeboot-server:/tftp/pxelinux.cfg# cat default 
# D-I config version 2.0
DEFAULT server
prompt 0
timeout 1
# serial console
console 0
serial 0 115200 0

LABEL server
kernel ubuntu-installer/amd64/linux
append ramdisk_size=14984 locale=en_US keyboard-configuration/layoutcode=us \
console-keymaps-at/keymap=us locale=en_US console-setup/layoutcode=en_US \
netcfg/wireless_wep= netcfg/choose_interface=eth0 netcfg/get_hostname=c01-07 \
url=http://10.10.10.10/node.preseed vga=normal \
initrd=ubuntu-installer/amd64/initrd.gz -- \
console=ttyS1,115200 earlyprint=serial,ttyS1,115200
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Finally I&amp;#8217;ll show a screenshot of a text install happening, and I am watching that via text-based &lt;span class=&quot;caps&quot;&gt;SOL&lt;/span&gt; access.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://raw.github.com/curtisgithub/curtisgithub.github.com/master/img/sol_install.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;So give &lt;span class=&quot;caps&quot;&gt;SOL&lt;/span&gt; a shot, and let me know if I&amp;#8217;ve made any mistakes in this post, or if there are other interesting things that can be done with ipmitool. :)&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>OpenStack 2012 Summit Day &#35;1</title>
   <link href="http://serverascode.com//2012/10/15/openstack-summit-day-1.html"/>
   <updated>2012-10-15T00:00:00-07:00</updated>
   <id>http://serverascode.com/2012/10/15/openstack-summit-day-1</id>
   <content type="html">&lt;h1&gt;OpenStack 2012 Summit Day &amp;#35;1&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;15 October &amp;#8211; 2012 &amp;#8211; San Diego&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://raw.github.com/curtisgithub/curtisgithub.github.com/master/img/openstack_hotel.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;h1&gt;OpenStack 2012 Summit&lt;/h1&gt;
&lt;p&gt;This week I&amp;#8217;m at the OpenStack 2012 Summit. It&amp;#8217;s by far the biggest conference I&amp;#8217;ve been to. Usually I go to conferences on security, such as &lt;a href=&quot;http://en.wikipedia.org/wiki/Hackers_on_Planet_Earth&quot;&gt;H.O.P.E&lt;/a&gt; or &lt;a href=&quot;http://cansecwest.com/&quot;&gt;CanSec&lt;/a&gt; or even smaller library related conferences. Given that OpenStack is one of the fastest growing open source projects of all time, it&amp;#8217;s no surprise to find out that the conference has grown from 75 people a couple years ago, to about 1300 this year, up from 700 only a year ago. It&amp;#8217;s massive and it&amp;#8217;s growing.&lt;/p&gt;
&lt;h2&gt;tl;dr&lt;br /&gt;
&lt;p&gt;&lt;/p&gt;&lt;/h2&gt;
&lt;ul&gt;
	&lt;li&gt;Need to get into Ceph&lt;/li&gt;
	&lt;li&gt;Database as a service too&lt;/li&gt;
	&lt;li&gt;Upgrading is a big issue in OpenStack&lt;/li&gt;
	&lt;li&gt;San Diego is nice&lt;/li&gt;
	&lt;li&gt;OpenStack is kinda a big deal&lt;br /&gt;
&lt;p&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Opening &amp;#8220;keynote&amp;#8221;&lt;/h2&gt;
&lt;p&gt;Not much to say here, some summit housekeeping with trippy techno rave music to wake me up. :)&lt;/p&gt;
&lt;h2&gt;Open Compute&lt;/h2&gt;
&lt;p&gt;The first session I attended was by &lt;a href=&quot;https://twitter.com/coleinthecloud&quot;&gt;Cole Crawford&lt;/a&gt; of the &lt;a href=&quot;http://opencompute.org/&quot;&gt;Open Compute Foundation&lt;/a&gt;. Basically this was an overview of the history of things like the 19&amp;quot; rack (it came from waaaaay back from the train system) and how we need to change our standards to allow things like interoperability and other good stuff.&lt;/p&gt;
&lt;p&gt;I was hoping to find out how a small organization&amp;#8212;like the one that I work for&amp;#8212;could be involved in Open Compute, specifically how we could access similar hardware as Facebook and others are using. I didn&amp;#8217;t quite get that out of the presentation, but hopefully in the future I will be able to get us into Open Compute hardware in some fashion or another.&lt;/p&gt;
&lt;p&gt;At the very least I signed up for the mailing list. :)&lt;/p&gt;
&lt;h2&gt;Intercloud Object Storage: Colony&lt;/h2&gt;
&lt;p&gt;The &lt;a href=&quot;https://github.com/nii-cloud/colony&quot;&gt;Colony&lt;/a&gt; session was lead by Shigetoshi Yokoyama of the &lt;a href=&quot;http://www.nii.ac.jp/en/&quot;&gt;Japan National Institute of Informatics&lt;/a&gt; and there is a copy of the slides  &lt;a href=&quot;http://www.slideshare.net/shigetoshi-yokoyama/openstack-design-summit-colony-session-12603753&quot;&gt;online&lt;/a&gt;. Colony is described as &amp;#8220;federated swifts&amp;#8221; for intercloud object storage services.&lt;/p&gt;
&lt;p&gt;Having worked in a world class library that was interested in running petabytes of storage, I&amp;#8217;m enthralled with object storage. It&amp;#8217;s an important storage paradigm, and surprisingly, for reasons unknown, one that doesn&amp;#8217;t seem to get a lot of attention in Canada. Perhaps it&amp;#8217;s because startups and other organizations just use S3 and haven&amp;#8217;t run into any privacy issues as of yet. Speaking of Amazon S3: it has a trillion+ objects stored now.&lt;/p&gt;
&lt;p&gt;I think that in situations where we need to store a lot of replicated data&amp;#8212;such as what a library or researcher would like to, or rather &lt;strong&gt;should&lt;/strong&gt; like to store&amp;#8212;object storage such as swift is a great way to go. (Though that said, perhaps systems like &lt;a href=&quot;http://aws.amazon.com/glacier/&quot;&gt;Amazon&amp;#8217;s Glacier&lt;/a&gt; make more sense for those use cases, but maybe not.) I was at a presentation by the then &lt;a href=&quot;http://webdocs.cs.ualberta.ca/~jonathan/&quot;&gt;&lt;span class=&quot;caps&quot;&gt;CIO&lt;/span&gt; of the University of Alberta&lt;/a&gt; who figured there was three to five petabytes of research data on campus that needs to be preserved. That&amp;#8217;s a lot of storage, especially when factoring in replication, and it really needs to happen at some point&amp;#8212;and it can&amp;#8217;t just be a huge tape system.&lt;/p&gt;
&lt;p&gt;Further, considering that libraries and researchers  (ie. their respective Universities and organizations), are supposed to work together it would make sense to be able to have some kind of interoperability between object storage clouds, private or otherwise, even if it&amp;#8217;s just for some geographic separation.&lt;/p&gt;
&lt;p&gt;Certainly Colonly is going to be a project to keep an eye on as object storage evolves and we try to do it across data centers and organizations.&lt;/p&gt;
&lt;h2&gt;Operating your OpenStack Private Cloud&lt;/h2&gt;
&lt;p&gt;The next session I attended was &lt;a href=&quot;http://www.openstack.org/summit/san-diego-2012/openstack-summit-sessions/&quot;&gt;Operating your OpenStack Private Cloud&lt;/a&gt;, which is good because that is one of the things that I do. I manage a small, eight node, OpenStack cluster that will eventually backend a &lt;a href=&quot;https://cwiki.apache.org/VCL/apache-vcl.html&quot;&gt;Apache &lt;span class=&quot;caps&quot;&gt;VCL&lt;/span&gt;&lt;/a&gt; setup for virtual classrooms. So a very small private cloud, but I&amp;#8217;ve still hit a few &amp;#8220;pain points&amp;#8221; that larger installations do.&lt;/p&gt;
&lt;p&gt;A few points the speaker made:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Monitoring: statsd, graphite, etc&lt;/li&gt;
	&lt;li&gt;Operations tools don&amp;#8217;t exist for OpenStack (yet)&amp;#8212;we need better ops tools so he wrote &lt;a href=&quot;https://github.com/JCallicoat/pulsar&quot;&gt;Pulsar&lt;/a&gt;
	&lt;ul&gt;
		&lt;li&gt;Would be nice to see an operations dashboard (perhaps in horizon)&lt;/li&gt;
		&lt;li&gt;Eg. can&amp;#8217;t get a list of all instances on a node and their IP addresses&lt;/li&gt;
		&lt;li&gt;Some tools need hostnames and some need ids&amp;#8230;why&lt;/li&gt;
		&lt;li&gt;&lt;span class=&quot;caps&quot;&gt;DSH&lt;/span&gt; for Ubuntu, &lt;span class=&quot;caps&quot;&gt;PSH&lt;/span&gt; for Redhat?&lt;/li&gt;
		&lt;li&gt;Don&amp;#8217;t forget your bashfu; still working with Linux :)&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Database backups
	&lt;ul&gt;
		&lt;li&gt;&lt;a href=&quot;http://hollandbackup.org/&quot;&gt;Holland&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Performance and scale considerations
	&lt;ul&gt;
		&lt;li&gt;Block storage solution of some kind (cinder, or cinder + some vendor)&lt;/li&gt;
		&lt;li&gt;Local disk &amp;#8211; raw image is only slightly faster than qcow2, but qcow2 may make better business sense&lt;/li&gt;
		&lt;li&gt;IO will degrade on local disks when glance copies images between machines&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Scheduling
	&lt;ul&gt;
		&lt;li&gt;&lt;span class=&quot;caps&quot;&gt;CFQ&lt;/span&gt; made the most sense&lt;/li&gt;
		&lt;li&gt;You have the power to change all this! You have the power to change your scheduler! Benchmark workloads and plan accordingly.&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Lots of things you can do with glance performance-wise
	&lt;ul&gt;
		&lt;li&gt;Image caching&lt;/li&gt;
		&lt;li&gt;If you&amp;#8217;re using qcow2 it doesn&amp;#8217;t have to move the whole image (something to check into)&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Don&amp;#8217;t want swift to become unbalanced&lt;/li&gt;
	&lt;li&gt;They use chef for automated deployment
	&lt;ul&gt;
		&lt;li&gt;controller in 15 minutes&lt;/li&gt;
		&lt;li&gt;compute in two&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Day to day tasks
	&lt;ul&gt;
		&lt;li&gt;Made up of mostly dealing with new issues&lt;/li&gt;
		&lt;li&gt;Eg. resizing&lt;/li&gt;
		&lt;li&gt;Hardware failures&amp;#8230;still have all this hardware&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Don&amp;#8217;t forget&amp;#8212;it&amp;#8217;s not (always) you, it&amp;#8217;s a bug&lt;/li&gt;
	&lt;li&gt;Nice thing about a private cloud is you can pick the architecture that matches your requirements&lt;/li&gt;
	&lt;li&gt;OpenStack/We need to provide an upgrade path (I hear this 20 times today)&lt;/li&gt;
	&lt;li&gt;Metrics
	&lt;ul&gt;
		&lt;li&gt;Load average is actually quite telling&lt;/li&gt;
		&lt;li&gt;How long does an &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; call take?&lt;br /&gt;
&lt;br /&gt;&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Lunch!&lt;/h2&gt;
&lt;p&gt;Lunch was Ok. There are so many people here it&amp;#8217;s tough to move around. And given OpenStack gave out giant bags, everyone (like me) has their own personal giant bag, plus the one they got from OpenStack (though I gave mine back). Giant bags galore!&lt;/p&gt;
&lt;p&gt;Then I had a beer at the bar downstairs:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://raw.github.com/curtisgithub/curtisgithub.github.com/master/img/openstack_summit_2012_bar.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;Database as a Service&lt;/h2&gt;
&lt;p&gt;This session is specifically about &lt;a href=&quot;http://wiki.openstack.org/DatabaseAsAService&quot;&gt;RedDwarf&lt;/a&gt;. RedDwarf is taking MySQL and treating it like a &amp;#8220;first class citizen&amp;#8221; in OpenStack. It&amp;#8217;s a managed MySQL database service.&lt;/p&gt;
&lt;p&gt;I believe that &lt;span class=&quot;caps&quot;&gt;SQL&lt;/span&gt; databases should be separated out from compute. That said, there are many people that would disagree with me. There&amp;#8217;s a theory out there that storage and compute should be together on the same nodes, and if that&amp;#8217;s the case then I assume so would database. Right now I would prefer to separate out storage, compute, and database. Maybe it doesn&amp;#8217;t fit perfectly with the cloud paradigm, but sometimes you have to apply technology not just theorize about it. &lt;span class=&quot;caps&quot;&gt;SQL&lt;/span&gt; isn&amp;#8217;t going anywhere, and neither is its unique workload.&lt;/p&gt;
&lt;p&gt;HP and Rackspace have slightly different implementations of RedDwarf, and both of their services are in production. Each are trying to keep their system compatible with OpenStack, and have committed themselves to using the same &lt;span class=&quot;caps&quot;&gt;CLI&lt;/span&gt;: &lt;a href=&quot;https://github.com/hub-cap/python-reddwarfclient&quot;&gt;python-reddwarfclient&lt;/a&gt;. Further, they are both using OpenStack-common and Swift for securely storing database snapshots.&lt;/p&gt;
&lt;p&gt;The team has a desire to bring RedDwarf forward, and they want to involve more community usage and get it into incubation in OpenStack and at that point a lot of doors open, such as a &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt; in Horizon.&lt;/p&gt;
&lt;p&gt;You can get a test install using the below commands, and it will &amp;#8220;fake&amp;#8221; a nova backend.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ git clone https://github.com/hub-cap/reddwarf_lite
$ ./reddwarf_lite/bin/start_server.sh
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;There was also a lot of discussion as to the fact that RedDwarf could be used to build &lt;em&gt;Other Things as a Service&lt;/em&gt; and also the fact that they are running it on top of OpenVZ versus another virtualization hypervisor and did so for performance reasons (up to 30% better was a number mentioned).&lt;/p&gt;
&lt;h2&gt;Extending OpenStack for Fun and Profit: Creating New Functionality with the Enhancements &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This session is about having two sides&amp;#8212;one side is OpenStack, and the other side is &amp;#8220;your innovation&amp;#8221;. It&amp;#8217;s about getting OpenStack and your innovation to talk to one another; about getting your innovation to market and make money.&lt;/p&gt;
&lt;p&gt;The speaker, Tim Smith, is the &lt;a href=&quot;http://www.gridcentric.com/company/management/&quot;&gt;co-founder&lt;/a&gt; of GridCentric which has essentially implemented &lt;em&gt;fork()&lt;/em&gt; for virtual machines. The main idea is spin up replica instances quickly and efficiently. They are reinventing boot, and in order to do that they need to extend Nova. GridCentric&amp;#8217;s code for their extension is up on &lt;a href=&quot;https://github.com/gridcentric/openstack&quot;&gt;github&lt;/a&gt; and would be a good example to work from. (I&amp;#8217;ve looked at GridCentric&amp;#8217;s offerings before in relation to virtual classrooms&amp;#8212;ie. not having a bootstorm when a bunch of students startup instances for a class. With something like GridCentric&amp;#8217;s technology you don&amp;#8217;t have to boot the instance.)&lt;/p&gt;
&lt;p&gt;Nova is a framework providing:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;A standardized &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;Messaging/&lt;span class=&quot;caps&quot;&gt;RPC&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;Database-backed &lt;span class=&quot;caps&quot;&gt;ORM&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Nova can be extended by:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; extensions&lt;/li&gt;
	&lt;li&gt;Custom &amp;#8220;services&amp;#8221;&lt;/li&gt;
	&lt;li&gt;Nova &lt;span class=&quot;caps&quot;&gt;CLI&lt;/span&gt; extensions&lt;/li&gt;
	&lt;li&gt;Dashboard extensions&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Tim suggests that there are a few business challenges such as the fast evolution of OpenStack but generally seems positive about extending OpenStack. Certainly GridCentric has based some of their business on OpenStack.&lt;/p&gt;
&lt;p&gt;A commenter noted that there are actually pre-action and post-action boot hooks in Folsom which may help to extend Nova.&lt;/p&gt;
&lt;h2&gt;Storing VMs with Cinder and Ceph &lt;span class=&quot;caps&quot;&gt;RBD&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Considering how interested I am in storage, this project, &lt;a href=&quot;http://ceph.com/&quot;&gt;Ceph&lt;/a&gt;, is one of the most important I know of. So when Josh from Inktank talks about Ceph, I&amp;#8217;m here to listen. As a note, this room is standing room only for this session!&lt;/p&gt;
&lt;p&gt;Ceph is designed for scalability&amp;#8212;it has no single point of failure, and you don&amp;#8217;t have to be locked into a single hardware vendor. It&amp;#8217;s software based and self-managing. There is also the ability to run custom functions on the storage node&amp;#8212;such as create a thumbnail from an image file.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://ceph.com/wiki/Custom_data_placement_with_CRUSH&quot;&gt;&lt;span class=&quot;caps&quot;&gt;CRUSH&lt;/span&gt;&lt;/a&gt; is basically what sets Ceph apart from other storage systems. It&amp;#8217;s a pseudo-random placement algorithm and it ensures even distribution across the cluster and has a rules-based system. Basically it avoids look up tables, which eventually kill distributed storage. Further, unlike &lt;span class=&quot;caps&quot;&gt;RAID&lt;/span&gt; the entire cluster can recover in parallel.&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;RBD&lt;/span&gt;, the Rados Block Device, is the part of Ceph used to access block storage. &lt;span class=&quot;caps&quot;&gt;KVM&lt;/span&gt; has a native driver for &lt;span class=&quot;caps&quot;&gt;RBD&lt;/span&gt;. They are thin-provisioned, striped across nodes, and support snapshots and cloning. With &lt;span class=&quot;caps&quot;&gt;RBD&lt;/span&gt; you can spin up thousands of virtual machines with the same base image.&lt;/p&gt;
&lt;p&gt;Why use block storage in OpenStack?&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Persistent&lt;/li&gt;
	&lt;li&gt;Not tied to a single host&amp;#8212;decouple storage from compute&lt;/li&gt;
	&lt;li&gt;Enables live migration&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now with Folsom, Cinder has learned how to talk to Glance, which can respond with Images&amp;#8212;ie. boot from volume. But still involves a large copy from Glance. However, images can be stored in &lt;span class=&quot;caps&quot;&gt;RBD&lt;/span&gt;, and have been able to for some time! So we can skip the copy and just use &lt;span class=&quot;caps&quot;&gt;RBD&lt;/span&gt; directly.&lt;/p&gt;
&lt;p&gt;That said, it isn&amp;#8217;t quite perfect yet. There are enhancements being made in Grizzly. Eg. is not in Horizon, but is in the &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; and &lt;span class=&quot;caps&quot;&gt;CLI&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;NOTES&lt;/span&gt;:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;The Ceph file system is not recommended for production, but everything else is, such as &lt;span class=&quot;caps&quot;&gt;RBD&lt;/span&gt;. If you don&amp;#8217;t use the Ceph file system you don&amp;#8217;t need metadata servers.&lt;/li&gt;
	&lt;li&gt;According to Josh, in terms of running OSDs on the same node as the hypervisor, as long as you have enough memory you should be Ok. Everything is running in userspace. This runs a bit counterintuitive to me, and also is contrary to one of the positive points made about block storage&amp;#8212;decoupling. But it&amp;#8217;s a valid use case.&lt;br /&gt;
&lt;p&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;From Folsom to Grizzy: A DevOps Upgrade Pattern&lt;/h2&gt;
&lt;p&gt;This was the last session of the day, and I was quite tired, so apologies. Suffice it to say: &lt;em&gt;Even imagining upgrading OpenStack is difficult and requires a lot of bullet points&lt;/em&gt;.&lt;/p&gt;
&lt;h2&gt;Misc Notes from the Day&lt;br /&gt;
&lt;p&gt;&lt;/p&gt;&lt;/h2&gt;
&lt;ul&gt;
	&lt;li&gt;There&amp;#8217;s free sunshine and &lt;strong&gt;stout&lt;/strong&gt; outside on the balcony&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.buildcloudstorage.com/2012/08/is-openstack-swift-reliable-enough-for.html&quot;&gt;Probability of data loss in Swift&lt;/a&gt; (this is not to say it&amp;#8217;s high, rather an analysis)&lt;/li&gt;
	&lt;li&gt;Infiniband doesn&amp;#8217;t have a lot of traction in OpenStack &lt;span class=&quot;caps&quot;&gt;AFAIK&lt;/span&gt;, need to look into this&lt;/li&gt;
	&lt;li&gt;San Diego has basically the same weather all the time&lt;/li&gt;
	&lt;li&gt;Japan&amp;#8217;s summers are very hot and humid&lt;/li&gt;
	&lt;li&gt;&lt;img src=&quot;https://fbcdn-sphotos-e-a.akamaihd.net/hphotos-ak-ash4/430171_10150245244739982_1571995757_n.jpg&quot; alt=&quot;&quot; /&gt;&lt;/li&gt;
&lt;/ul&gt;</content>
 </entry>
 
 <entry>
   <title>My OpenBSD Lab</title>
   <link href="http://serverascode.com//2012/06/13/openbsd-lab.html"/>
   <updated>2012-06-13T00:00:00-07:00</updated>
   <id>http://serverascode.com/2012/06/13/openbsd-lab</id>
   <content type="html">&lt;h1&gt;My OpenBSD Lab&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;13 June &amp;#8211; 2012 &amp;#8211; Edmonton&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://github.com/curtisgithub/curtisgithub.github.com/raw/master/img/openbsd_lab.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Above you can see my little OpenBSD lab. For some reason my workplace has several different kinds of small form factor servers, such as the big silver Netcom box, a couple of &lt;a href=&quot;http://soekris.com&quot;&gt;Soekris&lt;/a&gt; boxes, and I can&amp;#8217;t even tell what make/model the little blue boxes are. They are all essentially small, fanless servers with at least two ethernet ports. Since they weren&amp;#8217;t being used for anything and I needed to setup a few test installs of OpenBSD, I went to work. :)&lt;/p&gt;
&lt;p&gt;The &amp;#8220;lab&amp;#8221; is comprised of two &lt;a href=&quot;http://www.openbsd.org/faq/pf/carp.html&quot;&gt;carped&lt;/a&gt; firewalls (the blue boxes; note the red cable between them is a cross over cable for pfsync traffic), a couple of cheap desktop switches, and the square silver thing is an OpenBSD bridge that goes in between the two switches. The carped firewalls are connected to another part of my test network, which eventually leads out to the Internet. I also have a couple of OpenBSD virtual machines running on my &lt;span class=&quot;caps&quot;&gt;RHEL&lt;/span&gt; 5 xen dom0. One of them provides an OpenBSD pxe boot solution to install OpenBSD onto systems like the Soekris that can&amp;#8217;t boot from &lt;span class=&quot;caps&quot;&gt;USB&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;When testing I plug my laptop into the internal switch (the green cable), so that in order to get out to the Internet it has to go over the bridge and through the firewalls. &amp;#8220;Over the Bridge and through the Firewall&amp;#8221;&amp;#8230;sounds like a book Hemingway would have written if he was a Unix security administrator. ;)&lt;/p&gt;
&lt;p&gt;Using this little lab I can test out all kinds of interesting OpenBSD functionality such as packet filtering with pf, virtual IP address failover with carp, bridging, and network authentication using authpf, along with anything else that I need to work on or try out in the OpenBSD world, or just try to stay familiar with OpenBSD in general.&lt;/p&gt;
&lt;p&gt;Bridge up!&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ ifconfig bridge0 up
&lt;/code&gt;
&lt;/pre&gt;</content>
 </entry>
 
 <entry>
   <title>36 hot swappable hard-drive bay Supermicro server specs</title>
   <link href="http://serverascode.com//2012/06/07/36-hot-swappable-day-supermicro-chassis.html"/>
   <updated>2012-06-07T00:00:00-07:00</updated>
   <id>http://serverascode.com/2012/06/07/36-hot-swappable-day-supermicro-chassis</id>
   <content type="html">&lt;h1&gt;36 hot swappable hard-drive bay Supermicro server specs&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;7 June &amp;#8211; 2012 &amp;#8211; Edmonton&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://github.com/curtisgithub/curtisgithub.github.com/raw/master/img/supermicro_stack_small.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The above is the front of four Supermicro 36-bay chassis servers racked but not completely filled with drives.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://github.com/curtisgithub/curtisgithub.github.com/raw/master/img/supermicro_back_small.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;This is the back of the server. As you can see, there are 12 hot swappable slots in the back. The motherboard has room for seven low profile boards of varying PCIe speeds.&lt;/p&gt;
Sorry for the poor picture quality&amp;#8212;I don&amp;#8217;t get paid enough to have a phone with a good camera. ;)
&lt;p&gt;This is output from the bottom server that has four drives lit up:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
# ls /dev/sd?
/dev/sda  /dev/sdb  /dev/sdc  /dev/sdd  /dev/sde  /dev/sdf
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;so with the two internal hard-drives that makes six, which is what we see above. If the server was filled up with drives, there would be 38.&lt;/p&gt;
&lt;h2&gt;First things First: The Specs&lt;/h2&gt;
&lt;p&gt;Why not get this out of the way? That&amp;#8217;s what you&amp;#8217;re here for, isn&amp;#8217;t it? :) The below would be for one server:&lt;/p&gt;
&lt;table&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;strong&gt;Item&lt;/strong&gt;  &lt;/td&gt;
		&lt;td&gt; &lt;strong&gt;Part or Part #&lt;/strong&gt; &lt;/td&gt;
		&lt;td&gt; &lt;strong&gt;Quantity&lt;/strong&gt; &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; 4U 36 bay Chassis &lt;/td&gt;
		&lt;td&gt; SM &lt;a href=&quot;http://www.supermicro.com/products/chassis/4u/847/sc847e16-r1400lp.cfm&quot;&gt;SC847E16-R1400LPB&lt;/a&gt; &lt;/td&gt;
		&lt;td&gt; 1 &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; iPass cable &lt;/td&gt;
		&lt;td&gt; SM &lt;span class=&quot;caps&quot;&gt;CBL&lt;/span&gt;-0281L &lt;/td&gt;
		&lt;td&gt; 1 &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; iPass cable &lt;/td&gt;
		&lt;td&gt; SM 0108L-02 &lt;/td&gt;
		&lt;td&gt; 1 &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; Internal HD Brackets &lt;/td&gt;
		&lt;td&gt; SM &lt;span class=&quot;caps&quot;&gt;MCP&lt;/span&gt;-220-84701-0N &lt;/td&gt;
		&lt;td&gt; 2 &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; Motherboard &lt;/td&gt;
		&lt;td&gt; SM X8DT6-F &lt;/td&gt;
		&lt;td&gt; 1 &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;span class=&quot;caps&quot;&gt;CPU&lt;/span&gt; &lt;/td&gt;
		&lt;td&gt; Xeon E5645 (6 cores) &lt;/td&gt;
		&lt;td&gt; 2 &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; Heat Sink/&lt;span class=&quot;caps&quot;&gt;CPU&lt;/span&gt; Fan &lt;/td&gt;
		&lt;td&gt; Dynatron G666 &lt;/td&gt;
		&lt;td&gt; 2 &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; Kingston 24GB Pack  &lt;/td&gt;
		&lt;td&gt; SM KVR1066D3Q8R7SK3/24G &lt;/td&gt;
		&lt;td&gt; 2 &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &lt;span class=&quot;caps&quot;&gt;SATA&lt;/span&gt; power splitter &lt;/td&gt;
		&lt;td&gt;	SM &lt;span class=&quot;caps&quot;&gt;CBL&lt;/span&gt;-0082L &lt;/td&gt;
		&lt;td&gt; 1 &lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;
&lt;p&gt;The total cost for the above is around &lt;strong&gt;$4000&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;What you get is one 4U, dual &lt;span class=&quot;caps&quot;&gt;CPU&lt;/span&gt; server (24 cores counting hyperthreading), with 48GB of &lt;span class=&quot;caps&quot;&gt;RAM&lt;/span&gt;, the MB supports up to 196GB I believe, and room for 36 hot swappable drives, &lt;span class=&quot;caps&quot;&gt;PLUS&lt;/span&gt; two internal OS drives that are actually bracketed deep inside the chassis, ie. difficult to get out.&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color:blue;&quot;&gt;Note:&lt;/span&gt; I&amp;#8217;ve done my best to make sure the above is correct, and I do have exactly that hardware, but don&amp;#8217;t base your business on those specs without doing some testing. Order one server and see how it goes before ordering a dozen+.&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color:blue;&quot;&gt;Note:&lt;/span&gt; You would need to find a local vendor to put the pieces together, or you could do it yourself&amp;#8212;but I don&amp;#8217;t recommend that. I&amp;#8217;d put 5% of the total cost aside for professional assembly. We were lucky enough that our vendor was willing to put them together for free&amp;#8212;at least on the first order. :)&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://github.com/curtisgithub/curtisgithub.github.com/raw/master/img/supermicro_internal_hard_drive_small.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;(Terrible image&amp;#8230;but you can kind of see the two internal hard-drives.)&lt;/p&gt;
&lt;p&gt;So with those two internal slots, plus 24 bays in the front, and 12 in the back is a total of 38 3.5&amp;quot; slots, 36 of them hot swappable. Or, put another way, if using 3TB &lt;span class=&quot;caps&quot;&gt;SATA&lt;/span&gt; drives&amp;#8230;114TB of raw storage. (Also I think you can fit four 2.5&amp;quot; drives internally instead of two 3.5&amp;quot; drives. But don&amp;#8217;t quote me on that.)&lt;/p&gt;
&lt;h2&gt;Bulk storage costs&lt;/h2&gt;
&lt;p&gt;The amount of data an organization has to store never seems to go down, only up up UP!&amp;#8212;probably at least 50% per year. High-end, &amp;#8220;enterprise storage&amp;#8221;, can cost between $50K-$100K per terabyte, where K is thousands.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m not kidding. It&amp;#8217;s &lt;em&gt;really&lt;/em&gt; that much, and there are few organizations that can afford to have their storage increase by 50% per year at that cost. Everywhere I&amp;#8217;ve worked has started out with a large Enterprise &lt;span class=&quot;caps&quot;&gt;SAN&lt;/span&gt; and quickly realized they can&amp;#8217;t afford it.&lt;/p&gt;
&lt;p&gt;Of course, there are reasons why enterprise storage costs so much. It&amp;#8217;s not easy to design and build a large, production, high-performance &lt;span class=&quot;caps&quot;&gt;SAN&lt;/span&gt;, and in most cases trying to replicate one with commodity hardware is not a good idea, and could cost people their jobs. Not a nice thought, but it&amp;#8217;s true.&lt;/p&gt;
&lt;p&gt;But in some specialized cases, such as bulk data storage, &lt;em&gt;not&lt;/em&gt; using an Enterprise &lt;span class=&quot;caps&quot;&gt;SAN&lt;/span&gt; might be an option. However, unless you work at Facebook, or another company that somehow has access to hardware based on Open Compute&amp;#8217;s &lt;a href=&quot;http://opencompute.org/project_category/storage-technology/&quot;&gt;Open Vault&lt;/a&gt;, what do you do for bulk storage hardware?&lt;/p&gt;
&lt;p&gt;One possibility is the above 36-bay Supermicro chassis based server. I know there are people out there using them. &lt;em&gt;Lots&lt;/em&gt; of them.&lt;/p&gt;
&lt;h2&gt;Now you can afford test infrastructure&lt;/h2&gt;
&lt;p&gt;One note I feel important to make is that when you purchase cost effective hardware there is often money on the table to buy more hardware for test. I always like to have test hardware running so that I don&amp;#8217;t have to worry about &amp;#8220;trying something out&amp;#8221; in production. When running production systems I never want to be afraid to make a change, and the way to do that is to have test infrastructure to experiment and&amp;#8230;test with.&lt;/p&gt;
&lt;p&gt;If your enterprise hardware is so expensive that test infrastructure is completely out of the question, then I wonder how easy it will be to try things out; to make changes without fear of brining down the production system?&lt;/p&gt;
&lt;p&gt;To me there is massive value in test hardware.&lt;/p&gt;
&lt;p&gt;Also, test hardware can be moved from test to production in case of failure.&lt;/p&gt;
&lt;h2&gt;Support&lt;/h2&gt;
&lt;p&gt;Obviously if you spec your own hardware, versus say buying from a tier one vendor, support means that if it breaks you pull a new part off the shelf or out of test and replace it in production yourself.&lt;/p&gt;
&lt;p&gt;Further, tier one vendors will usually certify their hardware for particular operating systems and applications. You won&amp;#8217;t have that if you spec your own. But you certainly can start small (and inexpensively) and test out your specs/OS/applications, then go bigger when you know it all works well together.&lt;/p&gt;
&lt;p&gt;Personally, I don&amp;#8217;t like spending 3 hours on the phone with the tier one support, going through generic call scripts with someone who doesn&amp;#8217;t care about my problem in the least, and then having the local support tech either be a &amp;#8220;cell phone with hands&amp;#8221; or cancel four times in a row before simply replacing the whole motherboard because they have no idea what is actually wrong. I suppose that sounds kind of negative, but those are real anecdotes. :) PS. We have lots of tier one vendor servers&amp;#8230;&lt;/p&gt;
&lt;h2&gt;Bonus&lt;/h2&gt;
&lt;p&gt;The Java &lt;span class=&quot;caps&quot;&gt;IPMI&lt;/span&gt; remote console gui works great on Linux! Some tier one vendors don&amp;#8217;t&amp;#8230;and they make you pay extra to actually use the remote console. (&lt;strong&gt;cough&lt;/strong&gt; HP &lt;strong&gt;cough&lt;/strong&gt;)&lt;/p&gt;
&lt;p&gt;That said&amp;#8230;don&amp;#8217;t look at how they store passwords in the ssh interface. Just don&amp;#8217;t.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;I feel that in specialized applications systems like this supermicro server can be very effective. Especially if it leaves money on the table for test infrastructure. I&amp;#8217;d rather have twelve (nine production, three in test) of these boxes than two four-socket tier one servers.&lt;/p&gt;
&lt;p&gt;I recommend using 5% of the budget for parts to go on the shelf, and 5%-25% for test.&lt;/p&gt;
&lt;p&gt;If you have any questions/concerns, please comment.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;
Curtis.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Installing IBM high-iops FusionIO Cards in Redhat/Centos 6</title>
   <link href="http://serverascode.com//2012/05/23/installing-ibm-fusionio-rhel_centos6.html"/>
   <updated>2012-05-23T00:00:00-07:00</updated>
   <id>http://serverascode.com/2012/05/23/installing-ibm-fusionio-rhel_centos6</id>
   <content type="html">&lt;h1&gt;Installing &lt;span class=&quot;caps&quot;&gt;IBM&lt;/span&gt; high-iops FusionIO Cards in Redhat/Centos 6&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;23 May &amp;#8211; 2012 &amp;#8211; Edmonton&lt;/p&gt;
&lt;p&gt;In a previous &lt;a href=&quot;http://serverascode.com/serverascode/storage/2011/06/27/fusionio-drives-on-redhat-enterprise-5.html&quot;&gt;post&lt;/a&gt; I had described how I deployed a &lt;span class=&quot;caps&quot;&gt;IBM&lt;/span&gt; branded FusionIO drive on Redhat Enterprise 5.&lt;/p&gt;
&lt;p&gt;I am now running that same card on CentOS 6, and am using the new version (2.2.3) of &lt;a href=&quot;http://www-947.ibm.com/support/entry/portal/docdisplay?lndocid=MIGR-5085137&quot;&gt;IBM&amp;#8217;s version of the driver&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Actually I think there is a &lt;a href=&quot;http://www.mysqlperformanceblog.com/2012/05/07/testing-fusion-io-iodrive-now-with-driver-3-1/&quot;&gt;new-new&lt;/a&gt; version (3) of the driver now out for some people. I&amp;#8217;m not sure if &lt;span class=&quot;caps&quot;&gt;IBM&lt;/span&gt; has put out this driver or not for their high-iops cards.&lt;/p&gt;
&lt;p&gt;CentOS version:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@srv ~]# cat /etc/redhat-release 
CentOS release 6.2 (Final)
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;The kernel I am running is stock &lt;span class=&quot;caps&quot;&gt;RHEL&lt;/span&gt; 6:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@srv ~]# uname -a
Linux example.com 2.6.32-220.17.1.el6.x86_64 #1 \
SMP Wed May 16 00:01:37 BST 2012 x86_64 x86_64 x86_64 GNU/Linux
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;This is what I see in terms of &lt;span class=&quot;caps&quot;&gt;PCI&lt;/span&gt; devices for the FusionIO cards:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@srv ~]# lspci | grep -i fusion
8f:00.0 Mass storage controller: Fusion-io ioDimm3 (rev 01)
90:00.0 Mass storage controller: Fusion-io ioDimm3 (rev 01)
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;So the card is physically installed in the server, but the driver has not been loaded, so they are not usable at this point. Also should note that one 640GB cards actually looks like 2x 320GB devices to the OS.&lt;/p&gt;
&lt;p&gt;First, we download the zip file containing the RPMs from &lt;span class=&quot;caps&quot;&gt;IBM&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color:red;&quot;&gt;Warning:&lt;/span&gt; These drivers are for the &lt;span class=&quot;caps&quot;&gt;IBM&lt;/span&gt; version of the FusionIO cards. If you are not running the &lt;span class=&quot;caps&quot;&gt;IBM&lt;/span&gt; version you probably need different drivers and RPMs.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
# wget ftp://download2.boulder.ibm.com/ecc/sar/CMA/XSA/ibm_dd_highiop_ssd-2.2.3_rhel6_x86-64.zip
SNIP!
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Inside that zip are several RPMs:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@srv tmp]# mkdir fio
[root@srv tmp]# cd fio/
[root@srv fio]# unzip ../ibm_dd_highiop_ssd-2.2.3_rhel6_x86-64.zip 
Archive:  ../ibm_dd_highiop_ssd-2.2.3_rhel6_x86-64.zip
  inflating: rhel6/fio-common-2.2.3.66-1.0.el6.x86_64.rpm  
  inflating: rhel6/fio-firmware-highiops-101583.6-1.0.noarch.rpm  
  inflating: rhel6/fio-snmp-agentx-1.1.1.5-1.0.el6.x86_64.rpm  
  inflating: rhel6/fio-sysvinit-2.2.3.66-1.0.el6.x86_64.rpm  
  inflating: rhel6/fio-util-2.2.3.66-1.0.el6.x86_64.rpm  
  inflating: rhel6/high_iops-gui-2.3.1.1874-1.1.noarch.rpm  
  inflating: rhel6/iomemory-vsl-2.2.3.66-1.0.el6.el6.src.rpm  
  inflating: rhel6/iomemory-vsl-2.6.32-71.el6.x86_64-2.2.3.66-1.0.el6.el6.x86_64.rpm  
  inflating: rhel6/libfio-2.2.3.66-1.0.el6.x86_64.rpm  
  inflating: rhel6/libfusionjni-1.1.1.5-1.0.el6.x86_64.rpm 
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;So far when I&amp;#8217;ve been running these servers I haven&amp;#8217;t installed all of those RPMs, only a subset.&lt;/p&gt;
&lt;p&gt;So lets install those RPMs:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@srv rhel6]# yum localinstall --nogpg \
 fio-common-2.2.3.66-1.0.el6.x86_64.rpm \
 libfio-2.2.3.66-1.0.el6.x86_64.rpm fio-util-2.2.3.66-1.0.el6.x86_64.rpm \
 fio-sysvinit-2.2.3.66-1.0.el6.x86_64.rpm \
 fio-firmware-highiops-101583.6-1.0.noarch.rpm \
 iomemory-vsl-2.6.32-71.el6.x86_64-2.2.3.66-1.0.el6.el6.x86_64.rpm
SNIP!
Transaction Test Succeeded
Running Transaction
  Installing     : fio-util-2.2.3.66-1.0.el6.x86_64                   1/6 
  Installing     : fio-common-2.2.3.66-1.0.el6.x86_64                 2/6 
  Installing     : iomemory-vsl-2.6.32-71.el6.x86_64-2.2.3.66-1.0.e   3/6 
  Installing     : libfio-2.2.3.66-1.0.el6.x86_64                     4/6 
  Installing     : fio-sysvinit-2.2.3.66-1.0.el6.x86_64               5/6 
  Installing     : fio-firmware-highiops-101583.6-1.0.noarch          6/6 

Installed:
  fio-common.x86_64 0:2.2.3.66-1.0.el6                                    
  fio-firmware-highiops.noarch 0:101583.6-1.0                             
  fio-sysvinit.x86_64 0:2.2.3.66-1.0.el6                                  
  fio-util.x86_64 0:2.2.3.66-1.0.el6                                      
  iomemory-vsl-2.6.32-71.el6.x86_64.x86_64 0:2.2.3.66-1.0.el6.el6         
  libfio.x86_64 0:2.2.3.66-1.0.el6                                        

&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;As you can see the sysvinit &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt; contains a couple of init.d files.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@srv rhel6]# rpm -qpl fio-sysvinit-2.2.3.66-1.0.el6.x86_64.rpm 
/etc/init.d/iomemory-vsl
/etc/sysconfig/iomemory-vsl
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Let&amp;#8217;s &lt;em&gt;chkconfig&lt;/em&gt; this on permanently.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@srv rhel6]# chkconfig iomemory-vsl on

&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;We &lt;strong&gt;also&lt;/strong&gt; need to enable &lt;em&gt;iomemory-vsl&lt;/em&gt; in &lt;em&gt;/etc/sysconfig/iomemory-vsl&lt;/em&gt;.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@srv init.d]# cd /etc/sysconfig
[root@srv sysconfig]# grep ENABLED iomemory-vsl 
# If ENABLED is not set (non-zero) then iomemory-vsl init script will not be
#ENABLED=1
[root@srv sysconfig]# vi iomemory-vsl 
[root@srv sysconfig]# grep ENABLED iomemory-vsl 
# If ENABLED is not set (non-zero) then iomemory-vsl init script will not be
ENABLED=1
[root@srv sysconfig]#
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;And we can start or restart iomemory-vsl:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@srv sysconfig]# service iomemory-vsl restart
Stopping iomemory-vsl: 
Unloading module iomemory-vsl
                                                           [FAILED]
Starting iomemory-vsl: 
Loading module iomemory-vsl
Attaching: [                    ] (  0%) /Attaching:
[                    
Attaching: [====================] (100%) \
fioa
Attaching: [====================] (100%)
fiob
                                                           [  OK  ]
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;At this point I&amp;#8217;m going to &lt;strong&gt;reboot&lt;/strong&gt; the server as well, just to make sure everything is going to get loaded if the server spontaneously restarts, which they have been known to do. ;)&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@srv sysconfig]# reboot
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Now after the reboot there are a couple more block storage devices on this server:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@srv ~]# ls /dev/fio?
/dev/fioa  /dev/fiob
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;We want to create a lvm physical volume (pv) on that block device:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@srv ~]# pvcreate /dev/fioa
  Device /dev/fioa not found (or ignored by filtering).
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Ooops. Error message. What went wrong? Well, the &amp;#8220;or ignored by filtering&amp;#8221; is where to start looking. &lt;a href=&quot;https://support.fusionio.com/kb/enabling-an-iomemory-device-for-lvm-use/&quot;&gt;This&lt;/a&gt; FusionIO knowledge base entry (which you have to login to see, how annoying is that) shows that we need to add an entry to the &lt;em&gt;lvm.conf&lt;/em&gt; on the server:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
Locate and edit the /etc/lvm/lvm.conf configuration file.
Add an entry similar to the following to that file:
types = [ &quot;fio&quot;, 16 ]
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;That is precisely what I will do.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@srv lvm]# grep types lvm.conf
    # List of pairs of additional acceptable block device types found 
    # types = [ &quot;fd&quot;, 16 ]
    types = [ &quot;fio&quot;, 16 ]
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;And now:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
# let's see if the types were loaded
[root@srv ~]# lvm dumpconfig | grep types
  	types=[&quot;fio&quot;, 16]
[root@srv ~]# pvcreate /dev/fioa
  Physical volume &quot;/dev/fioa&quot; successfully created
[root@srv ~]# pvcreate /dev/fiob
  Physical volume &quot;/dev/fiob&quot; successfully created
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;And create a volume group and add the pvs to it.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@srv ~]# vgcreate hiops /dev/fioa
  Volume group &quot;hiops&quot; successfully created
[root@srv ~]# vgextend hiops /dev/fiob
  Volume group &quot;hiops&quot; successfully extended
[root@srv ~]# vgs
  VG     #PV #LV #SN Attr   VSize   VFree  
  hiops    2   0   0 wz--n- 504.91g 504.91g
  system   1   9   0 wz--n-  58.56g  36.66g
  vm       1  11   2 wz--n-   1.31t 228.09g
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;I should note at this point that there is only 504g in the hiops volume group when there should be about 600g.&lt;/p&gt;
&lt;p&gt;Previously, using the fio-format command, I had formatted these drives to only 80% capacity. But that was on another server, and I&amp;#8217;m not sure it&amp;#8217;s really necessary to do that unless you are looking for extreme performance or perhaps additional reliability.&lt;/p&gt;
&lt;p&gt;I believe that in some cases with &lt;span class=&quot;caps&quot;&gt;SSD&lt;/span&gt;, PCIe or otherwise, it&amp;#8217;s not a bad idea to use less than 100% of the drive. That said, if you are looking to max out these drives performance-wise, I&amp;#8217;d suggest talking to your vendor rather than just listening to me. :)&lt;/p&gt;
&lt;p&gt;(&lt;span class=&quot;caps&quot;&gt;AFAIK&lt;/span&gt;, these cards can actually take an external power source to increase performance even more. But we don&amp;#8217;t use that functionality.)&lt;/p&gt;
&lt;p&gt;So I&amp;#8217;m going to reformat these drives to 100% usage. Just for fun. Why not get back that 100g because the performance/endurance at 100% is going to be fine for our usage.&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color:blue;&quot;&gt;Note:&lt;/span&gt; Brand new drives won&amp;#8217;t have to be formatted. I&amp;#8217;m only doing this because I had formatted the drives when they were in the other server.&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color:red;&quot;&gt;Warning:&lt;/span&gt; Reformatting will obviously delete any data on these drives!&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
# first detach the /dev/fioa
[root@srv ~]# fio-detach /dev/fct0
Detaching: [====================] (100%) -
[root@srv ~]# fio-format -s 100% /dev/fct0
Creating a device of size 322.55GBytes (300.40GiBytes).
  Using block (sector) size of 512 bytes.

WARNING: Formatting will destroy any existing data on the device!
Do you wish to continue [y/n]? y
Formatting: [====================] (100%) \
Formatting: [====================] (100%)
Format successful.
# then attach...
[root@srv ~]# fio-attach /dev/fct0
Attaching: [====================] (100%) -
fioa
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;And we can add that device back with &lt;em&gt;pvcreate&lt;/em&gt; and then we should see a larger drive:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@srv ~]# pvcreate /dev/fioa
  Physical volume &quot;/dev/fioa&quot; successfully created
[root@srv ~]# pvs /dev/fioa
  PV         VG    Fmt  Attr PSize   PFree  
  /dev/fioa  hiops lvm2 a-   300.40g 300.40g
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;I reformatted the other side of the drive back to 100% as well. (With new drives this shouldn&amp;#8217;t be necessary.)&lt;/p&gt;
&lt;p&gt;And the fio-status now is:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@srv ~]# fio-status

Found 2 ioDrives in this system with 1 ioDrive Duo
Fusion-io driver version: 2.2.3 build 66

Adapter: ioDrive Duo
	IBM 640GB High IOPS MD Class PCIe Adapter, Product Number:68Y7381 SN:XXXXX
	External Power: NOT connected
	PCIE Power limit threshold: 24.75W
	Sufficient power available: Unknown
	Connected ioDimm modules:
	  fct0:	IBM 640GB High IOPS MD Class PCIe Adapter, Product Number:68Y7381 SN:XXXXX
	  fct1:	IBM 640GB High IOPS MD Class PCIe Adapter, Product Number:68Y7381 SN:XXXXX

fct0	Attached as 'fioa' (block device)
	IBM 640GB High IOPS MD Class PCIe Adapter, Product Number:68Y7381 SN:XXXXX
	Alt PN:68Y7382
	Located in slot 0 Upper of ioDrive Duo SN:XXXXX
	PCI:8f:00.0
	Firmware v5.0.6, rev 101583
	322.55 GBytes block device size, 396 GBytes physical device size
	Sufficient power available: Unknown
	Internal temperature: avg 50.2 degC, max 51.2 degC
	Media status: Healthy; Reserves: 100.00%, warn at 10.00%

fct1	Attached as 'fiob' (block device)
	IBM 640GB High IOPS MD Class PCIe Adapter, Product Number:68Y7381 SN:XXXXX
	Alt PN:68Y7382
	Located in slot 1 Lower of ioDrive Duo SN:XXXXX
	PCI:90:00.0
	Firmware v5.0.6, rev 101583
	322.55 GBytes block device size, 396 GBytes physical device size
	Sufficient power available: Unknown
	Internal temperature: avg 46.3 degC, max 46.8 degC
	Media status: Healthy; Reserves: 100.00%, warn at 10.00%


&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Finally we can create a logical volume (lv) to use.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@srv ~]# vgs hiops
  VG    #PV #LV #SN Attr   VSize   VFree  
  hiops   1   0   0 wz--n- 300.40g 300.40g
[root@srv ~]# lvcreate -n test -L10.0G /dev/hiops
  Logical volume &quot;test&quot; created
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;If you have any corrections or other comments, please let me know!&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;
Curtis.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Bottle, Elixir, Bootstrap and Datatables - Instant Admin Backend</title>
   <link href="http://serverascode.com//2012/05/15/instant-admin-backend.html"/>
   <updated>2012-05-15T00:00:00-07:00</updated>
   <id>http://serverascode.com/2012/05/15/instant-admin-backend</id>
   <content type="html">&lt;h1&gt;Bottle, Elixir, Bootstrap and Datatables &amp;#8211; Instant Admin Backend&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;15 May &amp;#8211; 2012 &amp;#8211; Edmonton&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span class=&quot;caps&quot;&gt;UPDATE&lt;/span&gt;:&lt;/strong&gt; I&amp;#8217;ve recently stopped using Elixir and have moved to using straight SQLAlchemy.&lt;/p&gt;
&lt;p&gt;Recently I have been working on a web-based administrative backend, and have found doing so unusually easy, mostly because of the combination of &lt;a href=&quot;http://bottlepy.org/&quot;&gt;Bottle&lt;/a&gt;, a python micro-framework, &lt;a href=&quot;http://elixir.ematia.de/&quot;&gt;Elixir&lt;/a&gt;, a wrapper over top of &lt;a href=&quot;http://www.sqlalchemy.org/&quot;&gt;SQLAlchemy&lt;/a&gt; (which is itself an &lt;span class=&quot;caps&quot;&gt;SQL&lt;/span&gt; toolkit and &lt;a href=&quot;http://en.wikipedia.org/wiki/Object-relational_mapping&quot;&gt;&lt;span class=&quot;caps&quot;&gt;ORM&lt;/span&gt;&lt;/a&gt;), Twitter&amp;#8217;s &lt;a href=&quot;http://twitter.github.com/bootstrap/&quot;&gt;bootstrap&lt;/a&gt;, scaffolding for websites, and finally &lt;a href=&quot;http://datatables.net/&quot;&gt;Datatables&lt;/a&gt;, which enables advanced interactions with &lt;span class=&quot;caps&quot;&gt;HTML&lt;/span&gt; tables.&lt;/p&gt;
&lt;p&gt;The only difficulty I had, and it was slight, was integrating bootstrap and datatables together, but this &lt;a href=&quot;http://datatables.net/blog/Twitter_Bootstrap_2&quot;&gt;post&lt;/a&gt; helped out quite a bit.&lt;/p&gt;
&lt;p&gt;I would certainly suggest to anyone looking to create an administrative backend, or any web application really, to look into these four technologies, as it would take very little time to create a &lt;a href=&quot;http://en.wikipedia.org/wiki/Minimum_viable_product&quot;&gt;minimum viable product&lt;/a&gt;, or a demo, using a combination of Bottle, Elixir, Bootstrap, and Datatables.&lt;/p&gt;
&lt;p&gt;In future posts I will present an example application.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>OCZ Z-Drive R4 Installation and Performance</title>
   <link href="http://serverascode.com//2012/05/08/ocz-zdrive-r4-installation-performance.html"/>
   <updated>2012-05-08T00:00:00-07:00</updated>
   <id>http://serverascode.com/2012/05/08/ocz-zdrive-r4-installation-performance</id>
   <content type="html">&lt;h1&gt;&lt;span class=&quot;caps&quot;&gt;OCZ&lt;/span&gt; Z-Drive R4 Installation and Performance&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;8 May &amp;#8211; 2012 &amp;#8211; Edmonton&lt;/p&gt;
&lt;p&gt;In a previous &lt;a href=&quot;http://serverascode.com/2012/04/13/11-ocz-zdrive-r4s&quot;&gt;post&lt;/a&gt; I mentioned how we had purchased 11 300GB &lt;a href=&quot;http://www.oczenterprise.com/ssd-products/z-drive-c-series.html&quot;&gt;&lt;span class=&quot;caps&quot;&gt;OCZ&lt;/span&gt; Z-Drive R4 PCIe-&lt;span class=&quot;caps&quot;&gt;SSD&lt;/span&gt; cards&lt;/a&gt;. (Please note that this was a special case purchase&amp;#8212;the cards didn&amp;#8217;t meet any specific requirements we had other than that they were easily available, PCIe-&lt;span class=&quot;caps&quot;&gt;SSD&lt;/span&gt;, and low profile.)&lt;/p&gt;
&lt;p&gt;We bought the low profile version because these drives are going into the &lt;a href=&quot;http://www.supermicro.com/products/chassis/4U/847/SC847E1-R1400LP.cfm&quot;&gt;Supermicro SC847E16-R1400LPB&lt;/a&gt; chassis (the subject of future posts), which have room for seven low profile cards. I believe the full height zdrive R4s are faster, so this is a compromise.&lt;/p&gt;
&lt;h2&gt;Installation&lt;/h2&gt;
&lt;p&gt;Each of our servers is going to get one zdrive. I placed them in a x8 slot.&lt;/p&gt;
&lt;p&gt;Once the OS is up and installed (these cards are not bootable, ie. the OS can&amp;#8217;t be installed onto the cards) the &lt;a href=&quot;http://www.oczenterprise.com/drivers.html&quot;&gt;proprietary kernel module&lt;/a&gt; needs to be loaded.&lt;/p&gt;
&lt;p&gt;There is an &lt;a href=&quot;http://www.oczenterprise.com/downloads/solutions/z-driver4-installation-guide.pdf&quot;&gt;installation guide&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m running Centos 6.2 on these servers.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
# cat /etc/redhat-release 
CentOS release 6.2 (Final)
# uname -a
Linux ocz_server 2.6.32-220.el6.x86_64 #1 SMP Tue Dec 6 19:48:22 GMT 2011 x86_64 x86_64 x86_64 GNU/Linux

&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;I&amp;#8217;m using the:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
Red Hat Enterprise Linux 6.x, CentOS 6.x 64-bit	1.0.0.1480	Mar 2, 2012
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;version of the driver.&lt;/p&gt;
&lt;p&gt;When that tar file is downloaded and unzipped all there is inside is the &lt;em&gt;ocz10xx.ko&lt;/em&gt; kernel module.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
# wget http://www.oczenterprise.com/files/drivers/OCZ%20RHEL-Centos_6.x_64-Bit_r1480.tar.gz 
--2012-05-08 21:40:23--  http://www.oczenterprise.com/files/drivers/OCZ%20RHEL-Centos_6.x_64-Bit_r1480.tar.gz
Resolving www.oczenterprise.com... 74.52.187.58
Connecting to www.oczenterprise.com|74.52.187.58|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4072553 (3.9M) [application/x-gzip]
Saving to: “OCZ RHEL-Centos_6.x_64-Bit_r1480.tar.gz”

100%[======================================&amp;gt;] 4,072,553   1.03M/s   in 4.0s    

2012-05-08 21:40:27 (991 KB/s) - “OCZ RHEL-Centos_6.x_64-Bit_r1480.tar.gz” saved [4072553/4072553]

# tar zxvf OCZ\ RHEL-Centos_6.x_64-Bit_r1480.tar.gz 
ocz10xx.ko
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;which can be loaded by:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
# insmod ocz10xx.ko
# lsmod | grep ocz
ocz10xx               479350  1 
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;When that module is loaded the following is reported to dmesg:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
ocz10xx: module license 'Proprietary' taints kernel.
Disabling lock debugging due to kernel taint
ocz10xx module is older than RHEL 6.2 ... applying fixups
  alloc irq_desc for 26 on node -1
  alloc kstat_irqs on node -1
ocz10xx 0000:07:00.0: PCI INT A -&amp;gt; GSI 26 (level, low) -&amp;gt; IRQ 26
ocz10xx 0000:07:00.0: setting latency timer to 64
OCZ Storage Controller is found, using IRQ 26, driver version 2.0.0.1480.
OCZ Linux driver ocz10xx, driver version 2.0.0.1480.
OCZ DRIVE LEVEL=OCZ_FAST, STATE=ONLINE
scsi5 : OCZ Storage Controller
scsi 5:0:126:0: Direct-Access     ATA      OCZ Z-DRIVE R4 C 2.15 PQ: 0 ANSI: 5
sd 5:0:126:0: Attached scsi generic sg8 type 0
sd 5:0:126:0: [sdg] 586135549 512-byte logical blocks: (300 GB/279 GiB)
sd 5:0:126:0: [sdg] Write Protect is off
sd 5:0:126:0: [sdg] Mode Sense: 41 00 00 00
sd 5:0:126:0: [sdg] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sdg: unknown partition table
sd 5:0:126:0: [sdg] Attached SCSI disk
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;and I now have a &lt;em&gt;/dev/sdg&lt;/em&gt; to use.&lt;/p&gt;
&lt;h2&gt;Loading the kernel module at boot&lt;/h2&gt;
&lt;p&gt;First, let me say that I don&amp;#8217;t have a lot of experience with kernel modules. I&amp;#8217;m hoping that if I&amp;#8217;ve made a mistake that someone will alert me in the comments. Or perhaps I missed where this is documented by &lt;span class=&quot;caps&quot;&gt;OCZ&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Running &lt;em&gt;insmod&lt;/em&gt; is great for the first time one tries out the zdrive, but what happens after a reboot?&lt;/p&gt;
&lt;p&gt;Usually kernel modules go in &lt;em&gt;/lib/modules/`uname -r`&lt;/em&gt; but this module doesn&amp;#8217;t seem to be tied to a particular kernel version. While I could put it in that directory, each time I get a new kernel I&amp;#8217;d have to move it. This would not be good for maintainability. Assuming the module works with all 6.x kernels&amp;#8212;which is what the &lt;span class=&quot;caps&quot;&gt;OCZ&lt;/span&gt; drivers page suggests&amp;#8212;it should be Ok to put this module in a more permanent location.&lt;/p&gt;
&lt;p&gt;What I did was build and &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt; with three files:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
# rpm -qf /etc/depmod.d/ocz-zdrive-r4.conf 
ocz-zdrive-r4-r1480-2.el6.x86_64
# rpm -qf /etc/modprobe.d/ocz-zdrive-r4.conf 
ocz-zdrive-r4-r1480-2.el6.x86_64
# rpm -qf /usr/share/ocz-zdrive-r4/module/ocz10xx.ko 
ocz-zdrive-r4-r1480-2.el6.x86_64
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;The &lt;em&gt;.conf&lt;/em&gt; files contain:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
# cat /etc/depmod.d/ocz-zdrive-r4.conf 
search /usr/share/ocz-zdrive-r4/module
# cat /etc/modprobe.d/ocz-zdrive-r4.conf 
alias ocz10xx ocz
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;which will ensure that the &lt;em&gt;ocz10xx.ko&lt;/em&gt; module is loaded with all the other kernel modules, so that you can put file systems on the zdrive into fstab and have them mounted at boot:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
# uptime
 23:05:24 up 15 min,  2 users,  load average: 0.00, 0.02, 0.00
# lsmod | grep ocz
ocz10xx               479350  1 
# mount | grep ocz
/dev/mapper/ocz-test on /mnt/ocz-xfs-test type xfs (rw)
# cat /etc/fstab | grep ocz
/dev/mapper/ocz-test /mnt/ocz-xfs-test          xfs    defaults        1
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Please let me know if there is something wrong with the methodology. :)&lt;/p&gt;
&lt;h2&gt;Performance testing&lt;/h2&gt;
&lt;p&gt;As I&amp;#8217;ve said before, good performance testing is hard to do. All I can really do at this point is run the same tests that &lt;a href=&quot;https://support.fusionio.com/kb/verifying-linux-system-performance/&quot;&gt;FusionIO&lt;/a&gt; (&lt;span class=&quot;caps&quot;&gt;GAH&lt;/span&gt;! Behind a support login now! Bad FusionIO, bad!) suggests running on their drives.&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color:red;&quot;&gt;&lt;span class=&quot;caps&quot;&gt;WARNING&lt;/span&gt;:&lt;/span&gt; The write tests will destroy data on the drive!&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color:blue;&quot;&gt;&lt;span class=&quot;caps&quot;&gt;NOTE&lt;/span&gt;:&lt;/span&gt; A little bird told me that you need to run the write tests first, otherwise the flash drive&amp;#8212;if it&amp;#8217;s empty&amp;#8212;may (depending on the vendor, perhaps) know it&amp;#8217;s empty and return zeroes and you&amp;#8217;ll be testing &lt;span class=&quot;caps&quot;&gt;RAM&lt;/span&gt; instead of the card.&lt;/p&gt;
&lt;h3&gt;Write bandwidth test&lt;/h3&gt;
&lt;pre&gt;
&lt;code&gt;
# fio --filename=/dev/sdg --direct=1 --rw=randwrite --bs=1m \
--size=5G --numjobs=4 --runtime=10 --group_reporting --name=file1
file1: (g=0): rw=randwrite, bs=1M-1M/1M-1M, ioengine=sync, iodepth=1
...
file1: (g=0): rw=randwrite, bs=1M-1M/1M-1M, ioengine=sync, iodepth=1
fio 2.0.7
Starting 4 processes
Jobs: 4 (f=4): [wwww] [100.0% done] [0K/1021M /s] [0 /974  iops] [eta 00m:00s]
file1: (groupid=0, jobs=4): err= 0: pid=2444
  write: io=9281.0MB, bw=948572KB/s, iops=926 , runt= 10019msec
    clat (usec): min=679 , max=81086 , avg=4111.26, stdev=4974.85
     lat (usec): min=848 , max=81251 , avg=4313.21, stdev=4974.67
    clat percentiles (usec):
     |  1.00th=[ 1704],  5.00th=[ 1928], 10.00th=[ 2064], 20.00th=[ 2672],
     | 30.00th=[ 2736], 40.00th=[ 2800], 50.00th=[ 2960], 60.00th=[ 3408],
     | 70.00th=[ 3568], 80.00th=[ 3760], 90.00th=[ 4960], 95.00th=[ 9664],
     | 99.00th=[35584], 99.50th=[36608], 99.90th=[38144], 99.95th=[38656],
     | 99.99th=[81408]
    bw (KB/s)  : min=139912, max=273338, per=25.14%, avg=238498.74, stdev=28729.62
    lat (usec) : 750=0.09%, 1000=0.03%
    lat (msec) : 2=8.60%, 4=76.87%, 10=9.69%, 20=2.80%, 50=1.90%
    lat (msec) : 100=0.03%
  cpu          : usr=4.53%, sys=2.98%, ctx=9287, majf=0, minf=120
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, &amp;gt;=64=0.0%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &amp;gt;=64=0.0%
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &amp;gt;=64=0.0%
     issued    : total=r=0/w=9281/d=0, short=r=0/w=0/d=0

Run status group 0 (all jobs):
  WRITE: io=9281.0MB, aggrb=948572KB/s, minb=948572KB/s, maxb=948572KB/s, mint=10019msec, maxt=10019msec

Disk stats (read/write):
  sdg: ios=83/18421, merge=578/0, ticks=13/69730, in_queue=69712, util=99.21%
&lt;/code&gt;
&lt;/pre&gt;
&lt;h3&gt;Read &lt;span class=&quot;caps&quot;&gt;IOPS&lt;/span&gt; test&lt;/h3&gt;
&lt;pre&gt;
&lt;code&gt;
# fio --filename=/dev/sdg --direct=1 --rw=randread --bs=4k \
--size=5G --numjobs=64 --runtime=10 --group_reporting --name=file1
file1: (g=0): rw=randread, bs=4K-4K/4K-4K, ioengine=sync, iodepth=1
...
file1: (g=0): rw=randread, bs=4K-4K/4K-4K, ioengine=sync, iodepth=1
fio 2.0.7
Starting 64 processes
Jobs: 64 (f=64): [rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Jobs: 64 (f=64): [rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Jobs: 64 (f=64): [rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Jobs: 64 (f=64): [rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Jobs: 64 (f=64): [rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Jobs: 64 (f=64): [rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Jobs: 64 (f=64): [rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Jobs: 64 (f=64): [rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Jobs: 64 (f=64): [rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr]
 [100.0% done] [374.1M/0K /s] [91.4K/0  iops] [eta 00m:00s]
file1: (groupid=0, jobs=64): err= 0: pid=2465
  read : io=3589.4MB, bw=367442KB/s, iops=91860 , runt= 10003msec
    clat (usec): min=100 , max=283036 , avg=693.42, stdev=1539.29
     lat (usec): min=101 , max=283036 , avg=693.61, stdev=1539.29
    clat percentiles (usec):
     |  1.00th=[  262],  5.00th=[  378], 10.00th=[  438], 20.00th=[  506],
     | 30.00th=[  556], 40.00th=[  604], 50.00th=[  652], 60.00th=[  700],
     | 70.00th=[  756], 80.00th=[  828], 90.00th=[  948], 95.00th=[ 1064],
     | 99.00th=[ 1400], 99.50th=[ 1592], 99.90th=[ 2288], 99.95th=[ 2832],
     | 99.99th=[56064]
    bw (KB/s)  : min=  816, max= 7032, per=1.55%, avg=5706.40, stdev=599.67
    lat (usec) : 250=0.81%, 500=17.90%, 750=50.29%, 1000=23.77%
    lat (msec) : 2=7.05%, 4=0.16%, 10=0.01%, 20=0.01%, 50=0.01%
    lat (msec) : 100=0.01%, 250=0.01%, 500=0.01%
  cpu          : usr=0.56%, sys=6.49%, ctx=919527, majf=0, minf=2240
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, &amp;gt;=64=0.0%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &amp;gt;=64=0.0%
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &amp;gt;=64=0.0%
     issued    : total=r=918880/w=0/d=0, short=r=0/w=0/d=0

Run status group 0 (all jobs):
   READ: io=3589.4MB, aggrb=367441KB/s, minb=367441KB/s, maxb=367441KB/s, mint=10003msec, maxt=10003msec

Disk stats (read/write):
  sdg: ios=914696/0, merge=0/0, ticks=612829/0, in_queue=607382, util=98.84%
&lt;/code&gt;
&lt;/pre&gt;
&lt;h3&gt;Read bandwidth test&lt;/h3&gt;
&lt;pre&gt;
&lt;code&gt;
# fio --filename=/dev/sdg --direct=1 --rw=randread --bs=1m --size=5G \
 --numjobs=4 --runtime=10 --group_reporting --name=file1
file1: (g=0): rw=randread, bs=1M-1M/1M-1M, ioengine=sync, iodepth=1
...
file1: (g=0): rw=randread, bs=1M-1M/1M-1M, ioengine=sync, iodepth=1
fio 2.0.7
Starting 4 processes
Jobs: 4 (f=4): [rrrr] [100.0% done] [1599M/0K /s] [1524 /0  iops] [eta 00m:00s]
file1: (groupid=0, jobs=4): err= 0: pid=2543
  read : io=16475MB, bw=1647.2MB/s, iops=1647 , runt= 10002msec
    clat (usec): min=828 , max=79515 , avg=2423.79, stdev=1154.98
     lat (usec): min=828 , max=79515 , avg=2424.04, stdev=1154.98
    clat percentiles (usec):
     |  1.00th=[ 1528],  5.00th=[ 1768], 10.00th=[ 1912], 20.00th=[ 2064],
     | 30.00th=[ 2160], 40.00th=[ 2256], 50.00th=[ 2320], 60.00th=[ 2416],
     | 70.00th=[ 2544], 80.00th=[ 2736], 90.00th=[ 2992], 95.00th=[ 3280],
     | 99.00th=[ 3856], 99.50th=[ 4128], 99.90th=[ 6176], 99.95th=[13120],
     | 99.99th=[78336]
    bw (KB/s)  : min=369211, max=526336, per=25.10%, avg=423322.49, stdev=33254.52
    lat (usec) : 1000=0.18%
    lat (msec) : 2=14.73%, 4=84.40%, 10=0.63%, 20=0.04%, 100=0.02%
  cpu          : usr=0.19%, sys=5.89%, ctx=16488, majf=0, minf=1151
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, &amp;gt;=64=0.0%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &amp;gt;=64=0.0%
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &amp;gt;=64=0.0%
     issued    : total=r=16475/w=0/d=0, short=r=0/w=0/d=0

Run status group 0 (all jobs):
   READ: io=16475MB, aggrb=1647.2MB/s, minb=1647.2MB/s, maxb=1647.2MB/s, mint=10002msec, maxt=10002msec

Disk stats (read/write):
  sdg: ios=32621/0, merge=0/0, ticks=71360/0, in_queue=71316, util=99.09%
&lt;/code&gt;
&lt;/pre&gt;
&lt;h3&gt;Write &lt;span class=&quot;caps&quot;&gt;IOPS&lt;/span&gt; test&lt;/h3&gt;
&lt;pre&gt;
&lt;code&gt;
# fio --filename=/dev/sdg --direct=1 --rw=randwrite --bs=4k --size=5G \
--numjobs=64 --runtime=10 --group_reporting --name=file
file: (g=0): rw=randwrite, bs=4K-4K/4K-4K, ioengine=sync, iodepth=1
...
file: (g=0): rw=randwrite, bs=4K-4K/4K-4K, ioengine=sync, iodepth=1
fio 2.0.7
Starting 64 processes
Jobs: 64 (f=64): [wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwJobs: 
 64 (f=64): [wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwJobs: 64
 (f=64): [wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwJobs: 64
 (f=64): [wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwJobs: 64
 (f=64): [wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwJobs: 64
 (f=64): [wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwJobs: 64
 (f=64): [wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwJobs: 64
 (f=64): [wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwJobs: 64
 (f=64): [wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww] 
[100.0% done] [0K/408.8M /s] [0 /99.8K iops] [eta 00m:00s]
file: (groupid=0, jobs=64): err= 0: pid=2556
  write: io=3670.1MB, bw=374777KB/s, iops=93694 , runt= 10030msec
    clat (usec): min=40 , max=302579 , avg=677.08, stdev=1765.33
     lat (usec): min=40 , max=302580 , avg=678.03, stdev=1765.34
    clat percentiles (usec):
     |  1.00th=[  117],  5.00th=[  390], 10.00th=[  450], 20.00th=[  506],
     | 30.00th=[  548], 40.00th=[  580], 50.00th=[  620], 60.00th=[  652],
     | 70.00th=[  692], 80.00th=[  748], 90.00th=[  820], 95.00th=[  892],
     | 99.00th=[ 1064], 99.50th=[ 1144], 99.90th=[31616], 99.95th=[32640],
     | 99.99th=[33536]
    bw (KB/s)  : min= 2208, max= 9448, per=1.56%, avg=5834.54, stdev=562.51
    lat (usec) : 50=0.25%, 100=0.58%, 250=1.49%, 500=16.44%, 750=62.05%
    lat (usec) : 1000=16.98%
    lat (msec) : 2=1.91%, 4=0.06%, 10=0.09%, 20=0.02%, 50=0.11%
    lat (msec) : 100=0.01%, 250=0.01%, 500=0.01%
  cpu          : usr=0.68%, sys=6.54%, ctx=942753, majf=0, minf=2070
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, &amp;gt;=64=0.0%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &amp;gt;=64=0.0%
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &amp;gt;=64=0.0%
     issued    : total=r=0/w=939753/d=0, short=r=0/w=0/d=0

Run status group 0 (all jobs):
  WRITE: io=3670.1MB, aggrb=374776KB/s, minb=374776KB/s, maxb=374776KB/s, mint=10030msec, maxt=10030msec

Disk stats (read/write):
  sdg: ios=609/926539, merge=2759/0, ticks=337/599297, in_queue=594561, util=99.08%
&lt;/code&gt;
&lt;/pre&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;From a cursory look these drives seem to perform well. At least when they are brand new. :) We&amp;#8217;ll see how they perform over time.&lt;/p&gt;
&lt;p&gt;If anyone would like to see specific tests, please let me know.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;
Curtis.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>What 11 OCZ Z-Drive R4 Cards Look Like</title>
   <link href="http://serverascode.com//2012/04/13/11-ocz-zdrive-r4s.html"/>
   <updated>2012-04-13T00:00:00-07:00</updated>
   <id>http://serverascode.com/2012/04/13/11-ocz-zdrive-r4s</id>
   <content type="html">&lt;h1&gt;What 11 &lt;span class=&quot;caps&quot;&gt;OCZ&lt;/span&gt; Z-Drive R4 Cards Look Like&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;13 April &amp;#8211; 2012 &amp;#8211; Edmonton&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://github.com/curtisgithub/curtisgithub.github.com/raw/master/img/Photo0128.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&amp;#8230;in one big box.&lt;/p&gt;
&lt;p&gt;Recently we picked up 11 &lt;a href=&quot;http://www.oczenterprise.com/ssd-products/z-drive-c-series.html&quot;&gt;300GB &lt;span class=&quot;caps&quot;&gt;OCZ&lt;/span&gt; Z-Drive PCIe &lt;span class=&quot;caps&quot;&gt;SSD&lt;/span&gt;&lt;/a&gt; cards to put in some new servers we bought. Don&amp;#8217;t ask me to explain what and why because this was somewhat of an unusual purchase, but suffice it to say we&amp;#8217;re going to be running a lot of fast VMs on top of this storage. I would have liked to get the full height cards, but because of the servers they are going in we have to use the half-height version.&lt;/p&gt;
&lt;p&gt;Look for some performance and configuration posts in the future, along with updates on using FusionIO on &lt;span class=&quot;caps&quot;&gt;RHEL&lt;/span&gt; 6 as I&amp;#8217;ve updated the server those are installed in to &lt;span class=&quot;caps&quot;&gt;RHEL&lt;/span&gt; 6.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Deploying Ruby-on-Rails applications using RPM packaging</title>
   <link href="http://serverascode.com//ruby/2012/01/17/Deploying-ruby-on-rails-applications-via-rpm-packaging.html"/>
   <updated>2012-01-17T00:00:00-08:00</updated>
   <id>http://serverascode.com/ruby/2012/01/17/Deploying-ruby-on-rails-applications-via-rpm-packaging</id>
   <content type="html">&lt;h1&gt;Deploying Ruby-on-Rails applications using &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt; packaging&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;17 January &amp;#8211; 2012 &amp;#8211; Edmonton&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s been a long time between posts but the time has come!&lt;/p&gt;
&lt;p&gt;In this post I hope to take a good look at one way to deploy a working ruby on rails (RoR) application by packaging it in an &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;In this example all of the gems the application requires are downloaded and built/compiled at the same time the &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt; is, and thus the &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt; contains all the required gems (100+ in this example). The best way to deploy an application, in my opinion, would be to standardize on a set of gems that is available at the OS level&amp;#8212;so the &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt; would not contain &lt;em&gt;any&lt;/em&gt; gems, rather would require the general OS level gems.&lt;/p&gt;
&lt;p&gt;Unfortunately, for many reasons, which I won&amp;#8217;t get into, that is just not possible for me at this time. Maybe in the future when all gems can easily be built into RPMs, and also when internal developers can agree on a set of gems. Someday&amp;#8230;&lt;/p&gt;
&lt;h2&gt;Environment&lt;/h2&gt;
&lt;p&gt;We&amp;#8217;re deploying to a specific RHEL6 server environment.&lt;/p&gt;
&lt;h3&gt;Ruby version&lt;/h3&gt;
&lt;p&gt;We&amp;#8217;ll be deploying the RoR application to &lt;a href=&quot;http://distrowatch.com/table.php?distribution=redhat&quot;&gt;Redhat Enterprise 6&lt;/a&gt; (RHEL6) virtual machine which has, &lt;strong&gt;and likely always will have&lt;/strong&gt;, &lt;code&gt;ruby 1.8.7&lt;/code&gt; (with backported security patches of course!).&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@RoR-TEST ~]# ruby -v
ruby 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux]
[root@RoR-TEST ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.1 (Santiago)
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;This will likely be a problem in the future, as it seems that Rails 3.2 will be the last version that supports ruby 1.8.X (where X seems to be 7+ as 1.8.6 is specifially not supported). At some point the dev team may want to go to a Rails version that will not run on Ruby 1.8.7.&lt;/p&gt;
&lt;h3&gt;Apache and passenger&lt;/h3&gt;
&lt;p&gt;We&amp;#8217;ll also be deploying the RoR app using apache and passenger.&lt;/p&gt;
&lt;h2&gt;Requirements&lt;/h2&gt;
&lt;p&gt;A few things are required to build and deploy an &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt;.&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;The application code in some kind of version control system and hopefully that &lt;span class=&quot;caps&quot;&gt;VCS&lt;/span&gt; supports tagging&amp;#8230;svn, mercurial, and git all support tags.&lt;/li&gt;
	&lt;li&gt;A build server that is the same as OS and arch as the production server being deployed to. In this case, RHEL6 and X86_64.
	&lt;ul&gt;
		&lt;li&gt;A spec file for the application.&lt;/li&gt;
		&lt;li&gt;This build server needs &lt;code&gt;bundle&lt;/code&gt; and &lt;code&gt;gem&lt;/code&gt; available in the binary &lt;span class=&quot;caps&quot;&gt;PATH&lt;/span&gt; because currently the example spec file needs it to be there.&lt;/li&gt;
		&lt;li&gt;A working rpmbuild environment, configured as appropriate.&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;A test server to test the &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt; deployment, ie. a place to actually install the &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt; into.&lt;br /&gt;
&lt;br /&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;The spec file&lt;/h2&gt;
&lt;p&gt;Building a &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt; requires, among other things, a spec file. This file is the heart of a RoR &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt; deployment.&lt;/p&gt;
&lt;p&gt;I have put an example spec file up on &lt;a href=&quot;https://github.com/curtisgithub/Ruby-on-Rails-Example-RPM-Deployment-spec-file&quot;&gt;github&lt;/a&gt; to peruse and abuse. Again, it&amp;#8217;s not going to work out of the box, but it&amp;#8217;s a good example, or will be at some point. :)&lt;/p&gt;
&lt;p&gt;The build portion of the spec file is what is interesting in terms of deploying a RoR app with &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Prior to the build section the code has been pulled out of a git repository into a local build directory by the rpmbuild process.&lt;/p&gt;
&lt;p&gt;In the build section, which I&amp;#8217;m cutting and pasting examples out of, we are going to cd into that checked out repository and use bundle to &lt;strong&gt;compile and install&lt;/strong&gt; all the gems into &lt;code&gt;./vendor/bundle&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
%build
pushd %{name}

# Install all required gems into ./vendor/bundle using the handy bundle commmand
bundle install --deployment
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Once that has completed, which could be quite a long process depending on the number and complexity of the gems required, we remove the assets and recompile them.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;

# Compile assets, this only has to be done once AFAIK, so in the RPM is fine
rm -rf ./public/assets/*
bundle exec rake assets:precompile

&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Then we need to also build bundler into the &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt; as well, which requires a smidge of trickery:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;

# For some reason bundler doesn't install itself, this is probably right,
# but I guess it expects bundler to be on the server being deployed to
# already. But the rails-helloworld app crashes on passenger looking for
# bundler, so it would seem to me to be required. So, I used gem to install
# bundler after bundle deployment. :) And the app then works under passenger.

PWD=`pwd`
cat &amp;gt; gemrc &amp;lt;&amp;lt;EOGEMRC
gemhome: $PWD/vendor/bundle/ruby/1.8
gempath:
- $PWD/vendor/bundle/ruby/1.8
EOGEMRC
        #gem --source %{gem_source} --config-file ./gemrc install bundler
        gem --config-file ./gemrc install bundler
# Don't need the gemrc any more...
rm ./gemrc

&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Finally, it seems that some of the gems have a funny location for ruby set, which we need to change because the rpmbuild process will mark that as a requirement. This issue may be fixed now.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;

# Some of the files in here have /usr/local/bin/ruby set as the bang
# but that won't work, and makes the rpmbuild process add /usr/local/bin/ruby
# to the dependencies. So I'm changing that here. Either way it prob won't
# work. But at least this rids us of the dependencie that we can never meet.
for f in `grep -ril &quot;\/usr\/local\/bin\/ruby&quot; ./vendor`; do
         sed -i &quot;s|/usr/local/bin/ruby|/usr/bin/ruby|g&quot; $f
         head -1 $f
done

popd
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Basically, three major things happen in the build section:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Use the handy bundler application to install all the required gems&lt;/li&gt;
	&lt;li&gt;Also install bundler itself&lt;/li&gt;
	&lt;li&gt;Work around other issues as found&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Once that is done, we have a nice spec file that can be built and then installed!&lt;/p&gt;
&lt;h2&gt;rpmbuild&lt;/h2&gt;
&lt;p&gt;Now we build our &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt;. In this example I&amp;#8217;m building a RoR application called &lt;code&gt;special_collections&lt;/code&gt;. &lt;code&gt;rhel6b&lt;/code&gt; is my RHEL6 build server/environment.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[curtis@rhel6b SPECS]$ rpmbuild -ba special_collections.spec 
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.J1hbLc
+ umask 022
+ cd /home/curtis/rpmbuild/BUILD
+ rm -rf ./special_collections
+ git clone https://code.example.com/git/special_collections
Initialized empty Git repository in /home/curtis/rpmbuild/BUILD/special_collections/.git/
SNIP!
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/curtis/rpmbuild/BUILDROOT/special_collections-0.1.4-1.el6.ualib.x86_64
Wrote: /home/curtis/rpmbuild/SRPMS/special_collections-0.1.4-1.el6.ualib.src.rpm
Wrote: /home/curtis/rpmbuild/RPMS/x86_64/special_collections-0.1.4-1.el6.ualib.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.VOkPMU
+ umask 022
+ cd /home/curtis/rpmbuild/BUILD
+ rm -rf /home/curtis/rpmbuild/BUILDROOT/special_collections-0.1.4-1.el6.ualib.x86_64
+ exit 0
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;&lt;span class=&quot;caps&quot;&gt;NOTES&lt;/span&gt;:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;The above rpmbuild could take a long time depending on the number of gems that the application requires. It&amp;#8217;s important to rembember that in this process all the gems are being downloaded from &lt;a href=&quot;http://rubygems.org&quot;&gt;rubygems.org&lt;/a&gt; and then also &lt;em&gt;compiled&lt;/em&gt; on the build server, each and every time the rpm is built. So it&amp;#8217;s slow. There are some things I&amp;#8217;m looking at doing to reduce the time it takes to build the &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt;, but that&amp;#8217;s where it is right now. Maybe someone will read this blog and give me some comments on what I can be doing better!&lt;/li&gt;
	&lt;li&gt;The resulting &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt; is quite large&amp;#8230;in this case about 80MB &lt;em&gt;compressed&lt;/em&gt;. This is because it has 100+ gems in it.&lt;br /&gt;
&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Installing the &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt; on a brand new server&lt;/h2&gt;
&lt;p&gt;I have a brand new server all ready for this ruby application to be deployed. It&amp;#8217;s a minimal install.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@RoR-TEST ~]# rpm -qa | grep -i &quot;apache\|ruby\|passenger&quot;
[root@RoR-TEST ~]# 
# Nothing! No ruby, passenger, or apache currently installed.
[root@RoR-TEST ~]# rpm -qa | wc -l
293
# And only 293 RPMs!
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Normally I install a &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt; from a custom yum repository, but in this example I will use &lt;code&gt;yum localinstall&lt;/code&gt; so I copy the &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt; from the build server to the new server.&lt;/p&gt;
&lt;p&gt;Note that I have several 3rd party repositories configured on this server, including epel, rpmforge, and the passenger repository. Obviously one has to trust a 3rd party repository to use it. Configuring yum priorities might be a good idea as well to try to avoid unwanted collisions.&lt;/p&gt;
&lt;p&gt;So, to install:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@RoR-TEST tmp]# yum localinstall special_collections-0.1.4-1.el6.ualib.x86_64.rpm 
SNIP!
 rubygem-passenger-native-libs  x86_64  1:3.0.11-1.el6_1.8.7.352   passenger                                       29 k
 rubygem-rack                   noarch  1:1.1.0-2.el6              epel                                           446 k
 rubygem-rake                   noarch  0.8.7-2.1.el6              optional                                       403 k
 rubygems                       noarch  1.3.7-1.el6                optional                                       206 k
 sgml-common                    noarch  0.6.3-32.el6               base                                            43 k

Transaction Summary
========================================================================================================================
Install      73 Package(s)

Total size: 234 M
Total download size: 74 M
Installed size: 413 M
Is this ok [y/N]: y
SNIP!
  rubygem-daemon_controller.noarch 0:0.2.6-1.el6                   rubygem-fastthread.x86_64 0:1.0.7-2.el6             
  rubygem-passenger.x86_64 1:3.0.11-1.el6                          rubygem-passenger-native.x86_64 1:3.0.11-1.el6      
  rubygem-passenger-native-libs.x86_64 1:3.0.11-1.el6_1.8.7.352    rubygem-rack.noarch 1:1.1.0-2.el6                   
  rubygem-rake.noarch 0:0.8.7-2.1.el6                              rubygems.noarch 0:1.3.7-1.el6                       
  sgml-common.noarch 0:0.6.3-32.el6                               

Complete!
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;h2&gt;Configure the application&lt;/h2&gt;
&lt;p&gt;Currently the &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt; will create a directory in &lt;code&gt;/etc/&lt;/code&gt; that contains the &lt;code&gt;database.yml&lt;/code&gt; file for the rails app:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@RoR-TEST special_collections]# pwd
/etc/railsapps/special_collections
[root@RoR-TEST special_collections]# ls
database.yml
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Edit that to set the proper database information.&lt;/p&gt;
&lt;h2&gt;Configure apache&lt;/h2&gt;
&lt;p&gt;Now that apache has been installed because it is required by the custom &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt; it needs to be configured.&lt;/p&gt;
&lt;p&gt;First let&amp;#8217;s make sure it&amp;#8217;ll start on a reboot. Don&amp;#8217;t want to have to login on the weekend three months from now after a spontaneous reboot now do we? :)&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@RoR-TEST yum.repos.d]# chkconfig httpd on
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Now to setup the apache rails environment for this particular application. Note that in this case, we&amp;#8217;re doing one RoR app per virtual host. It&amp;#8217;s just easier for me because there are some variables that need to be set in the virtual host config file.&lt;/p&gt;
&lt;p&gt;I also always configure a &lt;code&gt;/etc/httpd/conf.d/vhost.d&lt;/code&gt; directory for virtual host files, and tell httpd to check there for &lt;code&gt;*.conf&lt;/code&gt; files.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@RoR-TEST vhost.d]# grep vhost.d /etc/httpd/conf/httpd.conf 
Include conf.d/vhost.d/*.conf
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;The vhost config file looks like this:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@RoR-TEST vhost.d]# cat specialcollections.example.com.conf 
&amp;lt;VirtualHost *:80&amp;gt;
   ServerName specialcollections.example.com
   DocumentRoot /usr/share/railsapps/special_collections/public

   # Because of the way we're deploying rails apps, ie. by using bundler during the rpm
   # build process to install all the required gems into $RAILSAPP/$NAME/vendor/bundle/ruby/1.8
   # this has to be set here. Otherwise the app will not have the required gems to run.
   SetEnv GEM_HOME /usr/share/railsapps/special_collections/vendor/bundle/ruby/1.8/
   &amp;lt;Directory /usr/share/railsapps/special_collections/public&amp;gt;
        Options -MultiViews
    &amp;lt;/Directory&amp;gt;
&amp;lt;/VirtualHost&amp;gt;
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Startup apache:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@RoR-TEST vhost.d]# service httpd configtest
[root@RoR-TEST vhost.d]# service httpd start
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Done with apache.&lt;/p&gt;
&lt;h2&gt;Rake&lt;/h2&gt;
&lt;p&gt;Now to configue the initial database.&lt;/p&gt;
&lt;p&gt;First, the paths need to be setup. I create a file called &lt;code&gt;special_collectionsrc&lt;/code&gt; that has path information setup. Note that this rc file is someting I created specifically for this application because each rails app will have it&amp;#8217;s own paths &lt;em&gt;and&lt;/em&gt; gems. Then, when wanting to use rake with the specific application that file is sourced to ensure the correct rake and other gems are used.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@RoR-TEST ~]# which rake
/usr/bin/rake
# oops not the right one!
[root@RoR-TEST ~]# which bundle
/usr/bin/which: no bundle in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
# oops isn't on the path!
[root@RoR-TEST ~]# cat special_collectionsrc 
#!/bin/bash
export GEM_HOME=/usr/share/railsapps/special_collections/vendor/bundle/ruby/1.8
PATH=/usr/share/railsapps/special_collections/vendor/bundle/ruby/1.8/bin:$PATH
export RAILS_ENV=production
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Once that file is sourced, we should be able to find rake on the path:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@RoR-TEST ~]# source special_collectionsrc 
[root@RoR-TEST ~]# which rake
/usr/share/railsapps/special_collections/vendor/bundle/ruby/1.8/bin/rake
[root@RoR-TEST ~]# which bundle
/usr/share/railsapps/special_collections/vendor/bundle/ruby/1.8/bin/bundle
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;cd to &lt;code&gt;/usr/share/railsapps/special_collections/&lt;/code&gt; and load the db:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@RoR-TEST special_collections]# rake db:load
/usr/share/railsapps/special_collections/vendor/bundle/ruby/1.8/gems/curb-0.7.16/lib/curb_core.so: warning: already initialized constant CURL_SSLVERSION_DEFAULT
-- create_table(&quot;collections&quot;, {:force=&amp;gt;true})
   -&amp;gt; 0.4194s
-- create_table(&quot;gallery_images&quot;, {:force=&amp;gt;true})
   -&amp;gt; 0.0040s
-- initialize_schema_migrations_table()
   -&amp;gt; 0.0077s
-- assume_migrated_upto_version(20111104163654, [&quot;db/migrate&quot;])
   -&amp;gt; 0.0048s
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Whenever working with this particular RoR app the rc file should be sourced.&lt;/p&gt;
&lt;p&gt;Done raking.&lt;/p&gt;
&lt;h2&gt;That&amp;#8217;s&amp;#8230;it&lt;/h2&gt;
&lt;p&gt;At this point the rails app should be available at the virtual host &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt; that was configured in the vhost. :)&lt;/p&gt;
&lt;p&gt;While it&amp;#8217;s a long process to get that intial spec file and rpmbuild working, once it&amp;#8217;s done the application can be deployed in a few minutes, and now the developers can simply worry about commiting and tagging code, and let the sysadmin deal with deploying the actual application in a replicable manner. Of course there will be some back and forth, new gems might not compile, etc, but the general structure is in place. Further, the deployment is quite automatable&amp;#8212;a new tag could mean a new &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt; build and deployment to test.&lt;/p&gt;
&lt;p&gt;Feel free to comment below with &lt;em&gt;any&lt;/em&gt; corrections/issues, and thanks,&lt;br /&gt;
Curtis.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Quickly building command line apps to create files from templates in python</title>
   <link href="http://serverascode.com//python/2011/10/13/quickly-building-command-line-apps-to-create-files-from-templates-in-python.html"/>
   <updated>2011-10-13T00:00:00-07:00</updated>
   <id>http://serverascode.com/python/2011/10/13/quickly-building-command-line-apps-to-create-files-from-templates-in-python</id>
   <content type="html">&lt;h1&gt;Quickly building command line apps to create files from templates in python&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;13 October &amp;#8211; 2011 &amp;#8211; Edmonton&lt;/p&gt;
&lt;p&gt;First, let me say that I am not an expert in Python. :) That said, I have been working on a &lt;a href=&quot;http://github.com/curtisgithub/kicker&quot;&gt;script&lt;/a&gt; for a while now that creates a kickstart file from a command line application that uses:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;a configuration file to get defaults,&lt;/li&gt;
	&lt;li&gt;command line options to add or override options, and&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.cheetahtemplate.org/&quot;&gt;cheetah template&lt;/a&gt; files.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I think I finally have a good system for doing this, and could see it being useful to others in terms of writing their own quick application to generate some kind of text file from a command line application using the above three points, and what I have done is commited a set of &lt;a href=&quot;https://github.com/curtisgithub/cli-template-generator&quot;&gt;skeleton files&lt;/a&gt; so that you could do this yourself very easily.&lt;/p&gt;
&lt;h2&gt;Dependencies&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;cli-template-generator&lt;/code&gt; was written to run on RHEL5 which means python 2.4.3.&lt;/p&gt;
&lt;p&gt;It also requires &lt;code&gt;python-argparse&lt;/code&gt; and &lt;code&gt;python-cheetah&lt;/code&gt; if you are on RHEL5.&lt;/p&gt;
&lt;p&gt;I think it will work in later python versions.&lt;/p&gt;
&lt;h2&gt;Using the cli-template-generator&lt;/h2&gt;
&lt;p&gt;First, clone the &lt;code&gt;cli-template-generator&lt;/code&gt; repository.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ git clone git@github.com:curtisgithub/cli-template-generator.git
Cloning into cli-template-generator...
remote: Counting objects: 8, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 8 (delta 0), reused 8 (delta 0)
Receiving objects: 100% (8/8), done.
$ cd cli-template-generator/
$ ls
README  skeleton.conf  skeleton.py  skeleton.tpl
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;There are three files that work together to create a text file from a template: skeleton.{conf,py,tpl}.&lt;/p&gt;
&lt;p&gt;The tpl file contains the Cheetah template information:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ cat skeleton.tpl 
Hello $hello 
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Which means the &lt;code&gt;hello&lt;/code&gt; variable will be replaced with the string it&amp;#8217;s set to in either the config file or the command line argument.&lt;/p&gt;
&lt;p&gt;The conf file holds the default configuration option(s).&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ cat skeleton.conf 
[default]
#
# Add default configuration options in this file
# Eg.
# Key:	Value

hello:	World!
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;By default, the skeleton.conf file sets the variable &lt;code&gt;hello&lt;/code&gt; to the string &lt;code&gt;World!&lt;/code&gt;. So if we run &lt;code&gt;skeleton.py&lt;/code&gt; we will see:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ ./skeleton.py 
Hello World! 

&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Also by default we have one command line configuration option, &lt;code&gt;--hello&lt;/code&gt;, that we can set to whatever we want. We can see what options are available using &lt;code&gt;--help&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ ./skeleton.py --help
usage: skeleton.py [-h] [-c CONFIGFILE] [--hello HELLO]

optional arguments:
  -h, --help            show this help message and exit
  -c CONFIGFILE, --config-file CONFIGFILE
                        Use a different config file than ./skeleton.conf
  --hello HELLO         Who are you saying hello to?
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;So if we run &lt;code&gt;skeleton.py&lt;/code&gt; with the &lt;code&gt;--hello&lt;/code&gt; option we should get different results.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ ./skeleton.py --hello Curtis!
Hello Curtis! 
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;So, as you can see, it should be fairly easy to copy the skeleton files, replace some of the default locations for the files, add some configuration options to the configuration file and also to the parser in the py file, and edit the template so that it uses your new variables.&lt;/p&gt;
&lt;p&gt;Bam! You have a custom cli text file generator! Given the amount of text files in Unix/Linux, there could be a lot of good uses for this.&lt;/p&gt;
&lt;p&gt;If you see any mistakes or things that could be improved, please feel free to contribute back via github.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;
Curtis.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Getting the number of commits in mercurial, git, and svn</title>
   <link href="http://serverascode.com//2011/09/28/Getting-the-number-of-hg-git-svn-commits.html"/>
   <updated>2011-09-28T00:00:00-07:00</updated>
   <id>http://serverascode.com/2011/09/28/Getting-the-number-of-hg-git-svn-commits</id>
   <content type="html">&lt;h1&gt;Getting the number of commits in mercurial, git, and svn&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;28 September &amp;#8211; 2011 &amp;#8211; Edmonton&lt;/p&gt;
&lt;p&gt;This is a short post on one way to get the number of commits in hg, git, and svn.&lt;/p&gt;
&lt;p&gt;One of the things that I wanted to graph with Cacti is the number of commits that happen in our git, mercurial, and svn repositories. Yup we use all three.&lt;/p&gt;
&lt;p&gt;I know that the number of commits isn&amp;#8217;t the best metric in terms of figuring out how much our repos are being used, but it&amp;#8217;s certainly one of the numbers to look at, and it&amp;#8217;s easy to start with. I&amp;#8217;m aware of things like churn in hg, but haven&amp;#8217;t looked into them fully. Obviously one could make one large commit, or many smaller ones. I prefer many smaller ones, but that&amp;#8217;s just me. Basically I&amp;#8217;m saying I&amp;#8217;ll add more metrics later.&lt;/p&gt;
&lt;p&gt;In order to graph the number of commits, I need to find the number of commits.&lt;/p&gt;
&lt;p&gt;At this point I&amp;#8217;m most interested in the number of commits that happened in the last 24 hours, one day ago, or yesterday, which I&amp;#8217;m aware are not necessarily all the same thing. ;) I&amp;#8217;ll run the cronjob that checks commits just after midnight, so the numbers should be kinda accurate.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;hg&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ cd some_hg_repo
$ hg log --template '{rev}:{node|short}\n'  --date -1 | wc -l
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;git&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ cd some_git_repo
$ git log --since=&quot;24 hours ago&quot; | grep &quot;^commit&quot; | wc -l
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;svn&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ cd some_svn_repo
# and SVN_REPO=`pwd` or something like that
# Where YESTERDAY=`date --date yesterday +\{\%Y-\%m-\%d\}`
$ svn log -q -r $YESTERDAY file:///$SVN_REPO | grep &quot;^r&quot; | wc -l
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Note that with svn, if there hasn&amp;#8217;t been a commit in since &lt;code&gt;YESTERDAY&lt;/code&gt; it will return that last commit before that&amp;#8212;could be two days ago or more&amp;#8212;so unless there are no commits, the number of commits will be at least one, which may not be what you are expecting.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;
Curtis&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>OpenBSD pf and set limit states</title>
   <link href="http://serverascode.com//2011/09/12/openbsd-pf-set-limit-states.html"/>
   <updated>2011-09-12T00:00:00-07:00</updated>
   <id>http://serverascode.com/2011/09/12/openbsd-pf-set-limit-states</id>
   <content type="html">&lt;h1&gt;OpenBSD pf and set limit states&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;12 September &amp;#8211; 2011 &amp;#8211; Edmonton&lt;/p&gt;
&lt;p&gt;So you have a OpenBSD firewall. Actually you have at least two because you are doing &lt;a href=&quot;http://www.openbsd.org/faq/pf/carp.html&quot;&gt;carp&lt;/a&gt; for high availability (not load balancing but HA), right?&lt;/p&gt;
&lt;p&gt;Awesome! It&amp;#8217;s fun isn&amp;#8217;t it? I suppose I have to admit it&amp;#8217;s more fun testing it in a lab environment than in production. &lt;strong&gt;:)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;One thing I noticed when doing a bit of &lt;strong&gt;non-scientific&lt;/strong&gt; load testing on a pair of small carped firewalls is that in OpenBSD the size of the state table is limited to 10000 entries by default. I would imagine that most people won&amp;#8217;t run into the limit, but I was surprised at how easy it was to hit 10000 sessions using something like &lt;a href=&quot;http://www.joedog.org/index/siege-home&quot;&gt;siege&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Using a client laptop&amp;#8212;an older core 2 duo with 4 gigs of ram and a 60 gig &lt;span class=&quot;caps&quot;&gt;SSD&lt;/span&gt; drive (a Lenovo T61 specifically) on one side of the firewall and a virtualized web server with 512MB of &lt;span class=&quot;caps&quot;&gt;RAM&lt;/span&gt; and one &lt;span class=&quot;caps&quot;&gt;CPU&lt;/span&gt; on the other&amp;#8212;I was able to hit the state limit in a couple of seconds with a command such as:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
laptop$ siege -b -c 40 -r 100 http://testserver/testpage
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;where the resulting test page looks like:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
&amp;lt;html&amp;gt;
&amp;lt;body&amp;gt;
hi there
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;When the &lt;code&gt;siege&lt;/code&gt; command is run I watch the state tables on the OpenBSD firewalls with a command such as:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
openbsd_fw{1,2}#  while true; do pfctl -s info; sleep 1; done
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;With nothing happening the result of that command looks about like this:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
openbsd_fw1$ pfctl -s info
Status: Enabled for 0 days 00:22:05              Debug: err

State Table                          Total             Rate
  current entries                       38               
  searches                          215881          162.9/s
  inserts                            30364           22.9/s
  removals                           46342           35.0/s
Counters
  match                              30804           23.2/s
  bad-offset                             0            0.0/s
  fragment                               0            0.0/s
  short                                362            0.3/s
  normalize                              0            0.0/s
  memory                                 0            0.0/s
  bad-timestamp                          0            0.0/s
  congestion                             0            0.0/s
  ip-option                              0            0.0/s
  proto-cksum                            0            0.0/s
  state-mismatch                         0            0.0/s
  state-insert                           0            0.0/s
  state-limit                            0            0.0/s
  src-limit                              0            0.0/s
  synproxy                               0            0.0/s
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;We can see that the current limit is 10000:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
openbsd_fw1$ pfctl -sm     
states        hard limit    10000
src-nodes     hard limit    10000
frags         hard limit     5000
tables        hard limit     1000
table-entries hard limit   200000
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;So lets fire up that &lt;code&gt;siege&lt;/code&gt; command and see what happens by watching the current entries on the firewall that has the master carp IP. (Note that with &lt;code&gt;pfsync&lt;/code&gt; all the states will be transferred to the backup firewall as well, but for simplicity let&amp;#8217;s focus on the master.)&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
openbsd_fw1$ ifconfig | grep -i master
        carp: MASTER carpdev fxp2 vhid 1 advbase 1 advskew 0
        status: master
        carp: MASTER carpdev fxp0 vhid 2 advbase 1 advskew 0
        status: master
openbsd_fw1$ while true; do pfctl -s info | grep &quot;current entries&quot;; sleep 1; done
  current entries                       17               
  current entries                       15               
  current entries                       13               
  current entries                       12               
  current entries                       12 
# siege starts up here              
  current entries                     4820               
  current entries                    10000               
  current entries                    10000               
  current entries                    10000               
  current entries                    10000               
  current entries                    10000 
^C
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;So you can see it only takes a couple seconds to hit that limit.&lt;/p&gt;
&lt;p&gt;Let&amp;#8217;s up it to 200000 and see what happens.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
openbsd_fw1$ grep &quot;set limit&quot; /etc/pf.conf
set limit states 200000
openbsd_fw1$ pfctl -nf /etc/pf.conf
openbsd_fw1$ pfctl -f /etc/pf.conf
openbsd_fw1$ pfctl -sm
states        hard limit   200000
src-nodes     hard limit    10000
frags         hard limit     5000
tables        hard limit     1000
table-entries hard limit   200000
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Run the siege command on the client:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
openbsd_fw1$ while true; do pfctl -s info | grep &quot;current entries&quot;; sleep 1; done 
  current entries                       40               
  current entries                       40               
  current entries                       40               
  current entries                       40  
# siege starts up here             
  current entries                      560               
  current entries                     6686               
  current entries                    12480               
  current entries                    17728               
  current entries                    23060               
  current entries                    27116               
  current entries                    28332               
  current entries                    29498               
  current entries                    29884               
  current entries                    29884               
  current entries                    29884               
  current entries                    29884               
  current entries                    29884               
  current entries                    29884               
  current entries                    29884               
  current entries                    29884               
^C
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;And looks like we max out the &lt;code&gt;siege&lt;/code&gt; command now at about 30k sessions. Nice!&lt;/p&gt;
&lt;p&gt;To conclude, this was just a quick look at session limits on OpenBSD. If you&amp;#8217;re running a pf firewall it may be something to consider looking at to make sure you&amp;#8217;re not hitting the limit which would reduce the effectiveness of your firewall.&lt;/p&gt;
&lt;p&gt;Note that I haven&amp;#8217;t shown any memory usage from the firewall, but the small boxes have 512MB of &lt;span class=&quot;caps&quot;&gt;RAM&lt;/span&gt; and even at 200K sessions the memory usage only went up very slightly so I don&amp;#8217;t think it&amp;#8217;s constrained for memory reasons.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;
Curtis.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Cacti, Better Cacti Graphs, and SSH Original Command</title>
   <link href="http://serverascode.com//2011/09/12/better-cacti-graphs-and-ssh-original-command.html"/>
   <updated>2011-09-12T00:00:00-07:00</updated>
   <id>http://serverascode.com/2011/09/12/better-cacti-graphs-and-ssh-original-command</id>
   <content type="html">&lt;h1&gt;Cacti, Better Cacti Graphs, and &lt;span class=&quot;caps&quot;&gt;SSH&lt;/span&gt; Original Command&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;12 September &amp;#8211; 2011 &amp;#8211; Edmonton&lt;/p&gt;
&lt;p&gt;So you&amp;#8217;re at the point where you want to monitor your servers performance. Actually let&amp;#8217;s take it a step further and you want to do this with &lt;a href=&quot;http://www.cacti.net&quot;&gt;Cacti&lt;/a&gt;. Actually let&amp;#8217;s take &lt;em&gt;another&lt;/em&gt; step and say that you&amp;#8217;re going to use Cacti and &lt;a href=&quot;http://code.google.com/p/mysql-cacti-templates/&quot;&gt;Better Cacti Graphs&lt;/a&gt; (&lt;span class=&quot;caps&quot;&gt;BCG&lt;/span&gt;)&amp;#8230;and ssh.&lt;/p&gt;
&lt;p&gt;We&amp;#8217;re getting pretty specific here aren&amp;#8217;t we?&lt;/p&gt;
&lt;p&gt;So you setup Cacti, &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt; up old &lt;span class=&quot;caps&quot;&gt;BCG&lt;/span&gt;, and you configure &lt;a href=&quot;http://code.google.com/p/mysql-cacti-templates/wiki/SSHBasedTemplates&quot;&gt;ssh logins&lt;/a&gt; for &lt;span class=&quot;caps&quot;&gt;BCG&lt;/span&gt; so that it can grab stats off the client system.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;But&lt;/strong&gt;, and here&amp;#8217;s the kicker&amp;#8212;you want to make sure that you limit what the cacti user can do with a ssh login. (Possibly because your security analyst wants it to be &amp;#8220;more secure&amp;#8221; and yet has never actually used ssh.)&lt;/p&gt;
&lt;p&gt;Well, there is fairly little known functionality built into OpenSSH that will allow you to lock down what the user can do with a ssh key based login. The best thing to do at this point to learn more about this functionality would be to google &lt;a href=&quot;http://lmgtfy.com/?q=SSH_ORIGINAL_COMMAND&quot;&gt;SSH_ORIGINAL_COMMAND&lt;/a&gt;. Sorry, can&amp;#8217;t help but use &lt;a href=&quot;http://lmgtry.com&quot;&gt;lmgtfy.com&lt;/a&gt;, no offense intended. &lt;strong&gt;:)&lt;/strong&gt; It&amp;#8217;s just fun to say.&lt;/p&gt;
&lt;p&gt;The point is that there are many (little known) options that can be put in a &lt;code&gt;authorized_keys&lt;/code&gt; file to limit what the user can do with they login with that key.&lt;/p&gt;
&lt;p&gt;eg. The beginning of the key that I put in the cacti user&amp;#8217;s &lt;code&gt;authorized_keys&lt;/code&gt; file on the client server:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
command=&quot;/usr/share/cacti-ssh-auth/ssh_commands_check.sh&quot;,from=&quot;SOME_IP_ADDRESS&quot;,
no-port-forwarding,no-X11-forwarding ssh-dss SNIP_REST_OF_KEY!
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;What this setting does is:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Only allows the user to run the script that comes after command, meaning they can &lt;strong&gt;only&lt;/strong&gt; run &lt;code&gt;ssh_commands_check.sh&lt;/code&gt;, and it runs by default.&lt;/li&gt;
	&lt;li&gt;Only allow logins from SOME_IP_ADDRESS (eg. 10.0.4.30 or something), ie. the monitoring server where cacti is installed. Authentication via IP addresses isn&amp;#8217;t the best idea, but why not.&lt;/li&gt;
	&lt;li&gt;Disable port forwarding and X11 forwarding for the session, always.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The contents of the &lt;code&gt;ssh_commands_check.sh&lt;/code&gt; script look like this:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
#!/bin/sh

# When using $SSH_ORIGINAL_COMMAND to watch what commands we get out
# of better-cacti-graphs, this is what we see:
# cat /proc/diskstats
# cat /proc/stat
# wget -U Cacti/1.0 -q -O - -T 5 &quot;http://localhost/server-status?auto&quot;
# uptime
# free -ob

case &quot;$SSH_ORIGINAL_COMMAND&quot; in
        'cat /proc/diskstats')
                cat /proc/diskstats
                ;;
        'wget -U Cacti/1.0 -q -O - -T 5 http://localhost/server-status?auto')
                wget -U Cacti/1.0 -q -O - -T 5 &quot;http://localhost/server-status?auto&quot;
                ;;
        'uptime')
                uptime
                ;;
        'free -ob')
                free -ob
                ;;
        *)
                # Then essentially do nothing b/c only the above
                # commands are allowed to run. :)
                # I don't really want to echo the actual command
                # until I can find some way to escape anything 
                # malicious. For another day!
                logger -i &quot;$0 ERROR: disallowed command attempted&quot;
                ;;
esac
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Great you say. But how did you find out &lt;em&gt;exactly&lt;/em&gt; what commands cacti is trying to run? Well SSH_ORIGINAL_COMMAND to the rescue!&lt;/p&gt;
&lt;p&gt;I used something like:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
command=&quot;echo $SSH_ORIGINAL_COMMAND &amp;gt;&amp;gt; /var/tmp/ssh_check_cmd.txt; $SSH_ORIGINAL_COMMAND&quot;,
from=&quot;SOME_IP_ADDRESS&quot;,no-port-forwarding,no-X11-forwarding ssh-dss SNIP_REST_OF_KEY!
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;and then &lt;code&gt;tail -f /var/tmp/ssh_check_cmd.txt&lt;/code&gt; and saw this:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
client_server$ tail -f ssh_orig_cmd.txt 
cat /proc/diskstats
cat /proc/stat
wget -U Cacti/1.0 -q -O - -T 5 &quot;http://localhost/server-status?auto&quot;
uptime
free -ob
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;so we can be fairly sure that those are the commands the cacti monitor server is asking the client to run.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span class=&quot;caps&quot;&gt;NOTE&lt;/span&gt;&lt;/strong&gt; that I would suggest checking what commands the ssh cacti scripts are running and not blindly using the ones I put above because things could have changed since I put up this post. And in fact could be completely wrong. It will take a bit of time to figure this out.&lt;/p&gt;
&lt;p&gt;Also you can review the &lt;a href=&quot;http://code.google.com/p/mysql-cacti-templates/source/browse/trunk/scripts/ss_get_by_ssh.php&quot;&gt;code&lt;/a&gt; for BCG&amp;#8217;s use of ssh to find out exactly what commands are running, but note that bash/ect might interpret things differently, so it&amp;#8217;s best to check with SSH_ORIGINAL_COMMAND. &lt;strong&gt;:)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Thanks and good luck,&lt;br /&gt;
Curtis.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Packaging code is about sharing</title>
   <link href="http://serverascode.com//2011/08/18/packaging-code-is-about-sharing.html"/>
   <updated>2011-08-18T00:00:00-07:00</updated>
   <id>http://serverascode.com/2011/08/18/packaging-code-is-about-sharing</id>
   <content type="html">&lt;h1&gt;Packaging code is about sharing&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;18 August &amp;#8211; 2011 &amp;#8211; Edmonton&lt;/p&gt;
&lt;p&gt;I have been packaging code into RPMs for internal use for about five years now. I&amp;#8217;m not going to say I&amp;#8217;m an expert at it&amp;#8212;I&amp;#8217;m still learning&amp;#8212;but I&amp;#8217;m getting better at it and I think that&amp;#8217;s a good thing.&lt;/p&gt;
&lt;p&gt;Recently I packaged a &lt;a href=&quot;https://wiki.umiacs.umd.edu/adapt/index.php/Ace:Main&quot;&gt;piece of software&lt;/a&gt; that didn&amp;#8217;t have an existing &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt; (&lt;span class=&quot;caps&quot;&gt;AFAIK&lt;/span&gt;). I was then able to share that &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt;, and installation instructions, with a partner institution so that they could easily install the software as well&amp;#8212;in fact with one command. :)&lt;/p&gt;
&lt;p&gt;From one perspective it&amp;#8217;s obvious that packaging software is about sharing. But often I spend so much time just getting the &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt; built, which can mean the gruelling process of pulling requirements out of developers who think packaging is&amp;#8230;not important or even &lt;strong&gt;intrusive&lt;/strong&gt;, that I forget how it&amp;#8217;s not just about easing sysadmin maintenance of servers; that it&amp;#8217;s about being able to &lt;strong&gt;share&lt;/strong&gt; systems and software with peers.&lt;/p&gt;
&lt;p&gt;I often wonder where some Linux users think packages come from. Certainly not a big white stork in the middle of the night. Dedicated volunteers (and I don&amp;#8217;t mean me) are building thousands of packages every day! So hat tip to all those volunteers. Licensing is important, but so is packaging. :)&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Booting partitions bigger than 2TB on a HP DL160 G6 with RHEL5</title>
   <link href="http://serverascode.com//2011/08/09/dl160-g6-2tb-partitions.html"/>
   <updated>2011-08-09T00:00:00-07:00</updated>
   <id>http://serverascode.com/2011/08/09/dl160-g6-2tb-partitions</id>
   <content type="html">&lt;h1&gt;Booting partitions bigger than 2TB on a HP DL160 G6 with RHEL5&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;9 August &amp;#8211; 2011 &amp;#8211; Edmonton&lt;/p&gt;
&lt;p&gt;Yesterday I was working on a HP DL160 G6 server. Originally it had two 160GB hard-drives, but of course, I wanted more storage&amp;#8230;a lot more. :) So we ordered four 2TB drives to put in it. Then I realized the backplane would only support two drives, so I had to order a backplane that can support four drives.&lt;/p&gt;
&lt;p&gt;Once all the parts arrived I replaced the backplane and put the four drives in. It was fairly simple actually. Then when I booted the server with the new backplane and disks the P410 &lt;span class=&quot;caps&quot;&gt;RAID&lt;/span&gt; card noticed the new drives, and suggested configuring &lt;span class=&quot;caps&quot;&gt;RAID&lt;/span&gt; 1+0, a suggestion I accepted. That leaves me with about 4TB usable.&lt;/p&gt;
&lt;p&gt;By default, the system creates one large drive of 4TB, which Redhat Enterprise 5 sees as &lt;code&gt;/dev/sda&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;However&lt;/strong&gt;, mbr, the default partition type on RHEL5, cannot boot partitions larger than 2TB. So, after the first install via kickstart I was missing 2TB. Not cool! Well, actually it&amp;#8217;s fine, the computer did what it was told, but I wanted to use the rest.&lt;/p&gt;
&lt;p&gt;The solution? It was actually fairly easy. Maybe too easy. But it&amp;#8217;s working.&lt;/p&gt;
&lt;p&gt;Because, it seems, the HP &lt;span class=&quot;caps&quot;&gt;BIOS&lt;/span&gt; in this server supports &lt;span class=&quot;caps&quot;&gt;UEFI&lt;/span&gt;/&lt;span class=&quot;caps&quot;&gt;EFI&lt;/span&gt;/&lt;span class=&quot;caps&quot;&gt;GPT&lt;/span&gt;/whatever, in the &lt;code&gt;%pre&lt;/code&gt; section of the kickstart we can create a gpt partition.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
%pre
# B/c sda on this server is 4.0TB we need to try to use gpt instead of mdr.
/usr/sbin/parted -s /dev/sda mklabel gpt
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Also make sure that if you have a &lt;code&gt;clearpart&lt;/code&gt; command in your kickstart to comment it out or delete it.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
# Removing b/c of the parted in %pre
#clearpart --drives=sda --all --initlabel
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Then run your kickstart as usual and hopefully your system will boot with whatever partitions you configured. In my case, I created two partitions, one 60GB for the system and the rest for virtual machines, and placed logical volumes over top:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
4TB_RAID10_SERVER$ pvs
  PV         VG     Fmt  Attr PSize  PFree 
  /dev/sda2  system lvm2 a-   58.56g 36.66g
  /dev/sda3  vm     lvm2 a-    3.58t  3.58t
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;And running &lt;code&gt;parted&lt;/code&gt; we can see that it is indeed a gpt layout:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
4TB_RAID10_SERVER$ parted /dev/sda print
Model: HP LOGICAL VOLUME (scsi)
Disk /dev/sda: 4001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  525MB   524MB   ext4               boot
 2      525MB   63.4GB  62.9GB                     lvm
 3      63.4GB  4001GB  3937GB                     lvm
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;So now I can create that rsync backup server I&amp;#8217;ve always wanted, and I have up to 3.58TB to store the backups on. Good times and I&amp;#8217;m glad it all worked out. Now if only they were 3TB drives&amp;#8230; &lt;strong&gt;;)&lt;/strong&gt;&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>ksplice bought out by Oracle, RHEL desupported</title>
   <link href="http://serverascode.com//2011/07/21/oracle-buys-ksplice.html"/>
   <updated>2011-07-21T00:00:00-07:00</updated>
   <id>http://serverascode.com/2011/07/21/oracle-buys-ksplice</id>
   <content type="html">&lt;h1&gt;ksplice bought out by Oracle, &lt;span class=&quot;caps&quot;&gt;RHEL&lt;/span&gt; desupported&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;21 July &amp;#8211; 2011 &amp;#8211; Edmonton&lt;/p&gt;
&lt;p&gt;I am &lt;strong&gt;extremely&lt;/strong&gt; saddened to see that &lt;a href=&quot;http://ksplice.com&quot;&gt;ksplice&lt;/a&gt; has been &lt;a href=&quot;http://www.oracle.com/us/corporate/acquisitions/ksplice/customer-letter-430127.html&quot;&gt;bought out&lt;/a&gt; by Oracle and will no longer be supporting Redhat Enterprise. I can only hope that the Linux community can find a way to provide this service outside of the limited confines of Oracle Corp.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Basic infrastructure to support production linux servers</title>
   <link href="http://serverascode.com//infrastructure/2011/07/20/basic-linux-infrastructure.html"/>
   <updated>2011-07-20T00:00:00-07:00</updated>
   <id>http://serverascode.com/infrastructure/2011/07/20/basic-linux-infrastructure</id>
   <content type="html">&lt;h1&gt;Basic infrastructure to support production linux servers&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;20 July &amp;#8211; 2011 &amp;#8211; Edmonton&lt;/p&gt;
&lt;p&gt;Every IT group providing Linux servers will require some infrastructure services. What I mean by that is that there are services that Linux sysadmins need that help them to run their servers in a efficient, scalable way.&lt;/p&gt;
&lt;p&gt;Production services need support from &lt;i&gt;infrastructure services&lt;/i&gt;.&lt;/p&gt;
&lt;p&gt;This post lists a basic collection of services that a Linux sysadmin might require. For me, this would be the &lt;strong&gt;minimum&lt;/strong&gt; services required to run a group of Linux servers, be it 10 or 1000.&lt;/p&gt;
&lt;p&gt;Notes:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;I mention specific solutions, but there are many different ways to obtain the same basic infrastructure.&lt;/li&gt;
	&lt;li&gt;Most of what I discuss below is geared towards Redhat servers, but is also completely applicable to any Linux disto that has a packaging system, which is pretty much all of them.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;:)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. Write documentation with mediawiki&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;One of the most important things a sysadmin does is document what they did so that they can take a relaxing, rejuvenating vacation. By this I mean that they have documented their systems so that the other admins taking over can use it to fix things, to understand what is installed, where it is, what it does, who owns it, ect, when the primary sysadmin is unavailable because he/she is in downtown Tokyo and is having a hard time connecting to the local wireless because they can&amp;#8217;t read Japanese.&lt;/p&gt;
&lt;p&gt;Documentation is also important so you can remember what you did six months ago to get iscsi working, or how to configure a xen dom0 to use a bridge that comes from a vlan, or that command to dd a logical volume from one server to another over ssh without having to figure it out all over again. I suppose you could &lt;a href=&quot;http://serverascode.com&quot;&gt;blog&lt;/a&gt; about it too. &lt;strong&gt;:)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Regardless of what is being documented, usually the system I will use is a &lt;a href=&quot;http://www.mediawiki.org&quot;&gt;Mediawiki&lt;/a&gt; instance. Mediawiki supports searching (also full text searching if you use &lt;a href=&quot;http://sphinxsearch.com/&quot;&gt;sphinx&lt;/a&gt; and the &lt;a href=&quot;http://www.mediawiki.org/wiki/Extension:SphinxSearch&quot;&gt;sphinx search plugin&lt;/a&gt; so that you can search in pre tags too), file uploads, categories, and many, many other features, especially via the diverse plugin/extension community.&lt;/p&gt;
&lt;p&gt;When people don&amp;#8217;t want to use mediawiki I ask them what they want to do, how they want to work, and inevitably mediawiki can do it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Serve packages using mrepo&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Most Linux distros use &lt;em&gt;some&lt;/em&gt; form of package management to install software. For example, in Debian/Ubuntu a deb file and in Redhat it&amp;#8217;s an rpm.&lt;/p&gt;
&lt;p&gt;These packages, somewhat akin to an advanced zip file, contain all the files, requirements, metadata, ect, for a particular piece of software or service. The &lt;code&gt;./configure; make; make install&lt;/code&gt; dance is only done on the build servers.&lt;/p&gt;
&lt;p&gt;In most of the environments I work in, we strive to &lt;strong&gt;package all code&lt;/strong&gt;. This means that all software and applications are installed on a server in a package. Configuration can be done by hand, or via a centralized configuration management system, but the code is actually installed via a package. This goes for Perl &lt;span class=&quot;caps&quot;&gt;CPAN&lt;/span&gt; modules too. :) &lt;em&gt;&lt;span class=&quot;caps&quot;&gt;EVERYTHING&lt;/span&gt;&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;package server&lt;/strong&gt; provides a central spot that the servers obtain packages from, eg. a &lt;a href=&quot;http://dag.wieers.com/home-made/mrepo/&quot;&gt;mrepo&lt;/a&gt; server.&lt;/p&gt;
&lt;p&gt;The packages server will do three major things:&lt;/p&gt;

	&lt;ul&gt;
		&lt;li&gt;Download &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt; packages from external repositories, eg. the official Redhat repositories, &lt;span class=&quot;caps&quot;&gt;EPEL&lt;/span&gt;, RPMForge, ect.&lt;br /&gt;
Also it will allow us to store our own &lt;strong&gt;custom packages&lt;/strong&gt;.&lt;br /&gt;
This means our servers don&amp;#8217;t go to the internet to get updates, they go to the packages server.&lt;/li&gt;
	&lt;/ul&gt;
	&lt;ul&gt;
		&lt;li&gt;Serve those packages to all of our Linux servers.&lt;/li&gt;
	&lt;/ul&gt;
	&lt;ul&gt;
		&lt;li&gt;Allow for the ability to  “freeze” the repositories so that we can install software updates in test environments, test them, and then install the exact same version of the packages/software in production, thus being a &lt;em&gt;somewhat&lt;/em&gt; more sure that everything is going to work OK after the update.&lt;/li&gt;
	&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;3. Centralize syslogging with rsyslog&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;There should be a central syslog server somewhere in your infrastucture, and all production servers should send syslog packets to that server.&lt;/p&gt;
&lt;p&gt;This will allow for a central spot for gathering syslog messages from all servers. We can then run scripts/processes to analyze these logs looking for issues.&lt;/p&gt;
&lt;p&gt;Also, should a server get &lt;strong&gt;hacked&lt;/strong&gt; the first thing &lt;em&gt;malicious users&lt;/em&gt; usually do is (try) to delete logs. But, if the logs have been sent to a central log server then they (probably) can&amp;#8217;t do that.&lt;/p&gt;
&lt;p&gt;I usually replace, when possible, syslog with &lt;a href=&quot;http://www.rsyslog.com/&quot;&gt;rsyslog&lt;/a&gt; and at minimum use &lt;span class=&quot;caps&quot;&gt;TCP&lt;/span&gt; delivery instead of &lt;span class=&quot;caps&quot;&gt;UDP&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4. Centralize root email with sendmail or postfix and dovecot&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;There are many scripts on servers that will send email to root if something breaks, eg. cron or logwatch. So all of these emails should be sent to a central email address that sysadmins have access to.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m not a huge fan of what is essentially logging over email, but it&amp;#8217;s nearly impossible to avoid.&lt;/p&gt;
&lt;p&gt;Currently I configure each server&amp;#8217;s root alias to email a central address which is delivered to a Maildir and serve that up over &lt;span class=&quot;caps&quot;&gt;IMAPS&lt;/span&gt; with &lt;a href=&quot;http://www.dovecot.org&quot;&gt;dovecot&lt;/a&gt;. Dovecot is pretty great.&lt;/p&gt;
&lt;p&gt;(Note that while sendmail is default on RHEL5, postfix is default on RHEL6!)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;5. Serve kickstarts over http&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The kickstart server is simply a plain http server that serves kickstart files, and in conjunction with the packaging server allows for rapid, repeatable installation of Redhat/CentOS. Or you could do it over nfs, or pop it on the &lt;span class=&quot;caps&quot;&gt;USB&lt;/span&gt; key. I always use a web server to serve up the kickstarts.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ks=http://example.com/ks/newserver.ks&lt;/code&gt; if you know what I mean. :)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;6. Centralize configuration management&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is a central server that can be used to access all the Linux/Unix servers via ssh and to try automate with custom scripts or things like &lt;a href=&quot;https://code.google.com/p/pdsh/&quot;&gt;pdsh&lt;/a&gt;, &lt;a href=&quot;http://www.opscode.com/chef/&quot;&gt;chef&lt;/a&gt;, &lt;a href=&quot;http://www.puppetlabs.com/&quot;&gt;puppet&lt;/a&gt;, &lt;a href=&quot;http://www.fabfile.org&quot;&gt;fabric&lt;/a&gt;, ect.&lt;/p&gt;
&lt;p&gt;Also stores a copy of every Linux servers &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt; database so that if a server gets hacked you can check what files have changed, if any, on the hacked server. (Though that should be in backups too.)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;7. Build packages with rpmbuild&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To create custom &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt; packages a build server for each OS and architecture is required.  So if you run RHEL5 and &lt;span class=&quot;caps&quot;&gt;RHEL&lt;/span&gt; 6 on x86_64 then you&amp;#8217;ll need two build servers, one for each OS and arch.&lt;/p&gt;
&lt;p&gt;This is where &lt;code&gt;rpmbuild -ba some.spec&lt;/code&gt; will be run to build a &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt;. Then the &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt; will be copied to the packaging server.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;8. Login from anywhere securely with ssh&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;(Of course with ssh!)&lt;/p&gt;
&lt;p&gt;Linux/Unix admins should be able to access a ssh gateway from the Internet to be able to access servers and possibly their workstations or just the central management server.&lt;/p&gt;
&lt;p&gt;Only public key authentication would be allowed to this server (meaning no password based authentication) which makes it very secure in terms of auth.&lt;/p&gt;
&lt;p&gt;Some workplaces will want to put this behind a commercial &lt;span class=&quot;caps&quot;&gt;VPN&lt;/span&gt;. Try to avoid this&amp;#8230;&lt;span class=&quot;caps&quot;&gt;IMHO&lt;/span&gt; ssh is one of the, if &lt;strong&gt;not the&lt;/strong&gt;, most secure network applications on the planet&amp;#8212;certainly better than some million &lt;a href=&quot;https://secure.wikimedia.org/wikipedia/en/wiki/Source_lines_of_code&quot;&gt;&lt;span class=&quot;caps&quot;&gt;SLOC&lt;/span&gt;&lt;/a&gt; ssl &amp;#8220;vpn&amp;#8221;.&lt;/p&gt;
&lt;p&gt;PS. Did you know you can create a ssh-based vpn with something like &lt;a href=&quot;https://github.com/apenwarr/sshuttle&quot;&gt;sshuttle&lt;/a&gt;? If you did sysadmin 2pts for you! &lt;strong&gt;:)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;9. Monitor uptime with nagios&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Essentially a &lt;a href=&quot;http://www.nagios.org&quot;&gt;Nagios&lt;/a&gt; server, or similar, that monitors production services and servers and will let you know when they go down. I have also used hobbit, which is apparently called &lt;a href=&quot;http://sourceforge.net/projects/xymon/&quot;&gt;Xymon&lt;/a&gt; now.&lt;/p&gt;
&lt;p&gt;(But they won&amp;#8217;t go down, right? In fact, the monitoring system will go down more than the production serivces, won&amp;#8217;t it. &lt;strong&gt;:)&lt;/strong&gt; I&amp;#8217;ve always thought that was the hard part of uptime monitoring.)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;10. Manage code with version control systems&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Every IT workplace should have a central code repository. Sure, hg and git are distributed, but I still think it&amp;#8217;s nice to have a central location. &lt;a href=&quot;github.com&quot;&gt;Github&lt;/a&gt; seems to be successful at centralizing distributed revision control, so I think centralizing a local git or hg instance (with hgweb.cgi for example) will work for most workplaces as well. :)&lt;/p&gt;
&lt;p&gt;I have a github account and have used svn and hg at work. Use whatever you want&amp;#8212;just do it now!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;11. Backup with rdiff-backup&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This would be a server used to rsync snapshot-type backups over ssh to disk for rapid restores. I like &lt;a href=&quot;http://www.nongnu.org/rdiff-backup/&quot;&gt;rdiff-backup&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It would likely compliment that huge Netbackup, or Commvault (calmvault?), or other backup system you have that doesn&amp;#8217;t work half the time and requires the installation of a gigantic root-running tarball or monolithic 600MB &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt; which doubles the size of your 500MB minimal Redhat OS install. Good times in commercial backup land.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;12. Test with jmeter&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you have dev, test, production environments then you should also automate testing. This would be the service that helps you do that, running Jmeter and/or Selenium for example; do everything from one location, perhaps when a &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt;/package is built then it&amp;#8217;s automatically tested from here. Wouldn&amp;#8217;t that be nice!?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;13. Monitor performance with cacti&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Everyone wants performance. Or do they? How does one know how much performance one needs? You have to do performance testing, and you have to monitor performance. You can&amp;#8217;t just buy performance, you have to put some work in.&lt;/p&gt;
&lt;p&gt;That said, for monitoring performance I usually use either &lt;a href=&quot;http://www.nagios.org&quot;&gt;Nagios&lt;/a&gt; or something like &lt;a href=&quot;http://www.cacti.net&quot;&gt;Cacti&lt;/a&gt; using snmp with some custom scripts.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;14. Secure remote bios level access via a remote &lt;span class=&quot;caps&quot;&gt;KVM&lt;/span&gt; or &lt;span class=&quot;caps&quot;&gt;IPMI&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;By this I mean the secure network you attach your remote &lt;span class=&quot;caps&quot;&gt;KVM&lt;/span&gt; to the hardware dom0 servers, and/or to the &lt;span class=&quot;caps&quot;&gt;IPMI&lt;/span&gt; interfaces that most teir 1 servers come with (not that I endorse only tier 1 vendors) so that you don&amp;#8217;t have to hang out in that cold, loud, unfriendly server room.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Using fusion-io drives on Redhat Enterprise 5</title>
   <link href="http://serverascode.com//serverascode/storage/2011/06/27/fusionio-drives-on-redhat-enterprise-5.html"/>
   <updated>2011-06-27T00:00:00-07:00</updated>
   <id>http://serverascode.com/serverascode/storage/2011/06/27/fusionio-drives-on-redhat-enterprise-5</id>
   <content type="html">&lt;h1&gt;Using fusion-io drives on Redhat Enterprise 5&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;27 June &amp;#8211; 2011 &amp;#8211; Edmonton&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color:red;&quot;&gt;Update:&lt;/span&gt; Please note that this post is getting a bit old. Currently I am running these &lt;span class=&quot;caps&quot;&gt;IBM&lt;/span&gt; FusionIO drives on &lt;span class=&quot;caps&quot;&gt;RHEL&lt;/span&gt; 6. I&amp;#8217;ll be posting about that and a few other PCIe-&lt;span class=&quot;caps&quot;&gt;SSD&lt;/span&gt; subjects in the next short while. &amp;#8211; 24 Apr 2012&lt;/p&gt;
&lt;h2&gt;FusionIO IODrive Overview&lt;/h2&gt;
&lt;p&gt;So at work we have a rather large &lt;a href=&quot;http://www-03.ibm.com/systems/x/hardware/enterprise/x3850x5/&quot;&gt;&lt;span class=&quot;caps&quot;&gt;IBM&lt;/span&gt; x3850 x5&lt;/a&gt; server. It has 4 sockets each with six cores and hyperthreading (not that I&amp;#8217;m necessarily a fan of hyperthreading&amp;#8212;really I haven&amp;#8217;t done enough research to make up my mind) which ends up with RHEL5 seeing 48 &lt;span class=&quot;caps&quot;&gt;CPUS&lt;/span&gt;.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ cat /proc/cpuinfo | grep proc | wc -l
48
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Fun.&lt;/p&gt;
&lt;p&gt;But the important part of this post is that this server also has three 640GB &lt;a href=&quot;http://www.fusionio.com/products/iodrive-duo/&quot;&gt;fusion-io drives&lt;/a&gt; which I have installed and configured as a volume group called &lt;code&gt;fio&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ ls /dev/fio
fio/  fioa  fiob  fioc  fiod  fioe  fiof  
$ vgs fio
  VG   #PV #LV #SN Attr   VSize VFree
  fio    6   4   0 wz--n- 1.76T 1.08T
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;and where the &lt;code&gt;fio[a,b,c,d,e,f]&lt;/code&gt; are the drives, with each 640 gig card actually appearing as 2 320 gig disks.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ dmesg  |grep -i &quot;found device&quot;
fioinf IBM 640GB High IOPS MD Class PCIe Adapter 0000:89:00.0: Found device 0000:89:00.0
fioinf IBM 640GB High IOPS MD Class PCIe Adapter 0000:8a:00.0: Found device 0000:8a:00.0
fioinf IBM 640GB High IOPS MD Class PCIe Adapter 0000:93:00.0: Found device 0000:93:00.0
fioinf IBM 640GB High IOPS MD Class PCIe Adapter 0000:94:00.0: Found device 0000:94:00.0
fioinf IBM 640GB High IOPS MD Class PCIe Adapter 0000:98:00.0: Found device 0000:98:00.0
fioinf IBM 640GB High IOPS MD Class PCIe Adapter 0000:99:00.0: Found device 0000:99:00.0
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;h2&gt;Resources&lt;/h2&gt;
&lt;p&gt;The most important resource for using these FusionIO drives is the &lt;a href=&quot;http://kb.fusionio.com/KB/c4/linux-specific.aspx&quot;&gt;official knowledge base&lt;/a&gt; which has several articles specifically for linux. I would suggest reading all of them. :)&lt;/p&gt;
&lt;h2&gt;Install&lt;/h2&gt;
&lt;p&gt;Once the cards were put into the server, which is somewhat harrowing given their individual cost, and the server was booted, the software drivers that were downloaded from the &lt;span class=&quot;caps&quot;&gt;IBM&lt;/span&gt; website were installed. This server runs RHEL5&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 5.6 (Tikanga)
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;as that &lt;span class=&quot;caps&quot;&gt;RHEL&lt;/span&gt; version that is what &lt;span class=&quot;caps&quot;&gt;IBM&lt;/span&gt; supports for drivers.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ rpm -i iodrive-driver-1.2.7.5-1.0_2.6.18_164.el5.x86_64.rpm \
iodrive-firmware-1.2.7.6.43246-1.0.noarch.rpm \
iodrive-jni-1.2.7.5-1.0.x86_64.rpm \
iodrive-snmp-1.2.7.5-1.0.x86_64.rpm \
iodrive-util-1.2.7.5-1.0.x86_64.rpm \
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Currently I am using the drivers as they were downloaded, which means using a specific matching kernel to match. The drivers do come with a source &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt; so that you can rebuild them for your latest kernel, but I have opted not to do that yet. So install the matching kernel&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ yum install kernel-2.6.18-164.el5
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;and reboot.&lt;/p&gt;
&lt;p&gt;However, I am also using the amazing &lt;a href=&quot;http://ksplice.com&quot;&gt;ksplice&lt;/a&gt; service to ensure that depsite the fact that I am using a rather old kernel to match the FusionIO drivers that the kernel is still up to date in terms of security issues:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ uptrack-uname -r
2.6.18-238.12.1.el5
$ uname -r
2.6.18-164.el5
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;The &lt;code&gt;uptrack-uname -r&lt;/code&gt; command asks uptrack what security equivalent version of the kernel is. Great stuff that kslplice.&lt;/p&gt;
&lt;p&gt;Once the drivers are installed we can load the modules&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ modprobe fio-driver
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;and now we can see the drives&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ ls /dev/fio*
fioa  fiob  fioc  fiod  fioe  fiof 
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;and at this point we can configure the drives.&lt;/p&gt;
&lt;h2&gt;Worker processes&lt;/h2&gt;
&lt;p&gt;Once the drivers are installed there is a &lt;code&gt;/etc/init.d/iodrive&lt;/code&gt; startup script. One of the things this script does is startup some &lt;code&gt;worker&lt;/code&gt; processes which I believe are used to move data around the FusionIO drives to ensure their performance and longevity.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ chkconfig --list iodrive
iodrive 0:off	1:on	2:on	3:on	4:on	5:on	6:off
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ ps ax | grep worker
 5271 ?        S&amp;lt;   1169:51 [fct0-worker]
 5588 ?        S&amp;lt;   1168:07 [fct1-worker]
 5593 ?        S&amp;lt;   359:01 [fct2-worker]
 5598 ?        R&amp;lt;   206:02 [fct3-worker]
 5603 ?        S&amp;lt;   203:15 [fct4-worker]
 5608 ?        S&amp;lt;   203:12 [fct5-worker]
20921 pts/2    S+     0:00 grep worker
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;These processes will take up some &lt;span class=&quot;caps&quot;&gt;CPU&lt;/span&gt; time. Frankly, because there are 48 CPUs in this server, using up one to run these workers is OK. But it was a little confusing at first seeing all this activity&amp;#8212;one worker process for each card.&lt;/p&gt;
&lt;h2&gt;Configuration&lt;/h2&gt;
&lt;p&gt;Given that we are going to manage the FusionIO drives via &lt;span class=&quot;caps&quot;&gt;LVM&lt;/span&gt;, we will need to configure &lt;span class=&quot;caps&quot;&gt;LVM&lt;/span&gt; to allow it. See this &lt;a href=&quot;http://kb.fusionio.com/KB/a36/enabling-the-iodrive-for-lvm-use.aspx&quot;&gt;knowledge base article&lt;/a&gt;.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ grep fio /etc/lvm/lvm.conf
    types = [ &quot;fio&quot;, 16 ]
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Then add each &lt;code&gt;/dev/fio*&lt;/code&gt; drive as a phyical volume and then add them to a volume group.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ pvs | grep fio
  /dev/fioa  fio    lvm2 a-   300.31G 320.00M
  /dev/fiob  fio    lvm2 a-   300.31G 100.31G
  /dev/fioc  fio    lvm2 a-   300.31G 100.31G
  /dev/fiod  fio    lvm2 a-   300.31G 300.31G
  /dev/fioe  fio    lvm2 a-   300.31G 300.31G
  /dev/fiof  fio    lvm2 a-   300.31G 300.31G
$ vgs fio
  VG   #PV #LV #SN Attr   VSize VFree
  fio    6   4   0 wz--n- 1.76T 1.08T
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;h2&gt;fio-status&lt;/h2&gt;
&lt;p&gt;Useful way to check the status of the FusionIO drives.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ fio-status

Found 6 ioDrives in this system with 3 ioDrive Duos
Fusion-io driver version: 1.2.7.5

Adapter: ioDrive Duo
	IBM 640GB High IOPS MD Class PCIe Adapter, Product Number:68Y7381 SN:59518
	PCIE Power limit threshold: 24.75W
	Connected ioDimm modules:
	  fct0:	IBM 640GB High IOPS MD Class PCIe Adapter, Product Number:68Y7381 SN:77479
	  fct1:	IBM 640GB High IOPS MD Class PCIe Adapter, Product Number:68Y7381 SN:77478

fct0	Attached as 'fioa' (block device)
	IBM 640GB High IOPS MD Class PCIe Adapter, Product Number:68Y7381 SN:77479
	Alt PN:68Y7382
	Located in 0 Upper slot of ioDrive Duo SN:59518
	Firmware v43246
	322.46 GBytes block device size, 396 GBytes physical device size
	Internal temperature: avg 56.6 degC, max 59.6 degC
	Media status: Healthy; Reserves: 100.00%, warn at 10%

fct1	Attached as 'fiob' (block device)
	IBM 640GB High IOPS MD Class PCIe Adapter, Product Number:68Y7381 SN:77478
	Alt PN:68Y7382
	Located in 1 Lower slot of ioDrive Duo SN:59518
	Firmware v43246
	322.46 GBytes block device size, 396 GBytes physical device size
	Internal temperature: avg 61.0 degC, max 63.0 degC
	Media status: Healthy; Reserves: 100.00%, warn at 10%


Adapter: ioDrive Duo
	IBM 640GB High IOPS MD Class PCIe Adapter, Product Number:68Y7381 SN:59507
	PCIE Power limit threshold: 24.75W
	Connected ioDimm modules:
	  fct2:	IBM 640GB High IOPS MD Class PCIe Adapter, Product Number:68Y7381 SN:77143
	  fct3:	IBM 640GB High IOPS MD Class PCIe Adapter, Product Number:68Y7381 SN:77144

fct2	Attached as 'fioc' (block device)
	IBM 640GB High IOPS MD Class PCIe Adapter, Product Number:68Y7381 SN:77143
	Alt PN:68Y7382
	Located in 0 Upper slot of ioDrive Duo SN:59507
	Firmware v43246
	322.46 GBytes block device size, 396 GBytes physical device size
	Internal temperature: avg 62.0 degC, max 65.5 degC
	Media status: Healthy; Reserves: 100.00%, warn at 10%

fct3	Attached as 'fiod' (block device)
	IBM 640GB High IOPS MD Class PCIe Adapter, Product Number:68Y7381 SN:77144
	Alt PN:68Y7382
	Located in 1 Lower slot of ioDrive Duo SN:59507
	Firmware v43246
	322.46 GBytes block device size, 396 GBytes physical device size
	Internal temperature: avg 64.0 degC, max 66.4 degC
	Media status: Healthy; Reserves: 100.00%, warn at 10%


Adapter: ioDrive Duo
	IBM 640GB High IOPS MD Class PCIe Adapter, Product Number:68Y7381 SN:100366
	PCIE Power limit threshold: 24.75W
	Connected ioDimm modules:
	  fct4:	IBM 640GB High IOPS MD Class PCIe Adapter, Product Number:68Y7381 SN:77344
	  fct5:	IBM 640GB High IOPS MD Class PCIe Adapter, Product Number:68Y7381 SN:77345

fct4	Attached as 'fioe' (block device)
	IBM 640GB High IOPS MD Class PCIe Adapter, Product Number:68Y7381 SN:77344
	Alt PN:68Y7382
	Located in 0 Upper slot of ioDrive Duo SN:100366
	Firmware v43246
	322.46 GBytes block device size, 396 GBytes physical device size
	Internal temperature: avg 68.9 degC, max 71.9 degC
	Media status: Healthy; Reserves: 100.00%, warn at 10%

fct5	Attached as 'fiof' (block device)
	IBM 640GB High IOPS MD Class PCIe Adapter, Product Number:68Y7381 SN:77345
	Alt PN:68Y7382
	Located in 1 Lower slot of ioDrive Duo SN:100366
	Firmware v43246
	322.46 GBytes block device size, 396 GBytes physical device size
	Internal temperature: avg 63.0 degC, max 66.0 degC
	Media status: Healthy; Reserves: 100.00%, warn at 10%


&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;h2&gt;&lt;span class=&quot;caps&quot;&gt;XFS&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Prior to finding out about the official knowledge base, I had decided to purchase a subscription from Redhat for the &lt;span class=&quot;caps&quot;&gt;XFS&lt;/span&gt; file system. Then, upon reading this &lt;a href=&quot;http://kb.fusionio.com/KB/a43/filesystem-tuning.aspx&quot;&gt;kb article&lt;/a&gt;, I found that they heavily recommend &lt;span class=&quot;caps&quot;&gt;XFS&lt;/span&gt; as the file system to run on top of a FusionIO drive&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
XFS is currently the recommended filesystem. It can achieve up to 3x 
the performance of a tuned ext2/ext3 solution. At this time, there is 
no know additional tuning for running XFS in a single- or multi-ioDrive 
configuration 
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;so that is the file system we use.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ mount | grep fio
/dev/mapper/fio-vault1 on /var/lib/vault1 type xfs (rw)
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;h2&gt;Mounting drives after a reboot&lt;/h2&gt;
&lt;p&gt;I&amp;#8217;ll admit I hadn&amp;#8217;t thought of this during the initial installation. After a few days we moved the server to a new location which thus required a power down and restart.&lt;/p&gt;
&lt;p&gt;While the server was restarting, and I was standing in the cold, loud server room because the new room didn&amp;#8217;t have any networking for &lt;span class=&quot;caps&quot;&gt;IPMI&lt;/span&gt; (which is not good), I noticed it took a very long time to get past the udev portion of the boot, and in fact the FusionIO drives failed to mount from fstab. Of course there is a logical reason for that&amp;#8212;read about it &lt;a href=&quot;http://kb.fusionio.com/KB/a64/loading-the-driver-via-udev-or-init-script-for-md-and-lvm.aspx&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Because we are using the 1.2 driver, I followed the straight forward instructions &lt;a href=&quot;http://kb.fusionio.com/KB/a64/loading-the-driver-via-udev-or-init-script-for-md-and-lvm.aspx#Using_Init_Scripts_to_Load_the_1.2.x&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Performance testing&lt;/h2&gt;
&lt;p&gt;Performance testing is hard. Maybe it&amp;#8217;s just me. But testing superdisk like these FusionIO drives on a server with 48 &lt;span class=&quot;caps&quot;&gt;CPUS&lt;/span&gt; and 64 gigs of main memory is not easy. Again I will admit I took a shot at benchmarking the FusionIO disk having not read the kb. I messed around with Bonnie++, io-whatever, but nothing quite came out right, partially because I didn&amp;#8217;t put a lot of time into it, and because the server has so much memory that it makes it hard to beat the cache (I did try to reduce the memory the OS could see via kernel configuration, but didn&amp;#8217;t have a lot of luck with that).&lt;/p&gt;
&lt;p&gt;Finally I read this kb article which suggested using the &lt;a href=&quot;http://freshmeat.net/projects/fio&quot;&gt;fio utility&lt;/a&gt; (which I don&amp;#8217;t believe is a utility put out by FusionIO, rather just aptly named).&lt;/p&gt;
&lt;p&gt;The fio tool is not in the &lt;span class=&quot;caps&quot;&gt;RHEL&lt;/span&gt; repositories but it is in rpmforge/repoforge.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ cd /var/tmp
$ wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
$ rpm -Uvh rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
$ yum repolist | grep forge
rpmforge                           RHEL 5Server - RPMforge.net - enabled: 10,636
$ yum search fio | grep -i benchmark
fio.x86_64 : I/O benchmark and stress/hardware verification tool

&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Here are a couple of example runs. Please note that at this point I do not know much about fio. Benchmarking disk is a highly technical thing to do, and getting tests right would take a lot of research and consideration, which I have not done.&lt;/p&gt;
&lt;p&gt;It seems that the &lt;code&gt;fio&lt;/code&gt; benchmark utility suports &lt;code&gt;direct=1&lt;/code&gt; which means use non-buffered-io, thereby skipping memory cacheing and going straight to the disk.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ cat fio-randwrite.fio 
[randwrite[

direct=1
rw=randwrite 
bs=1m 
size=5G 
numjobs=4 
runtime=10 
group_reporting 
directory=/mnt/fio-test-xfs
$ fio fio-randwrite.fio 
randwrite: (g=0): rw=randwrite, bs=1M-1M/1M-1M, ioengine=sync, iodepth=1
...
randwrite: (g=0): rw=randwrite, bs=1M-1M/1M-1M, ioengine=sync, iodepth=1
fio 1.55
Starting 4 processes
randwrite: Laying out IO file(s) (1 file(s) / 5120MB)
randwrite: Laying out IO file(s) (1 file(s) / 5120MB)
randwrite: Laying out IO file(s) (1 file(s) / 5120MB)
randwrite: Laying out IO file(s) (1 file(s) / 5120MB)
Jobs: 4 (f=4): [wwww] [100.0% done] [0K/522.8M /s] [0 /510  iops] [eta 00m:00s]
randwrite: (groupid=0, jobs=4): err= 0: pid=28487
  write: io=4556.0MB, bw=466161KB/s, iops=455 , runt= 10008msec
    clat (msec): min=1 , max=1692 , avg= 9.83, stdev=22.04
     lat (msec): min=1 , max=1692 , avg= 9.84, stdev=22.04
    bw (KB/s) : min=  559, max=264126, per=24.79%, avg=115540.55, stdev=20377.90
  cpu          : usr=0.10%, sys=14.85%, ctx=59071, majf=0, minf=92
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, &amp;gt;=64=0.0%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &amp;gt;=64=0.0%
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &amp;gt;=64=0.0%
     issued r/w/d: total=0/4556/0, short=0/0/0

     lat (msec): 2=0.53%, 4=1.27%, 10=97.17%, 20=0.59%, 50=0.09%
     lat (msec): 100=0.18%, 250=0.15%, 2000=0.02%

Run status group 0 (all jobs):
  WRITE: io=4556.0MB, aggrb=466161KB/s, minb=477349KB/s, maxb=477349KB/s,
  mint=10008msec, maxt=10008msec

Disk stats (read/write):
  dm-11: ios=0/158802, merge=0/0, ticks=0/55956241, in_queue=55915327, 
  util=66.05%, aggrios=0/159667, aggrmerge=0/0, aggrticks=0/55932489,
  aggrin_queue=55785218, aggrutil=65.96%
    fioc: ios=0/159667, merge=0/0, ticks=0/55932489, in_queue=55785218, 
    util=65.96%
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;And then a similar test using RAID10 &lt;span class=&quot;caps&quot;&gt;SAS&lt;/span&gt; disk formated ext3.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ cat fio-randwrite.fio 
[randwrite[

direct=1
rw=randwrite 
bs=1m 
size=5G 
numjobs=4 
runtime=10 
group_reporting 
directory=/mnt/sas-test
$ fio fio-randwrite.fio 
randwrite: (g=0): rw=randwrite, bs=1M-1M/1M-1M, ioengine=sync, iodepth=1
...
randwrite: (g=0): rw=randwrite, bs=1M-1M/1M-1M, ioengine=sync, iodepth=1
fio 1.55
Starting 4 processes
randwrite: Laying out IO file(s) (1 file(s) / 5120MB)
randwrite: Laying out IO file(s) (1 file(s) / 5120MB)
randwrite: Laying out IO file(s) (1 file(s) / 5120MB)
randwrite: Laying out IO file(s) (1 file(s) / 5120MB)
Jobs: 4 (f=4): [wwww] [1200.0% done] [0K/0K /s] [0 /0  iops] [eta
 1158050441d:07h:00m:05sJobs: 4 (f=4): [wwww] [inf% done] [0K/0K /s] 
[0 /0  iops] [eta 1158050441d:07h:00m:04s]  Jobs: 4 (f=4): [wwww] 
[1300.0% done] [0K/0K /s] [0 /0  iops] [eta 1158050441d:07h:00m:04sJobs: 
4 (f=4): [wwww] [inf% done] [0K/0K /s] [0 /0  iops] 
[eta 1158050441d:07h:00m:03s]  Jobs: 1 (f=1): [___w] [66.1% done] 
[0K/0K /s] [0 /0  iops] [eta 00m:19s]               
randwrite: (groupid=0, jobs=4): err= 0: pid=28586
  write: io=4096.0KB, bw=112369 B/s, iops=0 , runt= 37326msec
    clat (usec): min=12140K, max=37183K, avg=32696578.04, stdev= 0.00
     lat (usec): min=12140K, max=37183K, avg=32696579.88, stdev= 0.00
    bw (KB/s) : min=   27, max=   83, per=31.61%, avg=34.46, stdev= 0.00
  cpu          : usr=0.00%, sys=51.90%, ctx=9598, majf=0, minf=102
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, &amp;gt;=64=0.0%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &amp;gt;=64=0.0%
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &amp;gt;=64=0.0%
     issued r/w/d: total=0/4/0, short=0/0/0

     lat (msec): &amp;gt;=2000=100.00%

Run status group 0 (all jobs):
  WRITE: io=4096KB, aggrb=109KB/s, minb=112KB/s, maxb=112KB/s, 
  mint=37326msec, maxt=37326msec

Disk stats (read/write):
  dm-12: ios=128/4721384, merge=0/0, ticks=5582/602531980, in_queue=602926524,
  util=97.85%, aggrios=129/87424, aggrmerge=0/4634618, aggrticks=5631/10828734,
  aggrin_queue=10826088, aggrutil=98.01%
    sdb: ios=129/87424, merge=0/4634618, ticks=5631/10828734, in_queue=10826088,
    util=98.01%
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;That&amp;#8217;s a pretty big difference: &lt;code&gt;io=4556.0MB&lt;/code&gt; for the FusionIO drives versus &lt;code&gt;io=4096.0KB&lt;/code&gt; for the &lt;span class=&quot;caps&quot;&gt;SAS&lt;/span&gt; RAID10. I&amp;#8217;m going to have to look into this more! :)&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;PS. I found this &lt;a href=&quot;https://secure.wikimedia.org/wikipedia/en/wiki/List_of_device_bandwidths&quot;&gt;list&lt;/a&gt; of device bandwidths interesting.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Installing chef on Centos 5</title>
   <link href="http://serverascode.com//serverascode/chef/2011/05/11/Installing-chef-on-centos-5.html"/>
   <updated>2011-05-11T00:00:00-07:00</updated>
   <id>http://serverascode.com/serverascode/chef/2011/05/11/Installing-chef-on-centos-5</id>
   <content type="html">&lt;h1&gt;Installing chef on Centos 5&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;11 May 2011 &amp;#8211; Edmonton&lt;/p&gt;
&lt;h2&gt;Mirroring the FrameOS &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt; repository&lt;/h2&gt;
&lt;p&gt;Installing Chef is pretty easy given that FrameOS has created all of the RPMs for us. See this &lt;a href=&quot;http://blog.frameos.org/2011/04/14/announcing-rbel-frameos-org/&quot;&gt;blog post&lt;/a&gt; for more information.&lt;/p&gt;
&lt;p&gt;I mirror their repository on a local, centralized server using mrepo. Below is an example of my configuration.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@repos etc]# cd /etc/mrepo.conf.d/
[root@repos mrepo.conf.d]# cat chef.conf 
[chef]
# FRAMEOS builds RPMS for chefhere: 
# http://blog.frameos.org/2011/04/14/announcing-rbel-frameos-org/
#
# This might also be a good repo to use:
# - http://download.elff.bravenet.com/5/x86_64/
name = FrameOS rbel Chef RPMs $release ($arch)
release = 5
#arch = x86_64 i386
arch = x86_64
metadata = repomd repoview yum

### Additional repositories
chef = http://rbel.frameos.org/stable/el$release/$arch/
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;This repo is then available to my servers at &lt;code&gt;http://repos/mrepo/chef-x86_64/RPMS.chef/&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Installing chef-server&lt;/h2&gt;
&lt;p&gt;Then I created a CentOS 5 virtual machine called &lt;code&gt;chef-server&lt;/code&gt;. I enabled the repo I mention above on that server, and then ran:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@chef-server yum.repos.d]# yum install rubygem-chef-server
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * extras: ftp.telus.net
 * updates: repos
Setting up Install Process
Resolving Dependencies
--&gt; Running transaction check
SNIP!
&lt;/code&gt;
&lt;/pre&gt;
&lt;br /&gt;

I added these iptables rules to /etc/sysconfig/iptables.

&lt;pre&gt;
&lt;code&gt;
# Chef
# -- web interface
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 4040 -j ACCEPT
# -- chef-server
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 4000 -j ACCEPT
# -- amqp server
-A RH-Firewall-1-INPUT -m state --state NEW -m multiport -p tcp --dport 5672,4369,50229 -j ACCEPT
# -- search indexes (solr)
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8983 -j ACCEPT
# data store (couchdb)
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5984 -j ACCEPT
&lt;/code&gt;
&lt;/pre&gt;
&lt;br /&gt;

And then ran the setup script (after taking a look at what it does :) ).

&lt;pre&gt;
&lt;code&gt;
[root@chef-server sbin]# setup-chef-server.sh
Checking RabbitMQ...
RabbitMQ not running. Starting...
Starting rabbitmq-server: SUCCESS
rabbitmq-server.
Configuring RabbitMQ default Chef user...

Starting CouchDB...

Starting couchdb:                                          [  OK  ]
Enabling Chef Services...

Starting Chef Services...

Starting chef-server:                                      [  OK  ]
Starting chef-server-webui:                                [  OK  ]
Starting chef-solr:                                        [  OK  ]
Starting chef-expander:                                    [  OK  ]
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;At which point I had a chef-server running, to which I can add clients and nodes.&lt;/p&gt;
&lt;h2&gt;Installing chef-client&lt;/h2&gt;
&lt;p&gt;Installing chef-client is also easily done with the provided rpms. I created another CentOS 5 virtual machine, called chef-client. (Actually I created many of them. It&amp;#8217;s fun once you get it automated. :) )&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@chef-client ~]# yum install chef-client
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;(Note that this may not be the preferred way to bootstrap a chef-client, but it has been working for me.)&lt;/p&gt;
&lt;p&gt;Then create a &lt;code&gt;client.rb&lt;/code&gt; file in &lt;code&gt;/etc/chef&lt;/code&gt;, where chef-server.example.com is the fqdn of your chef-server and is accessible on port 4000 from your chef-client.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@chef-client2 chef]# cat client.rb 
log_level        :info
    log_location     STDOUT
    chef_server_url  'http://chef-server.example.com:4000'
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Next, copy the &lt;code&gt;validation.pem&lt;/code&gt; file from the chef-server to &lt;code&gt;/etc/chef&lt;/code&gt; on the chef-client, likely using scp (or, do it when the server is built in a kickstart file :) ).&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@chef-client2 chef]# ls
client.rb  validation.pem
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Then start &lt;code&gt;chef-client&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@chef-client2 chef]# service chef-client start
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;But&lt;/strong&gt; in the /var/log/chef/client.log you will see an error that says client.pem is not present. This is good&amp;#8212;chef-client will create the client.pem file.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
# Logfile created on [Date] 1 by logger.rb/22285
 INFO: Daemonizing..
 INFO: Forked, in 1762. Priveleges: 0 0
 INFO: *** Chef 0.10.0 ***
 INFO: Client key /etc/chef/client.pem is not present - registering
 WARN: Failed to read the private key /etc/chef/validation.pem: #&amp;lt;Errno::ENOENT: No such file or directory - /etc/chef/validation.pem&amp;gt;
 ERROR: Chef::Exceptions::PrivateKeyMissing: I cannot read /etc/chef/validation.pem, which you told me to use to sign requests!
 FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
 ERROR: Sleeping for 1800 seconds before trying again
 FATAL: SIGTERM received, stopping
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Now, restart chef-client so that new client.pem file can be used in conjuncation with the validation.pem file to register the node/client with the chef-server.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@chef-client2 chef]# service chef-client restart
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;As long as the client.pem is there, the validation.pem is there, and the networking is OK, you should connect:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
 INFO: *** Chef 0.10.0 ***
 INFO: Run List is []
 INFO: Run List expands to []
 INFO: Starting Chef Run for chef-client2.example.com
 INFO: Loading cookbooks []
 WARN: Node chef-client2.example.com has an empty run list.
 INFO: Chef Run complete in 6.815418 seconds
 INFO: Running report handlers
 INFO: Report handlers complete
 FATAL: SIGTERM received, stopping
 INFO: Daemonizing..
 INFO: Forked, in 2032. Priveleges: 0 0
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;And now the client should appear in the node and client lists. (Note that I have not detailed how to add a user/client to the chef system, you&amp;#8217;ll have to do that to use knife.)&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[someuser@chef-server ~]$ knife node list
  chef-client2.example.com
SNIP!
[someuser@chef-server ~]$ knife client list
  chef-client2.example.com
SNIP!
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;(The &lt;span class=&quot;caps&quot;&gt;SNIP&lt;/span&gt;!s mean I&amp;#8217;ve removed some items for brevity.)&lt;/p&gt;
&lt;p&gt;Finally, run &lt;code&gt;chkconfig chef-client on&lt;/code&gt; on the chef-client to ensure the service starts at boot.&lt;/p&gt;
&lt;h2&gt;Installing chef-client from a kickstart file&lt;/h2&gt;
&lt;p&gt;When building new vms I install chef-client from a kickstart file. This is also easily done!&lt;/p&gt;
&lt;p&gt;The first important option in the kickstart file is the &lt;code&gt;repo&lt;/code&gt; option.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
repo --name=chef --baseurl=http://your_repo_server/mrepo/chef-x86_64/RPMS.chef/
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;and then, in the &lt;code&gt;%packages&lt;/code&gt; section simply add:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
rubygem-chef
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;which will be installed from the chef repo configured in the repo option.&lt;/p&gt;
&lt;p&gt;Also, enable the service:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
services --enabled chef-client
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Finally, in the &lt;code&gt;%post&lt;/code&gt; section I add the below. Note the [&lt;span class=&quot;caps&quot;&gt;PASTE&lt;/span&gt; &lt;span class=&quot;caps&quot;&gt;THE&lt;/span&gt; &lt;span class=&quot;caps&quot;&gt;CONTENTS&lt;/span&gt; OF &lt;span class=&quot;caps&quot;&gt;YOUR&lt;/span&gt; &lt;span class=&quot;caps&quot;&gt;VALIDATION&lt;/span&gt;.&lt;span class=&quot;caps&quot;&gt;PEM&lt;/span&gt; &lt;span class=&quot;caps&quot;&gt;HERE&lt;/span&gt;!!!] portion&amp;#8212;that means put the results of &lt;code&gt;cat /etc/chef/validation.pem&lt;/code&gt; there, not that actual phrase. :)&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
%post
# chef-client

if [ ! -e /etc/chef ]; then
        mkdir /etc/chef
fi

cat &amp;gt; /etc/chef/client.rb &amp;lt;&amp;lt; EOCLRB
log_level        :info
    log_location     STDOUT
    chef_server_url  'http://chef-server.example.com:4000'
EOCLRB
chmod 600 /etc/chef/client.rb

cat &amp;gt; /etc/chef/validation.pem &amp;lt;&amp;lt; EOVALPEM
[PASTE THE CONTENTS OF YOUR VALIDATION.PEM HERE!!!]
EOVALPEM
chmod 600 /etc/chef/validation.pem
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;When the server built from this kickstart boots chef-client will startup. However, it will fail the first time it starts up because the client.pem had to be generated. But, the next time it starts up it will connect to the chef-server and register. If you want it to register right away, then ssh into the server and run &lt;code&gt;service chef-client restart&lt;/code&gt; and it should register.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Installing Jekyll on Ubuntu 10.04</title>
   <link href="http://serverascode.com//serverascode/2011/05/09/Installing-jekyll-on-ubuntu-10-04.html"/>
   <updated>2011-05-09T00:00:00-07:00</updated>
   <id>http://serverascode.com/serverascode/2011/05/09/Installing-jekyll-on-ubuntu-10-04</id>
   <content type="html">&lt;h1&gt;Installing Jekyll on Ubuntu 10.04&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;9 May 2011 &amp;#8211; Edmonton&lt;/p&gt;
&lt;p&gt;Another small post&amp;#8230;given that I&amp;#8217;ve recently changed jobs and thus have new workstation(s) to install and configure as I like them, &lt;em&gt;and&lt;/em&gt; that I recently purchased a used Lenovo T61 laptop (which &lt;span class=&quot;caps&quot;&gt;BTW&lt;/span&gt; is running very well on Ubuntu 10.04/Lucid, perhaps fodder for another post) I&amp;#8217;ve repeated a several software installations lately on Lucid, including getting jekyll running locally so I can review blog posts before I send them up to &lt;a href=&quot;http://github.com&quot;&gt;github&lt;/a&gt; to run &lt;a href=&quot;http://serverascode.com&quot;&gt;serverascode.com&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;When you run &lt;code&gt;gem install jekyll&lt;/code&gt; on Lucid, you will recieve this error message:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ grep -i release /etc/lsb-release 
DISTRIB_RELEASE=10.04
$ gem install jekyll
ERROR:  Error installing jekyll:
	liquid requires RubyGems version &amp;gt;= 1.3.7
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Lucid comes with &lt;code&gt;gem 1.3.5&lt;/code&gt; which is not the version that Jekyll&amp;#8217;s gem requires. When searching for the error message I found &lt;a href=&quot;http://help.rubygems.org/discussions/problems/350-installing-rubygems-137-and-jekyll-on-ubuntu-1004#comment_3175741&quot;&gt;this&lt;/a&gt; post which describes one way of getting jekyll running on lucid, which is to install the gem package from Ubuntu 10.10. Now, obviously installing a package from what essentially is a different version of Ubuntu isn&amp;#8217;t usually a recommended way to go, it&amp;#8217;s certainly a quick and easy one (duh! :) ). I downloaded the &lt;a href=&quot;http://packages.ubuntu.com/maverick/all/rubygems1.8/download&quot;&gt;rubygems1.8_1.3.7-2&lt;/a&gt; package and installed it. Then I was able to run &lt;code&gt;gem install jekyll&lt;/code&gt; and then run jekyll:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
$ jekyll --server --auto
Configuration from /curtisgithub.github.com/_config.yml
Auto-regenerating enabled: /curtisgithub.github.com -&amp;gt; curtisgithub.github.com/_site
[2011-04-20 13:20:25] regeneration: 12 files changed
[2011-04-20 13:20:25] INFO  WEBrick 1.3.1
[2011-04-20 13:20:25] INFO  ruby 1.8.7 (2010-01-10) [x86_64-linux]
[2011-04-20 13:20:30] INFO  WEBrick::HTTPServer#start: pid=7082 port=4000
SNIP!
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;It remains to be seen if I&amp;#8217;ll run into issues with having the &lt;code&gt;gem&lt;/code&gt; from Ubuntu 10.10 running on Ubuntu 10.04. I&amp;#8217;ll update this post if I do. &lt;strong&gt;:)&lt;/strong&gt;&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Using LVM hosttags</title>
   <link href="http://serverascode.com//serverascode/2011/04/13/using-lvm-hosttags.html"/>
   <updated>2011-04-13T00:00:00-07:00</updated>
   <id>http://serverascode.com/serverascode/2011/04/13/using-lvm-hosttags</id>
   <content type="html">&lt;h1&gt;Using &lt;span class=&quot;caps&quot;&gt;LVM&lt;/span&gt; hosttags&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;13 April 2011 &amp;#8211; Edmonton&lt;/p&gt;
&lt;p&gt;This is a somewhat minor post, but I thought it would be worthwhile to take a peek at using &lt;span class=&quot;caps&quot;&gt;LVM&lt;/span&gt; hosttags to manage dom0 access to logical volumes on top of &lt;span class=&quot;caps&quot;&gt;SAN&lt;/span&gt; LUNs because there doesn&amp;#8217;t seem to be a lot of documentation on using hosttags online. Perhaps that&amp;#8217;s because no one is doing it this way.&lt;/p&gt;
&lt;p&gt;While it&amp;#8217;s not my favorite way of managing &lt;span class=&quot;caps&quot;&gt;SAN&lt;/span&gt; disks across servers (I like &lt;a href=&quot;http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Logical_Volume_Manager_Administration/LVM_Cluster_Overview.html&quot;&gt;clvmd&lt;/a&gt; but it brings considerable complexity), hosttags are certainly one way to do it. Hosttags are a relatively simple method, and better than &lt;span class=&quot;caps&quot;&gt;LVM&lt;/span&gt; filters &lt;span class=&quot;caps&quot;&gt;IMHO&lt;/span&gt;. The point of using &lt;span class=&quot;caps&quot;&gt;LVM&lt;/span&gt; hosttags is to ensure that only one server is ever writing to a &lt;span class=&quot;caps&quot;&gt;SAN&lt;/span&gt; &lt;span class=&quot;caps&quot;&gt;LUN&lt;/span&gt; at a time (unless you have something like &lt;span class=&quot;caps&quot;&gt;GFS&lt;/span&gt; or similar in use, which is managing that process of multiple writers, and in that case what are you doing here? :) ).&lt;/p&gt;
&lt;p&gt;In this example we have three Redhat Enterprise 5.x dom0 servers connected to a large&amp;#8212;and expensive&amp;#8212;storage area network. We&amp;#8217;ll call them &lt;code&gt;vmhost1&lt;/code&gt;, &lt;code&gt;vmhost2&lt;/code&gt;, and &lt;code&gt;vmhost3&lt;/code&gt;. The LUNs are provided to the vmhosts via the SANs configuration software. The vmhosts see them as regular disk, but they &lt;em&gt;aren&amp;#8217;t&lt;/em&gt; regular disk because each of the servers can see them, where see means read and write. (Note that I may be using terms incorrectly, but by &lt;span class=&quot;caps&quot;&gt;SAN&lt;/span&gt; &lt;span class=&quot;caps&quot;&gt;LUN&lt;/span&gt; I mean the slice of &lt;span class=&quot;caps&quot;&gt;SAN&lt;/span&gt; disk provided to the server over fibre channel.)&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@vmhost1 ~]# multipath -l | grep 00000002
mpath3 (877880e80144455000001445500000002) dm-12 HITACHI,OPEN-V*4
[root@vmhost2 ~]# multipath -l | grep 00000002
mpath3 (877880e80144455000001445500000002) dm-11 HITACHI,OPEN-V*4
[root@vmhost3 ~]# multipath -l | grep 00000002
mpath3 (877880e80144455000001445500000002) dm-11 HITACHI,OPEN-V*4
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;As is shown in the above output, each of the hosts can see the same &lt;span class=&quot;caps&quot;&gt;SAN&lt;/span&gt; &lt;span class=&quot;caps&quot;&gt;LUN&lt;/span&gt;: &lt;code&gt;877880e80144455000001445500000002&lt;/code&gt; which in each case is also called &lt;code&gt;mpath3&lt;/code&gt;. But I don&amp;#8217;t really care about what names the disk is given because I run &lt;span class=&quot;caps&quot;&gt;LVM&lt;/span&gt; on top of those disks.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@vmhost2 ~]# pvs | grep mpath3
  /dev/mapper/mpath3 some_volume_group LVM2 a-    96.62G  16.62G
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;So, we have a &lt;span class=&quot;caps&quot;&gt;SAN&lt;/span&gt; &lt;span class=&quot;caps&quot;&gt;LUN&lt;/span&gt;, a physical volume (PV) made from that &lt;span class=&quot;caps&quot;&gt;LUN&lt;/span&gt;, and a volume group (VG) called &lt;code&gt;some_volume_group&lt;/code&gt; created from that PV.&lt;/p&gt;
&lt;p&gt;So it sort of looks like this in terms of hierarchy:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Fibre Channel &lt;span class=&quot;caps&quot;&gt;SAN&lt;/span&gt; &lt;span class=&quot;caps&quot;&gt;LUN&lt;/span&gt;
	&lt;ul&gt;
		&lt;li&gt;multipathd
		&lt;ul&gt;
			&lt;li&gt;PV
			&lt;ul&gt;
				&lt;li&gt;VG
				&lt;ul&gt;
					&lt;li&gt;Logical volume (LV) which has hosttags assigned&lt;/li&gt;
				&lt;/ul&gt;&lt;/li&gt;
			&lt;/ul&gt;&lt;/li&gt;
		&lt;/ul&gt;&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Using hosttags&lt;/h2&gt;
&lt;p&gt;First we make sure we have hosttags configured on each of the vmhosts.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@vhmost2 lvm]# pwd
/etc/lvm
[root@vmohost2 lvm]# grep hosttags lvm.conf
tags { hosttags = 1 }
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Obviously because I run using &lt;span class=&quot;caps&quot;&gt;LVM&lt;/span&gt; hosttags in production, I already have hosttags configured and being used to control vmhost access to LVs.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@vmohost2 lvm]# uname -n
xmhost2.example.com
[root@vmhost2 lvm]# lvdisplay @`uname -n` | grep &quot;LV Name&quot;
SNIP!
  lv Name                /dev/some_logical_volume/test
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;If I want to create a LV on a vmhost, and that VG is configured to use hosttags, then it has to be done properly. This is an example that will fail because the host does not have permission, ie. the LV is not available because of the lack of a hosttag attribute on the LV that names the &lt;code&gt;uname -n&lt;/code&gt; host specifically.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@vmhost2 ~]# lvcreate -n test2 -L10.0G /dev/some_volume_group
# Will fail out with error message
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;But this &lt;em&gt;next&lt;/em&gt; command will work, because we are saying create a LV and assign a hosttag to it which is the same as the hostname that is creating it. The vmhost can&amp;#8217;t create a LV if it&amp;#8217;s not made available via a hosttag.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@vmhost2 ~]# uname -a
vmhost2.example.com
[root@vmhost2 ~]# lvcreate --addtag @vmhost2.example.com -n test2 \
-L10.0G /dev/some_volume_group
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Now, on &lt;code&gt;vmhost1&lt;/code&gt; we can see that the LV appears in the list, but it is not available:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@vmhost1 ~]# lvs some_volume_group | grep test2
  test2            some_volume_group -wi--- 10.00G
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;But it&amp;#8217;s available on vmhost2, where it was created, and where it has a hosttag attribute of &lt;code&gt;vmhost2.example.com&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@vmhost2 ~]# lvs some_volume_group | grep test2 
  test2            some_volume_group -wi-a- 10.00G
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;And, if you use &lt;code&gt;lvdisplay @`uname -n`&lt;/code&gt; you can see what LVs have the servers &lt;code&gt;uname -n&lt;/code&gt; tag:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@vmhost2 ~]# lvdisplay @vmhost2.example.com | grep &quot;LV Name&quot;
  LV Name                /dev/some_volume_group/test2
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;whereas &lt;code&gt;vmhost1&lt;/code&gt; does not see that LV:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
[root@vmhost1 ~]# lvdisplay @vmhost1.example.com | grep &quot;LV Name&quot;
# Nothing returns, as expected
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;So, while this sounds complicated, it really isn&amp;#8217;t. Essentially for a LV to be available to a server that can see the same LUNs as other servers, in terms of &lt;span class=&quot;caps&quot;&gt;LVM&lt;/span&gt;, it must have its hosttag added to the LVs metadata. Otherwise, it&amp;#8217;s not available and can&amp;#8217;t be used on that host.&lt;/p&gt;
&lt;p&gt;While all three hosts can see the LV, it&amp;#8217;s only available to those vmhosts that have had their hostname added to the specific LVs tags. It adds complexity to the vmhost setup and use, but it&amp;#8217;s better to do this than to end up having two virtual machines writing to the same LV. Other options include using filtering in &lt;span class=&quot;caps&quot;&gt;LVM&lt;/span&gt;, or even going all the way and using &lt;a href=&quot;http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Logical_Volume_Manager_Administration/LVM_Cluster_Overview.html&quot;&gt;clvmd&lt;/a&gt;, which I have done, &lt;em&gt;but that&amp;#8217;s another story&amp;#8230;&lt;/em&gt; :)&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>What is serverascode.com?</title>
   <link href="http://serverascode.com//2011/04/11/what-is-serverascode_com.html"/>
   <updated>2011-04-11T00:00:00-07:00</updated>
   <id>http://serverascode.com/2011/04/11/what-is-serverascode_com</id>
   <content type="html">&lt;h1&gt;What is serverascode.com?&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;11 April 2011 &amp;#8211; Edmonton&lt;/p&gt;
&lt;p&gt;serverascode.com has two major functions: 1) to document how I am working through the process of learning to treat servers as code, and 2) to be my systems administration resume.&lt;/p&gt;
&lt;p&gt;Starting with #2, I believe that in my line of work&amp;#8212;Unix/Linux systems administration&amp;#8212;in todays &amp;#8220;market&amp;#8221;, a two page traditional resume will not get me the job I&amp;#8217;m looking for. The only thing that will is a good set of open source contributions; that if servers are code, then much of what I do as a systems administrator should be available on-line in a source code repository. As I write this post, I only have a few lines of code available at &lt;a href=&quot;https://github.com/curtisgithub/kicker&quot;&gt;github&lt;/a&gt; but as time goes on that will increase.&lt;/p&gt;
&lt;p&gt;As far as #1, I love to read about the latest way systems administrator are working; how they are being successful leveraging technology to manage large numbers of often diverse, highly interconnected systems while still ensuring they are highly operational and secure. I read sites like Hacker News and other blogs that describe a sort of “new age” methodology to systems administration; so called &amp;#8220;devops&amp;#8221; or &amp;#8220;agile sysadmin&amp;#8221; or just plain 2010+ systems administration.  However, I have not had an opportunity to apply those concepts, and I would like to use this blog, and services like github, to begin treating a &lt;code&gt;server as code&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;For better or for worse, systems administration has changed greatly&amp;#8212;and will continue to change&amp;#8212;especially with the recent trend in virtualization. I believe at the core of this change is the concept of treating server(s) as code. My feeling is that in 2010+ we don&amp;#8217;t admin a server, we code it. From procurement to deployment to maintenance to decommissioning&amp;#8212;it&amp;#8217;s all code now.&lt;/p&gt;
&lt;p&gt;On top of every Linux distribution, which can perhaps now be a called a OS framework, comes configuration conventions, and a packaging system. Then, over top of the framework, we add a centralized management server instance (perhaps the only server I should be logging into) which runs configuration management software, such as chef, puppet, and others, which control installation and configuration of applications, alerting things such as change management, and other systems I have not yet determined.&lt;/p&gt;
&lt;p&gt;Suffice it to say that I am looking forward to working towards treating &lt;code&gt;servers as code&lt;/code&gt; and documenting that process in blog posts and, hopefully more-so, as code!&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Resume and Contact</title>
   <link href="http://serverascode.com//2011/04/10/resume.html"/>
   <updated>2011-04-10T00:00:00-07:00</updated>
   <id>http://serverascode.com/2011/04/10/resume</id>
   <content type="html">&lt;h1&gt;Resume and Contact&lt;/h1&gt;
&lt;p class=&quot;meta&quot;&gt;Updated 20 October &amp;#8211; 2012 &amp;#8211; Edmonton&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://raw.github.com/curtisgithub/curtisgithub.github.com/master/img/openstack_summit_2012_security.jpg&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
&lt;em&gt;(Taken at the 2012 OpenStack Summit)&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;Contact&lt;br /&gt;
&lt;p&gt;&lt;/p&gt;&lt;/h2&gt;
&lt;ul&gt;
	&lt;li&gt;Name: Curtis&lt;/li&gt;
	&lt;li&gt;Email: curtis@serverascode.com&lt;/li&gt;
	&lt;li&gt;Twitter: &lt;a href=&quot;https://twitter.com/serverascode&quot;&gt;@serverascode&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;Github: &lt;a href=&quot;https://github.com/curtisgithub&quot;&gt;curtisgithub&lt;/a&gt; &lt;em&gt;(I know&amp;#8230;not the best account name)&lt;/em&gt;&lt;/li&gt;
	&lt;li&gt;Hacker News: &lt;a href=&quot;http://news.ycombinator.com/user?id=serverascode&quot;&gt;serverascode&lt;/a&gt;&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;Stack Exchange: &lt;a href=&quot;http://stackoverflow.com/users/1460882/curtis&quot;&gt;curtis&lt;/a&gt; &lt;br /&gt;
&lt;p&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Goals&lt;/h2&gt;
&lt;p&gt;I would like to continue working with Linux, OpenBSD, OpenStack, Python, &lt;a href=&quot;http://ansible.cc&quot;&gt;Ansible&lt;/a&gt; and other great Open Source software (&lt;a href=&quot;http://opencompute.org&quot;&gt;and hardware&lt;/a&gt;) projects, especially projects related to devops, security, the &amp;#8220;cloud,&amp;#8221; performance, monitoring, and modern storage systems such as object storage and those using solid state devices. I&amp;#8217;m also interested in increasing my knowledge of networking, especially seeing how powerful projects like Quantum will be in OpenStack. I would be &lt;em&gt;very&lt;/em&gt; interested in working on a project developing tools related to OpenStack and security.&lt;/p&gt;
&lt;p&gt;My dream job would be to work at a great company. Sounds simple, but what defines a great compay? As far as I&amp;#8217;m concerned, it&amp;#8217;s one that&amp;#8217;s fast moving, yet thoughtful, and willing to fail fast. A company that accomplishes a lot in a short amount of time, and that doesn&amp;#8217;t mean 100 hour weeks for its employees. I&amp;#8217;d like to be part of a team that creates great products and services, open source or not.&lt;/p&gt;
&lt;p&gt;I would like to work in an organization that fosters diversity in its staff and works hard to maintain that diversity, not just in terms of gender and ethnicity, but also what staff do outside their work life.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;d also like to work for a company with a good sense of humor. I don&amp;#8217;t think sense of humor gets enough attention these days, though I admit that is a difficult requirement for an entire organization to meet.&lt;/p&gt;
&lt;p&gt;Finally, I would like to work in an environment where I can learn from my peers, which likely means going to a place where everyone is smarter than I am, and where they can help bring me up to their level. If I&amp;#8217;m lucky I can give them something in return, and hopefully contribute to the open source community as well.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;(And since we&amp;#8217;re talking dream jobs, it would be nice to bring my dog to work every once in a while.)&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;Background&lt;/h2&gt;
&lt;p&gt;Most of my career has been spent in Systems Administration. I have recently branched out to working as a  &amp;#8220;Cloud Developer&amp;#8221; mostly around the OpenStack ecosystem. While that title likely has a short lifespan, I do believe it&amp;#8217;s currently accurate, especially when one considers the somewhat recently initiated devops movement.&lt;/p&gt;
&lt;p&gt;I previously worked for a world-class library at a large Canadian university that wanted to archive and store digital artifacts (ie. our culture) for 500 years. That meant I learned a lot of about all kinds of modern storage systems&amp;#8212;and I&amp;#8217;m not just talking about your standard head-based fibre &lt;span class=&quot;caps&quot;&gt;SAN&lt;/span&gt;, because that model just doesn&amp;#8217;t work for all situations. We needed &lt;a href=&quot;http://en.wikipedia.org/wiki/ZFS&quot;&gt;checksumming filesystems&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;While working at the library I was lucky enough to travel to San Francisco and meet the people behind the &lt;a href=&quot;http://archive.org&quot;&gt;Internet Archive&lt;/a&gt; (an organization that has eight or nine petabytes of storage) find out what they were doing, and bring those concepts back and work on implementing some of them. I also worked with projects as diverse as a Canada-wide L2 networking to sync iRODS instances. Nothing like pinging a private network that is thousands of kilometres away. :)&lt;/p&gt;
&lt;p&gt;Prior to working in a library (which I can assure you is quite an experience, walking through the stacks to get to your office is amazing), I worked as a Systems Administrator at a large Canadian Online and and Distance Education university on several research projects as well as with scaling educational information systems such as Moodle. We  used Redhat Enterprise and Xen and &lt;span class=&quot;caps&quot;&gt;KVM&lt;/span&gt; based virtualization quite heavily. In this position I was able to work on several performance testing projects, such as pushing millions and millions of messages through Zimbra using Jmeter, as well as package many systems into &lt;a href=&quot;http://en.wikipedia.org/wiki/RPM_Package_Manager&quot;&gt;&lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I gained the bulk of my security experience&amp;#8212;and my understanding that &amp;#8220;siloing&amp;#8221; is not the best way to create security&amp;#8212;at the same university where I was the Security Systems Administrator. I worked on firewalls (of course), intrusion detection, and layered security. There I began the process of moving the university away from a single monolithic commercial firewall to multiple firewalls based on OpenBSD.&lt;/p&gt;
&lt;h2&gt;Skills&lt;br /&gt;
&lt;p&gt;&lt;/p&gt;&lt;/h2&gt;
&lt;ul&gt;
	&lt;li&gt;Professional Unix/Linux systems administrator&lt;/li&gt;
	&lt;li&gt;Operating private clouds based on OpenStack&lt;/li&gt;
	&lt;li&gt;Virtualization with Xen, &lt;span class=&quot;caps&quot;&gt;KVM&lt;/span&gt;, VirtualBox&lt;/li&gt;
	&lt;li&gt;Linux Operating System Packaging (eg. &lt;span class=&quot;caps&quot;&gt;RPM&lt;/span&gt;)&lt;/li&gt;
	&lt;li&gt;Experience with large, modern storage systems&lt;/li&gt;
	&lt;li&gt;Information security expert (&lt;span class=&quot;caps&quot;&gt;CISSP&lt;/span&gt;, &lt;span class=&quot;caps&quot;&gt;GCUX&lt;/span&gt;)&lt;sup class=&quot;footnote&quot; id=&quot;fnr1&quot;&gt;&lt;a href=&quot;#fn1&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/li&gt;
	&lt;li&gt;Scripting in python, bash&lt;/li&gt;
	&lt;li&gt;Life-long learning&lt;br /&gt;
&lt;p&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Projects&lt;br /&gt;
&lt;p&gt;&lt;/p&gt;&lt;/h2&gt;
&lt;ul&gt;
	&lt;li&gt;Lead developer on an open source &lt;a href=&quot;https://github.com/curtisgithub/labinski&quot;&gt;virtual lab&lt;/a&gt; (ie. &lt;a href=&quot;http://en.wikipedia.org/wiki/Desktop_virtualization&quot;&gt;DaaS&lt;/a&gt;) based on OpenStack&lt;sup class=&quot;footnote&quot; id=&quot;fnr2&quot;&gt;&lt;a href=&quot;#fn2&quot;&gt;2&lt;/a&gt;&lt;/sup&gt; called &lt;em&gt;The Labinski&lt;/em&gt;!&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/curtisgithub/ansible_playbooks/tree/master/openstack_essex&quot;&gt;Deployment&lt;/a&gt; and operation of a private cloud based on OpenStack&lt;/li&gt;
	&lt;li&gt;Installed and performance tested multiple vendor PCIe-&lt;span class=&quot;caps&quot;&gt;SSD&lt;/span&gt; cards&lt;/li&gt;
	&lt;li&gt;Development of a one petabyte+ storage system&lt;/li&gt;
	&lt;li&gt;Deployed iRODS across a Canarie Lightpath (ie. across Canada)&lt;/li&gt;
	&lt;li&gt;Deployed live migration capable virtual machine host cluster via &lt;span class=&quot;caps&quot;&gt;XEN&lt;/span&gt;/&lt;span class=&quot;caps&quot;&gt;KVM&lt;/span&gt; and &lt;span class=&quot;caps&quot;&gt;SAN&lt;/span&gt; (ie. clustered &lt;span class=&quot;caps&quot;&gt;LVM&lt;/span&gt;)&lt;/li&gt;
	&lt;li&gt;Deployed OpenBSD/pf as main firewall for large organization&lt;/li&gt;
	&lt;li&gt;Packaged and deployed systems such as Moodle, DSpace in production&lt;br /&gt;
&lt;p&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Education&lt;br /&gt;
&lt;p&gt;&lt;/p&gt;&lt;/h2&gt;
&lt;ul&gt;
	&lt;li&gt;2 Year After-degree in Information Security, 2001&lt;/li&gt;
	&lt;li&gt;Bachelor of Education, 2000&lt;br /&gt;
&lt;p&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Experience&lt;/h2&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Cloud Developer &amp;#8211; Educational Services, Startups  &amp;#8211; Non-profit Research Organization &amp;#8211; June 2012 to Present&lt;/li&gt;
	&lt;li&gt;Senior Unix Systems and Storage Administrator &amp;#8211; Digital Preservation &amp;#8211; Top 20 University Library &amp;#8211; April 2011 to June 2012&lt;/li&gt;
	&lt;li&gt;Unix Systems Administrator &amp;#8211; Production Services and Research &amp;#8211; Large Online and Distance University &amp;#8211; Oct 2007 to April 2011&lt;/li&gt;
	&lt;li&gt;IT Services &amp;#8211; Various &amp;#8211; July 2005 &amp;#8211; Sept 2007&lt;/li&gt;
	&lt;li&gt;Systems Administrator &amp;#8211; Banking &amp;#8211; Private Company &amp;#8211; May 2004 to June 2005&lt;/li&gt;
	&lt;li&gt;Security Systems Administrator &amp;#8211; Large Online and Distance University &amp;#8211; Dec 2001 to June 2004&lt;/li&gt;
&lt;/ul&gt;
&lt;p class=&quot;footnote&quot; id=&quot;fn1&quot;&gt;&lt;a href=&quot;#fnr1&quot;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt; &lt;em&gt;I have allowed these certifications to expire&lt;/em&gt;&lt;/p&gt;
&lt;p class=&quot;footnote&quot; id=&quot;fn2&quot;&gt;&lt;a href=&quot;#fnr2&quot;&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;/a&gt; &lt;em&gt;Still an early beta stage project&lt;/em&gt;&lt;/p&gt;</content>
 </entry>
 
 
</feed>
