<?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>Opscode.com</title>
	<atom:link href="http://www.opscode.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.opscode.com/blog</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Sat, 04 Feb 2012 03:15:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Post-Hoc Index Design: From Regex to PEG</title>
		<link>http://www.opscode.com/blog/2012/01/20/post-hoc-index-design-from-regex-to-peg/</link>
		<comments>http://www.opscode.com/blog/2012/01/20/post-hoc-index-design-from-regex-to-peg/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 17:13:30 +0000</pubDate>
		<dc:creator>Seth Falcon</dc:creator>
				<category><![CDATA[devops]]></category>

		<guid isPermaLink="false">http://www.opscode.com/blog/?p=3225</guid>
		<description><![CDATA[In September of last year, the team faced one of its first challenges in responding to the growing user base of Hosted Chef. The on-call engineer at the time received an alert that the queue used to store Chef objects waiting to be indexed for search was backed up. Soon we received alerts that calls [...]]]></description>
			<content:encoded><![CDATA[<p>In September of last year, the team faced one of its first challenges
in responding to the growing user base of Hosted Chef. The on-call
engineer at the time received an alert that the queue used to store
Chef objects waiting to be indexed for search was backed up. Soon we
received alerts that calls to the search API were failing and we
posted an <a href="http://status.opscode.com/post/1054956046/search-api-calls-are-timing-out">outage notice</a>. Restoring search functionality required
us to compromise on search freshness and we began investigating the
incident's root cause.</p>

<p>Chef's search feature is powered by <a href="http://lucene.apache.org/java/docs/index.html">Lucene</a> via <a href="http://lucene.apache.org/solr/">Solr</a>. Every
time an object is created or updated in Chef (e.g. a node, a
role, or a data bag) the object is converted to JSON and put on a
queue (we use <a href="http://www.rabbitmq.com/">RabbitMQ</a>) where it will be picked up for
indexing. The indexer expands the JSON into a set of key/value
pairs (deep structure is flattened by concatenating keys with
underscore) and sends the data to Solr for indexing.</p>

<p>The search outage was the result of Lucene doing a merge of its index
that took minutes. Analysis of our Lucene index revealed that we had
well over 900,000 fields in our index. If you look hard, you can find
benchmarks on Lucene using 30 fields. Our system was using Lucene
wrong.</p>

<p>In addition to mapping each flattened key into a field, the
indexer was "expanding" all compound keys by inserting an 'X' to
allow a kind of wild card searching. For example, the JSON:</p>

<pre><code>{"a": {"b": {"c": 1}}}
</code>
</pre>

<p>would have a flattened key of <code>a_b_c</code> which would get expanded
to:</p>

<pre><code>X_b_c
a_X_c
a_b_X
</code>
</pre>

<p>This was a non-optimal approach to say the least -- yet Lucene
actually made it work for quite some time.</p>

<p>We needed to change how Chef objects were indexed to avoid creating an
unbounded number of fields in the index. The solution we came up with
was to concatenate the flattened key value pairs with a delimiter (we
chose <code>__=__</code>) and put all of the concatenated pairs into a single
<code>content</code> field in the search index separated by whitespace. Besides
reducing the number of fields in the index, this approach eliminated
the need for the "X" expansion since Lucene wild card queries using
"*" could be used instead; this saved considerable time and memory
during the indexing preprocessing phase.</p>

<p>Experiments with simulated node data were run to validate the new
approach. Two 10,000 node save test scenarios were run: the first was
optimistic, in which two random keys were added to a node being saved,
and the second pessimistic, in which 50 random keys were added for
each save. The results showed a decrease in average commit time of 4x
and 23x, respectively.</p>

<p>This left us with two problems. We needed to reindex our data and all
queries would fail once we did; querying the new index required a new
query syntax.</p>

<p>The reindexing was solved with a well practiced deployment plan and a
small amount of <a href="http://status.opscode.com/post/1355380595/scheduled-maintenance-7-00-9-00pm-pst-oct-19-2010">scheduled maintenance</a>.  Dealing with the change in
the query syntax was somewhat more challenging.</p>

<p>Chef's query syntax directly exposes the Lucene syntax and, as a
result, the initial index layout. Chef object keys map to fields in
the query. For example, to search for all nodes with the "web" role,
the user query would be <code>role:web</code> which will be passed along to
Lucene unchanged. Lucene will interpret this as a search for documents
with "web" in the "role" field. The equivalent query for the new
"no-fields" index looks like this: <code>content:role__=__web</code>. In order to
deploy the new indexing scheme, we needed to be able to convert user
queries into the new format.</p>

<p>We were under operational duress at the time and needed a
fast-as-possible solution. By examining system logs, we determined that
we could cover the types of queries actually in use with a few regular
expressions. If you're ever looking for a definition of "quick and
dirty", <a href="https://github.com/opscode/chef/blob/3fe468c00b9869aab51015314134baa29489a779/chef/lib/chef/solr_query.rb#L127-L181">this is it</a>. To help verify the solution, we wrote a <a href="https://github.com/opscode/chef/blob/master/features/data/search-tests/do_knife_search_test.rb">test
harness</a> that populated an organization with a known set of objects
and randomly generated queries with Boolean operators in such a way
that the result set was computable. This helped increase our
confidence in our duct tape solution.</p>

<p>Having introduced a series of regular expressions into our query
handling code, we now had an additional problem. The regular
expression based solution was a stop-gap measure and didn't support
many aspects of the Lucene query syntax. For example, we failed to
handle the <code>!</code> and <code>-</code> operators (see <a href="http://lucene.apache.org/java/2_9_1/queryparsersyntax.html">Lucene syntax</a>). The query
<code>-role:blah</code> was transformed into <code>content:-role__=__blah</code> when it
should have been <code>-content:role__=__blah</code>. We considered adding
more regular expression based replacement rules to the already
somewhat <a href="https://github.com/opscode/chef/blob/3fe468c00b9869aab51015314134baa29489a779/chef/lib/chef/solr_query.rb#L127-L181">convoluted logic</a>, but it became clear that we'd need a
fair bit more logic to be able to identify the leading dash and ignore
the embedded dash in a query like <code>tags:b||(-role:web-server tags:a)</code>
(which should be transformed to <code>content:tags__=__b ||
(-content:role__=__web-server content:tags__=__a</code>).</p>

<p>In order to restore support for more of Lucene's <em>flexible</em> syntax and
to end up with a maintainable query handling system that isn't a
laundry list of regular expressions, we began work on code to parse
Lucene's query syntax. The initial implementation used a Parsing
Expression Grammar (PEG) created with <a href="http://treetop.rubyforge.org/">Treetop</a>. Here's the <a href="https://github.com/opscode/chef/blob/4fa575950d041f7bbfc7ec33372169861a4df014/chef/lib/chef/solr_query/lucene.treetop">grammar
file</a> we used. The result was a query handling system that we have
full control over and that provides a layer of abstraction over
Lucene's query syntax. A side-benefit of the full-parse approach is
that we can now validate user queries much earlier.</p>

<p>Since deploying the reorganized index, Lucene's commit times have
remained short and consistent even in the face of significant growth
of the index. We've ported the Hosted Chef search API endpoint to
Erlang and ported the Lucene PEG to Erlang using <a href="https://github.com/seancribbs/neotoma">neotoma</a>. We have
been able to address a few further edge cases of the Lucene query
syntax in a structured and robust fashion (no regular expressions
required).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.opscode.com/blog/2012/01/20/post-hoc-index-design-from-regex-to-peg/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>#ChefConf 2012 &#8211; Call for Proposals</title>
		<link>http://www.opscode.com/blog/2012/01/19/chefconf-2012-cfp/</link>
		<comments>http://www.opscode.com/blog/2012/01/19/chefconf-2012-cfp/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 22:58:57 +0000</pubDate>
		<dc:creator>Jesse Robbins</dc:creator>
				<category><![CDATA[chef]]></category>
		<category><![CDATA[chefconf]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[culture]]></category>
		<category><![CDATA[devops]]></category>
		<category><![CDATA[events]]></category>

		<guid isPermaLink="false">http://www.opscode.com/blog/?p=3173</guid>
		<description><![CDATA[In a few days we’ll be officially announcing #ChefConf 2012, our inaugural community conference.  #ChefConf will be held May 15-17th in Burlingame, California.  We’re really excited about what we’re putting together.  The CFP is open now!]]></description>
			<content:encoded><![CDATA[<h3><img class="alignright size-medium wp-image-3196" title="ChefConf-2012" src="http://www.opscode.com/blog/wp-content/uploads/2012/01/chefconf-sidebar-300x171.png" alt="Opscode #ChefCon! May 15-17, 2012 in Burlingame, California" width="240" height="137" align="right" />A few days ago, Chef turned 3 years old&#8230;</h3>
<p>Our community has grown to over <strong>15,000 users</strong>, and there are over <strong>500 developers</strong> and <strong>100 organizations</strong> contributing to and expanding Chef.</p>
<h3>In short&#8230; we&#8217;re ready for our own conference!</h3>
<p>In a few days we&#8217;ll be officially announcing <a href="http://chefconf.opscode.com">#ChefConf 2012</a>, our inaugural community conference.  #ChefConf will be held May 15-17th in Burlingame, California.  We&#8217;re really excited about what we&#8217;re putting together.</p>
<h2>Submit your session ideas for the<br />
<a href="http://chefconf.opscode.com/call-for-proposals/">#ChefConf 2012 Call for Proposals</a> now!</h2>
]]></content:encoded>
			<wfw:commentRss>http://www.opscode.com/blog/2012/01/19/chefconf-2012-cfp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Join Opscode at SCALE!</title>
		<link>http://www.opscode.com/blog/2012/01/18/join-us-at-scale/</link>
		<comments>http://www.opscode.com/blog/2012/01/18/join-us-at-scale/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 20:15:42 +0000</pubDate>
		<dc:creator>Matt Ray</dc:creator>
				<category><![CDATA[chef]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[Chef]]></category>
		<category><![CDATA[opschef]]></category>
		<category><![CDATA[scale]]></category>

		<guid isPermaLink="false">http://www.opscode.com/blog/?p=3162</guid>
		<description><![CDATA[Opscode is proud to be a sponsor of the Southern California Linux Expo (SCALE) this upcoming weekend in Los Angeles. SCALE is one of the premier open source events in the United States and we encourage you to attend. We&#8217;ll be participating in a number of events, giving a presentation and we&#8217;ll have a booth [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.socallinuxexpo.org"><img src="http://www.socallinuxexpo.org/sites/default/files/promo/scale_10x_160x600_banner2.png"/></a></p>
<p>Opscode is proud to be a sponsor of the <a href="https://www.socallinuxexpo.org/scale10x/">Southern California Linux Expo</a> (SCALE) this upcoming weekend in Los Angeles. <a href="https://www.socallinuxexpo.org/scale10x/">SCALE</a> is one of the premier open source events in the United States and we encourage you to attend. We&#8217;ll be participating in a number of events, giving a presentation and we&#8217;ll have a booth on the Expo floor.</p>
<h2>Chef Events</h2>
<h3>Friday January 20</h3>
<p><a href="https://www.socallinuxexpo.org/scale10x/events/build-cloud-day">Build a Cloud Day</a>: How to build and manage cloud computing environments using free and open source software. There will be an &#8220;Automating Your Cloud with Opscode Chef&#8221; session presented by Opscode employee Matt Ray.</p>
<p>Look for Opscode and Chef folks at the <a href="https://www.socallinuxexpo.org/scale10x/events/devops-day-la">DevOps Day LA</a> and at the <a href="https://www.socallinuxexpo.org/scale10x/events/openstack-happy-hour">OpenStack Happy Hour</a>!</p>
<h3>Saturday January 21</h3>
<p>Visit the Opscode booth at the Expo Saturday and Sunday (#53).</p>
<p>Catch up with other members of the Chef community and grab a drink at the <a href="https://www.socallinuxexpo.org/scale10x/events/bird-feather-sessions">Chef Birds of a Feather session</a> (Los Angeles BC room).</p>
<h3>Sunday January 22</h3>
<p><a href="https://www.socallinuxexpo.org/scale10x/presentations/infrastructure-automation-chef">Infrastructure Automation with Chef</a>: Opscode&#8217;s Sean OMeara will be giving an introductory Chef talk to help people get up to speed.</p>
<p>We would like to thank the Southern California Linux Expo for all their support and encourage you to come out and see us this weekend!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.opscode.com/blog/2012/01/18/join-us-at-scale/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Food Fight, the New Chef Community Podcast</title>
		<link>http://www.opscode.com/blog/2012/01/17/food-fight-the-new-community-chef-podcast/</link>
		<comments>http://www.opscode.com/blog/2012/01/17/food-fight-the-new-community-chef-podcast/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 17:04:47 +0000</pubDate>
		<dc:creator>Matt Ray</dc:creator>
				<category><![CDATA[chef]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[culture]]></category>
		<category><![CDATA[devops]]></category>
		<category><![CDATA[opschef]]></category>
		<category><![CDATA[podcast]]></category>
		<category><![CDATA[Chef]]></category>

		<guid isPermaLink="false">http://www.opscode.com/blog/?p=3151</guid>
		<description><![CDATA[Food Fight is a new podcast for the Chef community, discussing and summarizing the assorted news and topics of the day. It&#8217;s hosted by community member Bryan Berry and Opscode employee Matt Ray. They plan on interviewing lots of people from the greater Chef community and publishing every few weeks. The first episode is up [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://2.bp.blogspot.com/-DdZ5_ATcmWA/Twg-FMr73tI/AAAAAAAAD3I/7Y7Zi7pZaoY/s1600/FoodFightbanner100px.png" align="top"/></p>
<p>Food Fight is a new podcast for the Chef community, discussing and summarizing the assorted news and topics of the day. It&#8217;s hosted by community member Bryan Berry and Opscode employee Matt Ray. They plan on interviewing lots of people from the greater Chef community and publishing every few weeks. </p>
<p>The <a href="http://www.foodfightshow.org/2012/01/episode-1-chef-in-2012.html">first episode is up now</a>, where they talk about Chef in 2012 with guests Eric Wolfe and Jay Feldblum. The homepage is <a href="http://www.foodfightshow.org">http://www.foodfightshow.org</a> and the show is also available on <a href="http://itunes.apple.com/us/podcast/the-food-fight-show/id495577922">iTunes for subscription</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.opscode.com/blog/2012/01/17/food-fight-the-new-community-chef-podcast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An Opscode year in review</title>
		<link>http://www.opscode.com/blog/2012/01/03/an-opscode-year-in-review/</link>
		<comments>http://www.opscode.com/blog/2012/01/03/an-opscode-year-in-review/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 19:52:58 +0000</pubDate>
		<dc:creator>Bryan McLellan</dc:creator>
				<category><![CDATA[chef]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[culture]]></category>
		<category><![CDATA[devops]]></category>
		<category><![CDATA[hosted chef]]></category>

		<guid isPermaLink="false">http://www.opscode.com/blog/?p=3078</guid>
		<description><![CDATA[Like most open source projects, Chef began with an itch. From a small group of friends and colleagues, a band of system administrators who wanted a better way to build infrastructure, we have grown into a large and supportive community. In 2011 alone we&#8217;ve seen our contributor list double for both individuals and corporations from [...]]]></description>
			<content:encoded><![CDATA[<p>Like most open source projects, Chef began with an itch. From a small group of friends and colleagues, a band of system administrators who wanted a better way to build infrastructure, we have grown into a large and supportive community. In 2011 alone we&#8217;ve seen our contributor list double for both individuals and corporations from a year ago.<br />
<img class="alignright size-full wp-image-3113" style="float: right; padding: 4px;" title="darts" src="http://www.opscode.com/blog/wp-content/uploads/2012/01/darts.png" alt="" width="126" height="120" /></p>
<ul>
<li>Opscode&#8217;s <a href="http://community.opscode.com/">community site</a> grew to over 11,000 registered <a href="http://community.opscode.com/users">users</a> and 380 <a href="http://community.opscode.com/cookbooks">community cookbooks</a> supporting everything from Apache to Zabbix.</li>
<li>Over 500 people and 100 organizations are contributing to Chef, with <a href="http://wiki.opscode.com/display/chef/Release+MVPs">release MVPs</a>.</li>
<li>We ran our very first <a href="http://wiki.opscode.com/display/chef/Opscode+Community+Summit+1">Opscode Community Summit</a> which was filled to the max with over 110 people passionate about the future of Opscode &amp; Chef.  It was quite moving to have so many people come together who cared about Chef so much!</li>
<li>We&#8217;ve had an amazing time teaching people about Chef in our <a href="http://www.opscode.com/training/">training programs</a>, and will have major announcements in the year to come as the training expands.</li>
</ul>
<p>The <a href="http://community.opscode.com/">community site</a> has received some long-awaited love this year, most notably with the addition of a <a href="http://www.opscode.com/blog/2011/12/14/chef-community-site-cookbook-browsing/">source code browser</a>. We also had our first <a href="http://www.opscode.com/blog/2011/10/25/the-cookbook-contest-is-over-and-the-winners-are/">cookbook contest</a> which showed a dedicated and creative set of users out there solving interesting engineering problems with Chef.</p>
<p>This year saw the release of <a href="http://www.opscode.com/blog/2011/05/02/chef-0-10-0-released/">Chef 0.10</a>. This release of Chef introduced the concept of <a href="http://www.opscode.com/blog/2011/04/21/chef-0-10-preview-environments/">environments</a>, making it much easier to maintain configuration separation between production and other environments while supporting and encouraging other environments being produced by the same process. <img src="http://www.opscode.com/blog/wp-content/uploads/2012/01/chefknife.png" alt="" title="chefknife" width="96" height="100" class="alignleft size-full wp-image-3124" style="float:left; padding:4px;" /> Paired with devops culture, this helps reduce issues with a different environment when software passes from development and testing into production infrastructure.</p>
<p>Chef 0.10 also introduced <a href="http://www.opscode.com/blog/2011/04/29/chef-0-10-preview-encrypted-data-bags/">encrypted data bags</a> and <a href="http://www.opscode.com/blog/2011/04/22/chef-0-10-preview-knife-plugins-and-ui/">knife plugins</a>, among other things, providing for increased utility, flexibility and functionality.  The Chef Community has fully embraced plugins, actively creating <a href="http://wiki.opscode.com/display/chef/Community+Plugins">Community Plugins</a> for chef, ohai and knife &#8211; each a specialized delivery of particular functionality that can now be repeatably used and conveniently shared. Opscode utilized the plugin feature directly, providing a <a href="http://wiki.opscode.com/display/chef/Knife+Windows+Bootstrap">Knife Windows Plugin</a> for bootstrapping Windows systems using our powerful knife command line tool, in addition to specialized plugins to provide for automated <a href="http://wiki.opscode.com/display/chef/Launch+Cloud+Instances+with+Knife">Launching of Cloud Instances</a> with knife.</p>
<p>Opscode continued progress from the significance of 0.10, and are now at <a href="http://www.opscode.com/blog/2011/12/15/chef-0-10-8-released/">Chef 0.10.8</a>: where we gave our fellow Windows Systems Administrators a leg-up in the devops cultural revolution. <img src="http://www.opscode.com/blog/wp-content/uploads/2012/01/chef_windows_installer-300x2341.png" alt="" title="chef_windows_installer-300x234" width="200" height="156" class="alignright size-full wp-image-3127" style="float:right; padding:8px;"/> This release culminates a significant increase of Windows users of Chef this year, which also included our release of an <a href="http://www.opscode.com/blog/2011/12/15/chef-client-installer-for-windows/">Chef Client Installer for Windows</a>. There are members of the community already deploying this installer using group policy and teaming it with Windows Deployment Services (WDS) to enable bootstrapping bare-metal into fully functional servers. This pattern prevents traditional dusty and broken build documents for meat-cloud built servers as well as golden-images with an uncertain past.</p>
<p><a href="http://www.opscode.com/hosted-chef/">Opscode Hosted Chef</a> experienced organic growth throughout the year. As the user base of Hosted Chef expanded, Opscode responded to the growth by streamlining the management of search indices &#8211; resulting in average commit times being cut in half and merge commit times were reduced ten fold. <img src="http://www.opscode.com/blog/wp-content/uploads/2012/01/gears.png" alt="" title="gears" width="168" height="130" class="alignright size-full wp-image-3131" style="float:left; padding:4px;" /> We also upgraded the API Endpoints, and following migration of organizations to the new endpoints, saw standard response times halved from their pre-migration level.</p>
<p>Beyond those engineering efforts to sustain Hosted Chef scalability and reliability, Opscode Hosted Chef customers also benefited from the establishment of <a href="http://www.opscode.com/services-and-support/">Enterprise Support</a>, with Opscode offering an industry-leading <a href="http://www.opscode.com/service-level-agreement/">Service Level Agreement</a> for cloud infrastructure automation, including <a href="http://www.opscode.com/support/plans/">24x7x365 support plans</a>. Hosted Chef customers are receiving solutions to questions with a median response time of 35 minutes and a median resolution time of just over 4 hours for resolution of complex implementation and support issues &#8211; and continuous quality improvement is the goal.</p>
<p>Speaking of continuous quality improvement, the <a href="http://wiki.opscode.com/">Chef Wiki</a> underwent a fairly extensive redesign, restructuring and update throughout 2011. The result is a substantially improved and more useful set of documentation for Chef users, with further enhancements to product and support documentation both planned and in work for the new year.</p>
<p>It hasn&#8217;t all been evolutionary growth &#8211; there has also been a platform revolution! Opscode unveiled <a href="http://www.opscode.com/blog/2011/06/14/opscode-unveils-private-chef-for-the-enterprise/">Private Chef for the Enterprise</a>, providing for a highly available, dynamically scalable, fully managed and supported <a href="http://www.opscode.com/private-chef/">automation environment behind the corporate firewall</a>.  We&#8217;ve also been honored to have Chef included in both the <a href="http://www.opscode.com/blog/2011/07/26/dell-openstack-cloud-solution/">OpenStack project</a> and in the tools around it like <a href="http://www.opscode.com/blog/2011/09/22/opscode-dell-and-rackspace-are-making-crowbar-even-more-awesome/">Crowbar</a> in partnership with Dell and Rackspace. We are excited about the future of these projects and honored to be a part of them.</p>
<p>And all of this is just a portion of the fantastic year that 2011 was for Opscode, Chef, and the Chef Community! <img src="http://www.opscode.com/blog/wp-content/uploads/2012/01/10366948-a-cloud-computing-technology-concept.jpg" alt="" title="10366948-a-cloud-computing-technology-concept" width="168" height="112" class="alignleft size-full wp-image-3135" style="float:left; padding:8px;" /> </p>
<p>Looking back, it is amazing and inspiring the distance that we have come since Chef was introduced and Opscode was founded just a few years ago.  And that is nothing compared to what is planned for the future &#8211; and what we can all accomplish together.</p>
<p><em>Thank you to all of our customers and the wonderful open source Chef community for 2011&#8230; <strong>Welcome to 2012!</strong></em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.opscode.com/blog/2012/01/03/an-opscode-year-in-review/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Finding recently created hosts with Chef</title>
		<link>http://www.opscode.com/blog/2011/12/21/finding-recently-created-hosts-with-chef/</link>
		<comments>http://www.opscode.com/blog/2011/12/21/finding-recently-created-hosts-with-chef/#comments</comments>
		<pubDate>Wed, 21 Dec 2011 00:33:27 +0000</pubDate>
		<dc:creator>Bryan McLellan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.opscode.com/blog/?p=3021</guid>
		<description><![CDATA[When you utilize cloud resources as a commodity, it can sometimes be hard to differentiate between individual systems. While testing some Chef installations on EC2 instances I asked myself, &#8220;which of these instances registered with my Chef server did I create a few hours ago?&#8221; I considered searching through nodes for attributes that ought to [...]]]></description>
			<content:encoded><![CDATA[<p>When you utilize cloud resources as a commodity, it can sometimes be hard to differentiate between individual systems. While testing some Chef installations on EC2 instances I asked myself, &#8220;which of these instances registered with my Chef server did I create a few hours ago?&#8221; 

<p>I considered searching through nodes for attributes that ought to be unique to these test instances, like the run_list. But, then I remembered that the time of the last Ohai run is stored as an <a href="http://en.wikipedia.org/wiki/Unix_time">Unix time</a> in the automatic attributes of a Chef node run.

<pre class="brush: plain; title: ; notranslate">
$ date +%s
1324426395
$ date &#8211;date=&quot;-5 hours&quot; +%s
1324408398
$ knife search node &#8216;ohai_time:[1324408398 TO 1324426395]&#8216; -i
2 items found

i-b25c8ad0

i-1e5c8a7c
</pre>

<p>Above, I generated two time values using the date command, one for the current time and one for five hours ago. Then I used these values to search through my nodes for those who have had a Chef run in the last five hours using a <a href="http://wiki.opscode.com/display/chef/Search#Search-RangeSearch">range search</a> with knife. This returned two nodes, which was exactly what I was looking for.

<p>Another time-saving feature of Chef that you didn&#8217;t know you even wanted until you find yourself needing it.]]></content:encoded>
			<wfw:commentRss>http://www.opscode.com/blog/2011/12/21/finding-recently-created-hosts-with-chef/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

