<?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>join-fu!</title>
	<atom:link href="http://www.joinfu.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.joinfu.com</link>
	<description>the art of sql</description>
	<lastBuildDate>Tue, 11 Jun 2013 16:04:39 +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>Pushing revisions to a Gerrit code review</title>
		<link>http://www.joinfu.com/2013/06/pushing-revisions-to-a-gerrit-code-review/</link>
		<comments>http://www.joinfu.com/2013/06/pushing-revisions-to-a-gerrit-code-review/#comments</comments>
		<pubDate>Mon, 10 Jun 2013 13:29:15 +0000</pubDate>
		<dc:creator>jaypipes</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Chef]]></category>
		<category><![CDATA[Gerrit]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[openstack]]></category>

		<guid isPermaLink="false">http://www.joinfu.com/?p=444</guid>
		<description><![CDATA[Martin Stoyanov recently asked an excellent question about the proper way to push revisions to a changeset in Gerrit. This is a very common question that folks new to Gerrit or Git have, and I think it deserves its own post. When you do the first push of a local working branch to Gerrit, the [...]]]></description>
				<content:encoded><![CDATA[<p>
Martin Stoyanov recently <a href="http://www.joinfu.com/2013/05/working-with-the-openstack-code-review-and-ci-system-chef-edition/#comment-924957928">asked an excellent question</a> about the proper way to push revisions to a changeset in Gerrit. This is a very common question that folks new to Gerrit or Git have, and I think it deserves its own post.
</p>
<p>
When you do the first push of a local working branch to Gerrit, the act of pushing your code creates a Gerrit <em>changeset</em>. The changeset can be reviewed, and in the process of doing that review, it&#8217;s common for reviewers to request that the submitter make some changes to the code. Sometimes these changes are stylistic or cosmetic. Other times, the requested modifications can be extensive.
</p>
<p>
How you handle making the requested modifications and submitting those changes back to Gerrit depends on a few things:</p>
<ol>
<li>Are the changes requested mostly stylistic or cosmetic?</li>
<li>Are the changes requested going to provide additional functionality that is <em><strong>dependent</strong></em> on the existing changeset?</li>
<li>Are the changes requested going to provide additional functionality that is <em><strong>independent</strong></em> of the existing changeset?</li>
</ol>
<p>
Depending on the answers to the above questions, you should either <em>amend</em> the existing changeset commit, push a new commit to Gerrit from the <strong><em>same local branch</em></strong>, or push a new commit from a <strong><em>new local branch</em></strong>. Here&#8217;s some quick guidelines to help you decide:
</p>
<h2>The Changes Requested Are Cosmetic or Style-related</h2>
<p>
When a reviewer is providing some stylistic advice or offering suggestions for cosmetic changes or cleanups, you should <em>amend</em> the original commit. Do so like this:</p>
<pre>
# After making the requested changes...
git commit -a --amend
# Modify the commit message, if necessary, and save your editor
git review
</pre>
<p>While this looks fairly simple (and it is&#8230;), many folks make a fatal mistake when they modify the commit message and add sections that describe the &#8220;sausage-making&#8221; involved in the cleanups. <strong>DO NOT</strong> do this. It&#8217;s not necessary. Avoid adding any lines to the commit message that look like this:</p>
<ul>
<li>&#8220;Cleaned up whitespace&#8221;</li>
<li>&#8220;DRY&#8217;d up some stuff based on review comments&#8221;</li>
<li>&#8220;Fixed typos found during reviews&#8221;</li>
</ul>
<p>If all you did was correct typos and whitespace, simply leave the commit message as it was originally. After the call to <code>git review</code>, you will see a new <em>patchset</em> appear in the original code review. This is expected. The changeset is still viewed by Gerrit and reviewers as a single changeset, and reviewers may even select &#8220;Patchset 1&#8243; from the &#8220;Old Version History&#8221; dropdown instead of &#8220;Base&#8221; in order to see only the changes made in this last amended commit.
</p>
<h2>The Changes Requested Are Extensive and Depend on Original Commit</h2>
<p>
If a reviewer has asked for modifications to your original code, and the requested modifications are fairly extensive and depend on the code in your original commit, you have four choices:</p>
<ul>
<li>Amend the original commit to include all new changes</li>
<li>Amend the original commit for some things, push those changes to the original commit, make additional changes in the same local branch, git commit those additional changes and git review</li>
<li>Make additional changes, git commit those additional changes and git review</li>
<li>Lobby for your original commit to be accepted as-is, then when your change is accepted and merged into master, then create a new branch from master and push the additional changes in a new changeset</li>
</ul>
<p>
Whenever you do <strong>not</strong> amend a commit and issue a call to <code>git review</code>, you will be created a <em>dependent changeset</em>. Gerrit will assign a new <a href="http://gerrit.googlecode.com/svn/documentation/2.0/user-changeid.html" title="Gerrit Change-Id">Change-Id</a> to the patchset, but understands that the commit logically follows your original changeset&#8217;s code. If you go to the code review screen of your newly-created changeset, you will see your original changeset referenced in the &#8220;Dependencies&#8221; section. Below, you can see a screenshot of a changeset that is part of a &#8220;dependency chain&#8221;. Another patchset is dependent on this patchset and this patchset is dependent on another patchset.
</p>
<div id="attachment_445" class="wp-caption aligncenter" style="width: 762px"><a href="http://www.joinfu.com/wp-content/uploads/2013/06/dependent-changesets.png"><img src="http://www.joinfu.com/wp-content/uploads/2013/06/dependent-changesets.png" alt="Changeset showing a dependent changeset and a changeset dependent on this one (chained dependent patchsets)" width="752" height="398" class="size-full wp-image-445" /></a><p class="wp-caption-text">Changeset showing a dependent changeset and a changeset dependent on this one (chained dependent patchsets)</p></div>
<p>
It&#8217;s best to avoid long chains of dependent patchsets. The reason is because if a reviewer requests changes for one of the changesets at the &#8220;bottom&#8221; of the dependency chain, the entire chain of changesets (even changesets that are approved like the one shown above) are going to be held up from going through the gate tests.
</p>
<h2>The Changes Requested Are Extensive but are Independent of the Original Commit</h2>
<p>If a reviewer has requested extensive changes, but points out that the changes they want made are actually independent of the changes in your original commit, the reviewers will generally ask the original committer to wait until this changeset is merged and create a new branch for the additional work. Normally, depending on the extent of the requested changes, reviewers will insist that the submitter create a new bug or blueprint on Launchpad to keep track of the additional work they feel is needed.</p>
<h2>Conclusion</h2>
<p>It&#8217;s up to the discretion of core reviewers and the original submitter to work out which of the above solutions works best for the particular changeset. Each changeset introduces code and functionality that must be treated differently, and changesets from one submitter may be dealt with differently than others. However, to keep things simple for yourself and upstream reviewers, it&#8217;s best to follow this simple advice:</p>
<ol>
<li><strong>Prefer to amend the original commit</strong>. In most cases, this is the appropriate solution to push revisions to Gerrit.</li>
<li><strong>Don&#8217;t include sausage-making comments in the commit message</strong>.</li>
<li>Prefer <strong>free-standing changesets</strong> to long chains of dependent patches.</li>
<li><strong>Ask reviewers</strong> what their preferences are.</li>
</ol>
<p>Follow those guidelines and you&#8217;ll keep yourself out of the weeds. For more detailed information, including strategies for handling updates to your code that is dependent on another branch of code that gets updated, see the excellent <a href="https://wiki.openstack.org/wiki/Gerrit_Workflow">OpenStack GerritWorkflow documentation</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joinfu.com/2013/06/pushing-revisions-to-a-gerrit-code-review/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Gripe of the Day: Applications that Ask if I Want to Exit</title>
		<link>http://www.joinfu.com/2013/06/gripe-of-the-day-applications-that-ask-if-i-want-to-exit/</link>
		<comments>http://www.joinfu.com/2013/06/gripe-of-the-day-applications-that-ask-if-i-want-to-exit/#comments</comments>
		<pubDate>Wed, 05 Jun 2013 21:12:38 +0000</pubDate>
		<dc:creator>jaypipes</dc:creator>
				<category><![CDATA[Gripes]]></category>

		<guid isPermaLink="false">http://www.joinfu.com/?p=441</guid>
		<description><![CDATA[Honestly, if you are a developer of a program that has a dialog box that asks the user if they want to exit the program when they&#8217;ve clicked the close window, you should be sent to remedial programming and UI design class. I&#8217;m looking at you &#8230; developers of aMule and AT&#038;T&#8217;s Global Network Client.]]></description>
				<content:encoded><![CDATA[<p>
Honestly, if you are a developer of a program that has a dialog box that asks the user if they want to exit the program <strong>when they&#8217;ve clicked the close window</strong>, you should be sent to remedial programming and UI design class.
</p>
<p>
I&#8217;m looking at you &#8230; developers of aMule and AT&#038;T&#8217;s Global Network Client.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joinfu.com/2013/06/gripe-of-the-day-applications-that-ask-if-i-want-to-exit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Gerrit review reminder on inline comments</title>
		<link>http://www.joinfu.com/2013/05/quick-gerrit-review-reminder-on-inline-comments/</link>
		<comments>http://www.joinfu.com/2013/05/quick-gerrit-review-reminder-on-inline-comments/#comments</comments>
		<pubDate>Wed, 29 May 2013 13:53:37 +0000</pubDate>
		<dc:creator>jaypipes</dc:creator>
				<category><![CDATA[Gerrit]]></category>
		<category><![CDATA[openstack]]></category>

		<guid isPermaLink="false">http://www.joinfu.com/?p=440</guid>
		<description><![CDATA[For those of you new to Gerrit, remember that when you make inline comments in a patch review, you need to click the &#8220;Review&#8221; button and then the &#8220;Publish Comments&#8221; button in order for your comments to be visible to others on the review. Otherwise, your inline comments stay in Draft mode!]]></description>
				<content:encoded><![CDATA[<p>For those of you new to Gerrit, remember that when you make inline comments in a patch review, you need to click the &#8220;Review&#8221; button and then the &#8220;Publish Comments&#8221; button in order for your comments to be visible to others on the review. Otherwise, your inline comments stay in Draft mode!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joinfu.com/2013/05/quick-gerrit-review-reminder-on-inline-comments/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New Launchpad project for tracking bugs on Chef cookbooks</title>
		<link>http://www.joinfu.com/2013/05/new-launchpad-project-for-tracking-bugs-on-chef-cookbooks/</link>
		<comments>http://www.joinfu.com/2013/05/new-launchpad-project-for-tracking-bugs-on-chef-cookbooks/#comments</comments>
		<pubDate>Wed, 22 May 2013 20:05:15 +0000</pubDate>
		<dc:creator>jaypipes</dc:creator>
				<category><![CDATA[Chef]]></category>
		<category><![CDATA[openstack]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.joinfu.com/?p=436</guid>
		<description><![CDATA[Yesterday, I created a Launchpad project to be used for tracking bugs and feature requests for the new OpenStack Chef cookbooks house on Stackforge. Please do file bugs as you encounter issue with any of the cookbooks or the example OpenStack Chef Repository. You can check out the current list of open bugs and, if [...]]]></description>
				<content:encoded><![CDATA[<p>
Yesterday, I created a Launchpad project to be used for tracking bugs and feature requests for the new OpenStack Chef cookbooks house on <a href="https://github.com/stackforge">Stackforge</a>. Please do <a href="https://bugs.launchpad.net/openstack-chef/+filebug">file bugs</a> as you encounter issue with any of the cookbooks or the <a href="https://github.com/stackforge/openstack-chef-repo">example OpenStack Chef Repository</a>.
</p>
<p>
You can check out the <a href="https://bugs.launchpad.net/openstack-chef">current list of open bugs</a> and, if you&#8217;re in a contributory mood, give a shot at fixing one of them. <img src='http://www.joinfu.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />
</p>
<p>
Keep in mind that when you push code to Gerrit for a review, you can let Gerrit know that your patch fixes a bug by putting in a simple tag in the commit message:</p>
<pre>
fixes: lp XXXXXX
</pre>
<p>where XXXXXX is simply the bug number on Launchpad.
</p>
<p>
When Gerrit sees the above tag pattern, it will automatically mark the bug as <em>In Progress</em> and assign the job to whomever submitted the patch to Gerrit.
</p>
<p>
When your patch lands on the targeted branch, Gerrit will automatically mark the bug as <em>Fix Released</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joinfu.com/2013/05/new-launchpad-project-for-tracking-bugs-on-chef-cookbooks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working with the OpenStack Code Review and CI system &#8211; Chef Edition</title>
		<link>http://www.joinfu.com/2013/05/working-with-the-openstack-code-review-and-ci-system-chef-edition/</link>
		<comments>http://www.joinfu.com/2013/05/working-with-the-openstack-code-review-and-ci-system-chef-edition/#comments</comments>
		<pubDate>Mon, 20 May 2013 17:37:29 +0000</pubDate>
		<dc:creator>jaypipes</dc:creator>
				<category><![CDATA[Chef]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[openstack]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.joinfu.com/?p=426</guid>
		<description><![CDATA[For too long, the state of the OpenStack Chef world had been one of duplicative effort, endless forks of Chef cookbooks, and little integration with how many of the OpenStack projects choose to control source code and integration testing. Recently, however, the Chef + OpenStack community has been getting its proverbial act together. Folks from [...]]]></description>
				<content:encoded><![CDATA[<p>
For too long, the state of the OpenStack Chef world had been one of duplicative effort, endless forks of Chef cookbooks, and little integration with how many of the OpenStack projects choose to control source code and integration testing. Recently, however, the Chef + OpenStack community has been getting its proverbial act together. Folks from lots of companies have come together and pushed to align efforts to produce a set of well-documented, flexible, but focused Chef cookbooks that install and configure OpenStack services.
</p>
<p>
My sincere thanks go out to the individuals who have helped to make progress in the last couple weeks, the individuals on the upstream openstack.org continuous integration team, and of course, the many authors of cookbooks whose code and work is being merged together.
</p>
<p>
OK, so what&#8217;s happened?
</p>
<h2>StackForge now hosting a set of Chef cookbooks for OpenStack</h2>
<p>
Individual cookbooks for each integrated OpenStack project have been created in the <a href="https://github.com/stackforge/">StackForge GitHub</a> organization. Each cookbook name is prefixed with <strong>cookbook-openstack-</strong> followed by the OpenStack service name (not the project code name):</p>
<ul>
<li><strong><a href="https://github.com/stackforge/cookbook-openstack-identity">Keystone cookbook</a></strong></li>
<li><strong><a href="https://github.com/stackforge/cookbook-openstack-compute">Nova cookbook</a></strong></li>
<li><strong><a href="https://github.com/stackforge/cookbook-openstack-image">Glance cookbook</a></strong></li>
<li><strong><a href="https://github.com/stackforge/cookbook-openstack-object-storage">Swift cookbook</a></strong>: </li>
<li><em>(the project formerly known as)</em> <strong><a href="https://github.com/stackforge/cookbook-openstack-network">Quantum cookbook</a></strong></li>
<li><strong><a href="https://github.com/stackforge/cookbook-openstack-block-storage">Cinder cookbook</a></strong></li>
<li><strong><a href="https://github.com/stackforge/cookbook-openstack-dashboard">Horizon cookbook</a></strong></li>
<li><strong><a href="https://github.com/stackforge/cookbook-openstack-metering">Ceilometer cookbook</a></strong></li>
</ul>
<p>Note that we have not yet created the cookbook for Heat, but that will be coming in the Havana timeframe, for sure. Also note that the Ceilometer (metering) cookbook is empty right now. We&#8217;re in the process of pulling the ceilometer recipes out of the compute cookbook into a separate cookbook.</p>
<p><strong>UPDATE</strong>: The <strong><a href="https://github.com/stackforge/cookbook-openstack-orchestration">Heat cookbook repository</a></strong> is now up on Stackforge.
</p>
<p>
In addition to the OpenStack project cookbooks listed above, there are three other related cookbooks:</p>
<ul>
<li><strong><a href="https://github.com/stackforge/cookbook-openstack-common">Common library cookbook</a></strong></li>
<li><strong><a href="https://github.com/stackforge/cookbook-openstack-ops-database">Example database setup wrapper cookbook</a></strong></li>
<li><strong><a href="https://github.com/stackforge/cookbook-openstack-ops-messaging">Example message queue setup wrapper cookbook</a></strong></li>
</ul>
<p>
Finally, there will be another repository called <strong>openstack-chef-repo</strong> that will contain example Chef roles, databags and documentation showing how all the OpenStack and supporting cookbooks are tied together to create an OpenStack deployment.
</p>
<p>
<strong>UPDATE</strong>: The <strong><a href="https://github.com/stackforge/openstack-chef-repo">OpenStack Chef Repository</a></strong> is now up on Stackforge.
</p>
<h3>Code in cookbooks gated by Gerrit like any other OpenStack project</h3>
<p>
The biggest advantage of hosting all these Chef cookbooks on the StackForge GitHub repository is the easy integration with the upstream continuous integration system. The upstream CI team has built a metric crap-ton (technical term) of automation code that enabled us to quickly have Gerrit managing the patch queues and code reviews for all these cookbook repositories as well as have each repository guarded by a set of gate jobs that run linter and unit tests against the cookbooks.
</p>
<p>
The rest of this blog post explains how to use the development and continuous integration systems when working on the OpenStack Chef cookbooks housed in Stackforge.
</p>
<h2>Prepare to develop on a cookbook</h2>
<p>
OK, so you want to start working on one of the OpenStack Chef cookbooks? Great! The first thing you need to do is clone the appropriate Git repository containing the cookbook code and set up your Gerrit credentials. Here is the code to do that:
</p>
<pre>
git clone git@github.com:stackforge/cookbook-openstack-$SERVICE
cd cookbook-openstack-$SERVICE
git review -s
</pre>
<p>
Of course, replace <code>$SERVICE</code> above with one of <code>common</code>, <code>compute</code>, <code>identity</code>, <code>image</code>, <code>block-storage</code>, <code>object-storage</code>, <code>network</code>, <code>metering</code>, or <code>dashboard</code>. What that will do is clone the <em>upstream</em> Stackforge repository for the corresponding cookbook to your local machine, change directory into that clone&#8217;d repository, and set up a git remote called &#8220;gerrit&#8221; pointing to the review.openstack.org Gerrit system.
</p>
<p>
If everything was successful, you should see something like this:
</p>
<pre>
jpipes@uberbox:~/gerrit-tut$ git clone git@github.com:stackforge/cookbook-openstack-common
Cloning into 'cookbook-openstack-common'...
remote: Counting objects: 506, done.
remote: Compressing objects: 100% (168/168), done.
remote: Total 506 (delta 246), reused 503 (delta 243)
Receiving objects: 100% (506/506), 81.97 KiB, done.
Resolving deltas: 100% (246/246), done.
jpipes@uberbox:~/gerrit-tut$ cd cookbook-openstack-common/
jpipes@uberbox:~/gerrit-tut/cookbook-openstack-common$ git review -s
Creating a git remote called "gerrit" that maps to:
	ssh://jaypipes@review.openstack.org:29418/stackforge/cookbook-openstack-common.git
</pre>
<p>
Repeat the above for each cookbook you wish to clone and work on locally, or simply execute this to clone them all:
</p>
<pre>
for i in common compute identity image block-storage object-storage network metering dashboard;\
do git clone git@github.com:stackforge/cookbook-openstack-$i; cd cookbook-openstack-$i; git review -s; cd ../;\
done
</pre>
<h2>Start to develop on a cookbook</h2>
<p>
Now that you have git clone&#8217;d the upstream cookbook repository and set up your Gerrit remote properly, you can begin coding on the cookbook. Remember, however, that you should <em><strong>never make changes in your local &#8220;master&#8221; branch</strong></em>. <em>Always</em> work in a local <em><a href="http://www.reigndesign.com/blog/creating-and-deleting-topic-branches-with-git-and-github/">topic branch</a></em>. This allows you to work on a branch of code separately from the local master branch you will use to bring in changes from other developers.
</p>
<p>
Create a new topic branch like so:
</p>
<pre>
git checkout -b &lt;TOPIC_NAME&gt;
</pre>
<p>
Here is an example of what you can expect to see:
</p>
<pre>
jpipes@uberbox:~/gerrit-tut/cookbook-openstack-common$ git checkout -b tut-example
Switched to a new branch 'tut-example'
</pre>
<p>
Once you are checked out into your topic branch, you can now add, edit, delete, and move files around as you wish. When you have made the changes you want to make, you then need to commit your changes to the working tree in source control.
</p>
<p>
<strong>IMPORTANT NOTE:</strong>: If you created any new files while working in your branch, you will need to tell Git about those new files <em>before you commit</em>. An easy way to check if you&#8217;ve added any new files that should be added to Git source control is to always call <code>git status</code> before doing your commit. <code>git status</code> will tell you if there are any untracked files in your working tree that you may need to add to Git:
</p>
<pre>
jpipes@uberbox:~/gerrit-tut/cookbook-openstack-common$ touch something_new.txt
jpipes@uberbox:~/gerrit-tut/cookbook-openstack-common$ git status
# On branch tut-example
# Untracked files:
#   (use "git add &lt;file&gt;..." to include in what will be committed)
#
#	something_new.txt
nothing added to commit but untracked files present (use "git add" to track)
</pre>
<p>
As the note shows, you use the <code>git add</code> command to add the untracked file to source control:
</p>
<pre>
jpipes@uberbox:~/gerrit-tut/cookbook-openstack-common$ git status
# On branch tut-example
# Changes to be committed:
#   (use "git reset HEAD &lt;file&gt;..." to unstage)
#
#	new file:   something_new.txt
#
</pre>
<p>
If you make changes to files, they will show up in <code>git status</code> as changed files, as shown here:
</p>
<pre>
jpipes@uberbox:~/gerrit-tut/cookbook-openstack-common$ vi README.md 
jpipes@uberbox:~/gerrit-tut/cookbook-openstack-common$ git status
# On branch tut-example
# Changes to be committed:
#   (use "git reset HEAD &lt;file&gt;..." to unstage)
#
#	new file:   something_new.txt
#
# Changes not staged for commit:
#   (use "git add &lt;file&gt;..." to update what will be committed)
#   (use "git checkout -- &lt;file&gt;..." to discard changes in working directory)
#
#	modified:   README.md
#
</pre>
<p>
As you can see, I edited the <code>README.md</code> file, and the call to <code>git status</code> shows that file as modified. If you want to review the changes you made, use the <code>git diff</code> command:
</p>
<pre>
jpipes@uberbox:~/gerrit-tut/cookbook-openstack-common$ git diff
diff --git a/README.md b/README.md
index 4fbbd57..e197d3b 100644
--- a/README.md
+++ b/README.md
@@ -24,6 +24,8 @@ of all the settable attributes for this cookbook.
 
 Note that all attributes are in the `default["openstack"]` "namespace"
 
+TODO(jaypipes): Should we list all the attributes in the README?
+
 Libraries
 =========
</pre>
<p>
If you are happy with the changes, you&#8217;re now ready to commit those changes to source control. Call <code>git commit</code>, like so:
</p>
<pre>
git commit -a
</pre>
<p>
This will open up your text editor and present you with an area to write your commit message describing the contents of your patch. Commit messages should be properly formatted and abide by the <a href="https://wiki.openstack.org/wiki/GitCommitMessages#Information_in_commit_messages">upstream conventions</a>. Feel free to read that link, but here is a brief rundown of stuff to keep in mind:</p>
<ul>
<li>Make the first line of the commit message 50 chars or less</li>
<li>Separate the first line from the rest of the commit message with a blank newline</li>
<li>Make the commit message descriptive of what the patch is and what the motivation for the patch was</li>
<li>Do <strong>NOT</strong> make the commit message into a list of the things in the patch you changed in each revision &mdash; we can already see what is contained in the patch</li>
</ul>
<p>
Save and close your editor to finalize the commit. Once successfully committed, you now need to push your changes to the Gerrit code review and patch management system on <code>review.openstack.org</code>. You do this using a call to <code>git review</code>.</p>
<p>
When you issue a call to <code>git review</code> for any of the cookbooks, a patch review is created in Gerrit. Behind the scenes, the git review plugin is simply doing the call for you to git push to the Gerrit remote. You can always see what git review is doing by passing the -v flag, like so:
</p>
<pre>
jpipes@uberbox:~/gerrit-tut/cookbook-openstack-common$ git commit -a
[tut-example 66f844a] Simple patch for tutorial -- please IGNORE
 1 file changed, 2 insertions(+)
 create mode 100644 something_new.txt
jpipes@uberbox:~/gerrit-tut/cookbook-openstack-common$ git review -v
2013-05-20 12:48:54.333823 Running: git log --color=never --oneline HEAD^1..HEAD
2013-05-20 12:48:54.337044 Running: git remote
2013-05-20 12:48:54.339673 Running: git branch -a --color=never
2013-05-20 12:48:54.342580 Running: git rev-parse --show-toplevel --git-dir
2013-05-20 12:48:54.345139 Running: git remote update gerrit
Fetching gerrit
2013-05-20 12:48:55.475616 Running: git rebase -i remotes/gerrit/master
2013-05-20 12:48:55.616412 Running: git reset --hard ORIG_HEAD
2013-05-20 12:48:55.620552 Running: git config --get color.ui
2013-05-20 12:48:55.623098 Running: git log --color=always --decorate --oneline HEAD --not remotes/gerrit/master --
2013-05-20 12:48:55.626745 Running: git branch --color=never
2013-05-20 12:48:55.629703 Running: git log HEAD^1..HEAD
Using local branch name "tut-example" for the topic of the change submitted
2013-05-20 12:48:55.634665 Running: git push gerrit HEAD:refs/publish/master/tut-example
remote: Resolving deltas: 100% (2/2)
remote: Processing changes: new: 1, done    
remote: 
remote: New Changes:
remote:   https://review.openstack.org/29797
remote: 
To ssh://jaypipes@review.openstack.org:29418/stackforge/cookbook-openstack-common.git
 * [new branch]      HEAD -> refs/publish/master/tut-example
2013-05-20 12:48:56.775939 Running: git rev-parse --show-toplevel --git-dir
</pre>
<p>
As you can see in the above output, a new patch review was created at the location https://review.openstack.org/29797. You can go to that URL and see the patch review, shown here before any comments or reviews have been made on the patch.
</p>
<p><a href="http://www.joinfu.com/wp-content/uploads/2013/05/gerrit-review-29797.png"><img src="http://www.joinfu.com/wp-content/uploads/2013/05/gerrit-review-29797.png" alt="gerrit-review-29797" width="991" height="750" class="aligncenter size-full wp-image-427" /></a></p>
<h2>Reviewing patches with Gerrit</h2>
<p>
Gerrit has three separate levels of reviews: <em>Verify</em>, <em>Code-Review</em>, and <em>Approve</em>.
</p>
<h3>The Verify (V) review level</h3>
<p>
The Verify level is limited to the Jenkins Gerrit user, which runs the automated tests that protect each cookbook repository&#8217;s master branch. These automated tests are known as <strong>gate tests</strong>.
</p>
<p>
When you push code to Gerrit, there are a set of automatic tests that are run against your code by <a href="https://jenkins.openstack.org/">Jenkins</a>. Jenkins is a continuous integration job system that the upstream OpenStack CI team has integrated into Gerrit so that projects managed by Gerrit may have a series of automated check jobs run against proposed patches to the project. Below, you can see that the Jenkins user in Gerrit has already executed two jobs &mdash; <strong><a href="https://jenkins.openstack.org/view/All/job/gate-cookbook-openstack-common-chef-lint/">gate-cookbook-openstack-common-chef-lint</a></strong> and <strong><a href="https://jenkins.openstack.org/view/All/job/gate-cookbook-openstack-common-chef-unit/">gate-cookbook-openstack-common-chef-unit</a></strong> &mdash; against the proposed code changes. The jobs (expectedly) both pass, as I haven&#8217;t actually changed anything in the code, only added a blank file and added a line to the README file.
</p>
<p><a href="http://www.joinfu.com/wp-content/uploads/2013/05/jenkins-jobs-29797.png"><img src="http://www.joinfu.com/wp-content/uploads/2013/05/jenkins-jobs-29797.png" alt="jenkins-jobs-29797" width="896" height="835" class="aligncenter size-full wp-image-428" /></a></p>
<p>
<em>Curious about how those gate jobs are set up</em>? Check out the <a href="https://github.com/openstack-infra/config">github.com openstack-infra/config project</a>. Hint: look at <a href="https://github.com/openstack-infra/config/blob/master/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml#L79">these</a> <a href="https://github.com/openstack-infra/config/blob/master/modules/openstack_project/files/jenkins_job_builder/config/chef-jobs.yaml">two</a> files.
</p>
<p>
If the Jenkins jobs fail, you will see Jenkins issue a <strong color="red">-1 </strong> in the V column in the patch review. Any -1 from Jenkins as a result of a failed gate test will prevent the patch from being merged into the target branch, regardless of the reviews of any human.
</p>
<h3>The Code-Review (R) review level</h3>
<p>
Anyone who is logged in to Gerrit can review any proposed patch in Gerrit. To log in to Gerrit, click the &#8220;Sign In&#8221; link in the top right corner and log in using the Launchpad Single-Signon service. <em>Note</em>: This requires you to have an account on Launchpad.
</p>
<p>
Once logged in, you will see a &#8220;Review&#8221; button on each patch in the patchset. You can see this Review button in the images above. If you were the one that pushed the commit, you will also see buttons for &#8220;Abandon&#8221;, &#8220;Work in Progress&#8221;, and &#8220;Rebase Change&#8221;. The &#8220;Abandon&#8221; button simply lets you mark the patchset as abandoned and gets the patch off of the review radar. &#8220;Work in Progress&#8221; lets you mark the patchset as not ready for reviews, and &#8220;Rebase Change&#8221; is generally best left alone unless you know what you&#8217;re doing. <img src='http://www.joinfu.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />
</p>
<p>
Each file (including the commit message itself) has a corresponding link that you can view the diff of that file and add inline comments similar to how GitHub pull requests allow inline commenting. Simply double click directly below the line you wish to comment on, and a box for your comments will appear, as shown below:
</p>
<p><a href="http://www.joinfu.com/wp-content/uploads/2013/05/inline-review-29797.png"><img src="http://www.joinfu.com/wp-content/uploads/2013/05/inline-review-29797.png" alt="inline-review-29797" width="897" height="448" class="aligncenter size-full wp-image-430" /></a></p>
<p>
<strong>IMPORTANT NOTE</strong>: Unlike GitHub inline commenting on pull requests, your inline comments on Gerrit reviews are NOT viewable by others until you finalize your review by clicking the &#8220;Review&#8221; button. Your comments will appear in red as &#8220;Draft&#8221; comments on the main page of the patch review, as shown below:
</p>
<p><a href="http://www.joinfu.com/wp-content/uploads/2013/05/inline-draft-29797.png"><img src="http://www.joinfu.com/wp-content/uploads/2013/05/inline-draft-29797.png" alt="inline-draft-29797" width="764" height="501" class="aligncenter size-full wp-image-429" /></a></p>
<p>
To put in a review for the patch, click the &#8220;Review&#8221; button. You will see options for:</p>
<ul>
<li><strong>+1 Looks good to me, but someone else must approve</strong></li>
<li><strong>+0 No score</strong></li>
<li><strong>-1 I would prefer you didn&#8217;t merge this</strong></li>
</ul>
<p>If you are a core reviewer, in addition to the above three options, you will also see:</p>
<ul>
<li><strong>+2 Looks good to me (core reviewer)</strong></li>
<li><strong>-2 Do Not Merge</strong></li>
</ul>
<p>
There is also a comment are for you to put your review comments, which is directly above an area that shows all the inline comments you have made:
</p>
<p><a href="http://www.joinfu.com/wp-content/uploads/2013/05/review-29797.png"><img src="http://www.joinfu.com/wp-content/uploads/2013/05/review-29797.png" alt="review-29797" width="475" height="561" class="aligncenter size-full wp-image-431" /></a></p>
<p>
After selecting the review +/- that matches your overall thoughts on the patch, and entering any comment, click the &#8220;Publish Comments&#8221; button, and your review will show in the comments of the patch, as shown below:
</p>
<p><a href="http://www.joinfu.com/wp-content/uploads/2013/05/reviewed-29797.png"><img src="http://www.joinfu.com/wp-content/uploads/2013/05/reviewed-29797.png" alt="reviewed-29797" width="723" height="621" class="aligncenter size-full wp-image-432" /></a></p>
<h3>The Approve (A) review level</h3>
<p>
Members of the core review team also see a separate area in the review screen for the Approve (A) review level. This level tells Gerrit to either proceed with the merge of the patch into the target branch (+1 Approve) or to wait (0 No Score).
</p>
<p>
The general rule of thumb is that core reviewers should not hit +1 Approve until 2 or more core reviewers (can include the individual doing the +1 Approve) have added a +2 (R) to the patch in reviews. This rule is subject to the discretion of the core reviewer for trivial changes like typo fixes, etc.
</p>
<h2>Summary</h2>
<p>
I hope this tutorial has been a help for those new to the Gerrit and Jenkins integration used by the OpenStack upstream projects. Contributing to the Chef OpenStack cookbooks should be no different than contributing to the upstream OpenStack projects now, and additional gate tests &mdash; including full integration test runs using Vagrant or even a multi-node deployment &mdash; are on our TODO radar. Please sign up on the <a href="https://groups.google.com/forum/?fromgroups=#!forum/opscode-chef-openstack">OpenStack Chef mailing list</a> if you haven&#8217;t already. We look forward to your contributions!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joinfu.com/2013/05/working-with-the-openstack-code-review-and-ci-system-chef-edition/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Upgrade to Xubuntu 12.04 &#8211; All Keyboard Shortcuts Don&#8217;t Work</title>
		<link>http://www.joinfu.com/2012/05/upgrade-to-xubuntu-12-04-all-keyboard-shortcuts-dont-work/</link>
		<comments>http://www.joinfu.com/2012/05/upgrade-to-xubuntu-12-04-all-keyboard-shortcuts-dont-work/#comments</comments>
		<pubDate>Wed, 16 May 2012 15:03:02 +0000</pubDate>
		<dc:creator>jaypipes</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[xubuntu]]></category>

		<guid isPermaLink="false">http://www.joinfu.com/?p=422</guid>
		<description><![CDATA[Seriously, Ubuntu, upgrading between versions has become just painful&#8230; I waited a few weeks before I upgraded from Xubuntu 11.10 to 12.04 because the upgrade last time completely hosed my system and left me with a borked X configuration. This time, I upgraded and now all my keyboard shortcuts don&#8217;t work. None of them. I [...]]]></description>
				<content:encoded><![CDATA[<p>Seriously, Ubuntu, upgrading between versions has become just painful&#8230; I waited a few weeks before I upgraded from Xubuntu 11.10 to 12.04 because the upgrade last time completely hosed my system and left me with a borked X configuration. This time, I upgraded and now all my keyboard shortcuts don&#8217;t work. None of them. I mean, they appear in my Keyboard Settings &#8211;> Application Shortcuts, but none of them work anymore. Seriously, WTF.</p>
<p><strong>UPDATE</strong>:</p>
<p>Turns out that the issue is that (for some stupid reason), XFCE changed the name of the &lt;Ctrl&gt; key to &#8220;Primary&#8221;, so you need to go to Accessories &#8211;> Settings Manager &#8211;> Keyboard &#8211;> Application Shortcuts and then remove all your custom shortcuts that show &lt;Control&gt; in them and re-add them. You&#8217;ll notice that when you press the Ctrl key, it will now show up as &lt;Primary&gt;. Completely retarded.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joinfu.com/2012/05/upgrade-to-xubuntu-12-04-all-keyboard-shortcuts-dont-work/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Ushering in the OpenStack Essex Release</title>
		<link>http://www.joinfu.com/2012/04/ushering-in-the-openstack-essex-release/</link>
		<comments>http://www.joinfu.com/2012/04/ushering-in-the-openstack-essex-release/#comments</comments>
		<pubDate>Fri, 06 Apr 2012 17:11:59 +0000</pubDate>
		<dc:creator>jaypipes</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[openstack]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.joinfu.com/?p=421</guid>
		<description><![CDATA[As some of you may have noticed, the OpenStack community published its latest six-month release, codenamed Essex, this week[1]. As shown in the release notes, there&#8217;s a massive amount of change that comes in this release. Some of that change is quite visible. For example, the dashboard project, code-named Horizon, was entirely overhauled and became [...]]]></description>
				<content:encoded><![CDATA[<p>
As some of you may have noticed, the <a href="http://www.openstack.org/projects/essex/" title="OpenStack Essex Release">OpenStack community published its latest six-month release</a>, codenamed Essex, this week<sup><a href="#footnote-1">[1]</a></sup>. As shown in the <a href="http://wiki.openstack.org/ReleaseNotes/Essex" title="openStack Essex Release Notes">release notes</a>, there&#8217;s a massive amount of change that comes in this release.
</p>
<p>
Some of that change is quite visible. For example, the dashboard project, code-named <a href="http://launchpad.net/horizon" title="Horizon - OpenStack Dashboard">Horizon</a>, was entirely overhauled and became a core OpenStack project in the Essex release cycle. The new Horizon is pretty stunning<sup><a href="#footnote-2">[2]</a></sup>, if I may say so myself. Other visible awesomeness comes from <a href="http://justwriteclick.com/" title="Anne Gentle">Anne Gentle</a> and the dozens of contributors who worked on the <a href="http://api.openstack.org" title="OpenStack API documentation">new API documentation site</a>. It&#8217;s an excellent, and well-needed, resource for the community of developers who want to build applications on OpenStack clouds.
</p>
<p>
Other innovations weren&#8217;t so visible, but were just as impactful. The <a href="http://launchpad.net/swift" title="Swift - OpenStack Object Storage">Swift</a> development team added the ability for objects to expire, the ability to post objects via HTML forms with the &#8220;tempurl&#8221; functionality, and integration with the authentication mechanism in the OpenStack Identity API 2.0.
</p>
<p>
Under <a href="http://openstackconference2011.sched.org/speaker/vishvanandaishaya" title="Vishvananda Ishaya">Vishvananda Ishaya</a>&#8216;s continued leadership, contributors to the OpenStack Compute project, code-named <a href="http://launchpad.net/nova" title="Nova - OpenStack Compute">Nova</a>, focused on a number of things in the past six months. Notably, on the feature front, floating IP pools and role-based access control were added. A variety of internal subsystems were dramatically refactored, including de-coupling the network service from Nova itself &mdash; something critical to scaling the network service with the Quantum and Melange incubated projects &mdash; as well as separating the volume endpoint into its own service. In addition, the remote procedure call subsystem was streamlined (again) and the way API extensions are handled in source code was cleaned up substantially. On the performance front, there were numerous bug fixes, but one that stands out is the overhaul of the metadata service that Vish completed. This one patch dramatically improves performance of the metadata service used by things like cloud-init when setting up new launched instances. You can see the entire list of 53 blueprints implemented and 765 bugs fixed in Nova in the Essex release <a href="https://launchpad.net/nova/essex/2012.1">here</a>. Pretty impressive.
</p>
<p>
Over in the OpenStack Image Service project, code-named <a href="http://launchpad.net/glance" title="Glance - OpenStack Image Service">Glance</a>, we focused on performance and stability in this cycle. With a fresh infusion of contributors like Reynolds Chin, Eoghan Glynn and Stuart McLaren, the Glance project made some dramatic improvements. Notably, Reynolds Chin added a visual progressbar to the Glance CLI tool when uploading images, Stuart McLaren submitted patches that enabled a significant improvement in throughput by starting the Glance API and registry services on multiple operating system processes. Eoghan Glynn fixed a massive amount of bugs and added new functionality revolving around external images and having Glance&#8217;s API server automatically copy an image from an external datastore. Brian Waldon, Glance&#8217;s new PTL (congrats, Sir Glancelot!), added RBAC support and did the heavy lifting of converting Glance&#8217;s image identifiers to a UUID format. Check <a href="https://launchpad.net/glance/essex/2012.1">here</a> for the complete list of 11 blueprints implemented and 185 bugs fixed in Glance in the Essex cycle.
</p>
<p>
The Keystone codebase was entirely rewritten, causing some late cycle turmoil, but the team of contributors working on Keystone is dedicated to improving its stability and functionality in the Folsom release series. The new Keystone design should enable better extensibility and I&#8217;m confident the new PTL, Joe Heck, will work actively with contributing organizations to see Keystone make terrific improvements in coming months.
</p>
<p>
I&#8217;m sure there&#8217;s lots of names and stuff I&#8217;ve neglected to mention and I&#8217;ll apologize for that now! <img src='http://www.joinfu.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Here&#8217;s to a great <a href="http://openstack.org/conference/san-francisco-2012/" title="Folsom Design Summit">design summit</a> a week from now and a productive and cooperative Folsom release series. Thank you to all the OpenStack contributors. <strong>You are what makes OpenStack so special</strong>.</p>
<p>
<sup id="footnote-1">[1]</sup> In the OpenStack community &mdash; as in the Ubuntu community &mdash; we publish major releases every six months. We don&#8217;t hold up releases for a specific feature; if the feature isn&#8217;t completed, it simply goes into the next release when it is code-complete. In my opinion, this is one of the strengths of the OpenStack release model: it is predictable.
</p>
<p>
<sup id="footnote-2">[2]</sup> What&#8217;s more, we can&#8217;t wait to introduce the goodness of the Horizon Essex dashboard into <a href="http://trystack.org" title="TryStack">TryStack</a>. We aim to get this done before the summit, but more on that in a later blog post.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joinfu.com/2012/04/ushering-in-the-openstack-essex-release/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>OpenStack L.A. Meetup &#8211; The TryStack Slides</title>
		<link>http://www.joinfu.com/2012/03/openstack-l-a-meetup-the-trystack-slides/</link>
		<comments>http://www.joinfu.com/2012/03/openstack-l-a-meetup-the-trystack-slides/#comments</comments>
		<pubDate>Fri, 30 Mar 2012 17:15:31 +0000</pubDate>
		<dc:creator>jaypipes</dc:creator>
				<category><![CDATA[All]]></category>

		<guid isPermaLink="false">http://www.joinfu.com/?p=413</guid>
		<description><![CDATA[Had a blast with the gang from Dreamhost last night at the inaugural OpenStack Meetup in Los Angeles. Thanks to all who attended and asked some great questions Here is a link to the presentation I gave on TryStack after Vishy gave his Biased History of OpenStack presentation (always a good time!). I&#8217;ll update the [...]]]></description>
				<content:encoded><![CDATA[<p>
Had a blast with the gang from Dreamhost last night at the inaugural <a href="http://www.meetup.com/OpenStack-LA/" title="OpenStack LA Meetup">OpenStack Meetup in Los Angeles</a>. Thanks to all who attended and asked some great questions <img src='http://www.joinfu.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />
</p>
<p>
Here is a link to <a href="http://bit.ly/trystack-sandbox-for-openstack" title="Presentation: TryStack - A Sandbox for OpenStack">the presentation I gave on TryStack</a> after Vishy gave his Biased History of OpenStack presentation (always a good time!). I&#8217;ll update the slides as things change with <a href="http://trystack.org" title="TryStack - A Sandbox for OpenStack">TryStack</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joinfu.com/2012/03/openstack-l-a-meetup-the-trystack-slides/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Testing Essex RC1 with Devstack and Tempest</title>
		<link>http://www.joinfu.com/2012/03/testing-essex-rc1-with-devstack-and-tempest/</link>
		<comments>http://www.joinfu.com/2012/03/testing-essex-rc1-with-devstack-and-tempest/#comments</comments>
		<pubDate>Tue, 27 Mar 2012 00:36:24 +0000</pubDate>
		<dc:creator>jaypipes</dc:creator>
				<category><![CDATA[openstack]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://www.joinfu.com/?p=406</guid>
		<description><![CDATA[This past week, the first release candidates of a number of OpenStack projects was released. From this point until the OpenStack Design Summit, we are pretty much focused on testing the release candidates. One way you can help out is to test the release candidate code, and this article will walk you through doing that [...]]]></description>
				<content:encoded><![CDATA[<p>
This past week, <a href="https://lists.launchpad.net/openstack/msg08855.html" title="Nova Essex RC1">the</a> <a href="https://lists.launchpad.net/openstack/msg09072.html" title="Keystone Essex RC1">first</a> <a href="https://lists.launchpad.net/openstack/msg08907.html" title="Glance Essex RC1">release</a> <a href="https://lists.launchpad.net/openstack/msg08872.html" title="Horizon Essex RC1">candidates</a> of a number of OpenStack projects was released. From this point until the <a href="http://openstack.org/conference/san-francisco-2012/">OpenStack Design Summit</a>, we are pretty much focused on testing the release candidates. One way you can help out is to test the release candidate code, and this article will walk you through doing that with the Devstack and Tempest projects.
</p>
<h2>Setting up an OpenStack Essex RC1 Environment with Devstack</h2>
<p>
Before you test, you need an OpenStack environment. The easiest way to get an OpenStack environment up and running on a single machine <sup><a href="#foot1">[1]</a></sup> is to use <a href="http://devstack.org" title="Devstack">Devstack</a>. To get a version of Devstack that is designed to run against the release candidate branches of the OpenStack projects, simply clone the main repo of Devstack, like so:
</p>
<pre>
git clone git://github.com/openstack-dev/devstack
</pre>
<h3>Setting Up Your Devstack <code>stackrc</code> to pull RC1 branches of OpenStack Projects</h3>
<p>
Devstack contains a file called <code>stackrc</code> that is sourced by the main <code>stack.sh</code> script to create your OpenStack environment. The <code>stackrc</code> file contains environment variables that tell <code>stack.sh</code> which repositories and branches of OpenStack projects to clone. We will need to change the branches in the stackrc file from master to milestone-proposed to grab the release candidate branches. You will want to change the target branches for Nova, Glance, Keystone, and their respective client libraries. Here is what the default stackrc will look like:
</p>
<div id="attachment_410" class="wp-caption aligncenter" style="width: 620px"><a href="http://www.joinfu.com/wp-content/uploads/2012/03/stackrc.png"><img src="http://www.joinfu.com/wp-content/uploads/2012/03/stackrc.png" alt="" title="stackrc" width="610" height="598" class="size-full wp-image-410" /></a><p class="wp-caption-text">stackrc before...</p></div>
<p>
And here is what it should look like after you change the master branches to milestone-proposed branches appropriately:
</p>
<div id="attachment_411" class="wp-caption aligncenter" style="width: 594px"><a href="http://www.joinfu.com/wp-content/uploads/2012/03/stackrc-after.png"><img src="http://www.joinfu.com/wp-content/uploads/2012/03/stackrc-after.png" alt="" title="stackrc-after" width="584" height="594" class="size-full wp-image-411" /></a><p class="wp-caption-text">stackrc after...</p></div>
<h3>Setting Up Your Devstack <code>localrc</code> for Running Tempest</h3>
<p>
There are a couple things you will want to put into your Devstack&#8217;s localrc file before actually creating your OpenStack environment for testing with Tempest. So, open up your editor of choice and make sure that you have at least the following in your <code>localrc</code> file in Devstack&#8217;s root source directory. (If the file does not exist, simply create it)
</p>
<pre>
API_RATE_LIMIT=False
MYSQL_PASSWORD=pass
RABBIT_PASSWORD=pass
SERVICE_PASSWORD=pass
ADMIN_PASSWORD=pass
SERVICE_TOKEN=servicetoken
</pre>
<p>
The first line instructs devstack to disable the default ratelimit middleware in the Nova API server. We need to do this because Tempest issues hundreds of API requests in a short amount of time as it runs its tests. If we don&#8217;t do this, Tempest will take a much longer time to run and you will likely get test failures with a bunch of overLimitFault messages.
</p>
<p>
The other lines simply set the various passwords to an easy-to-remember password &#8220;pass&#8221; for testing. And the final line is needed currently to set up some services but should be deprecated fairly soon&#8230;
</p>
<h3>Installing the OpenStack RC1 Environment</h3>
<p>
Now that you&#8217;ve got your devstack scripts cloned and your <code>localrc</code> installed, it&#8217;s time to run the main <code>stack.sh</code> script that will install OpenStack on your test machine. It&#8217;s as easy as running the <code>stack.sh</code> script. After running &#038;mdash and be patient, on a first run the script can take ten or more minutes to complete &mdash; you will see a bunch of output and then something like this:
</p>
<pre>
$> ./stack.sh
&lt;snip lots and lots of output...&gt;
The default users are: admin and demo
The password: pass
This is your host ip: 192.168.1.98
stack.sh completed in 517 seconds.
</pre>
<p>
At this point, feel free to run the <code>info.sh</code> script to verify all went well:
</p>
<pre>
jpipes@librebox:~/repos/devstack$ ./tools/info.sh 
git|glance|milestone-proposed[f4a7035]
git|horizon|milestone-proposed[97fc4f8]
git|keystone|milestone-proposed[f3ce326]
git|nova|milestone-proposed[4e02ba1]
git|noVNC|master[22b9a75]
git|python-keystoneclient|milestone-proposed[bf13df1]
git|python-novaclient|milestone-proposed[aa0e87f]
os|vendor=Ubuntu
os|release=11.10
pkg|pep8|0.6.1-2ubuntu1
pkg|pylint|0.23.0-1
pkg|python-pip|1.0-1
&lt;snip a whole bunch of package versions...&gt;
pip|pika|0.9.5
localrc|API_RATE_LIMIT=False
localrc|HOST_IP=192.168.1.98
localrc|SERVICE_TOKEN=servicetoken
</pre>
<p>
At this point, you have a fully functioning OpenStack RC1 environment. You can do the following to check into the logs (actually just the daemon output in a screen window):
</p>
<pre>
$> screen -x
</pre>
<p>
Switch screen windows using the <code>&lt;Ctrl&gt;-a NUM</code> key combination, where <code>NUM</code> is the number of the screen window you see at the bottom of your console. Type <code>&lt;Ctrl&gt;-a d</code> to detach from your screen session. The screenshot below shows what your screen session may look like. In the screenshot, I&#8217;ve hit <code>&lt;Ctrl&gt;-a 4</code> to switch to the <code>n-api</code> screen window which is showing the Nova API server daemon output.
</p>
<div id="attachment_412" class="wp-caption aligncenter" style="width: 808px"><a href="http://www.joinfu.com/wp-content/uploads/2012/03/screen.png"><img src="http://www.joinfu.com/wp-content/uploads/2012/03/screen.png" alt="" title="screen" width="798" height="439" class="size-full wp-image-412" /></a><p class="wp-caption-text">screen session showing the Nova API server window...</p></div>
<h2>Testing the OpenStack Essex RC1 Environment with Tempest</h2>
<p>
The <a href="http://launchpad.net/tempest" title="Tempest - Integration Test Suite for OpenStack">Tempest</a> project is an integration test suite for the OpenStack projects. Personally, in my testing setup at home, I run Tempest from a different machine on my local network than the machine that I run devstack on. However, you are free to run Tempest on the same machine you just installed Devstack on.</p>
<p>
Grab Tempest by cloning the canonical repo:
</p>
<pre>
$> git clone git://github.com/openstack/tempest
</pre>
<p>
Once cloned, change directory into tempest.
</p>
<h3>Creating Your Tempest Configuration File</h3>
<p>
Tempest needs some information about your OpenStack environment to run properly. Because Tempest executes a series of API commands against the OpenStack environment, it needs to know where to find the main Compute API endpoint or where it can find the Keystone server that can return a service catalog. In addition, Tempest needs to know the UUID of the base image(s) that Devstack downloaded and installed in the Glance server.
</p>
<p>
Create the tempest configuration file by copying the sample config file included in Tempest <code>$tempest_dir/etc/tempest.conf.sample</code>.
</p>
<pre>
$> cp etc/tempest.conf.sample etc/tempest.conf
</pre>
<p>
Next, you will want to query the Glance API server to get the UUID of the base AMI image used in testing. To do this, issue a call like so:
</p>
<pre>
jpipes@uberbox:~/repos/tempest$ glance -I admin -K pass -T admin -N http://192.168.1.98:5000/v2.0 -S keystone index | grep ami | cut -f1 | awk '{print $1}'
99a48bc4-d356-4b4d-95d4-650f707699c2
</pre>
<p>
Of course, you will want to replace the appropriate parts of the call above with your own environment. In my case above, my devstack environment is running on a host 192.168.1.98 and I&#8217;m accessing Glance with an &#8220;admin&#8221; user in an &#8220;admin&#8221; tenant with a password of &#8220;pass&#8221;. Copy the UUID identifier of the image that is returned from the command above (in my case, that UUID is <em>99a48bc4-d356-4b4d-95d4-650f707699c2</em>).
</p>
<p>
Now go ahead and open up the configuration file you just created by copying the <code>tempest.conf.sample</code> file. You will see something like this:
</p>
<pre>
[identity]
use_ssl=False
host=127.0.0.1
port=5000
api_version=v2.0
path=tokens
user=admin
password=admin-password
tenant_name=admin-project
strategy=keystone

[compute]
# Reference data for tests. The ref and ref_alt should be
# distinct images/flavors.
image_ref=e7ddc02e-92fa-4f82-b36f-59b39bf66a67
image_ref_alt=346f4039-a81e-44e0-9223-4a3d13c92a07
flavor_ref=1
flavor_ref_alt=2
ssh_timeout=300
build_interval=10
build_timeout=600
catalog_type=compute
create_image_enabled=true
resize_available=true

[image]
username=admin
password=********
tenant=admin
auth_url=http://localhost:5000/v2.0
</pre>
<p>
You will want to replace the various configuration option values with ones that correspond to your environment. For the image_ref and image_ref_alt values in the [compute] scetion of the config file, use the UUID you copied from above.
</p>
<p>
Here is what my fully-replaced config file looks like. Keep in mind, my Devstack environment is running on 192.168.1.98. I&#8217;ve highlighted the values different from the sample config&#8230;
</p>
<pre>
[identity]
use_ssl=False
host=<strong>192.168.1.98</strong>
port=5000
api_version=v2.0
path=tokens
user=<strong>demo</strong>
password=<strong>pass</strong>
tenant_name=<strong>demo</strong>
strategy=keystone

[compute]
# Reference data for tests. The ref and ref_alt should be
# distinct images/flavors.
image_ref=<strong>99a48bc4-d356-4b4d-95d4-650f707699c2</strong>
image_ref_alt=<strong>99a48bc4-d356-4b4d-95d4-650f707699c2</strong>
flavor_ref=1
flavor_ref_alt=2
ssh_timeout=300
build_interval=10
build_timeout=600
catalog_type=compute
create_image_enabled=true
resize_available=true

[image]
username = <strong>demo</strong>
password = <strong>pass</strong>
tenant= <strong>demo</strong>
auth_url=<strong>http://192.168.1.98:5000/v2.0</strong>
</pre>
<h3>Fire Away</h3>
<p>
The only thing left to do is fire Tempest at your OpenStack environment. Below, I&#8217;m executing Tempest in verbose mode. <a href="http://readthedocs.org/docs/nose/en/latest/" title="nosetests">Nosetests</a> is our standard test runner.</p>
<p><pre>
jpipes@uberbox:~/repos/tempest$ nosetests -v tempest
All public and private addresses for ... ok
Providing a network type should filter ... ok
&lt;snip a <strong><em>whole</em></strong> bunch of tests&gt;
An access IPv6 address must match a valid address pattern ... ok
Use an unencoded file when creating a server with personality ... ok
Create a server with name parameter empty ... ok

----------------------------------------------------------------------
Ran 131 tests in 798.125s

OK (SKIP=5)
</pre>
<p>
After you&#8217;re done running Tempest &mdash; and hopefully everything runs OK &mdash; feel free to hit your Devstack Horizon dashboard and log in as your demo user. Unless you made some changes when installing Devstack above, your Horizon dashboard will be available at <code>http://$DEVSTACK_HOST_IP</code>.
</p>
<p>
If you encounter any test failures or issues, please be sure to log bugs for the appropriate project!
</p>
<h2>Known Issues</h2>
<p>
You can try running Tempest with the <code>--processes=N</code> option which uses the <a href="http://readthedocs.org/docs/nose/en/latest/plugins/multiprocess.html" title="Nosetests Multiprocessing plugin">nosetest multiprocessing plugin</a>. You might get a successful test run &#8230; but probably not <img src='http://www.joinfu.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />
</p>
<p>
Likely, you will hit two issues: the first is that you will likely hit the quote limits for your demo user because multiple processes will be creating instances and volumes. You can remedy this by altering the quotas for the tenant you are running the compute tests with.
</p>
<p>
Secondly, you may run into error output that looks like this:
</p>
<pre>
======================================================================
ERROR: An image for the provided server should be created
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jpipes/repos/tempest/tempest/tests/test_images.py", line 38, in test_create_delete_image
    self.servers_client.wait_for_server_status(server['id'], 'ACTIVE')
  File "/home/jpipes/repos/tempest/tempest/services/nova/json/servers_client.py", line 147, in wait_for_server_status
    raise exceptions.BuildErrorException(server_id=server_id)
BuildErrorException: Server 2e0b78fc-cc98-485b-8471-753778bee472 failed to build and is in ERROR status
</pre>
<p>
And in your nova-compute log (or screen output) you might notice something like this:
</p>
<pre>
libvirtError: operation failed: cannot restore domain 'instance-0000001f' uuid 2453b24b-87e1-4f85-9c25-ce3706a8c1d1 from a file which belongs to domain 'instance-0000001f' uuid deb8e941-4693-4768-90cc-03ad98444c85
</pre>
<p>
I&#8217;ve not quite gotten to the bottom of this, but there seems to be a race condition that gets triggered in the Compute API when a similar request is received nearly simulataneously. I can reliably reproduce the above error by simply adding <code>--processes=2</code> to my invocation of Tempest. I believe there is an issue with the seeding of identifiers, but it&#8217;s just a guess. I still have to figure it out. But in the meantime, be aware of the issue.
</p>
<p><sup id="foot1">1.</sup> You can certainly use devstack to install a multi-node OpenStack environment, but this tutorial sticks to a single-node environment for simplicity reasons.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joinfu.com/2012/03/testing-essex-rc1-with-devstack-and-tempest/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>TryStack.org &#8211; A Sandbox for OpenStack!</title>
		<link>http://www.joinfu.com/2012/02/trystack-org-a-sandbox-for-openstack/</link>
		<comments>http://www.joinfu.com/2012/02/trystack-org-a-sandbox-for-openstack/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 15:34:44 +0000</pubDate>
		<dc:creator>jaypipes</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[openstack]]></category>
		<category><![CDATA[TryStack]]></category>

		<guid isPermaLink="false">http://www.joinfu.com/?p=402</guid>
		<description><![CDATA[Today, a project that has been a long time in the making is finally coming to fruition. Back last summer, when I was working at Rackspace, Nati Ueno from NTT PF Labs came up with the idea of establishing a &#8220;Free Cloud&#8221; &#8212; a site running OpenStack that developers using the OpenStack APIs could use [...]]]></description>
				<content:encoded><![CDATA[<p>
Today, a project that has been a long time in the making is finally coming to fruition. Back last summer, when I was working at Rackspace, <a href="http://www.linkedin.com/pub/nachi-ueno/21/139/86a" title="Nati Ueno">Nati Ueno</a> from <a href="http://www.ntt.co.jp/islab/e/org/pf.html" title="NTT PF Labs">NTT PF Labs</a> came up with the idea of establishing a &#8220;Free Cloud&#8221; &mdash; a site running OpenStack that developers using the OpenStack APIs could use to test their software.
</p>
<p>
The involvement of a number of companies &#8212; <a href="http://dell.com/openstack" title="Dell - OpenStack">Dell</a>, <a href="http://www.ntt.co.jp/islab/e/org/pf.html">NTT PF Labs</a>, <a href="http://rackspacecloud.com" title="Rackspace Cloud">Rackspace</a>, <a href="http://cisco.com" title="Cisco">Cisco</a>, <a href="http://equinix.com" title="Equinix">Equinix</a> and <a href="http://hpcloud.com" title="HP Cloud Services">HP Cloud Services</a> &#8212; eventually drove the idea of &#8220;The Free Cloud&#8221; from concept to reality. Though there were many delays, I&#8217;m happy to announce that this new OpenStack testing sandbox has now been launched.
</p>
<p>
The new name of the artist formerly known as The Free Cloud is now called <a href="http://trystack.org" title="OpenStack Sandbox">TryStack</a>. The front page at http://trystack.org now houses some information about the effort and a few FAQs. If you&#8217;re interested in trying out OpenStack, TryStack.org is right up your alley, and we encourage you to sign up. Instructions for signup are on the front page.</p>
<div style="margin: 20px"><a href="http://www.joinfu.com/wp-content/uploads/2012/02/trystack_front.png"><img src="http://www.joinfu.com/wp-content/uploads/2012/02/trystack_front.png" alt="" width="546" height="164" class="aligncenter size-full wp-image-403" /></a></div>
<p><h2>Using TryStack</h2>
<p>
Once you&#8217;ve gone through the TryStack registration process, you will receive a username and password for logging in to the TryStack Dashboard and Nova API. After logging in, you&#8217;ll see the user dashboard for TryStack. This dashboard is essentially the stock upstream OpenStack Dashboard &#8212; only lightly modified with a couple extensions that Nati wrote to show consumption of Stack Dollars and the TryStack logo.
</p>
<p>
Stack Dollars are the &#8220;unit of currency&#8221; for TryStack. When you perform certain actions in TryStack &mdash; launching instances, creating volumes, etc &mdash; you consume Stack Dollars. Likewise, instances consume Stack Dollars as long as they are running. When you run out of Stack Dollars, you won&#8217;t be able to use TryStack services until your Stack Dollars are replenished. Stack Dollars will be replenished on a periodic basis (haven&#8217;t quite decided on the interval yet&#8230;)
</p>
<p>
To prevent people from gaming the system or using TryStack as a tool for evil, instances will remain alive for up to 24 hours or until your Stack Dollar balance is depleted. Also, always keep in mind that <strong>TryStack should only be used for testing. Under no circumstances should you use it for any production uses. There is no service level agreement with TryStack.</strong>
</p>
<h2>An Automation and Administration Sandbox Too!</h2>
<p>
In addition to being a useful sandbox for developers using the OpenStack APIs and others interested in seeing what OpenStack is all about, TryStack.org is also a very useful testbed for work that the OpenStack community is doing to automate the deployment and administration OpenStack environments.
</p>
<p>
TryStack is deployed using the Chef Cookbooks from the upstream repository, and changes that are needed will be pushed back upstream immediately for consumption by the broad community. We have a limited HA setup for the initial TryStack availability zone and lessons learned from the deployment of these HA setups are being incorporated into an online TryStack Administrator&#8217;s Guide that will serve as input for the upstream documentation teams as well.
</p>
<h2>Roadmap for TryStack</h2>
<p>
In the next three to six months, we&#8217;re planning to bring on-line at least one more availability zone. The next availability zone will be running HP hardware and will be housed in a datacenter in Las Vegas. It is likely that this new zone will be deployed with the Essex release of OpenStack components, enabling users to test against both a Diablo-based OpenStack installation and an Essex-based installation.
</p>
<p>
This first availability zone does not contain an installation of Swift. Of course, we want to change that, so an installation of Swift is definitely on the roadmap for either the next availability zone or as a separate service itself. Note that, just like the instances launched in TryStack, objects stored in a TryStack Swift cluster would be temporary. After all, TryStack is for trying out OpenStack services, not for providing a free CDN or storage system! <img src='http://www.joinfu.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>
We will also eventually move towards a different registration process to accomodate non-Facebook users. If you are interested in helping with this effort, please do let us know.
</p>
<p>
Finally, we&#8217;ll be adding things like an automated Twitter status feed for each zone, lots of documentation gathered from running TryStack, and hopefully a number of videos showing usage of TryStack as well as common administrative tasks &mdash; all with the goal of providing more and better information to the broad and growing OpenStack community. I fully expect numerous hiccups and growing pains in these first couple months of operation, but we promise to turn any pain points into lessons learned and document them for the benefit of the OpenStack community.
</p>
<p>
Please do check out the trystack.org service. We look forward to your feedback. You can find us on Freenode.net #trystack. Nati and I will be hosting a <a href="http://www.meetup.com/openstack/events/52464312/" title="TryStack Webinar">webinar</a> February 23, and we&#8217;ll be speaking at a San Francisco <a href="http://www.meetup.com/openstack/events/52464312/" title="TryStack/OpenStack meetup">meetup</a> March 6 if you&#8217;re interested in learning more or getting involved.
</p>
<p>
<strong>Update:</strong> I totally goofed and left Cisco off the list of donor organizations. My apologies to Mark Voelker and the excellent folks at Cisco who provided two 4948-10GE switches that are in use in the TryStack cloud. I also got the link wrong to HP Cloud&#8230; which is pretty lame, considering I work for HP. <img src='http://www.joinfu.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  That&#8217;s been corrected.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joinfu.com/2012/02/trystack-org-a-sandbox-for-openstack/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.483 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2013-06-20 01:25:49 -->
