<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Rhonabwy &#187; Geekstuff</title>
	<atom:link href="http://www.rhonabwy.com/wp/category/geekstuff/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rhonabwy.com/wp</link>
	<description>Mac, iOS, DevOps, and daily life in Seattle</description>
	<lastBuildDate>Wed, 12 Oct 2011 17:38:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Openstack Summit Fall 2011 &#8211; Wrap-up and overview</title>
		<link>http://www.rhonabwy.com/wp/2011/10/08/openstack-summit-fall-2011-wrap-up-and-overview/</link>
		<comments>http://www.rhonabwy.com/wp/2011/10/08/openstack-summit-fall-2011-wrap-up-and-overview/#comments</comments>
		<pubDate>Sat, 08 Oct 2011 21:48:00 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[devops]]></category>
		<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[openstack]]></category>
		<category><![CDATA[Ranting and Reflections]]></category>

		<guid isPermaLink="false">http://www.rhonabwy.com/wp/?p=1146</guid>
		<description><![CDATA[I&#8217;m back from the OpenStack design summit and conference, just held in Boston, MA. It was a fantastic week, with the first three days dedicated to the design summit &#8211; getting down and dirty with the details, and the last &#8230; <a href="http://www.rhonabwy.com/wp/2011/10/08/openstack-summit-fall-2011-wrap-up-and-overview/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m back from the <a href="http://www.openstack.org/">OpenStack</a> design summit and conference, just held in Boston, MA. It was a fantastic week, with the first three days dedicated to the design summit &#8211; getting down and dirty with the details, and the last two dedicated to the conference portion &#8211; talks and panels about folks actively using OpenStack, and a little wrap-up and overview from the project technical leads of the next 6 month roadmap for the core and incubation projects in OpenStack.</p>
<p>One thing that was intended as new, and I think worked well, was the splitting of the conference and design summit. It really made it a lot easier to be involved in the technical details and not have to choose between that and listening to folks talk to what they&#8217;re Openstack experiences have been, governance models and choices, and so forth. As an active contributor to (and general jack-of-all-trades with) a number of the OpenStack projects, it&#8217;s hard enough to balance my focus between the technical sessions.</p>
<p>There was also a ton of news related to OpenStack that is just fantastic for the community. <a href="http://www.openstack.org/blog/2011/10/openstack-foundation/">Rackspace is starting to form out a foundation</a> to run OpenStack long term, and the governance round-table at the conference made it clear that pretty much everyone agreed to a thoughtful, careful process to set it up to really make a long term run with OpenStack. There was notable consensus on ideas and vision of how to set up governance, including taking some long and deep looks at how other successful open source foundations have been set up, and looking to those foundations to learn what&#8217;s been successful, and what they might have done differently.</p>
<p>There was also the entrance of Hewlett Packard very publicly actively into the OpenStack world. <a href="http://h30529.www3.hp.com/t5/HP-Scaling-the-Cloud-Blog/HP-Announces-Support-for-OpenStack/ba-p/109">Back in September, they said they&#8217;d be there</a>, and with the conference <a href="http://openstackconference2011.sched.org/event/4e321f227cd76589defcb7a443af370c">they have committed hardware and time to continuous integration efforts</a>. They were notably involved in the design summit as well, hosting a couple of sessions and getting actively involved in others. And I think most pleasing to me, they are actively submitting code contributions to the OpenStack core projects. I think it&#8217;s a little odd that they&#8217;re all coming in as &#8220;<a href="https://review.openstack.org/#dashboard,1631">HP Nova Contributors</a>&#8220;, but I&#8217;m glad to see it. </p>
<p>With HP running <a href="http://www.vimeo.com/27928411">their cloud offering</a> on OpenStack, they&#8217;re getting deeper in the details of the code. Dell&#8217;s been focusing their efforts on the <a href="http://robhirschfeld.com/2011/03/14/how-openstack-installer-works/">amazing OpenStack deployment tool: Crowbar</a>, and it seems clear to me that HP is taking their interest quite a bit deeper into the core projects.</p>
<p>I won&#8217;t even do justice the the individual project roadmaps from the summit &#8211; I think that the most of the project technical leads are likely recovering this weekend from an intensely focused week. In the next couple of weeks, we&#8217;ll see them hit the mailing list  &#8211; and from what I saw from the sessions in the conference, there&#8217;s going to be some hard choices coming up on where to expend resources. Every one of the projects has more that they want to do than they will be able to smoothly accomplish in the next 6 months. We&#8217;ll see the details hitting the <a href="https://blueprints.launchpad.net/openstack">blueprints</a> in the very near future I&#8217;m sure. Suffice to say that if you&#8217;ve been thinking about getting involved in OpenStack, now is very definitely the time to jump in &#8211; there&#8217;s a ton to do, and a lot of really interesting problems to solve in getting it done.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhonabwy.com/wp/2011/10/08/openstack-summit-fall-2011-wrap-up-and-overview/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing OpenStack &#8211; Diablo release (nova and glance)</title>
		<link>http://www.rhonabwy.com/wp/2011/09/23/installing-openstack-diablo-release-nova-and-glance/</link>
		<comments>http://www.rhonabwy.com/wp/2011/09/23/installing-openstack-diablo-release-nova-and-glance/#comments</comments>
		<pubDate>Fri, 23 Sep 2011 16:41:09 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[openstack]]></category>
		<category><![CDATA[Ranting and Reflections]]></category>

		<guid isPermaLink="false">http://www.rhonabwy.com/wp/?p=1139</guid>
		<description><![CDATA[I know a lot of folks are using the StackOps script thingy to install OpenStack. I&#8217;ve been installing it (quite a bit) lately just from packages, and it&#8217;s not all that difficult, so I thought I&#8217;d write up the details &#8230; <a href="http://www.rhonabwy.com/wp/2011/09/23/installing-openstack-diablo-release-nova-and-glance/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I know a lot of folks are using the <a href="http://www.stackops.com/">StackOps</a> script thingy to install OpenStack. I&#8217;ve been installing it (quite a bit) lately just from packages, and it&#8217;s not all that difficult, so I thought I&#8217;d write up the details on how to do that. A lot of this is exactly what&#8217;s encoded into <a href="https://github.com/cloudbuilders/openstack-cookbooks">Chef recipes</a> and <a href="https://github.com/puppetlabs/puppetlabs-openstack">Puppet modules</a> out there &#8211; so if you&#8217;re looking to run with something already made, there&#8217;s plenty of options.</p>
<p>These instructions are assuming you&#8217;re starting with an Ubuntu based system &#8211; either 10.10 or 11.04. I haven&#8217;t tried it as yet with 11.10.</p>
<p>First things first, I recommend you make sure you have the latest bits of everything:</p>
<pre lang=bash>
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get autoremove
</pre>
<p>Then we need to add the release &#8220;PPA&#8221; so that your system can grab the packages for Openstack:</p>
<pre lang=bash>
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:openstack-release/2011.3
sudo apt-get update
</pre>
<p>Now we get into the details. I&#8217;m going to drive out the instructions that will start with a single host, but are set up to add additional virtualization hosts as you need. I&#8217;m writing this assuming you&#8217;re working in a small network, and setting it up for FlatDHCP networking. Choosing the networking strategy and IP address space to use is actually one of the trickier parts of doing a reasonable install. For just testing something out in a test lab, this setup will work reasonable well &#8211; the only thing to really note is that this *will* install a DHCP server to provide IP addresses to the virtual instances, so if you have another DHCP server handing out addresses, you might need to get into the details and change some of these settings.</p>
<p>Installing the packages:</p>
<p>OpenStack relies on using MySQL as a data repository for information about the openstack configuration, so we&#8217;ll need to set up a MySQL server. Normally when you install the packages for MySQL, it&#8217;ll ask you about configuring a root password and such. We can make that hands-off by pre-answering some of those questions. To do this, make a file named &#8220;/tmp/mysql_preseed.txt&#8221; and put in it the following:</p>
<pre>
mysql-server-5.1 mysql-server/root_password password openstack
mysql-server-5.1 mysql-server/root_password_again password openstack
mysql-server-5.1 mysql-server/start_on_boot boolean true
</pre>
<p>Then we can get into the commands to install the packages:</p>
<pre lang=bash>
cat /tmp/mysql_preseed.txt | debconf-set-selections
apt-get install mysql-server python-mysqldb
apt-get install rabbitmq-server
# ^^ pre-reqs for running controller nova instance
apt-get install euca2ools unzip
# ^^ for accessing nova through EC2 APIs
apt-get install nova-volume nova-vncproxy nova-api nova-ajax-console-proxy
apt-get install nova-doc nova-scheduler nova-objectstore
apt-get install nova-network nova-compute
apt-get install glance
</pre>
<p>That&#8217;s got all the packages installed onto your local system! Now we just need to configure it up and initialize some information (that&#8217;s the bit about networks, etc).</p>
<p>Before I get into changing configs, let me explain what I&#8217;ll be setting up. In this example, my internal &#8220;network&#8221; is 172.17.0.0/24 &#8211; and I have a dedicated IP address for this host that is 172.17.0.133. The virtual machines will be in their own network space (10.0.0.0 to 10.0.0.254), and (at this point) not visible from the local network, but will be able to access the local network through their virtualization hosts. The machine I&#8217;m using also only has a single NIC (eth0), which is fine for a little test bed, but not likely what you want to do in any sort of real setup.</p>
<p><strong>/etc/nova/nova.conf</strong></p>
<pre>--dhcpbridge_flagfile=/etc/nova/nova.conf
--dhcpbridge=/usr/bin/nova-dhcpbridge
--logdir=/var/log/nova
--state_path=/var/lib/nova
--lock_path=/var/lock/nova
--flagfile=/etc/nova/nova-compute.conf
--verbose
#
--sql_connection=mysql://novadbuser:novaDBsekret@172.17.0.133/nova
#
--network_manager=nova.network.manager.FlatDHCPManager
--flat_network_bridge=br100
--flat_injected=False
--flat_interface=eth0
--public_interface=eth0
#
--vncproxy_url=http://172.17.0.133:6080
--daemonize=1
--rabbit_host=172.17.0.133
--osapi_host=172.17.0.133
--ec2_host=172.17.0.133
--image_service=nova.image.glance.GlanceImageService
--glance_api_servers=172.17.0.133:9292
--use_syslog
</pre>
<p>Now you might have noticed the MySQL connection string in there. We need to set up that user and password in MySQL to do what needs to be done. I also change the MySQL configuration so that remote systems can connect to MySQL. It&#8217;s not needed on a single host, but if you ever want to have more than one compute host, you need to make this change. In <strong>/etc/mysql/my.conf</strong>, find the line:</p>
<pre>bind-address = 127.0.0.1</pre>
<p>and change it to</p>
<pre>bind-address 0.0.0.0</pre>
<p>Now lets make the user in Mysql:</p>
<pre>
mysql -popenstack
CREATE USER 'novadbuser' IDENTIFIED BY 'novaDBsekret';
GRANT ALL PRIVILEGES ON *.* TO 'novadbuser'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
</pre>
<p>And set up the database:</p>
<pre>
mysql -popenstack -e 'CREATE DATABASE nova;'
nova-manage db sync
</pre>
<p>If that last command gives you any trouble, then we likely don&#8217;t have the MySQL system configured correctly &#8211; the user can&#8217;t access the tables or something. Check in the logs for MySQL to get a sense of what might have gone wrong.</p>
<p>At this point, it&#8217;s time to configure up the internals of openstack &#8211; create projects, networks, etc.<br />
We&#8217;ll start by creating an admin user:</p>
<pre>
# create admin user called "cloudroot"
nova-manage user admin --name=cloudroot --secret=sekret
</pre>
<p>This should respond with something like:</p>
<pre>export EC2_ACCESS_KEY=sekret
export EC2_SECRET_KEY=653f3fad-df22-449b-9e6a-ea6c81e32621</pre>
<p>You can scratch that down, but we&#8217;ll be getting that same information again later and using it, so don&#8217;t worry too much about it.</p>
<p>Now we create a project:</p>
<pre>
# create project "cloudproject" with project mgr: "cloudroot"
nova-manage project create --project=cloudproject --user=cloudroot
</pre>
<p>And finally, a network configuration for those internal IP addresses:</p>
<pre>
nova-manage network create private \
    --fixed_range_v4=10.0.0.0/24 \
    --num_networks=1 \
    --network_size=256 \
    --bridge=br100 \
    --bridge_interface=eth0 \
    --multi_host=T
# gateway assumed at 10.0.0.1
# broadcast assumed at 10.0.0.255
</pre>
<p>Now I&#8217;m using the multi-host flag, which is new in the Diablo release. This makes each compute node it&#8217;s own networking host for the purposes of allowing the VM&#8217;s you spin up to access your network or the internet.</p>
<p>At this point, you&#8217;re system should be up and running, all systems operational. Let me walk you through the command steps to actually kick up a little test VM though. These commands are all meant to be done as a local user (not root!)</p>
<pre>
sudo nova-manage project zipfile cloudproject cloudroot /tmp/nova.zip
unzip -o /tmp/nova.zip -d ~/creds
cat creds/novarc >> ~/.bashrc
source creds/novarc
#
euca-add-keypair mykey > mykey.priv
chmod 600 mykey.priv
#
image="ttylinux-uec-amd64-12.1_2.6.35-22_1.tar.gz"
wget http://smoser.brickies.net/ubuntu/ttylinux-uec/$image
uec-publish-tarball $image mybucket
#
wget http://uec-images.ubuntu.com/releases/10.04/release/ubuntu-10.04-server-uec-amd64.tar.gz
uec-publish-tarball ubuntu-10.04-server-uec-amd64.tar.gz mybucket
...OUTPUT...
Thu Aug 18 14:02:20 PDT 2011: ====== extracting image ======
Warning: no ramdisk found, assuming '--ramdisk none'
kernel : lucid-server-uec-amd64-vmlinuz-virtual
ramdisk: none
image  : lucid-server-uec-amd64.img
Thu Aug 18 14:02:29 PDT 2011: ====== bundle/upload kernel ======
Thu Aug 18 14:02:34 PDT 2011: ====== bundle/upload image ======
Thu Aug 18 14:03:12 PDT 2011: ====== done ======
emi="ami-00000002"; eri="none"; eki="aki-00000001";
...OUTPUT...
</pre>
<p>And running the instances:</p>
<pre>
euca-run-instances ami-00000002 -k mykey -t m1.large
...OUTPUT...
RESERVATION r-1jj2a80v  cloudproject    default
INSTANCE    i-00000001  ami-00000002            scheduling  mykey (cloudproject, None)  0       m1.tiny2011-08-18T21:06:03Z unknown zone    aki-00000001    ami-00000000
...OUTPUT...
#
euca-describe-instances
...OUTPUT...
RESERVATION r-1jj2a80v  cloudproject    default
INSTANCE    i-00000001  ami-00000002    10.0.0.2    10.0.0.2    building    mykey (cloudproject, SIX)   0   m1.tiny 2011-08-18T21:06:03Z    nova    aki-00000001    ami-00000000
...OUTPUT...
#
euca-describe-instances
...OUTPUT...
RESERVATION r-1jj2a80v  cloudproject    default
INSTANCE    i-00000001  ami-00000002    10.0.0.2    10.0.0.2    running mykey (cloudproject, SIX)   0       m1.tiny 2011-08-18T21:06:03Z    nova    aki-00000001    ami-00000000
...OUTPUT...
#
euca-authorize -P tcp -p 22 default
ssh -i mykey.priv root@10.0.0.2
</pre>
<p>To add on additional hosts to support more VMs, you only need to install a few of the packages:</p>
<pre>
apt-get install nova-compute nova-network nova-api
</pre>
<p>You do need that exact same <b>/etc/nova/nova.conf</b> file though.</p>
<p>Note:<br />
The default install of Glance expects the images that you&#8217;ve loaded up to be available on the local file system for every compute node at /var/lib/glance. Either NFS mount this directory from a central machine, or replicate the files underneath it to all your &#8220;compute hosts&#8221; when you upload a new image to be used in the virtual machines.</p>
<p>Also, the metadata URL needed for UEC images (169.154.169.154) may need help getting forwarded when running on a system with a single NIC. Two potential solutions: A) run nova-api on each of the compute nodes (quick and dirty) or B) specify the &#8211;ec2_dmz_host=$HOSTIP, and potentially invoke the command ip link set dev br100 promisc on to turn on promiscuous mode (per <a href="https://answers.launchpad.net/nova/+question/152528">https://answers.launchpad.net/nova/+question/152528</a>).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhonabwy.com/wp/2011/09/23/installing-openstack-diablo-release-nova-and-glance/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>OpenStack Diablo Release Meetup in Seattle</title>
		<link>http://www.rhonabwy.com/wp/2011/09/17/openstack-diablo-release-meetup-in-seattle/</link>
		<comments>http://www.rhonabwy.com/wp/2011/09/17/openstack-diablo-release-meetup-in-seattle/#comments</comments>
		<pubDate>Sat, 17 Sep 2011 18:09:03 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[openstack]]></category>

		<guid isPermaLink="false">http://www.rhonabwy.com/wp/?p=1134</guid>
		<description><![CDATA[If you&#8217;re into OpenStack, come join us on September 28th to celebrate the Diablo release with other stackers in Seattle. HP Cloud Services has graciously offered up their offices at 701 Pike St, Suite 1100, Seattle WA to host a &#8230; <a href="http://www.rhonabwy.com/wp/2011/09/17/openstack-diablo-release-meetup-in-seattle/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img src="http://photos1.meetupstatic.com/photos/event/7/4/d/8/global_56129912.jpeg" alt="OpenStack Seattle Logo" /></p>
<p>If you&#8217;re into <a href="http://openstack.org/">OpenStack</a>, come <a href="http://www.meetup.com/OpenStack-Seattle/events/33922932/">join us</a> on September 28th to celebrate the Diablo release with other stackers in Seattle.</p>
<p>HP Cloud Services has graciously offered up their offices at <a href="http://maps.google.com/maps?q=701+Pike+Street%2C+Suite+1100%2C+Seattle%2C+WA">701 Pike St, Suite 1100, Seattle WA</a> to host a meetup.</p>
<p>If you&#8217;re planning on coming, please stop by the Meetup link at <a href="http://www.meetup.com/OpenStack-Seattle/events/33922932/">http://www.meetup.com/OpenStack-Seattle/events/33922932/</a> and RSVP for us so we can get a sense of who might be wandering by chat and say hello!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhonabwy.com/wp/2011/09/17/openstack-diablo-release-meetup-in-seattle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>As the diablo milestone nears&#8230;</title>
		<link>http://www.rhonabwy.com/wp/2011/09/17/as-the-diablo-milestone-nears/</link>
		<comments>http://www.rhonabwy.com/wp/2011/09/17/as-the-diablo-milestone-nears/#comments</comments>
		<pubDate>Sat, 17 Sep 2011 17:10:25 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[openstack]]></category>
		<category><![CDATA[Ranting and Reflections]]></category>

		<guid isPermaLink="false">http://www.rhonabwy.com/wp/?p=1131</guid>
		<description><![CDATA[In the openstack project, we&#8217;re nearing the &#8220;Diablo Milestone&#8221;. To a large respect, it&#8217;s the fourth release of OpenStack. Even as we close down on the tail end of this release, there has been and is a huge amount of &#8230; <a href="http://www.rhonabwy.com/wp/2011/09/17/as-the-diablo-milestone-nears/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In the openstack project, we&#8217;re nearing the &#8220;Diablo Milestone&#8221;. To a large respect, it&#8217;s the fourth release of OpenStack. Even as we close down on the tail end of this release, there has been and is a huge amount of movement in the project.</p>
<p>We have <a href="https://github.com/openstack/quantum">Quantum</a> and <a href="https://github.com/openstack/glance">Glance</a> shifting to use Github as a repository, <a href="https://review.openstack.org/">new processes (that would be using Gerrit)</a> wrapped around GitHub to allow the project to have a &#8220;gated trunk&#8221; methodology, and lots of &#8220;motion&#8221; within the various projects. It&#8217;s pretty easy to see on Github, a little harder with launchpad (I just don&#8217;t have the tools handy to create the pretty graphs) &#8211; you can see the impact graphs for <a href="https://github.com/openstack/swift/graphs/impact">swift</a>, <a href="https://github.com/openstack/keystone/graphs/impact">keystone</a>, <a href="https://github.com/openstack/glance/graphs/impact">glance</a>, <a href="https://github.com/openstack/quantum/graphs/impact">quantum</a>, and <a href="https://github.com/4p/openstack-dashboard/graphs/impact">openstack-dashbaord</a> to see what I mean.</p>
<p>The shifting to Gerrit hasn&#8217;t been without it&#8217;s trials, but is coming along pretty well now. I really wish the GitHub folks had been a bit more amenable to putting in a field that external folks could use to store metadata about a pull request. Several folks from the OpenStack project (including myself) reached out to them about this, all rebuffed (nicely, but still). In fact, one of the suggestions I got back from the github&#8217;r support was &#8220;Why don&#8217;t you set up Gerrit?&#8221;</p>
<p>With the changes in core repository, lots of dependencies are shifting as well. Dashboard was broken a bit this week we kicked things around to get the dependencies to match the new locations, I think we&#8217;ve got all those pieces worked around now (pull request outstanding for openstack-dashboard). The other piece that really shifted and broke with these changes were the install scripts that we&#8217;ve been using to build and work on a developer&#8217;s environment. The cloudbuilder team at Rackspace recently created a whole new setup that works very nicely, so I think we&#8217;re going to drop our older scripts (based on over-extended versions of Vish&#8217;s excellent <a href="https://github.com/vishvananda/novascript/blob/master/nova.sh">nova.sh</a> script) and move to using their new &#8220;<a href="https://github.com/cloudbuilders/devstack/blob/master/stack.sh">stack.sh</a>&#8220;. (And yeah, of course we&#8217;ll want to mess with it ourselves, so I&#8217;ve forked it&#8230;)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhonabwy.com/wp/2011/09/17/as-the-diablo-milestone-nears/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mental gear shifting and reflections</title>
		<link>http://www.rhonabwy.com/wp/2011/09/10/mental-gear-shifting-and-reflections/</link>
		<comments>http://www.rhonabwy.com/wp/2011/09/10/mental-gear-shifting-and-reflections/#comments</comments>
		<pubDate>Sat, 10 Sep 2011 19:44:26 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[Ranting and Reflections]]></category>

		<guid isPermaLink="false">http://www.rhonabwy.com/wp/?p=1127</guid>
		<description><![CDATA[I&#8217;m in this weird mental space today. At work, I&#8217;ve been putting a lot of effort into building infrastructure &#8211; or more specifically, creating things that build infrastructure. While doing this over the past month, I&#8217;ve hit a few interesting &#8230; <a href="http://www.rhonabwy.com/wp/2011/09/10/mental-gear-shifting-and-reflections/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m in this weird mental space today. At work, I&#8217;ve been putting a lot of effort into building infrastructure &#8211; or more specifically, creating things that build infrastructure. While doing this over the past month, I&#8217;ve hit a few interesting realizations:</p>
<p>That I primarily work in two modes: </p>
<ul>
<li>&#8220;gettin&#8217; shit done and stay the fuck outa my way&#8221;</li>
</ul>
<p>Which is the rude way of saying I&#8217;m hammering out basic frameworks, making sure the theories of how something will go together work, mostly ignoring error conditions and error checking, and testing is manual and just as I need it. I sketch out structures, build blocks on each other, and hopefully end up with my arch/bridge/sofware component/etc &#8211; whatever construct I&#8217;m making.</p>
<ul>
<li>&#8220;making it correct&#8221;</li>
</ul>
<p>In which I get totally OCD about understanding how something works &#8211; even something I&#8217;ve just created, down to creating tests to cover the logic, defining the failure conditions, and picking &#8220;just the right names&#8221; for objects, method calls, and general analogies.</p>
<p>The first shows more apparent progress &#8211; really short term progress &#8211; very quickly. But if that&#8217;s all you do, then I&#8217;m deep in the bug/muck in not very long at all. I&#8217;ve worked with a lot of people who don&#8217;t toggle between these modes &#8211; or I think even recognize them. I think that&#8217;s a bit of a tragedy, and something I encourage people to look at introspectively when they&#8217;re working for me.</p>
<p>Another realization:</p>
<blockquote><p>I have far, far less patience with executives and managers than I do with technical folks/line workers.</p></blockquote>
<p>The explanation into that is a bit more lengthy:</p>
<p>Being a good manager is very, very difficult. (Related reading that I highly recommend: <a href="http://managinghumans.com/">Managing Humans</a> and <a href="http://pragprog.com/book/rdbcd/behind-closed-doors">Behind Closed Doors</a>. Being a good executive (director or whatever up) is even harder. Doing either of those jobs without resorting to being a dick &#8211; keeping an objective and fair eye out is damn near impossible. The dirty truth (that most folks in management positions realize pretty darn quickly) is that you get more money and tend to make more progress if you ARE a dick/backstabber/amoral sonuvabitch. Much of the thinking at an executive level is about capital, progress, and rewards &#8211; where anything you control is capital, what you output is progress, and what you get from all this is rewards. If you want to know in a general sense why an executive is doing anything, find out what their reward structure is. The track from there is usually abundantly clear.</p>
<p>Oh &#8211; and as for that &#8216;progress&#8217; thing, that&#8217;s really naive of me to assert. Here&#8217;s the cynical me: </p>
<p>I&#8217;ve seen instances where output is status quo because that makes larger business sense: you want to keep some segment of the operation running solidly. Those are usually the pieces of the business that bore the shit out of me, and ironically the ones that are &#8220;looking for creative people&#8221; &#8211; usually to do mind-numbing work. </p>
<p>I&#8217;ve also seen directors having the output of one group to just fuck with other groups &#8211; not playing to win, but playing to have someone else loose. Why? Because that makes it easier for other resources you control  appear to be making progress (even if it&#8217;s not the case). I&#8217;ve almost always seen this at the director and above level; managers just don&#8217;t have enough resources under their control to assign some of them to screwing with other folks, and it&#8217;s very, very rare that you&#8217;re overtly rewarded for screwing over the other guy. Okay, maybe not in Microsoft if you&#8217;re working for the &#8220;office&#8221; or &#8220;windows&#8221; franchise components. There&#8217;s another company (that I worked for directly &#8211; I haven&#8217;t worked at Microsoft) in which this pattern is abundant.</p>
<p>The end result of this cynicism (or realism, if you prefer) is that I have little patience with people whom I perceive as not &#8220;trying to make things better&#8221;. A bit idealistic of me, I know &#8211; a place where my idealism doesn&#8217;t match at all with reality. <a href="http://www.imdb.com/title/tt0327137/quotes?qt=qt0370315">A little quote</a> from a favorite movie (<a href="http://www.imdb.com/title/tt0327137/">Secondhand Lions</a>): </p>
<blockquote><p><a href="http://www.imdb.com/name/nm0000380/">Hub</a>: Sometimes the things that may or may not be true are the things a man needs to believe in the most. That people are basically good; that honor, courage, and virtue mean everything; that power and money, money and power mean nothing; that good always triumphs over evil; and I want you to remember this, that love&#8230; true love never dies. You remember that, boy. You remember that. Doesn&#8217;t matter if it&#8217;s true or not. You see, a man should believe in those things, because those are the things worth believing in.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.rhonabwy.com/wp/2011/09/10/mental-gear-shifting-and-reflections/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Crimson Steam</title>
		<link>http://www.rhonabwy.com/wp/2011/09/04/crimson-steam/</link>
		<comments>http://www.rhonabwy.com/wp/2011/09/04/crimson-steam/#comments</comments>
		<pubDate>Sun, 04 Sep 2011 16:09:51 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[iPad]]></category>

		<guid isPermaLink="false">http://www.rhonabwy.com/wp/?p=1121</guid>
		<description><![CDATA[I snagged a copy of Crimson Steam (iTunes link) this past Friday, thinking it would be fun to play with over the labor day weekend. The game play is good, very good actually. It really uses the direct touch style &#8230; <a href="http://www.rhonabwy.com/wp/2011/09/04/crimson-steam/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I snagged a copy of <a href="http://www.bungie.net/projects/aerospace/crimson/content.aspx?link=crimson_about" title="Crimson Steam">Crimson Steam</a> (<a href="http://itunes.apple.com/us/app/crimson-steam-pirates/id438053238?mt=8">iTunes link</a>) this past Friday, thinking it would be fun to play with over the labor day weekend. The game play is good, very good actually. It really uses the direct touch style interface of the iPad to good effect, while not trying to shim in a &#8220;virtual joystick&#8221; or the like. It ends up with a turn based sort of effect that&#8217;s vaguely reminiscent of old-school miniatures gaming.</p>
<p>But there is something about this game that just really annoys the crap out of me. The music theme is a (very!) thinnly veiled rip off from the Pirates of the Carribean theme. Its not the same, but its so close as to be nearly identical in my head. And that theme has been SO overworked in my hearing that I just want it to go away. I get that the <a href="http://harebrained-schemes.com/crimson/">harebrained folks</a> were wanting to (I think, positively) riff on the genre, and that&#8217;s reasonably cool &#8211; but I&#8217;d really hoped for music that enhanced the game, rather than a piece which, probably because of my over exposure to it, pisses me off rather than adds. The game itself was pretty new and interesting for the gameplay &#8211; I wish they&#8217;d taken the trouble to make the music something of their own rather than relying on a &#8220;common theme&#8221; that most people will recognize to try and garner some emotion towards their game.</p>
<p>The artwork is a bit overdone for my tastes as well, but maybe it appeals to folks a bit more into steampunk than I am. It&#8217;s a fun, goofy genre &#8211; the artwork in the game reflects that.</p>
<p>The only other downside is that the game has a tendency to crash on me as well &#8211; usually right when you&#8217;re loading up a scenario to play it. I&#8217;m guessing they got a bit overexcited with the memory allocation or something, as restarting the iPad resolves it &#8211; makes me think they&#8217;re hitting upper limits on memory pressure, and just not dealing well when the iPad OS says &#8220;shrink or die!&#8221; under the covers. Their FAQ even tells you to do restart the iPad (or reinstall), which is an incredibly lame response. I hope they put a little more effort into tuning the memory use to avoid that crap in the future.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhonabwy.com/wp/2011/09/04/crimson-steam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making a board game</title>
		<link>http://www.rhonabwy.com/wp/2011/08/21/making-a-board-game/</link>
		<comments>http://www.rhonabwy.com/wp/2011/08/21/making-a-board-game/#comments</comments>
		<pubDate>Sun, 21 Aug 2011 17:39:45 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Ranting and Reflections]]></category>

		<guid isPermaLink="false">http://www.rhonabwy.com/wp/?p=1113</guid>
		<description><![CDATA[It&#8217;s been too long, so I&#8217;m diving back into IOS development and making a board game. I have a test app (not even close to the final thing) for working out the UI pieces of the game that I just &#8230; <a href="http://www.rhonabwy.com/wp/2011/08/21/making-a-board-game/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been too long, so I&#8217;m diving back into IOS development and making a board game. I have a test app (not even close to the final thing) for working out the UI pieces of the game that I just got to a reasonable baseline (i.e. it builds, runs on iPhone and iPad, and can be OTA updated with <a href="https://testflightapp.com/">TestFlight</a>).</p>
<p><a href="http://www.rhonabwy.com/wp/2011/08/21/making-a-board-game/gameboard/" rel="attachment wp-att-1112"><img src="http://www.rhonabwy.com/wp/wp-content/uploads/2011/08/gameboard-231x300.png" alt="" title="gameboard" width="231" height="300" class="aligncenter size-medium wp-image-1112" /></a></p>
<p>The game is <a href="http://en.wikipedia.org/wiki/Tafl_games">Hnefatafl</a> &#8211; not quite an ancestor of chess, but somewhat related. The board is 11&#215;11, and the game is unusual in that it&#8217;s an asymmetric game. It&#8217;s harder to win as one player than the other.</p>
<p>I first learned about this game through a book (the <a href="http://en.wikipedia.org/wiki/Mabinogion">Mabinogion</a>) that had a reference to a game called Gwyddbwyll (from &#8216;the dream of rhonabwy&#8217; &#8211; see how this crazy stuff all ties together?). Nobody really knows the details of gwyddbwyll, but there&#8217;s some reference to say its related to other games from that era &#8211; Irish and Welsh, all of which seem to be the asymmetric &#8220;save the king&#8221; tafl games.</p>
<p>Right now I&#8217;m building this on iPad and iPhone, but I&#8217;m not sure if I&#8217;ll release it under the iPhone &#8211; only because the squares are <i>so damned small</i> on that interface. I have a few ideas for how I want to make the interface function, and once I get beyond that I&#8217;m going to aim to make it a turn-based multiplayer game using Apple&#8217;s <a href="http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/GameKit_Guide/GameCenterOverview/GameCenterOverview.html">GameKit</a> (just an excuse to use the new stuff, course). A multi-player only game seemed kind of limiting though, so I purchased a book on game AI (<a href="http://www.amazon.com/gp/product/0123747317/ref=pd_lpo_k2_dp_sr_1">Artificial Intelligence for games</a>) so that I could make a reasonable single-player game. It&#8217;s a darned good book &#8211; so we&#8217;ll see how I do implementing some of those algorithms in Objective-C. I bought the whole book for Chapter 8 (<i>Board Games</i>), and don&#8217;t regret a penny of the purchase.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhonabwy.com/wp/2011/08/21/making-a-board-game/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Functional testing with Lettuce and Fabric</title>
		<link>http://www.rhonabwy.com/wp/2011/08/10/functional-testing-with-lettuce-and-fabric/</link>
		<comments>http://www.rhonabwy.com/wp/2011/08/10/functional-testing-with-lettuce-and-fabric/#comments</comments>
		<pubDate>Wed, 10 Aug 2011 17:08:23 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[django]]></category>
		<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[Ranting and Reflections]]></category>

		<guid isPermaLink="false">http://www.rhonabwy.com/wp/?p=1109</guid>
		<description><![CDATA[After the launch of Nebula, from which I think I&#8217;m mostly recovered, I&#8217;ve been thinking about and working on ways to allow us to accelerate development. Our team has done a fair bit of work on the Openstack Dashboard, an &#8230; <a href="http://www.rhonabwy.com/wp/2011/08/10/functional-testing-with-lettuce-and-fabric/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After the launch of <a href="http://www.nebula.com/">Nebula</a>, from which I think I&#8217;m mostly recovered, I&#8217;ve been thinking about and working on ways to allow us to accelerate development. Our team has done a fair bit of work on the Openstack Dashboard, an incubating project within OpenStack, and we have a couple of internal http based interfaces for our own pieces. </p>
<p>We have unit testing up and running, and like most projects a few of those tests are more &#8220;functional&#8221; or &#8220;integration&#8221; tests than actually unit tests, but really the project&#8217;s been pretty darn good about keeping those separate. As it turns out, the Junit framework is truly awesome for fast, quick tests &#8211; but when you start to step into functional testing you want just a touch more linearity to the testing. The unit test frameworks that I&#8217;ve run into (<a href="http://readthedocs.org/docs/nose/en/latest/">nosetests</a>, <a href="http://docs.python.org/library/unittest.html">unittest2</a>) don&#8217;t have much in their mechanisms that allow you to set up longer, repeated sequences or flows, so it was time to look around for what else might work there. (sidenote: If you know of some mechanisms that do longer, sequential tests and are based around <a href="http://docs.python.org/library/unittest.html">unittest2</a> or <a href="http://readthedocs.org/docs/nose/en/latest/">nose</a>, I&#8217;d love it hear about it! I&#8217;ll freely admit to not having searched every corner there&#8230;)</p>
<p>I&#8217;ve been watching and reading quite a bit on <a href="http://en.wikipedia.org/wiki/Behavior_Driven_Development">BDD</a> and the <a href="http://cukes.info/">cucumber framework</a> for testing applications, so I thought it was time to try it out. Of course, being more of a python geek than a ruby geek, I&#8217;d heard about <a href="http://lettuce.it/">Lettuce</a>, which is either a straight up port, or incredibly headily inspired by Cucumber.</p>
<p>Getting started with it was incredibly easy. Everything we&#8217;re doing is working from a virtualenv (which I highly recommend for development!), so I just added lettuce to the pip-requires list and it was pretty much ready to go.</p>
<p>In setting up lettuce, I probably spent as much time knocking together a quick &#8220;functional_tests.py&#8221; script as anything &#8211; making it responsible for the sequence of testing. The whole point there was to make a single script that could be run, returning an exit code that meant success or failure for the whole set, so it could be plugged into our local instance of Jenkins.</p>
<p>The core of <a href="https://gist.github.com/1137357">that fabric script</a> is really just simple fabric commands to set up, clean, and push code to a remote node. I ended up adding a script to our local repository to start up services on the far-end for functional testing &#8211; <a href="https://gist.github.com/1137366">testsetup.sh</a> &#8211; that runs the various pieces under &#8220;screen&#8221; &#8211; which makes it super easy to see what&#8217;s happened when something goes awry.</p>
<p><script src="https://gist.github.com/1137357.js"> </script></p>
<p><script src="https://gist.github.com/1137366.js"> </script></p>
<p>You&#8217;ll notice at the very end of that functional test script, I invoke &#8220;lettuce&#8221; on the local machine. That takes care of running the actual test sequences. The documentation for lettuce is pretty reasonable, so I recommend walking through that tutorial for a quick understanding. The super-basic gists is that lettuce uses a DSL that you basically create as you go along, and ends up being rather highly customized to your testing setup. You put together files in a &#8220;features&#8221; directory, and they use &#8220;steps.py&#8221; in that same directory to do what&#8217;s needed. The pattern that I&#8217;ve been using (and which seemed to be implied) was to use the &#8220;world&#8221; object in lettuce as a sort of black-board to get and store data as you walk through the steps in lettuce. There&#8217;s deeper integration into Django based projects (my example was using a little <a href="http://flask.pocoo.org/">Flask</a> based application run with <a href="http://gunicorn.org/">gunicorn</a>).</p>
<p>The key to setting up the functional testing was taking advantage of the file &#8220;<a href="https://gist.github.com/1137390">terrain.py</a>&#8220;, which lettuce uses to do global setup, and setup/teardown around steps, scenarios, features, or the whole shebang. Turns out I had several options for how to reach out and walk through the remote application, so I chose to use twill, although I could clearly have used the local test_client() with Flask, or even the web_driver setup from Selenium to drive Firefox.</p>
<p><script src="https://gist.github.com/1137390.js"> </script></p>
<p>One of the nicer things that I found while walking through setting this up was that I could write up a feature file and run lettuce, and it gave me really pleasant &#8220;this isn&#8217;t implemented yet&#8221; output that I could use to expand steps.py. For example, I created &#8220;<a href="https://gist.github.com/1137413">example.feature</a>&#8221; in the features directory:</p>
<p><script src="https://gist.github.com/1137413.js"> </script></p>
<p>and then ran &#8220;lettuce&#8221; and got the following <a href="https://gist.github.com/1137418">output</a>:</p>
<p><script src="https://gist.github.com/1137418.js"> </script></p>
<p>As you can see, it&#8217;s basically giving you the code to add to steps.py to make this work. As I went, I found myself refactoring steps.py to use some of lettuce more advanced mechanisms &#8211; regular expressions and grouping steps together in sequences. And to make sure I don&#8217;t leave you completely in the dark about setting up and using <a href="https://gist.github.com/1137441">steps.py</a>, here&#8217;s a snippet from my growing file.</p>
<p><script src="https://gist.github.com/1137441.js"> </script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhonabwy.com/wp/2011/08/10/functional-testing-with-lettuce-and-fabric/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Always On Applications, personal style</title>
		<link>http://www.rhonabwy.com/wp/2011/08/06/always-on-applications-personal-style/</link>
		<comments>http://www.rhonabwy.com/wp/2011/08/06/always-on-applications-personal-style/#comments</comments>
		<pubDate>Sat, 06 Aug 2011 20:37:07 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[Ranting and Reflections]]></category>

		<guid isPermaLink="false">http://www.rhonabwy.com/wp/?p=1105</guid>
		<description><![CDATA[Almost a year ago I wrote a bit about wanting &#8220;Always on&#8221; applications. I started out just sort of complaining about the difficultly with current computing devices, and then looked to the future with cloud computing and the price points &#8230; <a href="http://www.rhonabwy.com/wp/2011/08/06/always-on-applications-personal-style/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Almost a year ago I wrote a bit about wanting &#8220;Always on&#8221; applications. <a href="http://www.rhonabwy.com/wp/2010/09/19/the-always-on-for-desktop-apps/">I started out just sort of complaining</a> about the difficultly with current computing devices, and then <a href="http://www.rhonabwy.com/wp/2010/09/20/more-always-on-applications-in-the-cloud/">looked to the future with cloud computing and the price points to enable those sorts of applications</a>.</p>
<p>This morning, I found a link that adds a new dimension into place: <a href="http://www.raspberrypi.org/">Raspberry Pi</a>. <a href="http://en.wikipedia.org/wiki/Raspberry_Pi">Wikipedia has a good description of the details of the device</a>, and there&#8217;s a BBC interview that shows it and gets into a nice overview.</p>
<p>It&#8217;s the price point of this device with the capabilities that changes the game a bit. It&#8217;s a computer the size of a tin of mints, with a processor capable of easily running higher level languages &#8211; python, ruby, java, whatever. There&#8217;s a lot out there now (<a href="http://www.arduino.cc/">Arduino</a>) that is a roughly similar cost and form factor, but programming it requires working in C or <a href="http://arduino.cc/en/Reference/HomePage">C-like languages</a> and some tools to get it all together. </p>
<p>Raspberry Pi BBC Interview:<br />
<iframe width="560" height="349" src="http://www.youtube.com/embed/pQ7N4rycsy4" frameborder="0" allowfullscreen></iframe></p>
<p>While the interview and foundation talk to making low-cost computers available to kids, I think this kind of device has a much broader potential in personal computing. The tech specs of this device make it very similar to the computing power available in the iPad or iPhones. And while the first generation of this device is missing some things I&#8217;d like to see default (a networking port), it&#8217;s easily added with a USB hub. The device is also incredibly low power &#8211; so I could imagine a shoe-box sized container of these running a 10x the amount of compute, and generating less heat (using less power) than your average dell desktop.</p>
<p>For an always-on application, I want something that&#8217;s not drawing a lot of power and could conceivably run unattended in the closet all day and night. This enables it at a new, lower price point (~$25 compared to a <a href="http://hawkboard.wordpress.com/">Hawkboard SBC</a> at ~$90). Now that&#8217;s cheaper (for the moment), than running an instance up on a cloud server&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhonabwy.com/wp/2011/08/06/always-on-applications-personal-style/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Artificial Intelligence for Games, Second Edition</title>
		<link>http://www.rhonabwy.com/wp/2011/07/16/artificial-intelligence-for-games-second-edition/</link>
		<comments>http://www.rhonabwy.com/wp/2011/07/16/artificial-intelligence-for-games-second-edition/#comments</comments>
		<pubDate>Sat, 16 Jul 2011 19:53:58 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Ranting and Reflections]]></category>

		<guid isPermaLink="false">http://www.rhonabwy.com/wp/?p=1101</guid>
		<description><![CDATA[I&#8217;ve been thinking it&#8217;s time to cobble another IOS app up for sale, not just fiddle around with open source client apps (which is a lot of the IOS work I&#8217;ve been doing lately). So I found a board game &#8230; <a href="http://www.rhonabwy.com/wp/2011/07/16/artificial-intelligence-for-games-second-edition/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been thinking it&#8217;s time to cobble another IOS app up for sale, not just fiddle around with open source client apps (which is a lot of the IOS work I&#8217;ve been doing lately). So I found a board game idea that I liked, and thought I&#8217;d make a stab of doing it &#8211; maybe using some of the new IOS5 features for a multiplayer turn-based game.</p>
<p>As I got into the game, noodling on the design and how the interaction would work, I came to the realization that I really would like to have a reasonable single player game as well, and that I didn&#8217;t have a clue about how to do board-game AI to make a good game experience.</p>
<p>After looking around through a pile of game AI books, I came across &#8220;<a href="http://www.amazon.com/Artificial-Intelligence-Games-Second-Millington/dp/0123747317">Artificial Intelligence for Games, Second Edition</a>&#8220;. Heavy book, hardback &#8211; some $80 if you pick it up outside of Amazon&#8217;s discount mechanisms. It looked good after a glance-through and minimal reading, so I took it home to dig in depth. I&#8217;m really glad I did!</p>
<p>This book does an excellent job of describing the AI algorithms in pseudo good and good ole english, as opposed to many which seem to be littered with mostly un-parse-able fragments of C++. They reference a number of modern games, but rather than catalog &#8220;these used this type of AI, the others didn&#8217;t&#8221; (which I saw in a number of books), they took some time to explain the tradeoffs in choosing the AI mechanism in the game, even if they didn&#8217;t have the &#8220;why&#8221; of the game designer to pull from.</p>
<p>I liked it enough to put up a review on Amazon, and hey &#8211; I&#8217;m writing this too. If you&#8217;re looking for a good overview of AI algorithms and how they work, I recommend the book.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhonabwy.com/wp/2011/07/16/artificial-intelligence-for-games-second-edition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Inside the Nova service framework</title>
		<link>http://www.rhonabwy.com/wp/2011/07/07/inside-the-nova-service-framework/</link>
		<comments>http://www.rhonabwy.com/wp/2011/07/07/inside-the-nova-service-framework/#comments</comments>
		<pubDate>Fri, 08 Jul 2011 00:11:29 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[openstack]]></category>

		<guid isPermaLink="false">http://www.rhonabwy.com/wp/?p=1091</guid>
		<description><![CDATA[In my previous spelunking article, I went over the basic pieces needed to get a nova service stood up. Well okay &#8211; I skipped logging &#8211; maybe another article later for that later&#8230; Quick recap: The service framework in nova &#8230; <a href="http://www.rhonabwy.com/wp/2011/07/07/inside-the-nova-service-framework/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.rhonabwy.com/wp/2011/06/30/spelunking-nova-flags-and-services/" title="Spelunking Nova – flags and services">In my previous spelunking article</a>, I went over the basic pieces needed to get a nova service stood up. Well okay &#8211; I skipped logging &#8211; maybe another article later for that later&#8230;</p>
<p>Quick recap: The service framework in nova is set up to make it easy to write your own services that interact with any other nova services (such as nova-network, nova-scheduler, etc). The service framework includes all the pieces to communicate with these other services (using a module called <a href="https://github.com/openstack/nova/blob/master/nova/rpc.py">rpc.py</a> that abstracts away the communications), a <a href="https://github.com/openstack/nova/blob/master/nova/db/api.py">database connection</a> for looking up data from the nova persistence store, and leaves the rest to you.</p>
<p>The <a href="https://github.com/openstack/nova/blob/master/nova/service.py">service</a> module is expecting to be told a <a href="https://github.com/openstack/nova/blob/master/nova/manager.py">manager</a> class to load, and the framework will use that to do what it needs. There are only two required methods to overwrite:</p>
<ul>
<li><a href="https://github.com/openstack/nova/blob/master/nova/manager.py#L80">init_host</a></li>
<li><a href="https://github.com/openstack/nova/blob/master/nova/manager.py#L76">periodic_tasks</a></li>
</ul>
<p>There are two kinds of services &#8211; I&#8217;m going to focus on the stand-alone (not WSGI) service that expects to communicate and respond entirely through the message queue system in Nova.</p>
<p>So how does this service critter work? Well, when it&#8217;s initialized, it gets a number of attributes assigned to it. This is typically done from a class method on <a href="https://github.com/openstack/nova/blob/master/nova/service.py">service.py</a>:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> nova.<span style="color: black;">service</span> <span style="color: #ff7700;font-weight:bold;">import</span> Service
my_service = Service.<span style="color: black;">create</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>The create() method has a number of parameters:</p>
<ul>
<li>host &#8211; a string with the host this service is running on</li>
<li>binary &#8211; a string with the binary name of this program</li>
<li>topic &#8211; a string with a subset of the binary name, used to set up a message exchange in AMQP</li>
<li>manager &#8211; a string with the class name to be loaded to do the &#8216;work&#8217;</li>
<li>report_interval &#8211; an interval set from Flags, triggering a regular reporting loop</li>
<li>periodic_interval &#8211; an interval set from Flags, triggering a periodic loop to do repeating tasks</li>
</ul>
<p>If you don&#8217;t provide any of them, all these values get populated with defaults and from configuration detail (the flags) in the <code>service.serve()</code> method. Once serve() gets everything configured up, it calls <code>.start()</code> on each service to kick it into gear.</p>
<p><a href="https://github.com/openstack/nova/blob/master/nova/service.py#L73">start()</a> is where things really get moving. This is where the service manager class gets loaded, registered with the nova database (if it isn&#8217;t already), and the RPC mechanisms get spun up with Eventlet greenthreads to accept messages to this service. The topic (which is the name of the binary, minus any &#8220;nova-&#8221; in front of it) is used as an exchange. Through this mechanism, any service can talk to any other service (or set of services). Here&#8217;s how that works:</p>
<p><a href="https://github.com/openstack/nova/blob/master/nova/rpc.py">rpc.py</a> has two methods: call() and cast()  that do all the heavy lifting. When you use these, they take a &#8220;context&#8221; (i.e. authorization for who&#8217;s doing the call), a topic (the name of the service you&#8217;re calling), and a message. call() sends this message and waits for a response. cast() sends the message entirely asynchronously, not expecting a response.</p>
<p>The message is a JSON structure &#8211; a dictionary, and it&#8217;s expected that the dictionary will have a key &#8220;method&#8221; and another key &#8220;args&#8221;. method is expected to be a string, and args is expected to be another dictionary. The rpc module <a href="https://github.com/openstack/nova/blob/master/nova/rpc.py#L189">does the work</a> of using that method string to look up and invoke the method on your manager.</p>
<p>An example of this operating is right in the code. In the nova-network API, <a href="https://github.com/openstack/nova/blob/master/nova/network/api.py#L92">there&#8217;s an rpc.cast()</a>:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">rpc.<span style="color: black;">cast</span><span style="color: black;">&#40;</span>context,
         <span style="color: #008000;">self</span>.<span style="color: black;">db</span>.<span style="color: black;">queue_get_for</span><span style="color: black;">&#40;</span>context, FLAGS.<span style="color: black;">network_topic</span>, host<span style="color: black;">&#41;</span>,
         <span style="color: black;">&#123;</span><span style="color: #483d8b;">'method'</span>: <span style="color: #483d8b;">'associate_floating_ip'</span>,
          <span style="color: #483d8b;">'args'</span>: <span style="color: black;">&#123;</span><span style="color: #483d8b;">'floating_address'</span>: floating_ip<span style="color: black;">&#91;</span><span style="color: #483d8b;">'address'</span><span style="color: black;">&#93;</span>,
                   <span style="color: #483d8b;">'fixed_address'</span>: fixed_ip<span style="color: black;">&#91;</span><span style="color: #483d8b;">'address'</span><span style="color: black;">&#93;</span><span style="color: black;">&#125;</span><span style="color: black;">&#125;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>Through the service framework and the RPC mechanisms, this is calling <a href="https://github.com/openstack/nova/blob/master/nova/network/manager.py#L208">associate_floating_ip()</a> on the <a href="https://github.com/openstack/nova/blob/master/nova/network/manager.py">network service manager class</a>.</p>
<p>The other nifty thing about service is that it&#8217;s keeping and managing a number of greenthreads from <a href="http://eventlet.net/">Eventlet</a> to do it&#8217;s work. The basic bits are all encapsulated in that rpc.py mechanism &#8211; when it sets up connections to the message queue service to receive communications, that starts a greenthread rolling to watch out for, pull, and process any messages inbound. The two periodic interval pieces are also spun up on their own greenthreads &#8211; looping every &#8220;interval&#8221; (specified by the flags &#8211;report_interval and &#8211;periodic_interval, set at 10 and 60 seconds by default respectively). These run continuously until the service is terminated.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhonabwy.com/wp/2011/07/07/inside-the-nova-service-framework/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Benchmarking Celery</title>
		<link>http://www.rhonabwy.com/wp/2011/07/07/benchmarking-celery/</link>
		<comments>http://www.rhonabwy.com/wp/2011/07/07/benchmarking-celery/#comments</comments>
		<pubDate>Thu, 07 Jul 2011 16:07:17 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[devops]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[Geekstuff]]></category>

		<guid isPermaLink="false">http://www.rhonabwy.com/wp/?p=1083</guid>
		<description><![CDATA[Before you even go there, I&#8217;ll preface this with YMMV. This little post is to document a benchmark that I did for an internal use case, in the hopes that it&#8217;ll be helpful for others. As a benchmark, I wasn&#8217;t &#8230; <a href="http://www.rhonabwy.com/wp/2011/07/07/benchmarking-celery/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Before you even go there, I&#8217;ll preface this with <a href="http://en.wiktionary.org/wiki/YMMV">YMMV</a>.</p>
<p>This little post is to document a benchmark that I did for an internal use case, in the hopes that it&#8217;ll be helpful for others. As a benchmark, I wasn&#8217;t attempting to fully characterize the performance of a specific system &#8211; I just wanted a pole against which to measure changes in the environment or underlying infrastructure. I was curious what the performance was of <a href="http://celeryproject.org/">Celery</a>, using RabbitMQ. The tests I ran were pretty much straight sample code of the project (a simple &#8220;add&#8221; task) and a client making multiple requests and combining the results with the veritable python &#8220;<a href="http://docs.python.org/library/timeit.html">timeit</a>&#8220;.</p>
<h3>The code</h3>
<p>All the code for this test (and more, I got excited&#8230;) is stashed up on Github: <a href="https://github.com/heckj/openstack-benchmarks/tree/CeleryBenchmark">https://github.com/heckj/openstack-benchmarks/tree/CeleryBenchmark</a>. Really, the parts you&#8217;re likely to be interested in is the worker class: <a href="https://github.com/heckj/openstack-benchmarks/blob/CeleryBenchmark/benchmark/celerybench/tasks.py">tasks.py</a>, the configuration: <a href="https://github.com/heckj/openstack-benchmarks/blob/CeleryBenchmark/bin/celeryconfig.py">celeryconfig.py</a>, and the actual benchmarking code: <a href="https://github.com/heckj/openstack-benchmarks/blob/CeleryBenchmark/bin/celery-benchmark.py">celery-benchmark.py</a>.</p>
<p>And before you ask, no &#8211; the OpenStack project doesn&#8217;t currently use Celery &#8211; in fact they use Carrot right now. I&#8217;m just intending to add on more benchmarks and profile tools into this codebase around the OpenStack project in the future.</p>
<h3>The config</h3>
<p>The configuration was held constant &#8211; a stock Ubuntu 10.10 server with all the various dependencies installed. Since I&#8217;m sure someone will want to know about the versions:</p>
<ul>
<li>rabbitmq-server 1.8.0-1ubuntu2</li>
<li>python2.6   2.6.6-5ubuntu1</li>
<li>python-amqplib  0.6.1-1</li>
<li>celery 2.2.7</li>
<li>kombu 1.1.6</li>
<li>anyjson 0.3.1</li>
</ul>
<p>The host was a Shuttle PC, 8GB ram, Core 2 Duo processors. The host was never heavily burdened by the processing that took place (load < 1.0, no significant swaping). The benchmarking was done on the same host as RabbitMQ to remove any network latency effects.</p>
<h3>The results</h3>
<p><a href="http://www.flickr.com/photos/joseph_heck/5912117341/in/photostream/"><img src="http://farm7.static.flickr.com/6012/5912117341_057feefb5f.jpg"></a>.</p>
<p>I was totally abusing MS Excel&#8217;s &#8220;stock graph&#8221; to show variability in the results (of which there wasn&#8217;t a hell of a lot). In the graph, the thin line represents the range (min to max) and the thicker box in the middle is standard deviation +/- the average result. The gist &#8211; the round trip time was pretty much straight up at 160ms per requests, and that sampled over 1,000,000 requests. The image above shows a portion of the sequence. The relevant code:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> benchmark.<span style="color: black;">celerybench</span>.<span style="color: black;">tasks</span> <span style="color: #ff7700;font-weight:bold;">import</span> add
&nbsp;
result = add.<span style="color: black;">apply_async</span><span style="color: black;">&#40;</span>args=<span style="color: black;">&#91;</span><span style="color: #ff4500;">4</span>, <span style="color: #ff4500;">4</span><span style="color: black;">&#93;</span>_
result.<span style="color: black;">get</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>(As I mentioned earlier, you can see the whole code <a href="https://github.com/heckj/openstack-benchmarks/blob/CeleryBenchmark/bin/celery-benchmark.py">on github</a>).</p>
<p>I did more tests, but I need to keep some of those to myself, as they&#8217;re testing variations of configurations for my job.</p>
<h3>Random side notes</h3>
<p>I hadn&#8217;t done anything in depth with Celery before. I&#8217;d heard about it <a href="http://seeknuance.com/">from friends</a>, and in the community in general. The <a href="https://twitter.com/asksol/">author</a> pinged me a couple of times <a href="https://twitter.com/asksol/status/88544724637589504">with help</a> as well. Overall, I found the Celery setup to be <i>incredibly</i> easy to use and a very straightforward API (always nice). There were lots of options available, but everything was set with very usable defaults from the start. I&#8217;m totally looking forward to using <a href="http://celeryproject.org/">Celery</a> in some projects, as well as taking advantage of <a href="http://readthedocs.org/docs/kombu/en/latest/">Kombu</a> &#8211; a drop-in/compatibility layer for Carrot.</p>
<p><b>Update</b>:</p>
<p><a href="https://github.com/ask">Ask</a> mentioned some suggestions for optimizing in twitter &#8211; seemed a good place to put them. Try:</p>
<ul>
<li>CELERYD_PREFETCH_MULTIPLIER=0</li>
<li>CELERY_DISABLE_RATE_LIMITS=True</li>
<li>and BROKER_TRANSPORT=&#8221;librabbitmq&#8221; to use the pylibrabbitmq C library</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.rhonabwy.com/wp/2011/07/07/benchmarking-celery/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Spelunking Nova &#8211; flags and services</title>
		<link>http://www.rhonabwy.com/wp/2011/06/30/spelunking-nova-flags-and-services/</link>
		<comments>http://www.rhonabwy.com/wp/2011/06/30/spelunking-nova-flags-and-services/#comments</comments>
		<pubDate>Thu, 30 Jun 2011 17:55:44 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[openstack]]></category>

		<guid isPermaLink="false">http://www.rhonabwy.com/wp/?p=1065</guid>
		<description><![CDATA[I&#8217;ve been doing a lot of spelunking into the nova codebase, digging around and trying to learn some of the under pinnings. Some of these pieces were a bit confusing to me, so I&#8217;m stashing them up here for Google &#8230; <a href="http://www.rhonabwy.com/wp/2011/06/30/spelunking-nova-flags-and-services/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been doing a lot of spelunking into the <a href="https://github.com/openstack/nova">nova codebase</a>, digging around and trying to learn some of the under pinnings. Some of these pieces were a bit confusing to me, so I&#8217;m stashing them up here for Google to find and share with others in the future.</p>
<p>Before I dive into the gritty details, it&#8217;s worth getting a high level overview so that some of this (hopefully) makes sense. OpenStack&#8217;s <a href="http://nova.openstack.org/service.architecture.html">service architecture</a> is made up of services that all talk with each other to get things done. nova-network, nova-scheduler, etc. There&#8217;s a lot of underpinning in the nova codebase to make those services relatively easy to write and work together &#8211; I was mostly curious about how they passed messages back and forth.  As I dove in, the two pieces that stood out as needing to be understood first were the unified service framework in nova and configuration using flags (which it heavily depends upon).</p>
<h3>Configuration &#8211; using the flags</h3>
<p>The configuration for nova services &#8211; global or specific to a service &#8211; are all done with configuration files that can be over-ridden on the command line, taking advantage of <a href="http://code.google.com/p/python-gflags/">python gflags</a> to make it all work nice. I didn&#8217;t know much about the flags system, so I dug around in the <a href="http://code.google.com/p/python-gflags/">python-gflags project</a>. They have the documentation for how to use gFlags in the code itself: <a href="http://python-gflags.googlecode.com/svn/trunk/gflags.py">http://python-gflags.googlecode.com/svn/trunk/gflags.py</a>.</p>
<p>To summarize it up: </p>
<p>Python modules in the codebase can define and use flags, and there is a general nova flags file that holds the cross-service (common)  configuration settings. Nova defaults to looking for it&#8217;s configuration in a <code>nova.conf</code> file in the local directory. Failing that it looks for the <code>nova.conf</code> file in <code>/etc/nova/nova.conf</code>.  Where it looks for the configuration file can be overridden (typically on the command line) by (<code>--flagfile</code>) and a location to a config file. The code that makes this happen <a href="https://github.com/openstack/nova/blob/master/nova/utils.py#L229">nova.utils.default_flagfile()</a>.</p>
<p>To use the configuration from within code, you typically instantiate the global flags, add any flag definitions (with default values) that you care to add, and then use &#8216;em! Here&#8217;s a code snippet example:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> nova <span style="color: #ff7700;font-weight:bold;">import</span> flags
<span style="color: #808080; font-style: italic;"># import the nova wrapper around python gflags</span>
<span style="color: #808080; font-style: italic;">#  .. there's some interesting wrapping for taking in arguments</span>
<span style="color: #808080; font-style: italic;">#     and passing along extras values to your code</span>
<span style="color: #808080; font-style: italic;">#  .. and it's where the global flag definitions reside</span>
FLAGS = flags.<span style="color: black;">FLAGS</span>
<span style="color: #808080; font-style: italic;"># get the global instance</span>
<span style="color: #808080; font-style: italic;">#  .. this attempts to read the /etc/nova/nova.conf for flags</span>
<span style="color: #808080; font-style: italic;"># </span>
<span style="color: #808080; font-style: italic;"># You can define an additional flag here if you needed to...</span>
flags.<span style="color: black;">DEFINE_string</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'my_flag'</span>, <span style="color: #483d8b;">'default_value'</span>, \
        <span style="color: #483d8b;">'human readable description of your flag'</span><span style="color: black;">&#41;</span>
<span style="color: #808080; font-style: italic;"># there's also flags.DEFINE_bool, flags.DEFINE_integer and more...</span>
<span style="color: #808080; font-style: italic;"># </span>
<span style="color: #808080; font-style: italic;"># And then you can use the flags</span>
<span style="color: #808080; font-style: italic;">#  .. the flags you defined show up as attributes </span>
<span style="color: #808080; font-style: italic;">#     on that FLAGS object</span>
<span style="color: #ff7700;font-weight:bold;">print</span> FLAGS.<span style="color: black;">my_ip</span></pre></div></div>

<p>If you were happening to write a script that took in flags and worked with them for a command-line script, you might do something like:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> nova <span style="color: #ff7700;font-weight:bold;">import</span> flags
form nova <span style="color: #ff7700;font-weight:bold;">import</span> utils
utils.<span style="color: black;">default_flagfile</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
flags.<span style="color: black;">FLAGS</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#41;</span>
GLOBAL_FLAGS = flags.<span style="color: black;">FLAGS</span>
<span style="color: #808080; font-style: italic;"># ... and on to the rest of your code</span></pre></div></div>

<p>There is some good <a href="http://docs.openstack.org/cactus/openstack-compute/admin/content/general-compute-configuration-overview.html">end-user documentation on how to find the flags</a>. The gist is &#8211; if you want to know what flags are there, the easiest way is to hand in the flag &#8220;&#8211;help&#8221; or &#8220;&#8211;shorthelp&#8221; from the command line. That is how the gFlags library is set up to tell you about the flags.</p>
<p><b>Update:</b></p>
<p>After a little digging down a side passage, I noticed that service.py had some debugging code in it <a href="https://github.com/openstack/nova/blob/master/nova/service.py#L294">that iterated through all the set flags</a>. You iterate directly on <code>FLAGS</code> (treating it as an iterable thing) and use <code>FLAGS.get()</code> to retrieve the set values.</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">    <span style="color: #dc143c;">logging</span>.<span style="color: black;">debug</span><span style="color: black;">&#40;</span>_<span style="color: black;">&#40;</span><span style="color: #483d8b;">'Full set of FLAGS:'</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">for</span> flag <span style="color: #ff7700;font-weight:bold;">in</span> FLAGS:
        flag_get = FLAGS.<span style="color: black;">get</span><span style="color: black;">&#40;</span>flag, <span style="color: #008000;">None</span><span style="color: black;">&#41;</span>
        <span style="color: #dc143c;">logging</span>.<span style="color: black;">debug</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'%(flag)s : %(flag_get)s'</span> <span style="color: #66cc66;">%</span> <span style="color: #008000;">locals</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></pre></div></div>

<h3> Services </h3>
<p>There are two types of services in Nova: system services and web services. The code to use and launch them is basically the same, and Nova has this all bundled into a general service architecture and code base. The reason that configuration is so important is that the nova service framework has a convention of knowing how to run a service based on flags from the framework.</p>
<p>Here&#8217;s a bit of example code of a service to illustrate what I&#8217;m talking about.</p>
<p><b><code>nova-exampleservice</code></b>:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> eventlet
eventlet.<span style="color: black;">monkey_patch</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span>
<span style="color: #ff7700;font-weight:bold;">from</span> nova <span style="color: #ff7700;font-weight:bold;">import</span> flags
<span style="color: #ff7700;font-weight:bold;">from</span> nova <span style="color: #ff7700;font-weight:bold;">import</span> service
<span style="color: #ff7700;font-weight:bold;">from</span> nova <span style="color: #ff7700;font-weight:bold;">import</span> utils
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> __name__ == <span style="color: #483d8b;">'__main__'</span>:
    utils.<span style="color: black;">default_flagfile</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    flags.<span style="color: black;">FLAGS</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#41;</span>
    service.<span style="color: black;">serve</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    service.<span style="color: black;">wait</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>The convention starts off by using the name of the script invoked &#8211; in this case &#8220;nova-exampleservice&#8221;. The scripts in <a href="https://github.com/openstack/nova/tree/master/bin"><code>bin/</code></a> (like <a href="https://github.com/openstack/nova/blob/master/bin/nova-network"><code>nova-network</code></a>) use this mechanism. This convention can be overridden, of course, but it does make things pretty straightforward once you know the convention. The key to this convention is that the code in nova.service looks in the configuration for a class to instantiate (expected to be a subclass of <a href="https://github.com/openstack/nova/blob/master/nova/manager.py"><code>nova.manager.Manager</code></a>) named after the service that was just invoked. (this convention is in code under the <a href="https://github.com/openstack/nova/blob/master/nova/service.py#L146"><code>nova.service.create()</code> method</a>) </p>
<p>For our example of </b>nova-exampleservice</b>, the service is going to look in the configuration for <code>exampleservice_manager</code>, expecting the value to be a class that it can load that will be a subclass of <a href="https://github.com/openstack/nova/blob/master/nova/manager.py"><code>nova.manager.Manager</code></a> and will be responsible for running the service.</p>
<p>This code is invoked from <code>service.serve()</code> from our example above. Again, it looks for the flag &#8220;exampleservice_manager&#8221; and try to load that class to do the work.</p>
<p>An updated example that sets a default manager that will attempt to load the class mymodule.exampleservice.ExampleServiceManager by default:</p>
<p><b><code>nova-exampleservice</code></b>:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> eventlet
eventlet.<span style="color: black;">monkey_patch</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span>
<span style="color: #ff7700;font-weight:bold;">from</span> nova <span style="color: #ff7700;font-weight:bold;">import</span> flags
<span style="color: #ff7700;font-weight:bold;">from</span> nova <span style="color: #ff7700;font-weight:bold;">import</span> service
<span style="color: #ff7700;font-weight:bold;">from</span> nova <span style="color: #ff7700;font-weight:bold;">import</span> utils
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> __name__ == <span style="color: #483d8b;">'__main__'</span>:
    utils.<span style="color: black;">default_flagfile</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    flags.<span style="color: black;">FLAGS</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#41;</span>
    flags.<span style="color: black;">DEFINE_string</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'exampleservice_manager'</span>,
            <span style="color: #483d8b;">'mymodule.exampleservice.ExampleServiceManager'</span>,
            <span style="color: #483d8b;">'Default manager for the nova-exampleservice'</span><span style="color: black;">&#41;</span>
    service.<span style="color: black;">serve</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    service.<span style="color: black;">wait</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>The <a href="http://nova.openstack.org/api/nova.manager.html?highlight=nova.manager#nova.manager.Manager">manager class</a> has two classes that you override to get your stuff done:</p>
<ul>
<li><code>init_host</code></li>
<li><code>periodic_tasks</code></li>
</ul>
<p>There are also some conventions around adding methods to your manager and invoking them using the service framework&#8217;s RPC mechanism, which I&#8217;ll dig into with another post.</p>
<p>Ref: <a href="http://nova.openstack.org/">Nova Developer Documentation</a><br />
Ref: <a href="http://docs.openstack.org/cactus/openstack-compute/admin/content/">OpenStack Compute (Nova) Administration Manual</a><br />
Ref: <a href="http://wiki.openstack.org/UnifiedServiceArchitecture">Openstack Wiki: Unified Service Architecture</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhonabwy.com/wp/2011/06/30/spelunking-nova-flags-and-services/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Sunny summer mornings</title>
		<link>http://www.rhonabwy.com/wp/2011/06/26/sunny-summer-mornings/</link>
		<comments>http://www.rhonabwy.com/wp/2011/06/26/sunny-summer-mornings/#comments</comments>
		<pubDate>Sun, 26 Jun 2011 20:02:15 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Geekstuff]]></category>

		<guid isPermaLink="false">http://www.rhonabwy.com/wp/?p=1061</guid>
		<description><![CDATA[Its been ages since I wrote here, and its time to get back into that a bit. Since January I&#8217;ve switched jobs, which I have found to be immensely refreshing. My teams at Disney accomplished truely amazing things, including an &#8230; <a href="http://www.rhonabwy.com/wp/2011/06/26/sunny-summer-mornings/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Its been ages since I wrote here, and its time to get back into that a bit. Since January I&#8217;ve switched jobs, which I have found to be immensely refreshing. My teams at Disney accomplished truely amazing things, including an incredibly innovative internal cloud hosting architecture and production support of a central hadoop instance and breaking through the learning curves on operationalizing a multi-tenant Hadoop cluster.</p>
<p>April started showing me a need to change things up. There&#8217;s not too much to say about the whys and wherefores of deciding to leave Disney that are relevant (or appropriate) for a public forum like my blog. Suffice to say the impetus hit. In late April I attended the second <a href="http://www.openstack.org/blog/2011/03/openstack-conference-design-summit-2011-sponsored-by-citrix/">OpenStack design summit in Santa Clara</a>, and then a vacation up to Alaska to settle down and reset. At the end of that, I was ready and took on a new position at a new company where I can combine a number of pieces that Im passionate about: <a href="http://en.wikipedia.org/wiki/DevOps">DevOps</a> and <a href="http://www.openstack.org/">OpenStack</a>. I guess that misses out a bit on the Mac/iPhone development, but it would be an immensely rare gig that could cover all three of those.</p>
<p>I can&#8217;t yet speak of the new company, save to say that it is exciting, challenging, and I really enjoy the crew that I&#8217;m working with.  We are all top-secret and stealth startup at the moment&#8230; although the word should be coming out at <a href="http://www.oscon.com/oscon2011/">OSCON 2011</a> with some pretty amazing announcements. In the mean time, I&#8217;m very happy to be back in the middle of actively working on open source projects &#8211; most specifically <a href="http://www.openstack.org/">OpenStack</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhonabwy.com/wp/2011/06/26/sunny-summer-mornings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>javascript everywhere</title>
		<link>http://www.rhonabwy.com/wp/2011/01/27/javascript-everywhere/</link>
		<comments>http://www.rhonabwy.com/wp/2011/01/27/javascript-everywhere/#comments</comments>
		<pubDate>Fri, 28 Jan 2011 05:28:31 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[Ranting and Reflections]]></category>

		<guid isPermaLink="false">http://www.rhonabwy.com/wp/?p=1058</guid>
		<description><![CDATA[There&#8217;s an interesting fast iteration in language efforts happening around javascript. It&#8217;s been pretty much dominating the client side arena for ages, started to make some interesting headway into server side with Node.js, but now I am starting to see &#8230; <a href="http://www.rhonabwy.com/wp/2011/01/27/javascript-everywhere/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s an interesting fast iteration in language efforts happening around javascript. It&#8217;s been pretty much dominating the client side arena for ages, started to make some interesting headway into server side with <a href="http://nodejs.org/">Node.js</a>, but now I am starting to see even greater depth in the languages toolchain.</p>
<p>It all revolves around the development toolchain, and the base components to cobble together full desktop-UI quality applications. This happens to overlap extensively with the server side world too &#8211; but the details started really becoming clear after digging a bit into <a href="http://www.sencha.com/">Sencha</a>, <a href="http://www.sproutcore.com/">SproutCore</a>, and <a href="http://javascriptmvc.com/">JavascriptMVC</a>. And it&#8217;s Javascript MVC that stands out to me. </p>
<p>If you look at the home page for the site, it presents itself as a collection of tools and mechanisms to do a full-bore standard application:</p>
<ul>
<li>core generators</li>
<li>dependency management</li>
<li>build scripts</li>
<li>testing</li>
<li>templating</li>
<li>code cleaning and linting</li>
</ul>
<p>and the list goes on. All of those components in javascript, for javascript. It&#8217;s still incredibly fragmented as a language, but the parallel efforts moving forward to drive automated testing, including unit testing on the server side. Node has <a href="http://cjohansen.no/en/node_js/unit_testing_node_js_apps">it&#8217;s own built-in stuff</a>, but there&#8217;s also a lot of effort to bring <a href="http://docs.jquery.com/Qunit">QUnit</a> from the JQuery world into that same server side world.</p>
<p>Python and Ruby still have a dominant hold on the server side development, but I wonder for how much longer&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhonabwy.com/wp/2011/01/27/javascript-everywhere/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A week with the fitbit</title>
		<link>http://www.rhonabwy.com/wp/2011/01/23/a-week-with-the-fitbit/</link>
		<comments>http://www.rhonabwy.com/wp/2011/01/23/a-week-with-the-fitbit/#comments</comments>
		<pubDate>Mon, 24 Jan 2011 06:52:48 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Geekstuff]]></category>

		<guid isPermaLink="false">http://www.rhonabwy.com/wp/?p=1054</guid>
		<description><![CDATA[I first heard about fitbit from a coworker who used it to track his daily running and activity. He showed it to me, and it&#8217;s a pedometer with a bit more &#8211; it wireless sync&#8217;s to a base station (laptop &#8230; <a href="http://www.rhonabwy.com/wp/2011/01/23/a-week-with-the-fitbit/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I first heard about <a href="http://www.fitbit.com/">fitbit</a> from a coworker who used it to track his daily running and activity. He showed it to me, and it&#8217;s a pedometer with a bit more &#8211; it wireless sync&#8217;s to a base station (laptop or desktop computer) and tracks your activity level as you wear it. It&#8217;s small and easy to tuck away &#8211; I&#8217;ve been wearing it under the color of my shirt, and it&#8217;s been pretty effective.</p>
<p>I had a previous pedometer (kept running out of battery), but I&#8217;m finding that after a week with the fitbit, the big difference is the dashboard that it automatically keeps and maintains. You can sign up for the <a href="http://client.fitbit.com/">dashboard</a> even without having one &#8211; although without the fitbit what it really amounts to is an online journal for tracking food intake, weight, and the other kinds of common measurements. With the fitbit, and some of the data going in on a regular basis, it&#8217;s really become a bit more of a personal dashboard.</p>
<p>I&#8217;ve been trying to track food intake (i.e. calories) and weight manually. That&#8217;s going reasonably well, although I find it rather tricky to track calories for some of the food I eat &#8211; there isn&#8217;t an easy lookup. Ironically, getting breakfast at a health club cafe last weekend was the hardest &#8211; they couldn&#8217;t tell me anything about the nutritional value of what I ate. Ironic that it was a health club too&#8230;</p>
<p>The fitbit cost $99, and I frankly bought it on a whim because I saw other people saying great things about it. I wanted to check it &#8211; having liked having a pedometer before &#8211; and I&#8217;ve got to say, this particular gadget buy has really worked out. I&#8217;m now much more aware of how much I&#8217;m walking (and how much I&#8217;m not walking), and it&#8217;s even doing some numbers like &#8220;how many calories I&#8217;ve burned&#8221; so that making attempts to track how much I&#8217;m taking in with food have something nice to balance against.</p>
<p><a href="http://www.rhonabwy.com/wp/2011/01/23/a-week-with-the-fitbit/screen-shot-2011-01-23-at-10-51-06-pm/" rel="attachment wp-att-1055"><img src="http://www.rhonabwy.com/wp/wp-content/uploads/2011/01/Screen-shot-2011-01-23-at-10.51.06-PM-300x86.png" alt="" title="fitbit dashboard chart" width="300" height="86" class="aligncenter size-medium wp-image-1055" /></a></p>
<p>I&#8217;m pretty happy with the first week &#8211; and I&#8217;d recommend it to anyone wanting to get a track on their day to day activity. Now we&#8217;ll see what happens after a few weeks&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhonabwy.com/wp/2011/01/23/a-week-with-the-fitbit/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>jquerymobile and having design constraints</title>
		<link>http://www.rhonabwy.com/wp/2010/11/27/jquerymobile-and-having-design-constraints/</link>
		<comments>http://www.rhonabwy.com/wp/2010/11/27/jquerymobile-and-having-design-constraints/#comments</comments>
		<pubDate>Sat, 27 Nov 2010 20:07:22 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[django]]></category>
		<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[Ranting and Reflections]]></category>

		<guid isPermaLink="false">http://www.rhonabwy.com/wp/?p=1039</guid>
		<description><![CDATA[I&#8217;ve been working on this idea/project called Eyes for the past year on and off. Maybe for the past 4 to 6 months I&#8217;ve been stymied by what I want the visual representation to look like, struggling with the options &#8230; <a href="http://www.rhonabwy.com/wp/2010/11/27/jquerymobile-and-having-design-constraints/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on this idea/project called <a href="http://bitbucket.org/heckj/eyes">Eyes</a> for the past year on and off. Maybe for the past 4 to 6 months I&#8217;ve been stymied by what I want the visual representation to look like, struggling with the options of an open HTML design canvas. I&#8217;m afraid the sheer potential of anything there left me struggling &#8211; there were too many ideas of what I could do for a visual presentation and interaction, and I wasn&#8217;t able to really narrow it down all that well.</p>
<p>I&#8217;ve been following <a href="http://www.sproutcore.com/">SproutCore</a> for a while, sort of thinking about that as an interesting mechanism, and then more recently I saw the announcements about the <a href="http://jquerymobile.com/">jQueryMobile</a> framework setup. Having done some iPhone and iPad development, the common metaphors of list views, tableviews, etc. felt very familiar. jQueryMobile isn&#8217;t all that to be perfectly honest, but the basic design feel is reasonably close.</p>
<p>I made a branch on Eyes and started laying it out &#8211; and I&#8217;ve been going gangbusters since. Laying in the constraints of the framework has really made the choices much easier to work out. Not that I haven&#8217;t run down some dead ends and had to back out, but I feel like I have better sense of how the pages flow and work together.</p>
<p><a href="http://www.rhonabwy.com/wp/wp-content/uploads/2010/11/fontpage.png"><img class="alignleft size-medium wp-image-1040" title="fontpage" src="http://www.rhonabwy.com/wp/wp-content/uploads/2010/11/fontpage-230x300.png" alt="" width="230" height="300" /></a>And best of all, I have something that I&#8217;m comfortable will work on mobile devices, while not looking like crap on a larger view.</p>
<p>I&#8217;m still learning the various tidbits of the framework CSS stylings, and I&#8217;m already seeing some elements where I&#8217;m going to want to dig deeper. The only real struggle I&#8217;ve had is working with Ajax based forms submissions and debugging them when I bork it up. Doing so much javascript work and debugging is still pretty unfamiliar to me. I&#8217;m ending up with a lot of print(&#8220;..&#8221;) debugging on the back end, and alert(&#8230;) debugging in the javascript itself.</p>
<p><a href="http://www.rhonabwy.com/wp/wp-content/uploads/2010/11/hostpage.png"><img class="alignleft size-medium wp-image-1041" title="hostpage" src="http://www.rhonabwy.com/wp/wp-content/uploads/2010/11/hostpage-300x231.png" alt="" width="300" height="231" /></a>All in all, I&#8217;m very pleased with the effects and results of using jQueryMobile. I do rather wish I hadn&#8217;t left my jQuery book at work for the holiday weekend though &#8211; I&#8217;m certainly not a jQuery expect, and it would have come in very handy more than once already. Thank god for excellent online documentation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhonabwy.com/wp/2010/11/27/jquerymobile-and-having-design-constraints/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Eyes &#8211; a new monitoring system</title>
		<link>http://www.rhonabwy.com/wp/2010/11/20/eyes-a-new-monitoring-system/</link>
		<comments>http://www.rhonabwy.com/wp/2010/11/20/eyes-a-new-monitoring-system/#comments</comments>
		<pubDate>Sat, 20 Nov 2010 21:51:58 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[devops]]></category>
		<category><![CDATA[Geekstuff]]></category>

		<guid isPermaLink="false">http://www.rhonabwy.com/wp/?p=1037</guid>
		<description><![CDATA[It was over a year ago that I started getting really annoyed at the state of monitoring systems. They all do what you sort of expect a monitoring system to do &#8211; watch (poll) systems and alert you when something&#8217;s &#8230; <a href="http://www.rhonabwy.com/wp/2010/11/20/eyes-a-new-monitoring-system/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It was over a year ago that I started getting really annoyed at the state of monitoring systems. They all do what you sort of expect a monitoring system to do &#8211; watch (poll) systems and alert you when something&#8217;s gone off. Pretty much anyone who&#8217;s done much system administration work knows the obvious critters: <a href="http://www.nagios.org/">Nagios</a>, <a href="http://munin-monitoring.org/">Munin</a>, <a href="http://www.cacti.net/">Cacti</a>, <a href="http://www.zenoss.com/">Zenoss</a>. Zenoss is the start into the pay realm too &#8211; GroundWorks, BMC Patrol, HP&#8217;s SiteScope, etc.</p>
<p>So here&#8217;s my annoyance &#8211; all of these systems, even the open source ones, are really set up to be managed by people, not other systems. They&#8217;re not built with API&#8217;s to be able to create, update, check on, and delete monitors. Some of them come darned close &#8211; Zenoss, SiteScope, etc. Others have this sort of worked around from the back side &#8211; i.e. Puppet or Chef recipes that generate Nagios configuration files.</p>
<p>So a year ago I decided that I could probably put something together that does the same basics, but has API&#8217;s built in from scratch. I did a lot of noodling on the idea, scratching ideas in notebooks and such, before I really kicked things off. Then I decided to see what I could do to wrap up a new system. I built it around Nagios plugins &#8211; mostly because there&#8217;s a lot of them and they do some pretty good stuff right off the bat. And that&#8217;s all open source as well. And I wrapped that around with a web application based on Django, because &#8211; well &#8211; I know Django reasonably well. The result is a basic system that I&#8217;m calling &#8220;Eyes&#8221;.</p>
<p>The whole source, from the very beginning, is on Bitbucket at <a href="http://bitbucket.org/heckj/eyes">http://bitbucket.org/heckj/eyes</a>. And after poking at it on and off for nearly 12 months, I decided to wrap this up a bit and get it out there &#8211; so as of today I have my first release on <a href="http://pypi.python.org/pypi/eyes/">PyPi</a>, with <a href="http://packages.python.org/eyes/">documentation</a>. And I created a mailing list &#8211; <a href="http://groups.google.com/group/eyes-monitoring">eyes-monitoring</a> &#8211; on Google Groups to have some place to talk around it.</p>
<p>I very intentionally included documentation for the project from the very beginning, embedded with the project. I also very intentionally wrapped a large number of tests around the project, and have been checking and watching test coverage as the project grows and changes. The state today? Basically functional, but you have to know the innards to do much more with it.</p>
<p>Today it doesn&#8217;t have anything related to alerting or escalation within it. It doesn&#8217;t have much of anything around a user interface, and the data is stored all in RRD files. It&#8217;s at the point now where the basic framework is in place &#8211; and there&#8217;s a lot more to go: design of the user interface, blocking in alternate mechanisms to do monitoring, and fleshing out higher level features like notifications and alerts &#8211; both via email and alternative mechanisms (like web-hooks, or XMPP event streams).</p>
<p>What it is ready for is outside eyes. If you&#8217;re interested in contributing, or even sharing some ideas about what to do with Eyes, I&#8217;d love to hear from you. <a href="http://bitbucket.org/heckj/eyes/fork">Fork the code</a> and <a href="http://packages.python.org/eyes/intro/hackerguide.html">try it out</a>, or join the mailing list (<a href="http://groups.google.com/group/eyes-monitoring">http://groups.google.com/group/eyes-monitoring</a>) and share some of your ideas or thoughts.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhonabwy.com/wp/2010/11/20/eyes-a-new-monitoring-system/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Nearly at the top of that first hill</title>
		<link>http://www.rhonabwy.com/wp/2010/11/13/nearly-at-the-top-of-that-first-hill/</link>
		<comments>http://www.rhonabwy.com/wp/2010/11/13/nearly-at-the-top-of-that-first-hill/#comments</comments>
		<pubDate>Sat, 13 Nov 2010 22:25:14 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[openstack]]></category>
		<category><![CDATA[Ranting and Reflections]]></category>

		<guid isPermaLink="false">http://www.rhonabwy.com/wp/?p=1030</guid>
		<description><![CDATA[I&#8217;ve been thinking about the past week at the OpenStack Design Summit (Bexar) solidly from last night (flying home from San Antonio, TX) through the various errands I&#8217;ve been running today. This morning Rick Clark tweeted &#8220;A question about OpenStack&#8221;. &#8230; <a href="http://www.rhonabwy.com/wp/2010/11/13/nearly-at-the-top-of-that-first-hill/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been thinking about the past week at the <a href="http://summit.openstack.org/">OpenStack Design Summit (Bexar)</a> solidly from last night (flying home from San Antonio, TX) through the various errands I&#8217;ve been running today. This morning <a href="http://twitter.com/#!/dendrobates/status/3458393733865472">Rick Clark tweeted</a> <a href="http://dendrobates.wordpress.com/2010/11/13/a-question-about-openstack/"> &#8220;A question about OpenStack&#8221;</a>. As I think about it, this shouldn&#8217;t be about what is going right and wrong, but where the project is and what will provide the most benefit by improving it.</p>
<p>I&#8217;m saying all this after a week with the OpenStack guys &#8211; both in design sessions and just chillin&#8217; out. Focused, intelligent, demanding conversations scattered through the week with an amazing &#8220;no-ego&#8221; attitude presenting itself. Not that there weren&#8217;t some good ole technical &#8220;best way to do it&#8221; or &#8220;which is better&#8221; fights, but given the breadth of this project and the open nature with vendors lurking all around the corners &#8211; well, frankly I expected a lot more &#8220;special interest&#8221; to be clearly showing itself. Everyone at that conference was interested in making <a href="http://openstack.org/">OpenStack</a> better at every turn.</p>
<p>250 people, 12 countries, 90 companies/organizations &#8211; all that after 3 months from being publicly announced. And they&#8217;re going it without any prior structure &#8211; building up an OpenStack foundation, doing all the legal and community building, right from scratch. And yeah &#8211; that&#8217;s showing right now.</p>
<p>The first thing I see that will provide the biggest gains:</p>
<ul>
<li><strong>&#8220;How do we all work together?&#8221;</strong></li>
</ul>
<p>Some of the best sessions were around &#8220;What does the status X of bugs mean&#8221; and talking through the development and release process. At this point I&#8217;m convinced the core folks are reasonably comfortable with LaunchPad (the platform the system is hosted on) &#8211; and being at the conference really taught me a great deal about how OpenStack is effectively using it. Prior, it wasn&#8217;t comfortable or familiar to me at all. The object store and compute (swift and nova, respectively) core groups are really quite separate teams, all trying to figure out how to get some common ground in re-using code, libraries, and even setting up documentation.</p>
<p>The second:</p>
<ul>
<li><strong>&#8220;Show me it&#8217;s workin&#8217;, again and again&#8221;</strong></li>
</ul>
<p>OpenStack is quickly heading to be the kernel or core of a platform. You could see it in the twinkle of Eucalyptus&#8217; eye when they talked about Swift (the object store), or chatting with the folks from Scalr or RightScale. The whole system is being built with API in mind from the ground up, and while there is some <a href="http://hudson.openstack.org/job/swift-coverage/">pretty good unit testing</a> in play and <a href="http://hudson.openstack.org/">continuous integration</a>, it was clear that installing this sucker was a PITA &#8211; and the documentation to really pull that all together starting coming together in the documentation sprint and install fest at the summit. One of the &#8220;blueprints&#8221; of the design summit (i.e. &#8220;Things we want to do, and how we want to do it for the next release&#8221;) is to get some <a href="https://blueprints.launchpad.net/nova/+spec/bexar-testing-hudson-integration">fully automated integration testing</a> as well as track the metrics on how the system is operating. There were a lot of folks that have some cross over into the <a href="https://launchpad.net/drizzle">Drizzle project</a>, and the ideas of running and tracking benchmark data on every revision is darned power.</p>
<p>Add to that the benefits of a constant flow of functional testing against a couple of pre-defined clusters of both compute and object store, and you have a powerful engine to make sure trouble is spotted early and can be resolved quickly.</p>
<p>The third:</p>
<ul>
<li><strong>&#8220;How&#8217;s this thing tick?&#8221;</strong></li>
</ul>
<p>One of the admitted weak points is that some small, damned effective core teams have done most of the work &#8211; and if you want to understand the system, well&#8230; you&#8217;ve just got to read the code. That is a huge investment &#8211; and frankly a barrier to entry into the project that can be avoided with some effort towards docs and discussion. Again, great progress was made there (I learned what the &#8220;project&#8221; concept was in Nova at the summit) &#8211; but the interactions between components, what the components are responsible for, and what they&#8217;re *not* responsible for, are all kind of tricky to learn right now.</p>
<p>This extends down into digging into the code, where docstrings could be better (and are getting better!) so that if you wanted to go help with something specific, you didn&#8217;t have to grok a broad codebase to get a handle on what the impacts are of the changes you&#8217;ll need to make.</p>
<p>And the last thing I&#8217;ll throw in here:</p>
<ul>
<li><strong>&#8220;What OpenStack isn&#8217;t, or won&#8217;t do&#8230;&#8221;</strong></li>
</ul>
<p>The project is still in a lot of flux. There were some great components that were shown off at the summit that ride over the top of the infrastructure, or work with it through APIs. Should those be a part of OpenStack, or on the side? Some service providers were very interested in more platform-kind of elements &#8211; a common logging infrastructure, a common authentication, ID, and authorization infrastructure. Should that be a part, or on the side? How tightly or loosely do we want to couple some of these elements? The philosophy is there and forming up, but the real truth of it all will be over the next 6-12 months of the project when decisions are made, reviewed, and a core forms out of it. There have been a few architectural decisions made early: &#8220;Don&#8217;t mandate anything in the client&#8221;, &#8220;If a feature would restrict scale, it MUST be optional&#8221;, etc. that I absolutely applaud. I think it will form up more as projects apply to join the OpenStack umbrella and either make it or don&#8217;t. It will become clear what&#8217;s common, and what isn&#8217;t, pretty darn quickly.</p>
<p>I&#8217;m pumped about this project, the people, and it&#8217;s future. The core openstacker&#8217;s have clearly been driving up a steep hill to get to where they can level out a bit and move into more of a marathon mode. Really, it feels like we&#8217;re nearly at the top of that first hill.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhonabwy.com/wp/2010/11/13/nearly-at-the-top-of-that-first-hill/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>more always on applications &#8230; in the cloud</title>
		<link>http://www.rhonabwy.com/wp/2010/09/20/more-always-on-applications-in-the-cloud/</link>
		<comments>http://www.rhonabwy.com/wp/2010/09/20/more-always-on-applications-in-the-cloud/#comments</comments>
		<pubDate>Tue, 21 Sep 2010 06:12:13 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[Ranting and Reflections]]></category>

		<guid isPermaLink="false">http://www.rhonabwy.com/wp/?p=1024</guid>
		<description><![CDATA[I took the &#8220;always on application&#8221; and ran through some numbers this evening. I was curious &#8211; with the hosting options available today, what would it cost someone to run an &#8220;always on&#8221; application. The way I&#8217;m thinking about it, &#8230; <a href="http://www.rhonabwy.com/wp/2010/09/20/more-always-on-applications-in-the-cloud/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I took the &#8220;<a href="http://www.rhonabwy.com/wp/2010/09/19/the-always-on-for-desktop-apps/">always on application</a>&#8221; and ran through some numbers this evening. I was curious &#8211; with the hosting options available today, what would it cost someone to run an &#8220;always on&#8221; application.</p>
<p>The way I&#8217;m thinking about it, <a href="http://code.google.com/appengine/">GAE</a> probably isn&#8217;t the right thing. They don&#8217;t easily let you run repeated cron jobs, making an agent style application (i.e. proactive, rather than reactive) not quite a good fit. So what would be? A VM. Sure, you could slice it down farther and get a slicehost style thing &#8211; they&#8217;re excellent, but many of them have restrictions about &#8220;long running processes&#8221; &#8211; and that is exactly what I want.</p>
<p>So what&#8217;s it take to run a VM? There&#8217;s an interesting question. The cheapest I found was Rackspace &#8211; that offered a 256MB Linux hosting solution for $10/mo. Linode starts at 512MB for $19.95. Of course you need to at least make a vague attempt to compare to an EC2 instance. The always on really bites you there &#8211; the cheapest I could get my numbers was around $6/mo (a single micro instance, 1 yr commitment &#8211; minimal to no bandwidth).</p>
<p>I have to wonder &#8211; how well would something like that be received? Say you could offer a private agent/proxy service for $10/mo. I suspect you could get it cheaper &#8211; the compute needed for this kind of service would seem to smaller than the minimum you can purchase as a slice of compute. But people aren&#8217;t generally buying like this &#8211; at least not today.</p>
<p>I think most folks who have a desire for something like this would be more likely to have a desktop computer at home they could dedicate to leaving on. That&#8217;s assuming they have an internet service to their house too &#8211; so the real cost is more than the hosted compute, but since people often have it anyway&#8230; I&#8217;m guessing they&#8217;d be more likely to want to just use it.</p>
<p>The closest to paying as you go for an application gets to the Platform as a Service &#8211; <a href="http://code.google.com/appengine/">Google App Engine</a> or <a href="http://www.microsoft.com/windowsazure/">Microsoft Azure</a>. Frankly neither of which I particularly want because they both represent a sort of technology lock in. In development now is <a href="http://www.openstack.org/">OpenStack</a> &#8211; Rackspace &#038; NASA doing some of that base line commoditization work to drive down the costs of running small VM slices. We&#8217;re already on the sweet side of Moore&#8217;s Law for the commoditization of compute resources &#8211; it&#8217;s just a few more years until it&#8217;s a complete no brainer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhonabwy.com/wp/2010/09/20/more-always-on-applications-in-the-cloud/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

