<?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>Wallaby updates</title>
	<atom:link href="http://getwallaby.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://getwallaby.com</link>
	<description>News and information about the Wallaby project</description>
	<lastBuildDate>Sat, 12 Nov 2011 16:14:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Exporting versioned configurations</title>
		<link>http://getwallaby.com/2011/exporting-versioned-configurations/</link>
		<comments>http://getwallaby.com/2011/exporting-versioned-configurations/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 22:24:33 +0000</pubDate>
		<dc:creator>William Benton</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[wallaby]]></category>

		<guid isPermaLink="false">http://getwallaby.com/?p=22</guid>
		<description><![CDATA[Wallaby stores versioned configurations in a database. Wallaby API clients can access older versions of a node&#8217;s configuration by supplying the version option to the Node#getConfig method. Sometimes, though, we&#8217;d like to inspect individual configurations in greater detail than the API currently allows. The Wallaby git repository now contains a command to export versioned configurations [...]]]></description>
			<content:encoded><![CDATA[<p>Wallaby stores versioned configurations in a database.  <a href="http://getwallaby.com/the-wallaby-api/">Wallaby API</a> clients can access older versions of a node&#8217;s configuration by supplying the <code>version</code> option to the <code>Node#getConfig</code> method.  Sometimes, though, we&#8217;d like to inspect individual configurations in greater detail than the API currently allows.</p>
<p>The <a href="http://git.fedorahosted.org/git/?p=grid/wallaby.git">Wallaby git repository</a> now contains a <a href="http://git.fedorahosted.org/git/?p=grid/wallaby.git;a=blob;f=lib/mrg/grid/config/shell/cmd_versioned_config_export.rb;hb=HEAD">command</a> to export versioned configurations from a database to flat text files.  Clone the repository or just download the file and then place <code>cmd_versioned_config_export.rb</code> somewhere in your <code>WALLABY_SHELL_COMMAND_PATH</code>, and you&#8217;ll be able to invoke it like this:</p>
<pre><code>Usage:  wallaby vc-export DBFILE
exports versioned configurations from DBFILE to plain text files
    -h, --help                       displays this message
        --verbose                    outputs information about command progress
    -o, --output-dir DIR             set output directory to DIR
        --earliest NUM               output only the earliest NUM configurations
        --latest NUM                 output only the most recent NUM configurations
        --since DATE                 output only configurations since the given date
</code></pre>
<p>It will create a directory (called <code>snapshots</code> by default) with subdirectories for each versioned configuration; each of these will be timestamped with the time of the configuration.  Within each version directory, there will be directories for node configurations and stored group configurations.  (If you&#8217;re using an older version of Wallaby, the only stored group configuration will be for the default group.  Versioned configurations generated with a fairly recent version of Wallaby, on the other hand, will have stored configurations for more groups and should also have useful information about node memberships in the configuration file.)</p>
<p><code>wallaby vc-export</code> allows you both to back up versioned configurations and simply to inspect them.  Let us know if you find a new application for it, or if you find it useful in other ways!</p>
]]></content:encoded>
			<wfw:commentRss>http://getwallaby.com/2011/exporting-versioned-configurations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wallaby paper at SC11</title>
		<link>http://getwallaby.com/2011/wallaby-paper-at-sc11/</link>
		<comments>http://getwallaby.com/2011/wallaby-paper-at-sc11/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 17:07:30 +0000</pubDate>
		<dc:creator>William Benton</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://getwallaby.com/2011/wallaby-paper-at-sc11/</guid>
		<description><![CDATA[I&#8217;m pleased to announce that our paper &#8220;Wallaby: A Scalable Semantic Configuration Service for Grids and Clouds&#8221; will be presented at SC11 in the &#8220;State of the Practice&#8221; track on Clouds and Grids. If you&#8217;re going to be at SC, I hope we&#8217;ll be able to chat about Wallaby! (Cross-posted from Chapeau.)]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m pleased to announce that our paper &#8220;<a href="http://web.willbenton.com/research/sc11">Wallaby: A Scalable Semantic Configuration Service for Grids and Clouds</a>&#8221; will be <a href="http://sc11.supercomputing.org/schedule/event_detail.php?evid=sprac111">presented at SC11 in the &#8220;State of the Practice&#8221; track on Clouds and Grids</a>.  If you&#8217;re going to be at SC, I hope we&#8217;ll be able to chat about Wallaby!</p>
<p>(Cross-posted from <a href="http://chapeau.freevariable.com/">Chapeau</a>.)</p>
]]></content:encoded>
			<wfw:commentRss>http://getwallaby.com/2011/wallaby-paper-at-sc11/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Node tagging in a Wallaby client library</title>
		<link>http://getwallaby.com/2011/node-tagging-in-a-wallaby-client-library/</link>
		<comments>http://getwallaby.com/2011/node-tagging-in-a-wallaby-client-library/#comments</comments>
		<pubDate>Mon, 20 Jun 2011 16:11:01 +0000</pubDate>
		<dc:creator>William Benton</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://getwallaby.com/2011/node-tagging-in-a-wallaby-client-library/</guid>
		<description><![CDATA[In an earlier post, I presented a technique for adding node tagging to Wallaby without adding explicit tagging support to the Wallaby API. Node tags are useful for a variety of reasons: they can correspond to informal user-supplied classifications of nodes or machine-generated system attributes (e.g. &#8220;64-bit&#8221;, &#8220;high-memory&#8221;, &#8220;infiniband&#8221;). Since we implemented tags as special [...]]]></description>
			<content:encoded><![CDATA[<p>In an <a href="http://getwallaby.com/2011/using-wallaby-groups-to-implement-node-tagging/">earlier post</a>, I presented a technique for adding <em>node tagging</em> to Wallaby without adding explicit tagging support to the Wallaby API.  Node tags are useful for a variety of reasons:  they can correspond to informal user-supplied classifications of nodes or machine-generated system attributes (e.g. &#8220;64-bit&#8221;, &#8220;high-memory&#8221;, &#8220;infiniband&#8221;).  Since we implemented tags as special Wallaby groups, they may contain configuration information (although they don&#8217;t need to) and will be advertised as one of the machine&#8217;s Condor attributes.</p>
<p>The Wallaby source repository now includes a <a href="http://git.fedorahosted.org/git/?p=grid/wallaby.git;a=blob;f=extensions/tagging.py;hb=HEAD">small Python module</a> that patches the <a href="http://chapeau.freevariable.com/2010/12/extending-wallaby-with-a-python-client-library.html">Wallaby python client library</a> with idiomatic tagging support:  namely, you can ask the store for the name of the group that represents the partition between tags and groups, and you can call <tt>getTags()</tt> and <tt>modifyTags()</tt> methods on <tt>Node</tt> objects, as well as inspect the tags property of a <tt>Node</tt>.  This will appear in Wallaby packages in the future, but you don&#8217;t have to be that adventurous to try it out now!  To use it, clone the repository and put <tt>extensions/tagging.py</tt> and <tt>schema/wallaby.py</tt> somewhere in your <tt>PYTHONPATH</tt>.  Then follow along with this transcript:</p>
<p><script src="https://gist.github.com/1035680.js?file=gistfile1.py"></script><noscript>Visit this post in a browser with JavaScript support (not a feed reader) to see the embedded transcript.</noscript></p>
<p>I appreciate any feedback or comments on this library.</p>
<p>(Cross-posted from <a href="http://chapeau.freevariable.com/">Chapeau</a>.)</p>
]]></content:encoded>
			<wfw:commentRss>http://getwallaby.com/2011/node-tagging-in-a-wallaby-client-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Wallaby groups to implement node tagging</title>
		<link>http://getwallaby.com/2011/using-wallaby-groups-to-implement-node-tagging/</link>
		<comments>http://getwallaby.com/2011/using-wallaby-groups-to-implement-node-tagging/#comments</comments>
		<pubDate>Wed, 25 May 2011 15:03:01 +0000</pubDate>
		<dc:creator>William Benton</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://getwallaby.com/2011/using-wallaby-groups-to-implement-node-tagging/</guid>
		<description><![CDATA[One of the great things about Wallaby is that it&#8217;s a platform, not merely a tool. Put another way, if it doesn&#8217;t do exactly what you want, you can use its API to build tools that benefit from configuration validation and deployment. We&#8217;ve talked in the past about a number of useful tools built on [...]]]></description>
			<content:encoded><![CDATA[<p>One of the great things about Wallaby is that it&#8217;s a platform, not merely a tool.  Put another way, if it doesn&#8217;t do exactly what you want, you can use its <a href="http://getwallaby.com/the-wallaby-api/">API</a> to build tools that benefit from configuration validation and deployment.  We&#8217;ve talked in the past about a <a href="http://chapeau.freevariable.com/2010/09/migrating-legacy-condor-configurations-to-wallaby.html">number</a> of <a href="http://chapeau.freevariable.com/2010/10/wallaby-node-inventory-with-constraints.html">useful</a> <a href="http://chapeau.freevariable.com/2010/10/retrieving-wallaby-node-configurations-over-http.html">tools</a> built on the Wallaby API.  (Another cool Wallaby API client that I hope to talk about more in the future is <a href="https://github.com/erikerlandson/">Erik Erlandson</a>&#8216;s <a href="http://git.fedorahosted.org/git/?p=grid/albatross.git">Albatross</a> project, which programmatically generates and changes pool configurations in order to test Condor scale and functionality.)</p>
<p>The Wallaby API is designed to be sufficiently general to allow developers to do just about anything with configuration data, not to unnecessarily restrict users to a few use cases that we thought of.  Because of this generality, some tasks might require adopting application-level conventions.  In this article, we&#8217;ll cover one such convention and see how the Wallaby API is flexible enough to handle an interesting use case &mdash; namely, tagging nodes with various keywords, perhaps as supplied by a user or generated by an agent like <a href="http://qpidcomponents.org/download.html">sesame</a> or <a href="https://github.com/matahari/matahari/wiki">matahari</a>.</p>
<p>First, though, we&#8217;ll review how configurations are generated and applied to nodes.  Recall that a <em>node</em> is a member of several <em>groups</em>.  These memberships are ordered:  a node&#8217;s lowest-priority membership is always in the special <em>default group</em> (which includes every node), and its highest-priority membership is always in a special, node-specific <em>identity group</em> (which only includes a single node).  Zero or more memberships in <em>explicit groups</em> may occupy the priority space between the default group and a node&#8217;s identity group.  In the illustration below, <code>node.local</code> is a member of two explicit groups, which have blue backgrounds:  &#8220;EC2 submit nodes,&#8221; and &#8220;Execute nodes.&#8221;</p>
<p><img src="http://chapeau.freevariable.com//wallaby-groups-simple.png" alt="Wallaby groups simple" title="wallaby-groups-simple.png" border="0" width="487" height="175" /></p>
<p>When Wallaby calculates the configuration for <code>node.local.</code>, it will begin with a copy of the default group&#8217;s configuration.  It will then repeatedly apply the configurations for the explicit groups and identity group in order of increasing priority, so that parameter-value mappings from higher-priority groups take precedence over lower-priority ones (and thus either replace these or are appended to them, depending on the mapping kind).  The <code>condor_configd</code>, which takes a node&#8217;s configuration from Wallaby and installs it on a node, will also cause the Wallaby groups a node is a member of (as well as the Wallaby features it has installed) to be advertised for use in Condor matchmaking.  So a Condor job could specify that it wanted to match against a node that was a member of the &#8220;EC2 submit nodes&#8221; group; this would translate into a preference for <code>node.local</code>.</p>
<p>Because group names appear in machine ClassAd attributes, the list of explicit node memberships is a natural place to put tag information.  Nodes would simply be members of &#8220;dummy&#8221; groups like &#8220;Desktop workstations&#8221; or &#8220;Machines with more than 8GB RAM,&#8221; and these keywords could be used in matchmaking or in searching for particular nodes.  However, the list of explicit groups is not necessarily suitable for automatic manipulation:  users will not necessarily expect their changes to be overridden, other API clients won&#8217;t necessarily expect users to rearrange or remove groups corresponding to tags, and in general it is impossible to determine whether a group membership should be interpreted as a tag or as an explicit membership.</p>
<p>We can adopt a convention to partition the space of group memberships.  Say we create a special <em>sentinel group</em> to partition the membership space:  every node will be a member of the sentinel group.  All memberships that are of a lower priority than the sentinel group will be managed by tagging agents, and all memberships that are of a higher priority will be explicitly managed by the user.  In the example below, &#8220;&mdash;EXPLICIT GROUPS&#8221; is the sentinel group, and groups in yellow correspond to tags.</p>
<p><img src="http://chapeau.freevariable.com//wallaby-sentinel-groups.png" alt="Wallaby memberships, with a sentinel group and tag groups" title="wallaby-sentinel-groups.png" border="0" width="487" height="294" /></p>
<p>This approach demonstrates the generality of the Wallaby API, and allows users to supply tag-specific configurations by installing parameters or features on tag groups, for example, ensuring that every desktop workstation has a policy that favors its owner, or overprovisioning high-memory nodes.  However, it is not free of shortcomings.  Firstly, Wallaby will present all of these groups &mdash; sentinel, tag, and explicit groups &mdash; so a user-facing tool that puts a friendly interface on node memberships and tagging will need to use the sentinel group to partition which groups it displays to the user.  Secondly, the sentinel groups must be added to all nodes (in practice, we can assume that the absence of a sentinel group implies the absence of tags); in general, we are relying on clients to enforce invariants in this case.  Finally, altering a node&#8217;s membership list to insert a tag will cause that node&#8217;s configuration to be validated at the next activation.  If the node has a complex configuration, this could be expensive.</p>
<p>(Cross-posted from <a href="http://chapeau.freevariable.com/">Chapeau</a>.)</p>
]]></content:encoded>
			<wfw:commentRss>http://getwallaby.com/2011/using-wallaby-groups-to-implement-node-tagging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wallaby user tutorial and live VM</title>
		<link>http://getwallaby.com/2011/wallaby-user-tutorial-and-live-vm/</link>
		<comments>http://getwallaby.com/2011/wallaby-user-tutorial-and-live-vm/#comments</comments>
		<pubDate>Wed, 04 May 2011 18:03:01 +0000</pubDate>
		<dc:creator>William Benton</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://getwallaby.com/2011/wallaby-user-tutorial-and-live-vm/</guid>
		<description><![CDATA[Rob Rati and I presented a Wallaby user tutorial at Condor Week yesterday. Today, we have a tutorial you can follow along with at home, including a link to an EC2 AMI that boots up with Wallaby and Condor installed and running so you can experiment without installing anything. Enjoy! (Cross-posted from Chapeau.)]]></description>
			<content:encoded><![CDATA[<p>Rob Rati and I presented a Wallaby user tutorial at <a target="_blank" href="http://www.cs.wisc.edu/condor/CondorWeek2011/">Condor Week</a> yesterday.  Today, we have a <a target="_blank" href="http://getwallaby.com/tutorial-2011/">tutorial you can follow along with at home</a>, including a link to an EC2 AMI that boots up with Wallaby and Condor installed and running so you can experiment without installing anything. Enjoy!</p>
<p>(Cross-posted from <a href="http://chapeau.freevariable.com/">Chapeau</a>.)</p>
]]></content:encoded>
			<wfw:commentRss>http://getwallaby.com/2011/wallaby-user-tutorial-and-live-vm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extending Wallaby with a Python client library</title>
		<link>http://getwallaby.com/2010/extending-wallaby-with-a-python-client-library/</link>
		<comments>http://getwallaby.com/2010/extending-wallaby-with-a-python-client-library/#comments</comments>
		<pubDate>Fri, 10 Dec 2010 14:57:01 +0000</pubDate>
		<dc:creator>William Benton</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://getwallaby.com/2010/extending-wallaby-with-a-python-client-library/</guid>
		<description><![CDATA[In my previous post, we saw how to extend wallaby by writing Ruby classes that use a client library to extend the wallaby shell. If you&#8217;re comfortable with Ruby, this is a great way to build functionality on top of the wallaby API in an idiomatic way. However, Python programmers shouldn&#8217;t have to learn Ruby [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://chapeau.freevariable.com/2010/10/extending-the-wallaby-shell.html">my previous post</a>, we saw how to extend wallaby by writing Ruby classes that use a client library to extend the wallaby shell.  If you&#8217;re comfortable with Ruby, this is a great way to build functionality on top of the wallaby API in an idiomatic way.  However, Python programmers shouldn&#8217;t have to learn Ruby just to interact with wallaby.</p>
<p>The wallaby source repository now includes <a href="http://git.fedorahosted.org/git/?p=grid/wallaby.git;a=blob;f=schema/wallaby.py">a Python client library</a> to interact with a wallaby service.  This library does a few things to make your life easier:</p>
<ol>
<li>Raw QMF object proxies are wrapped in Python client objects.</li>
<li>Object references returned by QMF methods are automatically wrapped by client objects.</li>
<li>QMF methods that return error statuses will raise exceptions in the client library.</li>
<li>Client classes include docstrings for QMF methods.</li>
</ol>
<p>See below for a transcript illustrating these features.  Note that you&#8217;ll need to have the following packages installed to use the Python wallaby client library:  Red Hat Enterprise MRG 1.3 (or the <code>python-qmf</code> package from a recent Fedora release) and Wallaby 0.9.18 or later (0.10.0 to access all of the features exposed through the client library).</p>
<p><script src="https://gist.github.com/743525.js?file=gistfile1.txt"></script><noscript>Please visit this post in a browser with JavaScript support to view the embedded transcript.</noscript></p>
<p>(Cross-posted from <a href="http://chapeau.freevariable.com/">Chapeau</a>.)</p>
]]></content:encoded>
			<wfw:commentRss>http://getwallaby.com/2010/extending-wallaby-with-a-python-client-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extending the Wallaby shell</title>
		<link>http://getwallaby.com/2010/extending-the-wallaby-shell/</link>
		<comments>http://getwallaby.com/2010/extending-the-wallaby-shell/#comments</comments>
		<pubDate>Thu, 21 Oct 2010 16:43:07 +0000</pubDate>
		<dc:creator>William Benton</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://getwallaby.com/2010/extending-the-wallaby-shell/</guid>
		<description><![CDATA[The most recent few releases of the Wallaby configuration management service have included some great new features: wallaby console can now be used as an interpreter for shebang scripts, wallaby inventory now supports limiting the nodes it lists with expressive constraints, the wallaby http-server command provides access to node configurations over HTTP, and the wallaby [...]]]></description>
			<content:encoded><![CDATA[<p>The most recent few releases of the Wallaby configuration management service have included some great new features:  <code>wallaby console</code> can now be used as an interpreter for <a href="http://en.wikipedia.org/wiki/Shebang_(Unix)">shebang scripts</a>, <code>wallaby inventory</code> now supports limiting the nodes it lists with <a href="http://chapeau.freevariable.com/2010/10/wallaby-node-inventory-with-constraints.html">expressive constraints</a>, the <code>wallaby http-server</code> command <a href="http://chapeau.freevariable.com/2010/10/retrieving-wallaby-node-configurations-over-http.html">provides access to node configurations over HTTP</a>, and the <code>wallaby</code> command and its subcommands feature many minor functional and aesthetic improvements.  One feature that I&#8217;m particularly excited about is under the hood:  there is now an API for extending the wallaby shell with your own subcommands.  In this post, we&#8217;ll look at how to make a new <code>wallaby</code> subcommand.  <noscript>You&#8217;ll need to view this post outside of a feed reader, in a browser with JavaScript support, in order to see the embedded code snippets.</noscript></p>
<p>First, make sure you&#8217;re running <a href="http://git.fedorahosted.org/git/?p=grid/wallaby.git;a=shortlog;h=refs/tags/v0.9.23">wallaby 0.9.23</a> or later.  If you&#8217;re running Fedora, you can simply <code>git clone</code> the repository, check out the <code>v0.9.23</code> tag, and run <code>rake rpms</code> to generate installable packages.</p>
<p>Next, you&#8217;ll want to have a directory in which to put your custom wallaby shell commands.  I recommend putting them somewhere in your home directory.  (For the purposes of this discussion, we&#8217;ll assume that you&#8217;re using <code>~/.wallaby</code>.)  The <code>wallaby</code> command will find and attempt to load every ruby file in this directory that begins with <code>cmd_</code>, so you probably don&#8217;t want it to be writable by anyone other than you.  Once you have this directory set up, set <code>WALLABY_COMMAND_DIR</code> in your environment to this directory:</p>
<p><code>export WALLABY_COMMAND_DIR=${HOME}/.wallaby</code></p>
<p>We&#8217;ll start by making a fairly straightforward command that simply prints out the API version supported by the wallaby service.  To create a new wallaby command, use <code>wallaby new-command</code>:</p>
<p><script src="http://gist.github.com/638780.js?file=gistfile3.txt"></script></p>
<p>The <code>-d</code> option allows us to provide a description for the new command (viz., what would show up if we typed <code>wallaby help commands</code>).  The <code>-D</code> option allows us to specify a directory in which to create the new command file.  (<code>wallaby new-command</code> supports several other options; you can use <code>wallaby help new-command</code> for additional documentation.)  After executing this command, we&#8217;ll have a documented template file for a new wallaby command, called <code>cmd_api_version.rb</code>, installed in our <code>WALLABY_COMMAND_DIR</code>.  It will look something like this:</p>
<p><script src="http://gist.github.com/638780.js?file=generated_cmd_api_version.rb"></script></p>
<p>We can now run <code>wallaby help commands</code> and verify that our command shows up.  Sure enough, it does:</p>
<p><script src="http://gist.github.com/638780.js?file=gistfile4.txt"></script></p>
<p>We can even run <code>wallaby api-version</code>, although it won&#8217;t do anything yet.  To make it do something useful, we&#8217;re going to edit the <code>act</code> method defined for us in the <code>ApiVersion</code> class.  We could do something very simple, like insert <code>puts store.apiVersionNumber</code> before <code>return 0</code>, but it would be nice to allow a user to format the API version number as he or she sees fit, in order to use the result of our command in other scripts.</p>
<p>To let the user supply a format string, we&#8217;ll need to add a command-line option, which requires us to edit the <code>init_option_parser</code> method.  This method must return an <code>OptionParser</code> object; if you haven&#8217;t used Ruby&#8217;s option parser class, read up on <a href="http://ruby-doc.org/stdlib/libdoc/optparse/rdoc/classes/OptionParser.html">its documentation</a>.  For this example, though, the changes we have to make are pretty minor.  </p>
<p>After we&#8217;ve added a command-line option and a body for the <code>act</code> method, our <code>cmd_api_version.rb</code> file will look more like this:</p>
<p><script src="http://gist.github.com/638780.js?file=cmd_api_version.rb"></script></p>
<p>Running this command without arguments will return a string like <code>The wallaby service is running version 20100915 of the Wallaby API.</code>  If you supply a format string, you can get simply the raw number (with <code>--format '%s'</code>) or something more suited to your taste.  (Note that this example script doesn&#8217;t do any sanity- or error-checking of the format string, which you&#8217;d certainly want to do if you were going to put your command into production.)</p>
<p>We&#8217;ll look at a more interesting example wallaby shell command and some of the issues that more interesting commands raise in a future post.</p>
<p>(Cross-posted from <a href="http://chapeau.freevariable.com/">Chapeau</a>.)</p>
]]></content:encoded>
			<wfw:commentRss>http://getwallaby.com/2010/extending-the-wallaby-shell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wallaby node inventory with constraints</title>
		<link>http://getwallaby.com/2010/wallaby-node-inventory-with-constraints/</link>
		<comments>http://getwallaby.com/2010/wallaby-node-inventory-with-constraints/#comments</comments>
		<pubDate>Mon, 18 Oct 2010 16:59:37 +0000</pubDate>
		<dc:creator>William Benton</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://getwallaby.com/2010/wallaby-node-inventory-with-constraints/</guid>
		<description><![CDATA[wallaby inventory is a useful command for quickly checking up on the health of your pool and answering certain kinds of questions: Which nodes have checked in recently? Which nodes have checked in without being explicitly configured? Which nodes have never checked in? Recently, I added constraint support to wallaby inventory. That is, instead of [...]]]></description>
			<content:encoded><![CDATA[<p><tt>wallaby inventory</tt> is a useful command for quickly checking up on the health of your pool and answering certain kinds of questions:  Which nodes have checked in recently?  Which nodes have checked in without being explicitly configured?  Which nodes have never checked in?</p>
<p>Recently, I added <em>constraint</em> support to <tt>wallaby inventory</tt>.  That is, instead of listing all nodes, you can choose to list only nodes for which a given Ruby expression is true.  These constraints can be simple, like <tt>last_checkin &lt; 1.hour_ago</tt> (which will find all nodes that have checked in more than one hour ago), or more complex.  They are only limited by Ruby&#8217;s <a href="http://ruby-doc.org/docs/ProgrammingRuby/html/taint.html"><tt>$SAFE</tt> execution</a>:  among other things, they cannot modify running classes, perform file I/O, fork new processes, or, because of how QMF is implemented, invoke QMF <em>methods</em> on the node object.  However, every QMF <em>property</em> of the node object is available to <tt>wallaby inventory</tt> constraints.  The transcript below provides some examples running against a wallaby agent loaded up with test data.</p>
<p><script src="http://gist.github.com/632556.js"> </script><noscript>Visit this post in a browser with JavaScript support (not a feed reader) to see the embedded transcript.</noscript></p>
<p>(Cross-posted from <a href="http://chapeau.freevariable.com/">Chapeau</a>.)</p>
]]></content:encoded>
			<wfw:commentRss>http://getwallaby.com/2010/wallaby-node-inventory-with-constraints/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Retrieving Wallaby configurations over HTTP</title>
		<link>http://getwallaby.com/2010/retrieving-wallaby-configurations-over-http/</link>
		<comments>http://getwallaby.com/2010/retrieving-wallaby-configurations-over-http/#comments</comments>
		<pubDate>Fri, 15 Oct 2010 18:01:54 +0000</pubDate>
		<dc:creator>William Benton</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://wallaby.freevariable.com/2010/retrieving-wallaby-configurations-over-http/</guid>
		<description><![CDATA[In some environments, users may wish to use Wallaby to serve configurations to nodes that can&#8217;t reach the Qpid broker that the Wallaby agent is running against. Some users may also want to write simple scripts that access current or historical configuration data without writing a QMF console. The wallaby http-server command, which is available [...]]]></description>
			<content:encoded><![CDATA[<p>In some environments, users may wish to use Wallaby to serve configurations to nodes that can&#8217;t reach the Qpid broker that the Wallaby agent is running against.  Some users may also want to write simple scripts that access current or historical configuration data without writing a QMF console.  The <tt>wallaby http-server</tt> command, which is available beginning with <tt>wallaby-0.9.19</tt>, offers a solution for such users.  It provides a read-only web service gateway to a node&#8217;s configuration:  the last activated configuration, a particular version, and the node&#8217;s current configuration in the store (which may not yet have been activated).</p>
<p><tt>wallaby http-server</tt> requires that the Sinatra framework is installed.  If you are building RPMs for wallaby, <tt>wallaby-http-server</tt> will be built as a separate package, and only if you&#8217;re building from Fedora 12 or later.  If you&#8217;re installing from source, simply <tt>gem install sinatra</tt> before running the HTTP server; if you&#8217;ve already installed a wallaby package on a non-Fedora system, you can simply install <tt>cmd_http_server.rb</tt> <a href="http://git.fedorahosted.org/git/?p=grid/wallaby.git;a=blob;f=lib/mrg/grid/config/shell/cmd_http_server.rb;hb=HEAD">from the source repository</a> into your wallaby shell commands directory.  (In the future, we expect to package <tt>wallaby-http-server</tt> for Red Hat Enterprise Linux as well, thus simplifying this process.)</p>
<p>The transcript below shows the HTTP server&#8217;s built-in help, listing all of the methods it supports (as of <tt>wallaby-0.9.20</tt>, which will be released later today).  Please let us know if you can think of other API methods that would be useful to expose over the Wallaby HTTP server.</p>
<p><script src="http://gist.github.com/628571.js"> </script><noscript>Please visit this post in a browser with JavaScript support to see the embedded code snippet.</noscript></p>
<p><em>(Cross-posted from <a href="http://chapeau.freevariable.com/2010/10/retrieving-wallaby-node-configurations-over-http.html">chapeau</a>.)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://getwallaby.com/2010/retrieving-wallaby-configurations-over-http/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flexible interaction with the Wallaby console</title>
		<link>http://getwallaby.com/2010/flexible-interaction-with-the-wallaby-console/</link>
		<comments>http://getwallaby.com/2010/flexible-interaction-with-the-wallaby-console/#comments</comments>
		<pubDate>Wed, 06 Oct 2010 14:56:35 +0000</pubDate>
		<dc:creator>William Benton</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://wallaby.freevariable.com/2010/flexible-interaction-with-the-wallaby-console/</guid>
		<description><![CDATA[One of the main benefits of using Wallaby for configuration is the remote-access API. Because the API is comprehensive and usable from any language with a QMF binding (including C++, Java, Python, and Ruby), it provides developers and users with the means to build tools, policies, templating systems, and one-off scripts on top of Wallaby. [...]]]></description>
			<content:encoded><![CDATA[<p>One of the main benefits of using Wallaby for configuration is the remote-access <a href="http://wallaby.freevariable.com/the-wallaby-api/">API</a>.  Because the API is comprehensive and usable from any language with a QMF binding (including C++, Java, Python, and Ruby), it provides developers and users with the means to build tools, policies, templating systems, and one-off scripts on top of Wallaby.</p>
<p>If you&#8217;re writing a Wallaby API client in Ruby, you can use a couple of nice features to ease development:  the <a href="http://git.fedorahosted.org/git/?p=grid/wallaby.git;a=blob;f=lib/mrg/grid/config-client.rb;hb=HEAD">Wallaby client library</a>, which presents a more polished interface than dealing with raw QMF queries and calls, and the <code>wallaby console</code> utility, which connects to a specified broker and gives you a Ruby <a href="http://en.wikipedia.org/wiki/Read-eval-print_loop">REPL</a> that has a global variable pointing to a store client &#8212; perfect for casual, interactive experimentation.</p>
<p>Use the same global command line options for <code>wallaby console</code> as you&#8217;d use for any other <code>wallaby</code> subcommand:  specifying host, port, and authentication information for the broker.  Once you&#8217;ve started it up, you&#8217;ll be dropped into a Ruby prompt where <code>Wallaby::store</code> is a reference to a client proxy object for your Wallaby store.  You can then inspect or modify any entity that the store knows about; the store object has accessors called <code>nodes</code>, <code>features</code>, <code>parameters</code>, etc., that return arrays of each kind of object.  Then you can invoke methods on each object.  The transcript below shows a session in which the user inspects some details of a node in a trivial pool:</p>
<p><code>&gt;&gt; Wallaby::store.nodes.map {|n| n.name}</code> <br />
<code>=&gt; ["frotz"]</code> <br />
<code>&gt;&gt; frotz = Wallaby::store.nodes[0] ; nil</code> <br />
<code>=&gt; nil</code> <br />
<code>&gt;&gt; Wallaby::store.groups.map {|g| g.name}</code> <br />
<code>=&gt; ["+++DEFAULT", "+++af413ebf1de0f9d4253eb89717a4e13b"]</code> <br />
<code>&gt;&gt; Wallaby::store.groups[1].features</code> <br />
<code>=&gt; ["DisablePreemption"]</code> <br />
<code>&gt;&gt; frotz.getConfig</code> <br />
<code>=&gt; {"PREEMPT"=&gt;"FALSE", "WALLABY_CONFIG_VERSION"=&gt;"1284180448517726"}</code></p>
<p>In the future, it will be easier to extend the <code>wallaby</code> command with your own subcommands.  For now, however, <code>wallaby console</code> provides a great way to interact with the Wallaby API.</p>
<p><em>(Cross-posted from <a href="http://chapeau.freevariable.com/2010/09/flexible-interaction-with-the-wallaby-console.html">Chapeau</a>.)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://getwallaby.com/2010/flexible-interaction-with-the-wallaby-console/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
