<?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; openstack</title>
	<atom:link href="http://www.rhonabwy.com/wp/category/geekstuff/openstack/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rhonabwy.com/wp</link>
	<description>Mac, iOS, DevOps, Cloud Services, and daily life in Seattle</description>
	<lastBuildDate>Fri, 19 Apr 2013 22:11:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>OpenStack docs and tooling in 20 minutes</title>
		<link>http://www.rhonabwy.com/wp/2013/04/19/openstack-docs-and-tooling-in-20-minutes/</link>
		<comments>http://www.rhonabwy.com/wp/2013/04/19/openstack-docs-and-tooling-in-20-minutes/#comments</comments>
		<pubDate>Fri, 19 Apr 2013 22:08:32 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[openstack]]></category>

		<guid isPermaLink="false">http://www.rhonabwy.com/wp/?p=1206</guid>
		<description><![CDATA[I&#8217;ve gone through the routine several times now, so I decided to make it easy to replicate to help out some friends get started with all the tooling and setup needed to build, review, and contribute to OpenStack Documentation. I&#8217;m a huge fan of CloudEnvy, so I&#8217;ve created a public github repository with the envy [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve gone through the routine several times now, so I decided to make it easy to replicate to help out some friends get started with all the tooling and setup needed to build, review, and contribute to OpenStack Documentation.</p>
<p>I&#8217;m a huge fan of <a href="https://github.com/cloudenvy/cloudenvy">CloudEnvy</a>, so I&#8217;ve created a public github repository with the envy configuration and setup scripts to be able to set up a VM and completely build out all the existing documentation in roughly 20-25 minutes. </p>
<p>First, we install cloudenvy. It&#8217;s a python module, so it&#8217;s really easy to install with pip. My recommended installation process:</p>
<pre class="wp-code-highlight prettyprint">pip install -U cloudenvy</pre>
<p>If you&#8217;re working on a mac laptop (like I do), you may need to use</p>
<pre class="wp-code-highlight prettyprint">sudo pip install -U cloudenvy</pre>
<p>Once cloudenvy is installed, you need to set up the credentials to your handy-dandy local OpenStack cloud (y&#8217;all have one of those, don&#8217;t you?). For cloudenvy, you create a file in your home directory named <code><strong>.cloudenvy</strong></code> akin to this:</p>
<pre class="wp-code-highlight prettyprint">
cloudenvy:
  clouds:
    cloud01:
      os_username: username
      os_password: password
      os_tenant_name: tenant_name
      os_auth_url: http://keystone.example.com:5000/v2.0/
</pre>
<p>Obviously, put in the proper values for your cloud.</p>
<p>Now you just need to clone the doctools envyfile setup, switch to that directory, and kick off Envy!</p>
<pre class="wp-code-highlight prettyprint">
git clone https://github.com/heckj/envyfile-openstack-docs.git
cd envyfile-openstack-docs
envy up
</pre>
<p>20-25 minutes later, you&#8217;ll have a virtual machine running with all the tooling installed, run-through, and the output generated for all the documentation in the openstack manuals repository. The envyfile puts all this into your virtual machine at
<pre class="wp-code-highlight prettyprint">~/src/openstack-manuals</pre>
<p>To get there, you can use the command <code><strong>envy ssh</strong></code> to connect to the machine and do what you need.</p>
<p>For more on the how-to with contributing to OpenStack documentation, check out the wiki page <a href="https://wiki.openstack.org/wiki/Documentation/HowTo">https://wiki.openstack.org/wiki/Documentation/HowTo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhonabwy.com/wp/2013/04/19/openstack-docs-and-tooling-in-20-minutes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making keystoneclient python library a little easier to work with</title>
		<link>http://www.rhonabwy.com/wp/2012/11/11/making-keystoneclient-python-library-a-little-easier-to-work-with/</link>
		<comments>http://www.rhonabwy.com/wp/2012/11/11/making-keystoneclient-python-library-a-little-easier-to-work-with/#comments</comments>
		<pubDate>Sun, 11 Nov 2012 23:48:21 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[openstack]]></category>

		<guid isPermaLink="false">http://www.rhonabwy.com/wp/?p=1191</guid>
		<description><![CDATA[A few weeks prior to the Grizzly OpenStack Design Summit, I was digging around in various python-*client libraries for OpenStack. Glanceclient had just started to use python-keystoneclient to take care of it&#8217;s auth needs, but everyone else was doing it themselves &#8211; intertia from having it in the base project from the early days and [...]]]></description>
				<content:encoded><![CDATA[<p>A few weeks prior to the Grizzly OpenStack Design Summit, I was digging around in various python-*client libraries for OpenStack. Glanceclient had just started to use python-keystoneclient to take care of it&#8217;s auth needs, but everyone else was doing it themselves &#8211; intertia from having it in the base project from the early days and never refactoring things as clients replicated and split in the Essex release.</p>
<p>Looking at what glanceclient did, and had to do, I got really annoyed and wanted the client to have a much easier to use interface. At the same time, I was also digging around trying to allow the keystoneclient CLI to accept and use an override for the endpoint from the command line. Turns out the various mechanations to make the original client setup work with a system with two distinct URL endpoints was quite a mess under the covers, and that mess just propagated through to anyone trying to use the library.</p>
<p>We just landed some new code updates with keystoneclient to make it much easier to use. So this little article is intended to be a quick guide to using the python keystoneclient library and some of it&#8217;s new features. While we&#8217;re getting v3 API support installed, we&#8217;re still very actively using v2 apis, so we&#8217;ll use v2 API examples throughout.</p>
<p>The first is just getting a client object established.</p>
<p><code><br />
>>> from keystoneclient.v2_0 import client<br />
>>> help(client)<br />
</code></p>
<p>We&#8217;ve expanded the documentation extensively to make it easier to use the library. The base client is still working from <a href="http://code.google.com/p/httplib2/">httplib2</a> &#8211; I didn&#8217;t rage-change it into the <a href="http://docs.python-requests.org/en/latest/">requests</a> library (although it was damned close).</p>
<p>There&#8217;s a couple of common things that you&#8217;ll want to do with initializing the client. The first is to authorize the client with the bootstrapping pieces so you can use it to configure keystone. In general, I&#8217;m sort of expecting this to be done mostly from the CLI, but you can also do it from the python code directly. To use this setup, you&#8217;ll need to initialize the client with two pieces of data:</p>
<ul>
<li>token</li>
<li>endpoint</li>
</ul>
<p>Token is what you&#8217;ll have configured in your keystone.conf file under <b><code>admin_token</code></b> and endpoint is the URL to your keystone service. If you were using devstack, it would be <b><code>http://localhost:35357/v2.0</code></b></p>
<p>A bit of example code (making up the admin_token)</p>
<pre class="wp-code-highlight prettyprint">
from keystone client.v2_0 import client

adminclient = client.Client(token=&#039;9fc31e32f61e78f114a40999fbf594c2&#039;,
                            endpoint=&#039;http://localhost:35357/v2.0&#039;)
</pre>
<p>Now at this point, you&#8217;ll have an instance of the client, and can start interacting with all the internal structures in keystone. <code>adminclient.tenants.list()</code> for example.</p>
<p>You may have spotted the authenticate() method on the client. If you&#8217;re using the token/endpoint setup, you <strong>do not</strong> want to call this method. When you&#8217;re using the admin_token setup, you don&#8217;t<br />
have a full authorization token as retrieved from keystone, you&#8217;re short-cutting the system. This mode is really only intended to be used to bootstrap in projects, users, etc. Once you&#8217;ve done that, you&#8217;re better using the username/password setup with the client.</p>
<p>To do that, you minimally need to know the username, the password, and the &#8220;public&#8221; endpoint of Keystone. With the v2 API, the public and administrative endpoints are separate. With devstack, the example public API endpoint is <code>http://localhost:5000/v2.0</code>.</p>
<p>A bit of an example:</p>
<pre class="wp-code-highlight prettyprint">
from keystoneclient.v2_0 import client
kc = client.Client(username=&#039;heckj&#039;, password=&#039;e2112EFFd3ff&#039;,
                   auth_url=&#039;http://localhost:5000/v2.0&#039;)
</pre>
<p>At this point, the client has been initialized, and as a default it will immediately attempt to authenticate() to the endpoint, so it already has some authorization data. With the updated keystoneclient library, this authorization info is stashed into an attribute &#8220;auth_ref&#8221;. You can check out the code in more detail &#8211; the class is <code>keystoneclient.access.AccessInfo</code>, and this represents the token that we retrieved after calling authenticate() to auth against keystone.</p>
<p>With only providing a username and password, the token is really only useful for about two things &#8211; getting a list of clients that this user can authorize to (getting a &#8216;scoped&#8217; token &#8211; where the token represents authorization to a project), and then retrieving that token.</p>
<pre class="wp-code-highlight prettyprint">
&gt;&gt;&gt; kc.username
&#039;heckj&#039;
&gt;&gt;&gt; kc.auth_ref
{u&#039;token&#039;: {u&#039;expires&#039;: u&#039;2012-11-12T23:28:58Z&#039;, u&#039;id&#039;: u&#039;97913f8839634946afab2897ac19908d&#039;}, u&#039;serviceCatalog&#039;: {}, u&#039;user&#039;: {u&#039;username&#039;: u&#039;heckj&#039;, u&#039;roles_links&#039;: [], u&#039;id&#039;: u&#039;c8d112a0932a454097dfba0f3b598bdc&#039;, u&#039;roles&#039;: [], u&#039;name&#039;: u&#039;heckj&#039;}}
&gt;&gt;&gt; kc.auth_ref.scoped
False
&gt;&gt;&gt; kc.tenants.list()
[&lt;Tenant {u&#039;id&#039;: u&#039;7dbf826d086c4580a28cf860a6d13046&#039;, u&#039;enabled&#039;: True, u&#039;description&#039;: u&#039;&#039;, u&#039;name&#039;: u&#039;heckj-project&#039;}&gt;]
&gt;&gt;&gt; kc.authenticate(tenant_name=&#039;heckj-project&#039;)
True
&gt;&gt;&gt; kc.auth_ref.scoped
True
&gt;&gt;&gt; kc.auth_ref
{u&#039;token&#039;: {u&#039;expires&#039;: u&#039;2012-11-12T23:37:10Z&#039;, u&#039;id&#039;: u&#039;6d811d7c39034813b6cab2ad083cdf3e&#039;, u&#039;tenant&#039;: {u&#039;id&#039;: u&#039;7dbf826d086c4580a28cf860a6d13046&#039;, u&#039;enabled&#039;: True, u&#039;description&#039;: u&#039;&#039;, u&#039;name&#039;: u&#039;heckj-project&#039;}}, u&#039;serviceCatalog&#039;: [{u&#039;endpoints_links&#039;: [], u&#039;endpoints&#039;: [{u&#039;adminURL&#039;: u&#039;http://localhost:8776/v1/7dbf826d086c4580a28cf860a6d13046&#039;, u&#039;region&#039;: u&#039;RegionOne&#039;, u&#039;internalURL&#039;: u&#039;http://localhost:8776/v1/7dbf826d086c4580a28cf860a6d13046&#039;, u&#039;publicURL&#039;: u&#039;http://localhost:8776/v1/7dbf826d086c4580a28cf860a6d13046&#039;}], u&#039;type&#039;: u&#039;volume&#039;, u&#039;name&#039;: u&#039;Volume Service&#039;}, {u&#039;endpoints_links&#039;: [], u&#039;endpoints&#039;: [{u&#039;adminURL&#039;: u&#039;http://localhost:9292/v1&#039;, u&#039;region&#039;: u&#039;RegionOne&#039;, u&#039;internalURL&#039;: u&#039;http://localhost:9292/v1&#039;, u&#039;publicURL&#039;: u&#039;http://localhost:9292/v1&#039;}], u&#039;type&#039;: u&#039;image&#039;, u&#039;name&#039;: u&#039;Image Service&#039;}, {u&#039;endpoints_links&#039;: [], u&#039;endpoints&#039;: [{u&#039;adminURL&#039;: u&#039;http://localhost:8774/v2/7dbf826d086c4580a28cf860a6d13046&#039;, u&#039;region&#039;: u&#039;RegionOne&#039;, u&#039;internalURL&#039;: u&#039;http://localhost:8774/v2/7dbf826d086c4580a28cf860a6d13046&#039;, u&#039;publicURL&#039;: u&#039;http://localhost:8774/v2/7dbf826d086c4580a28cf860a6d13046&#039;}], u&#039;type&#039;: u&#039;compute&#039;, u&#039;name&#039;: u&#039;Compute Service&#039;}, {u&#039;endpoints_links&#039;: [], u&#039;endpoints&#039;: [{u&#039;adminURL&#039;: u&#039;http://localhost:8773/services/Admin&#039;, u&#039;region&#039;: u&#039;RegionOne&#039;, u&#039;internalURL&#039;: u&#039;http://localhost:8773/services/Cloud&#039;, u&#039;publicURL&#039;: u&#039;http://localhost:8773/services/Cloud&#039;}], u&#039;type&#039;: u&#039;ec2&#039;, u&#039;name&#039;: u&#039;EC2 Service&#039;}, {u&#039;endpoints_links&#039;: [], u&#039;endpoints&#039;: [{u&#039;adminURL&#039;: u&#039;http://localhost:35357/v2.0&#039;, u&#039;region&#039;: u&#039;RegionOne&#039;, u&#039;internalURL&#039;: u&#039;http://localhost:5000/v2.0&#039;, u&#039;publicURL&#039;: u&#039;http://localhost:5000/v2.0&#039;}], u&#039;type&#039;: u&#039;identity&#039;, u&#039;name&#039;: u&#039;Identity Service&#039;}], u&#039;user&#039;: {u&#039;username&#039;: u&#039;heckj&#039;, u&#039;roles_links&#039;: [], u&#039;id&#039;: u&#039;c8d112a0932a454097dfba0f3b598bdc&#039;, u&#039;roles&#039;: [{u&#039;name&#039;: u&#039;Member&#039;}], u&#039;name&#039;: u&#039;heckj&#039;}, u&#039;metadata&#039;: {u&#039;is_admin&#039;: 0, u&#039;roles&#039;: [u&#039;08ccc339c0074a548104b9050bdf9492&#039;]}}
</pre>
<p>You might have noticed that you can now call authenticate() on the client and just pass in values that are missing from previous authenticate() calls, or you can switch them out entirely. You can change the username, password, project, etc &#8211; anything that you&#8217;d otherwise normally initialize with the client to do what you need.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhonabwy.com/wp/2012/11/11/making-keystoneclient-python-library-a-little-easier-to-work-with/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenStack Keystone plans for the Grizzly release</title>
		<link>http://www.rhonabwy.com/wp/2012/11/08/openstack-keystone-plans-for-the-grizzly-release/</link>
		<comments>http://www.rhonabwy.com/wp/2012/11/08/openstack-keystone-plans-for-the-grizzly-release/#comments</comments>
		<pubDate>Thu, 08 Nov 2012 19:59:35 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[openstack]]></category>
		<category><![CDATA[Ranting and Reflections]]></category>

		<guid isPermaLink="false">http://www.rhonabwy.com/wp/?p=1187</guid>
		<description><![CDATA[I posted this information to the OpenStack-dev mailing list, but thought it would be worthwhile as a blog post as well. Here is an overview of what&#8217;s looking to happen in Keystone over the grizzly release cycle. From the summit, we had the state of the project slides, which might be of interest: http://www.slideshare.net/ccjoe/oct-2012-state-of-project-keystone Since [...]]]></description>
				<content:encoded><![CDATA[<p>I <a href="http://markmail.org/thread/orumuygr7yfqz2px">posted this information to the OpenStack-dev mailing list</a>, but thought it would be worthwhile as a blog post as well.</p>
<p>Here is an overview of what&#8217;s looking to happen in Keystone over the grizzly release cycle.</p>
<p>From the summit, we had the state of the project slides, which might be of interest: <a href="http://www.slideshare.net/ccjoe/oct-2012-state-of-project-keystone">http://www.slideshare.net/ccjoe/oct-2012-state-of-project-keystone</a></p>
<p>Since then, we&#8217;ve been working on fleshing out more details around those initial discussions, and we&#8217;ve been correlating who&#8217;s working on what to get an overview of what&#8217;s coming up for Keystone. If you&#8217;re into reading raw notes, take a look at https://etherpad.openstack.org/keystone-grizzly-plans. </p>
<p>For those looking for more of a tl;dr:</p>
<p>grizzly-1 plans:<br />
 * merging in V3 API work &#8211; &#8220;tech preview&#8221;<br />
<a href="https://blueprints.launchpad.net/keystone/+spec/implement-v3-core-api">https://blueprints.launchpad.net/keystone/+spec/implement-v3-core-api</a></p>
<p> * move auth_token middleware to keystoneclient repo<br />
<a href="https://blueprints.launchpad.net/keystone/+spec/authtoken-to-keystoneclient-repo">https://blueprints.launchpad.net/keystone/+spec/authtoken-to-keystoneclient-repo</a></p>
<p> * AD LDAP extensions<br />
<a href="https://blueprints.launchpad.net/keystone/+spec/ad-ldap-identity-backend">https://blueprints.launchpad.net/keystone/+spec/ad-ldap-identity-backend</a></p>
<p> * enabling policy &#038; RBAC access for V3 API<br />
<a href="https://blueprints.launchpad.net/keystone/+spec/rbac-keystone-api">https://blueprints.launchpad.net/keystone/+spec/rbac-keystone-api</a></p>
<p>grizzly-2 plans:<br />
* pre-authenticated token<br />
 <a href="https://blueprints.launchpad.net/keystone/+spec/pre-auth">https://blueprints.launchpad.net/keystone/+spec/pre-auth</a></p>
<p>* plugable authentication handlers<br />
<a href="https://blueprints.launchpad.net/keystone/+spec/pluggable-identity-authentication-handlers">https://blueprints.launchpad.net/keystone/+spec/pluggable-identity-authentication-handlers</a></p>
<p>* consolidated policy documentation/recommendations<br />
<a href="https://blueprints.launchpad.net/keystone/+spec/document-deployment-suggestions-policy">https://blueprints.launchpad.net/keystone/+spec/document-deployment-suggestions-policy</a></p>
<p>* PKI future work<br />
<a href="https://blueprints.launchpad.net/keystone/+spec/delegation">https://blueprints.launchpad.net/keystone/+spec/delegation</a><br />
  &#8211; starting into delegation, signing of tokens<br />
  &#8211; annotations on signing for authorization</p>
<p>grizzly-3 plans:<br />
* delegation<br />
<a href="https://blueprints.launchpad.net/keystone/+spec/delegation">https://blueprints.launchpad.net/keystone/+spec/delegation</a></p>
<p>* multifactor authN<br />
<a href="https://blueprints.launchpad.net/keystone/+spec/multi-factor-authn">https://blueprints.launchpad.net/keystone/+spec/multi-factor-authn</a></p>
<p>Much of the work and desires around Delegation  has yet to be fully defined and nailed down, and relies on a lot of additions in making PKI based tokens a stable, solid, default mechanism. I&#8217;m sure there will be some redirection once we get a few weeks down the road and see what&#8217;s happening with the V3 API rollout and PKI token extensions to support delegation, pre-auth, and so forth. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhonabwy.com/wp/2012/11/08/openstack-keystone-plans-for-the-grizzly-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CloudEnvy &#8211; vagrant for OpenStack</title>
		<link>http://www.rhonabwy.com/wp/2012/10/28/cloudenvy-vagrant-for-openstack/</link>
		<comments>http://www.rhonabwy.com/wp/2012/10/28/cloudenvy-vagrant-for-openstack/#comments</comments>
		<pubDate>Sun, 28 Oct 2012 17:54:35 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[openstack]]></category>

		<guid isPermaLink="false">http://www.rhonabwy.com/wp/?p=1183</guid>
		<description><![CDATA[I work on OpenStack, I work in OpenStack. Seems like everyone I know that&#8217;s been working on, in, or with OpenStack has their own little script to &#8220;set up their environment&#8221; &#8211; meaning getting a VM spun up with their dotfiles, tools, etc, all configured and ready to roll. I had one myself for quite [...]]]></description>
				<content:encoded><![CDATA[<p>I work on OpenStack, I work in OpenStack. Seems like everyone I know that&#8217;s been working on, in, or with OpenStack has their own little script to &#8220;set up their environment&#8221; &#8211; meaning getting a VM spun up with their dotfiles, tools, etc, all configured and ready to roll. I had one myself for quite a while, and recently I threw it away. </p>
<p><a href="https://github.com/cloudenvy/cloudenvy">CloudEnvy</a> (https://github.com/cloudenvy/cloudenvy) is what started that cascade. <a href="https://github.com/bcwaldon">Brian Waldon</a> started it some time ago as a script that emulated the ease of spinning up VM&#8217;s with vagrant, except wrapped over the OpenStack clients. I always wanted to like Vagrant, but it never really synced for me. I think mostly because I was in never-ending kernel panic hell with virtualbox. CloudEnvy is a different story.</p>
<p>I think the most interesting illustration of CloudEnvy is using it to spin up an instance in a cloud, and then run <a href="https://github.com/openstack-dev/devstack">devstack</a> in that instance.</p>
<p>CloudEnvy relies on a starter of two files &#8211; one that&#8217;s specific to the project (DevStack in this case): Envyfile, and one for your personal cloud configuration (~/.cloudenvy).</p>
<p>Here&#8217;s my .cloudenvy file (with the hostname and password redacted):<br />
<script src="https://gist.github.com/3969250.js?file=.cloudenvy"></script></p>
<p>And the Envyfile I use with <a href="https://github.com/openstack-dev/devstack">devstack</a>:<br />
<script src="https://gist.github.com/3969250.js?file=Envyfile"></script></p>
<p>You&#8217;ll notice that the Envyfile references a script I named &#8220;cloudenvy-setup.sh&#8221; &#8211; this is the basic script that cloudenvy uploads to the instance it creates to automatically provision things up. You could easily replace this with Puppet, Chef, or whatever it is you like to configure VMs in your world.</p>
<p>Here&#8217;s what I&#8217;m doing:<br />
<script src="https://gist.github.com/3969250.js?file=cloudenvy-setup.sh"></script></p>
<p>(all three of these files are in the gist <a href="https://gist.github.com/3969250">https://gist.github.com/3969250</a>)</p>
<p>The Envyfile also refers to a image_name. I&#8217;m using a stock UEC precise image that I uploaded to our instance of OpenStack. Pretty shortly, CloudEnvy will be replacing &#8220;image_name&#8221; with just &#8220;image&#8221;, and they recommend that you use an image ID (guaranteed uniqueness) over a name. For my immediate use, the name works pretty well.</p>
<p>Once this is all in place:</p>
<p><code><br />
envy up<br />
</code></p>
<p>Creates the instance, assigns it a floating IP address, SSH&#8217;s into the instance, uploads the provision script, and starts cranking on the provisioning. 763 seconds later, a fully operational devstack in an instance running on OpenStack.</p>
<p><code><br />
envy ssh<br />
</code></p>
<p>Gets you in, lets you do what you want. </p>
<p><code><br />
envy list<br />
</code></p>
<p>Shows you the instance(s) you have running.</p>
<p>There&#8217;s more, a lot more, but hopefully this is sufficient to get you started. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhonabwy.com/wp/2012/10/28/cloudenvy-vagrant-for-openstack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenStack Design Summit &#8211; wrap-up and links</title>
		<link>http://www.rhonabwy.com/wp/2012/10/20/openstack-design-summit-wrap-up-and-links/</link>
		<comments>http://www.rhonabwy.com/wp/2012/10/20/openstack-design-summit-wrap-up-and-links/#comments</comments>
		<pubDate>Sat, 20 Oct 2012 20:04:32 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[openstack]]></category>

		<guid isPermaLink="false">http://www.rhonabwy.com/wp/?p=1180</guid>
		<description><![CDATA[This fall&#8217;s OpenStack design summit in San Diego is wrapped up, and we&#8217;re all back to being distributed across the globe. I was pleased with the summit, and pleased to see the project I&#8217;m helping coordinate (Keystone) move forward with a lot of ideas, growing interest in contributions, and concrete feedback from a wide mix [...]]]></description>
				<content:encoded><![CDATA[<p>This fall&#8217;s OpenStack design summit in San Diego is wrapped up, and we&#8217;re all back to being distributed across the globe. I was pleased with the summit, and pleased to see the project I&#8217;m helping coordinate (<a href="http://wiki.openstack.org/Keystone">Keystone</a>) move forward with a lot of ideas, growing interest in contributions, and concrete feedback from a wide mix of folks. </p>
<p>The design sessions are definitely less about actually hacking code than they were a year ago, offset though with the increasing diversity of backgrounds and interests participating in the sessions. The core team developers joined me through-out Thursday and drove most of the discussions, with fantastic input from David Chadwick, Khaja, Ryan Lane. There were way more people in the sessions than that, but to me these three represent a set of fresh inputs from folks with a deep academic background, previous experience building identity systems, and active operator points of view. They and the the previous contributors provided tremendous feedback, asked great questions, and set the stage for a lot of interesting ideas.</p>
<p>This year all the project technical leads gave a &#8220;state of the project&#8221; overview, but we did that on Tuesday &#8211; so like John Griffith (the project technical lead for <a href="http://wiki.openstack.org/Cinder">cinder</a>), I was doing the &#8216;state of the project&#8217; routine prior to getting the feedback and doing the brainstorming in the sessions. The <a href="http://www.slideshare.net/ccjoe/oct-2012-state-of-project-keystone">slides from that presentation are online</a> at <a href="http://www.slideshare.net/ccjoe/oct-2012-state-of-project-keystone">http://www.slideshare.net/ccjoe/oct-2012-state-of-project-keystone</a> if you&#8217;re interested. The coordinators all video-taped those segments, as I understand it, they should be appearing on the <a href="http://www.youtube.com/channel/HC8Qp-iErLZE0?feature=g-all-lgv">OpenStack channel in Youtube</a> in the next couple of days.</p>
<p>There was also a very active session led by Gabriel Hurley seeking to drive more continuity into the OpenStack APIs, and a matching session by Doug Hellman and Dean Troyer for the OpenStack CLIs. The continued focus on bringing in new ideas while keeping the interfaces consistent and clear is a great sign for the project overall, and I was pleased to see a large number of like minded folks wanting to continue to move things forward in those areas.</p>
<p>This was also the first summit under the auspices of the <a href="http://www.openstack.org/foundation/">OpenStack Foundation</a> &#8211; they all met for an extended period of time early in the conference, and the <a href="http://www.openstack.org/foundation/technical-committee/">Technical Committee</a> managed to pull of a first all-in-person meeting over dinner and scattered conversation Tuesday evening. </p>
<p>And not at all related to any core projects or overall effort: check out the very creative riff on the OpenStack theme <a href="http://www.dopenstack.com">Dope&#8217;n'Stack</a>, (<a href="http://www.youtube.com/watch?v=3jUQ09Jf4GU">video on YouTube</a> as well). Gabriel and Erik were working their tails off prior to and during the conference to pull this off, culminating in a great presentation Wednesday evening at Piston&#8217;s party. (I was disappointed that Gabriel lost the mohawk for the summit, but he said he was sick of wearing it after three weeks).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhonabwy.com/wp/2012/10/20/openstack-design-summit-wrap-up-and-links/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>OpenStack Folsom RC1</title>
		<link>http://www.rhonabwy.com/wp/2012/09/22/openstack-folsom-rc1/</link>
		<comments>http://www.rhonabwy.com/wp/2012/09/22/openstack-folsom-rc1/#comments</comments>
		<pubDate>Sat, 22 Sep 2012 20:05:49 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[openstack]]></category>

		<guid isPermaLink="false">http://www.rhonabwy.com/wp/?p=1175</guid>
		<description><![CDATA[It&#8217;s been a busy couple of weeks, and I expect the new several to be busy as well, leading up to the next OpenStack Design Summit (Oct 15th-18th in San Diego, CA). We rolled RC1 for Keystone Folsom release out the door this past week, and at this point I think all the projects have [...]]]></description>
				<content:encoded><![CDATA[<p>It&#8217;s been a busy couple of weeks, and I expect the new several to be busy as well, leading up to the next OpenStack Design Summit (Oct 15th-18th in San Diego, CA).</p>
<p>We rolled RC1 for Keystone <a href="http://wiki.openstack.org/FolsomReleaseSchedule">Folsom</a> release out the door this past week, and at this point I think all the projects have an initial release candidate out the door. The original release date is 5 days away, and it&#8217;s looking pretty good for hitting it. If you want a quick overview of what&#8217;s coming in this release, I&#8217;d recommend a look at Emilien Macchi&#8217;s <a href="http://my1.fr/blog/whats-new-in-openstack-folsom/">Folsom overview</a>, which is a pretty nice high level summary.</p>
<p>While we&#8217;ve been busy nailing down bugs and wrapping this release together, the <a href="http://www.openstack.org/foundation/">OpenStack Foundation</a> has finally come into form. As the Keystone project technical lead, I&#8217;m on the <a href="http://www.openstack.org/foundation/technical-committee/">OpenStack technical committee</a> &#8211; picture and title, but I haven&#8217;t written a bio yet. (Sorry Lauren). I find it really quite difficult to write a bio at myself. Regardless, it&#8217;s great to finally see this moving into a foundation external to any single corporate interest. That&#8217;s not to say it&#8217;s all in the land of milk and cookies, there&#8217;s just a lot of people with all slightly different interests jumping into the pool to push this little rowboat in different directions.</p>
<p>One thing that we did early out of excellent foresight was keeping the direction of the core projects democratically oriented by the contributors to those projects. The people that show up to write, update, and support the code are the ones that are ultimately making the decisions on what features get implemented, and when. Lots of folks talk about what could be, but it&#8217;s the contributors that make it happen.</p>
<p>A perfect example of this is <a href="http://www.linkedin.com/in/admiyo">Adam Young</a>, who in the past 6 months drove the implementation of PKI based tokens in Keystone. I&#8217;m not even sure I&#8217;ve met Adam face to face, but I definitely know him &#8211; and he&#8217;s been a fantastic contributor, and in the Folsom development cycle was promoted to the core Keystone team.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhonabwy.com/wp/2012/09/22/openstack-folsom-rc1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>6 months later&#8230; Essex</title>
		<link>http://www.rhonabwy.com/wp/2012/04/08/6-months-later-essex/</link>
		<comments>http://www.rhonabwy.com/wp/2012/04/08/6-months-later-essex/#comments</comments>
		<pubDate>Sun, 08 Apr 2012 19:37:13 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[openstack]]></category>

		<guid isPermaLink="false">http://www.rhonabwy.com/wp/?p=1155</guid>
		<description><![CDATA[Easter Sunday and I&#8217;ve some time to sit back, relax, and spend the weekend doing a little cleaning and catching up. I&#8217;ve got to admit to some embarrassment that the last post here was the wrap-up of the OpenStack Diablo design summit. To say it&#8217;s been a busy six months since the last post is [...]]]></description>
				<content:encoded><![CDATA[<p>Easter Sunday and I&#8217;ve some time to sit back, relax, and spend the weekend doing a little cleaning and catching up. I&#8217;ve got to admit to some embarrassment that the last post here was the wrap-up of the OpenStack Diablo design summit.</p>
<p>To say it&#8217;s been a busy six months since the last post is really quite an understatement. What we released in the past month, and the work that went in to getting us there, is nothing short of phenomenal.</p>
<p>The <a href="http://www.openstack.org/projects/essex/">OpenStack Essex</a> release is out, and I&#8217;m still sort of catching my breath from that. Just six withs prior to the release I was elected as the PTL for Keystone. I had no idea how much additional work it was to wrangle the bugs, approvals, and the other sundry details that go into getting the release out the door. I rather wish there was a &#8220;new PTL user&#8217;s manual&#8221; for the process. It was a lot of learning, most of it last-minute and ad-hoc around our project management, release process and associated the mechanics. I spent a lot of time trying to figure out how to wrangle Launchpad into some semblance of useful tracking, etc. (To be fair, it was mostly a matter of learning what Launchpad could and couldn&#8217;t do, and figuring out the conventions that were already in place).</p>
<p>The past month was terrifically busy with getting OpenStack deployed and tested &#8211; running in small environments (<a href="http://devstack.org/">devstack</a>), and large. I&#8217;ve been working from the Ubuntu distributions myself, and the whole gang that has been packaging OpenStack (Chuck, Adam, Kiall, and others &#8211; inside Canonical and out) with the downstream distributions has done a tremendous job wrapping together the changes and making it into a deployable release from packages.</p>
<p><strong>A much better release:</strong></p>
<p>Where I was, er, more than disappointed with the Diablo, I&#8217;m significantly happier with the Essex release. <a href="https://launchpad.net/keystone/">Keystone</a> (the project for which I am now the PTL) didn&#8217;t advance this release cycle so much as retrench and prepare for advancement this next release cycle. <a href="https://launchpad.net/horizon/">Horizon</a> made huge leaps and bounds, which I think is fantastic as the face of OpenStack to many users. <a href="https://launchpad.net/nova/">Nova</a> and <a href="https://launchpad.net/swift/">Swift</a> advanced, and the integration work and definition going into making <a href="https://launchpad.net/quantum/">Quantum</a> (and <a href="https://launchpad.net/melange/">Melange</a>) a reality has been terrific.</p>
<p>I think if I were to pull out a star of the show for the Essex release, then I&#8217;ve really got to point to the combined work for the crew formulating and keeping <a href="http://devstack.org/">DevStack</a> solid, and the <a href="https://launchpad.net/openstack-ci">CI team</a> that integrated it into our development and review process so that we had a minimum of guaranteed interoperability. Where I was screaming into the wind during the last milestone of Diablo for continued breakages between the components, the integration of devstack has demanded that changes be rolled in with though to an overall use case and interop. With 200+ developers all kicking this ball down the field, the guaranteed CI has been the piece that has done us the most good.</p>
<p><strong>A little about Keystone:</strong></p>
<p>Keystone, as we retrenched and simplified the codebase, also has a significant advancement in integration testing. We replaced the entire codebase based on a series of integration tests that verified and guaranteed API compatibility with the Diablo and trunk releases as well as the client while we made that switch. The underlying code base is now significantly simplified, and the <a href="http://keystone.openstack.org/architecture.html">internal architecture of that service now wrapped around some core &#8220;internal service&#8221; concepts</a> to allow us to have drivers that cleanly back-end into external systems to support identity and authorization.</p>
<p>I&#8217;ve received a number of questions about &#8220;why the API still sucks&#8221; six months later after Diablo. There&#8217;s still no obvious means for a user to &#8220;log out&#8221; (invalidate their own token), or change their own password (assuming the back-end were to support it). In switching out the underlying code base and architecture we needed to keep the API stable so that we could make sure we had the internals correct. With the internals switched out, it is now time to revisit the API and take the lessons we&#8217;ve learned from 6+ months of using the v2.0 API and improve upon it.</p>
<p><strong>Looking towards the summit:</strong></p>
<p>While I&#8217;m much, much happier with the Essex release, there are still plenty of places for improvement &#8211; many that I remember from the Diablo summit, and some new things that I&#8217;d love to see some focus on for the upcoming six months.</p>
<p>While Horizon has given us a dramatically improved user experience for OpenStack, there&#8217;s much more that we could do there &#8211; both with a web based UI, and with our command line interfaces to OpenStack. One thing that could use some explicit attention is the proliferation of &#8220;clients&#8221; needed to interact with OpenStack. As projects are splintering off Nova into their own domains, we have a number of new command line clients (nova, keystone, glance, quantum) &#8211; and they don&#8217;t all act the same. There is some great work on driving them to consistency, but I wonder if we shouldn&#8217;t bag all the individual clients and roll them together into one &#8220;OpenStack&#8221; client that is consistent in how it handles command line options, what the &#8220;commands&#8221; look like, and generally how you interact with them. </p>
<p>I hate to admit this, but even as the PTL of Keystone, I ran into a brick wall of old docs referring to using the command of &#8220;<code>nova-manage project list</code>&#8221; to see the projects, when I knew darn well and good they were all in the keystone system, and to see a list of them I should use the command &#8220;<code>keystone tenant-list</code>&#8220;. Not so hot, huh? Quantum and the nova-network components are going to really come into their own in this release, so we&#8217;ll have more shattering of the user experience from a deployer&#8217;s point of view unless we do something to be specific about tying it together.</p>
<p>There are more changes to be made in Keystone that I&#8217;m paying a lot of attention to &#8211; some of which are honestly going to require buy-in from the entire community to make happen. Where we place the boundaries of role based access, and how we deal with trust and information sharing about identity between the projects is probably going to need some changes that will ripple all the way down into the API&#8217;s of nova, swift, glance, quantum, melange, etc. Getting the brainstorming around those concepts and desired features is what I primarily want to accomplish at the <a href="http://www.openstack.org/conference/san-francisco-2012/">Design Summit</a>, with follow on in the milestone timeframe thereafter to bring the new features into existence and integrate them across OpenStack. My ideal goal is to get all the heavy features implemented early in the Folsom release cycle so that they&#8217;re solid and nailed down for the later milestones, and we can tweak and fix what may be broken long before any release points.</p>
<p><strong>About that CloudStack thing:</strong></p>
<p>Seems like in the last week, everybody (or at least the pundits) got their knickers in a twist about Citrix finally being more open about their dual-interest in CloudStack and OpenStack. Regardless of Gartner pundit sensationalistic babbling, the release of CloudStack as an Apache licensed project is nothing but goodness for the whole community. The Apache license makes me feel more comfortable with reviewing their code and looking at how they attacked the same issues and problems OpenStack has, and I expect they&#8217;ll look closely at how OpenStack has done the same. I applaud any company trying to build an open-source community, and I&#8217;m looking forward to seeing what Citrix does to actually do that community building. If it gains ground and folks contribute to CloudStack, we&#8217;re all better off &#8211; it&#8217;s more ideas hitting the street and becoming reality.</p>
<p>Finally, for anyone that didn&#8217;t think that the user-facing EC2 API was the defacto API, wake the F* up. It is reasonable, solid, and nobody is going to be turning it off any time soon. It also doesn&#8217;t allow/enable some things that a lot of cloud administrators would like to do &#8211; so it shouldn&#8217;t surprise anyone that CloudStack has their &#8220;api&#8221; and OpenStack has their &#8220;api&#8221;. The APIs are another place where we can learn from each other, as we add some value beyond what the bookseller down street might want to impose and expose.</p>
<p>If you want a little pundit action from this source, watch the API&#8217;s of both CloudStack and OpenStack (not just the EC2 compatibility layer) over the next six months. I think you&#8217;ll be seeing some very interesting steps forward.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhonabwy.com/wp/2012/04/08/6-months-later-essex/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<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 two dedicated to the conference portion &#8211; talks and panels about folks actively using OpenStack, [...]]]></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 on how to do that. A lot of this is exactly what&#8217;s encoded into Chef [...]]]></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 class="wp-code-highlight prettyprint">
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 class="wp-code-highlight prettyprint">
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 class="wp-code-highlight prettyprint">
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 class="wp-code-highlight prettyprint">
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 class="wp-code-highlight prettyprint">--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 class="wp-code-highlight prettyprint">bind-address = 127.0.0.1</pre>
<p>and change it to</p>
<pre class="wp-code-highlight prettyprint">bind-address 0.0.0.0</pre>
<p>Now lets make the user in Mysql:</p>
<pre class="wp-code-highlight prettyprint">
mysql -popenstack
CREATE USER &#039;novadbuser&#039; IDENTIFIED BY &#039;novaDBsekret&#039;;
GRANT ALL PRIVILEGES ON *.* TO &#039;novadbuser&#039;@&#039;%&#039; WITH GRANT OPTION;
FLUSH PRIVILEGES;
</pre>
<p>And set up the database:</p>
<pre class="wp-code-highlight prettyprint">
mysql -popenstack -e &#039;CREATE DATABASE nova;&#039;
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 class="wp-code-highlight prettyprint">
# create admin user called &quot;cloudroot&quot;
nova-manage user admin --name=cloudroot --secret=sekret
</pre>
<p>This should respond with something like:</p>
<pre class="wp-code-highlight prettyprint">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 class="wp-code-highlight prettyprint">
# create project &quot;cloudproject&quot; with project mgr: &quot;cloudroot&quot;
nova-manage project create --project=cloudproject --user=cloudroot
</pre>
<p>And finally, a network configuration for those internal IP addresses:</p>
<pre class="wp-code-highlight prettyprint">
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 class="wp-code-highlight prettyprint">
sudo nova-manage project zipfile cloudproject cloudroot /tmp/nova.zip
unzip -o /tmp/nova.zip -d ~/creds
cat creds/novarc &gt;&gt; ~/.bashrc
source creds/novarc
#
euca-add-keypair mykey &gt; mykey.priv
chmod 600 mykey.priv
#
image=&quot;ttylinux-uec-amd64-12.1_2.6.35-22_1.tar.gz&quot;
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 &#039;--ramdisk none&#039;
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=&quot;ami-00000002&quot;; eri=&quot;none&quot;; eki=&quot;aki-00000001&quot;;
...OUTPUT...
</pre>
<p>And running the instances:</p>
<pre class="wp-code-highlight prettyprint">
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 class="wp-code-highlight prettyprint">
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>19</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 meetup. If you&#8217;re planning on coming, please stop by the Meetup link at http://www.meetup.com/OpenStack-Seattle/events/33922932/ and [...]]]></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 movement in the project. We have Quantum and Glance shifting to use Github as 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>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 is set up to make it easy to write your own services that interact with [...]]]></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>
<pre class="wp-code-highlight prettyprint">
from nova.service import Service
my_service = Service.create()
</pre>
<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>
<pre class="wp-code-highlight prettyprint">
rpc.cast(context,
         self.db.queue_get_for(context, FLAGS.network_topic, host),
         {&#039;method&#039;: &#039;associate_floating_ip&#039;,
          &#039;args&#039;: {&#039;floating_address&#039;: floating_ip[&#039;address&#039;],
                   &#039;fixed_address&#039;: fixed_ip[&#039;address&#039;]}})
</pre>
<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>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 to find and share with others in the future. Before I dive into the gritty [...]]]></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>
<pre class="wp-code-highlight prettyprint">
from nova import flags
# import the nova wrapper around python gflags
#  .. there&#039;s some interesting wrapping for taking in arguments
#     and passing along extras values to your code
#  .. and it&#039;s where the global flag definitions reside
FLAGS = flags.FLAGS
# get the global instance
#  .. this attempts to read the /etc/nova/nova.conf for flags
# 
# You can define an additional flag here if you needed to...
flags.DEFINE_string(&#039;my_flag&#039;, &#039;default_value&#039;, \
        &#039;human readable description of your flag&#039;)
# there&#039;s also flags.DEFINE_bool, flags.DEFINE_integer and more...
# 
# And then you can use the flags
#  .. the flags you defined show up as attributes 
#     on that FLAGS object
print FLAGS.my_ip
</pre>
<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>
<pre class="wp-code-highlight prettyprint">
from nova import flags
form nova import utils
utils.default_flagfile()
flags.FLAGS(sys.argv)
GLOBAL_FLAGS = flags.FLAGS
# ... and on to the rest of your code
</pre>
<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>
<pre class="wp-code-highlight prettyprint">
    logging.debug(_(&#039;Full set of FLAGS:&#039;))
    for flag in FLAGS:
        flag_get = FLAGS.get(flag, None)
        logging.debug(&#039;%(flag)s : %(flag_get)s&#039; % locals())
</pre>
<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>
<pre class="wp-code-highlight prettyprint">
import eventlet
eventlet.monkey_patch()

import sys
from nova import flags
from nova import service
from nova import utils

if __name__ == &#039;__main__&#039;:
    utils.default_flagfile()
    flags.FLAGS(sys.argv)
    service.serve()
    service.wait()
</pre>
<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>
<pre class="wp-code-highlight prettyprint">
import eventlet
eventlet.monkey_patch()

import sys
from nova import flags
from nova import service
from nova import utils

if __name__ == &#039;__main__&#039;:
    utils.default_flagfile()
    flags.FLAGS(sys.argv)
    flags.DEFINE_string(&#039;exampleservice_manager&#039;,
            &#039;mymodule.exampleservice.ExampleServiceManager&#039;,
            &#039;Default manager for the nova-exampleservice&#039;)
    service.serve()
    service.wait()
</pre>
<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>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;. As I think about it, this shouldn&#8217;t be about what is going right and wrong, [...]]]></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>Hacking on OpenStack&#8217;s Nova</title>
		<link>http://www.rhonabwy.com/wp/2010/08/08/hacking-on-openstacks-nova/</link>
		<comments>http://www.rhonabwy.com/wp/2010/08/08/hacking-on-openstacks-nova/#comments</comments>
		<pubDate>Sun, 08 Aug 2010 18:24:19 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[devops]]></category>
		<category><![CDATA[Geekstuff]]></category>
		<category><![CDATA[openstack]]></category>

		<guid isPermaLink="false">http://www.rhonabwy.com/wp/?p=1010</guid>
		<description><![CDATA[Like quite a number of other folks, I&#8217;ve been lurking on the OpenStack mailing lists since I saw the announcements. Friday, Eric Day put out a call to help with the &#8220;get this code into shape&#8221; against PEP8 and pylint. &#8220;Ahh!&#8221;, I thought &#8211; an easy intro to getting into the project and it&#8217;ll give [...]]]></description>
				<content:encoded><![CDATA[<p>Like quite a number of other folks, I&#8217;ve been lurking on the OpenStack mailing lists since I saw the announcements. Friday, <a href="http://oddments.org/">Eric Day</a> put out a call to help with the &#8220;get this code into shape&#8221; against PEP8 and pylint.</p>
<p>&#8220;Ahh!&#8221;, I thought &#8211; an easy intro to getting into the project and it&#8217;ll give me an excuse to really read the code. So this weekend I started taking a stab at doing a little light buff and puff on the code to get the PEP8 and pylint code scores up a bit.</p>
<p>What I found is that it took some work to get everything from the codebase ready to really do some work on it. And the notes aren&#8217;t all in the same places on how to do that &#8211; what notes are there are all written mostly for Ubuntu. I was pretty sure most of this could be done on a Mac too &#8211; at least based on the dependency documentation, so I cobbled up some notes on getting rolling with Launchpad, this code base, and being able to run the tests to verify that my cleaning didn&#8217;t really break anything.</p>
<p>I put the resulting notes on the OpenStack wiki page <a href="http://wiki.openstack.org/HackingNovaMacOSX">http://wiki.openstack.org/HackingNovaMacOSX</a>.</p>
<p>The big thing that I&#8217;m not sure about is the testing. Just a stock install is failing on one unit test, and it&#8217;s in an area I&#8217;m not very familiar with (auth &#038; creating certificates). If any the OpenStack folk are reading this, here&#8217;s the error I&#8217;m seeing:</p>
<pre class="wp-code-highlight prettyprint">
[ERROR]: nova.tests.auth_unittest.AuthTestCase.test_209_can_generate_x509

Traceback (most recent call last):
  File &quot;/Users/heckj/Documents/code/nova/nova/test.py&quot;, line 222, in run
    d = self._maybeInlineCallbacks(testMethod)
  File &quot;/Users/heckj/Documents/code/nova/nova/test.py&quot;, line 182, in _maybeInlineCallbacks
    g = f()
  File &quot;/Users/heckj/Documents/code/nova/nova/tests/auth_unittest.py&quot;, line 162, in test_209_can_generate_x509
    signed_cert = X509.load_cert_string(cert_str)
  File &quot;/Users/heckj/Documents/code/nova/.nova-venv/lib/python2.6/site-packages/M2Crypto/X509.py&quot;, line 655, in load_cert_string
    return load_cert_bio(bio, format)
  File &quot;/Users/heckj/Documents/code/nova/.nova-venv/lib/python2.6/site-packages/M2Crypto/X509.py&quot;, line 639, in load_cert_bio
    raise X509Error(Err.get_error())
M2Crypto.X509.X509Error: 140735090166816:error:0906D06C:PEM routines:PEM_read_bio:no start line:/SourceCache/OpenSSL098/OpenSSL098-32/src/crypto/pem/pem_lib.c:650:Expecting: CERTIFICATE
</pre>
<p><strong><em>update:</em></strong> Turns out the error was directly related to the version of OpenSSL installed on my laptop. I had version 1.0.0a from MacPorts installed and in my default path, which caused the error. Version 0.9.8l (base install in MacOS X) works fine. </p>
<p><code>sudo port deactivate openssl</code></p>
<p>did the trick and the tests are all running now. I updated the <a href="https://bugs.launchpad.net/nova/+bug/615518">bug against Nova</a> with those details, leaving it open &#8211; it ought to at least fail reasonably.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhonabwy.com/wp/2010/08/08/hacking-on-openstacks-nova/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
