<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments for Nick Zalabak - techwhizbang</title>
	<atom:link href="http://techwhizbang.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://techwhizbang.com</link>
	<description>my work, life, and ideas</description>
	<lastBuildDate>Thu, 03 Nov 2011 10:04:26 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>Comment on Multiple Sinatra Apps and Cucumber by nash</title>
		<link>http://techwhizbang.com/2010/09/modular-sinatra-apps-with-cucumber/comment-page-1/#comment-246</link>
		<dc:creator>nash</dc:creator>
		<pubDate>Thu, 03 Nov 2011 10:04:26 +0000</pubDate>
		<guid isPermaLink="false">http://techwhizbang.com/?p=332#comment-246</guid>
		<description>You can use this 
Capybara.app, _ = Rack::Builder.parse_file(File.expand_path(&#039;../../config.ru&#039;, __FILE__))
instead of using eval</description>
		<content:encoded><![CDATA[<p>You can use this<br />
Capybara.app, _ = Rack::Builder.parse_file(File.expand_path(&#8216;../../config.ru&#8217;, __FILE__))<br />
instead of using eval</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Fat chunky ugly bloated &#8220;models&#8221; by Stephen Sloan</title>
		<link>http://techwhizbang.com/2011/08/fat-chunky-ugly-bloated-models/comment-page-1/#comment-239</link>
		<dc:creator>Stephen Sloan</dc:creator>
		<pubDate>Tue, 06 Sep 2011 18:48:19 +0000</pubDate>
		<guid isPermaLink="false">http://techwhizbang.com/?p=461#comment-239</guid>
		<description>Great post.  I think the &quot;Facetious Wonderment&quot; phrase is appropriate.  Ruby is wonderful.  Rails is wonderful.  It&#039;s fun, it&#039;s opinionated, it&#039;s right!  When I learned Ruby and Rails I learned OOP design at the same time.  Okay, not really, I mostly just learned MVC.  There are other patterns, other entities out there.  Unfortunately I learned the most about OO design from Java books.  Ruby is awesome enough that we shouldn&#039;t need to learn Java.  There are a few books (now) that probably fill in that void, but I&#039;d guess that the Rails community is somewhat burdened by excessive appreciation of just one implementation.</description>
		<content:encoded><![CDATA[<p>Great post.  I think the &#8220;Facetious Wonderment&#8221; phrase is appropriate.  Ruby is wonderful.  Rails is wonderful.  It&#8217;s fun, it&#8217;s opinionated, it&#8217;s right!  When I learned Ruby and Rails I learned OOP design at the same time.  Okay, not really, I mostly just learned MVC.  There are other patterns, other entities out there.  Unfortunately I learned the most about OO design from Java books.  Ruby is awesome enough that we shouldn&#8217;t need to learn Java.  There are a few books (now) that probably fill in that void, but I&#8217;d guess that the Rails community is somewhat burdened by excessive appreciation of just one implementation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Infrastructure Automation with Chef by techwhizbang</title>
		<link>http://techwhizbang.com/2010/04/cooking-with-chef/comment-page-1/#comment-238</link>
		<dc:creator>techwhizbang</dc:creator>
		<pubDate>Mon, 05 Sep 2011 19:56:51 +0000</pubDate>
		<guid isPermaLink="false">http://techwhizbang.com/?p=193#comment-238</guid>
		<description>If you don&#039;t want to mess with the Chef server to update all the nodes with chef-client? Use chef-solo. 

If don&#039;t want to worry about editing JSON files and uploading those JSON files for chef-solo to use? I would consider exporting temporary environment variables during the execution of a remote SSH command and then referencing those in your deploy recipes. Anything you can do with Ruby you can do with Chef. So something like:

&lt;pre lang=&quot;ruby&quot;&gt;

deploy &quot;/my/deploy/dir&quot; do
  repo &quot;git@github.com/whoami/project&quot;
  revision &quot;#{ENV[&#039;APP_REVISION&#039;]}&quot; # Use the temp environment vars..
  user &quot;deploy_ninja&quot;
  enable_submodules true
  migrate true
  migration_command &quot;rake db:migrate&quot;
  environment &quot;RAILS_ENV&quot; =&gt; &quot;production&quot;
  shallow_clone true
  action &quot;#{ENV[&#039;DEPLOY_OR_ROLLBACK&#039;]}&quot;
  restart_command &quot;touch tmp/restart.txt&quot;
  scm_provider Chef::Provider::Git
end

&lt;/pre&gt;

If you desire to make it look and feel exactly like Capistrano then write a shell script or a Ruby script that takes the same &quot;signature&quot; and then pass those arguments along accordingly. 

A few parting thoughts. Chef isn&#039;t for everyone, in fact, some might argue that automating your infrastructure is a separate concern from deployment. Deviating too far outside the pragmatic uses of Chef could just mean that it is not a good fit for your team. Don&#039;t try to shoehorn something in because it is trendy or seemingly cool. Maybe Capistrano is exactly what you need...</description>
		<content:encoded><![CDATA[<p>If you don&#8217;t want to mess with the Chef server to update all the nodes with chef-client? Use chef-solo. </p>
<p>If don&#8217;t want to worry about editing JSON files and uploading those JSON files for chef-solo to use? I would consider exporting temporary environment variables during the execution of a remote SSH command and then referencing those in your deploy recipes. Anything you can do with Ruby you can do with Chef. So something like:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">&nbsp;
deploy <span style="color:#996600;">&quot;/my/deploy/dir&quot;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
  repo <span style="color:#996600;">&quot;git@github.com/whoami/project&quot;</span>
  revision <span style="color:#996600;">&quot;#{ENV['APP_REVISION']}&quot;</span> <span style="color:#008000; font-style:italic;"># Use the temp environment vars..</span>
  user <span style="color:#996600;">&quot;deploy_ninja&quot;</span>
  enable_submodules <span style="color:#0000FF; font-weight:bold;">true</span>
  migrate <span style="color:#0000FF; font-weight:bold;">true</span>
  migration_command <span style="color:#996600;">&quot;rake db:migrate&quot;</span>
  environment <span style="color:#996600;">&quot;RAILS_ENV&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;production&quot;</span>
  shallow_clone <span style="color:#0000FF; font-weight:bold;">true</span>
  action <span style="color:#996600;">&quot;#{ENV['DEPLOY_OR_ROLLBACK']}&quot;</span>
  restart_command <span style="color:#996600;">&quot;touch tmp/restart.txt&quot;</span>
  scm_provider <span style="color:#6666ff; font-weight:bold;">Chef::Provider::Git</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>If you desire to make it look and feel exactly like Capistrano then write a shell script or a Ruby script that takes the same &#8220;signature&#8221; and then pass those arguments along accordingly. </p>
<p>A few parting thoughts. Chef isn&#8217;t for everyone, in fact, some might argue that automating your infrastructure is a separate concern from deployment. Deviating too far outside the pragmatic uses of Chef could just mean that it is not a good fit for your team. Don&#8217;t try to shoehorn something in because it is trendy or seemingly cool. Maybe Capistrano is exactly what you need&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Infrastructure Automation with Chef by Nathan L Smith</title>
		<link>http://techwhizbang.com/2010/04/cooking-with-chef/comment-page-1/#comment-237</link>
		<dc:creator>Nathan L Smith</dc:creator>
		<pubDate>Mon, 05 Sep 2011 19:02:59 +0000</pubDate>
		<guid isPermaLink="false">http://techwhizbang.com/?p=193#comment-237</guid>
		<description>I guess the thing I&#039;m missing from Chef right now is I guess what I would call &quot;on-demand&quot; execution.

With Capistrano I do &quot;cap production deploy BRANCH=v20110903&quot; or whatever and that branch is deployed. With chef I have to set an attribute on a node or edit then upload a data bag, then run the chef-client.

This is even more important for rolling back, since that&#039;s usually a high-pressure situation, where &quot;cap production deploy:rollback&quot; instantly fixes it. I don&#039;t want to be dicking around with JSON and having to upload stuff while my server is on fire.

I guess it would be nice to be able to type a command like &quot;knife deploy omfg its on fire roll back roll back!&quot; 

I&#039;m not trying to diss chef here, I use it a lot and I&#039;m going to ditch cap for chef for deployments, but I need to come up with a solution for this (common?) use-case.</description>
		<content:encoded><![CDATA[<p>I guess the thing I&#8217;m missing from Chef right now is I guess what I would call &#8220;on-demand&#8221; execution.</p>
<p>With Capistrano I do &#8220;cap production deploy BRANCH=v20110903&#8243; or whatever and that branch is deployed. With chef I have to set an attribute on a node or edit then upload a data bag, then run the chef-client.</p>
<p>This is even more important for rolling back, since that&#8217;s usually a high-pressure situation, where &#8220;cap production deploy:rollback&#8221; instantly fixes it. I don&#8217;t want to be dicking around with JSON and having to upload stuff while my server is on fire.</p>
<p>I guess it would be nice to be able to type a command like &#8220;knife deploy omfg its on fire roll back roll back!&#8221; </p>
<p>I&#8217;m not trying to diss chef here, I use it a lot and I&#8217;m going to ditch cap for chef for deployments, but I need to come up with a solution for this (common?) use-case.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Infrastructure Automation with Chef by Nathan L Smith</title>
		<link>http://techwhizbang.com/2010/04/cooking-with-chef/comment-page-1/#comment-236</link>
		<dc:creator>Nathan L Smith</dc:creator>
		<pubDate>Mon, 05 Sep 2011 18:53:44 +0000</pubDate>
		<guid isPermaLink="false">http://techwhizbang.com/?p=193#comment-236</guid>
		<description>* I emailed Nick to ask some questions about this article and he asked me to post it here *


Hi,

I just read your article
http://techwhizbang.com/2010/04/cooking-with-chef/ , which was good,
but I had a question and I thought you might be able to answer.

In the article you&#039;re talking about how easy it is to deploy with
Chef. I&#039;ve found this to be somewhat true, but the default deploy
resource basically makes is so your &quot;master&quot; or whatever is deployed
to the system whenever you run chef-client. So, if I&#039;m running
chef-client as a daemon and doing continuous deployment that&#039;s cool,
but I&#039;m still not getting it for periodic deploys of a certain branch
or for rolling back.

I mean, a collegue asked me, &quot;how do I deploy the app&quot;, and I told
him, &quot;well, you don&#039;t really deploy the app, you bring the node into a
state of convergence.&quot;, then he said, &quot;What?&quot;

I&#039;m deploying with the deploy resource and apps data bag, and I&#039;m
thinking of making a knife plugin where I can do `knife deploy
production myapp` that sets an attribute for the action of the deploy
resource or something, so I was wondering how you handle rolling back
(as I understand it, the way the defaults work I have to edit a
cookbook if I want to roll back, which is not cool.)

Also, you said, &quot;Take deployment and rollback even a step further with
a tool like Hudson or TeamCity. Configure a job for them to run and
wire up the Chef deployment script. The “easy button” deployment and
rollback.&quot; Could you explain how you do this?

* He replied: *

Hi Nathan,

For some reason your name sounds familiar. Thanks for the inquiry and the complement. I think Chef is a good choice for deployment if you are already using it for automating your setups. It is probably way too much trouble in terms of setup and understanding for just the deploy resource. Although you could just use chef-solo to sidestep the complicated steps of maintaining and managing the full Chef server stack. I&#039;m assuming you&#039;re intending on using it to its fullest extent. I&#039;ve used the deploy resource a couple different ways. The first way I used it was to create a recipe that does deploying/rollbacks for each target environment. Imagine a cookbook with the following recipes:

--- deploy_some_app_cookbook
  - development.rb
  - qa.rb
  - staging.rb
  - production.rb

All of these recipes share the same code except for a couple things captured in attributes. The recipes have attributes for the target tag or branch and potentially if you&#039;e deploying or rolling back:
default[:deploy_apps][:vcs_branch_or_tag] = &quot;Tag v0.0.1&quot;
default[:deploy_apps][:rollback] = false

So when you use these recipes you can reference the attributes in the deploy resource. This way you aren&#039;t always deploying master or trunk. Update the recipes and attributes across Chef accordingly as things for your project(s) change.

Another approach is to use data bags. You can access data bags similarly in your recipes. By the way, the deploy resource is extensible to just about any application, not just Rails apps. I&#039;ve molded it to deploy WAR files, background applications, and all types of services. 

You were concerned about rollback, but Chef does 2 types of deployments - timestamped or commit revisions. When you execute a rollback, Chef places a file on your server that keeps track of the last 10 or so deploys in the exact order they were performed along with all of the artifacts necessary to perform the rollback. So when you do a rollback you don&#039;t have to worry about specifying a revision number, tag, or anything of that sort. Just &quot;rollback&quot; and Chef will automatically change the symlink it uses to point to the previous deploy. 

In terms of using Team City or Jenkins as an &quot;easy button&quot;. Both of the CI servers will take an arbitrary shell script, executable, rake task, maven task, ant task, or whatever else you can dream up. You would normally use the command line to do a deploy with Chef, so my suggestion was to make it one step easier. Create a job that will execute a shell script that wraps the Chef commands used for deployment and rollback.

I think once you get Chef fully up and running and begin using it this will be easier and also become very clear. Hope this helps.</description>
		<content:encoded><![CDATA[<p>* I emailed Nick to ask some questions about this article and he asked me to post it here *</p>
<p>Hi,</p>
<p>I just read your article<br />
<a href="http://techwhizbang.com/2010/04/cooking-with-chef/" rel="nofollow">http://techwhizbang.com/2010/04/cooking-with-chef/</a> , which was good,<br />
but I had a question and I thought you might be able to answer.</p>
<p>In the article you&#8217;re talking about how easy it is to deploy with<br />
Chef. I&#8217;ve found this to be somewhat true, but the default deploy<br />
resource basically makes is so your &#8220;master&#8221; or whatever is deployed<br />
to the system whenever you run chef-client. So, if I&#8217;m running<br />
chef-client as a daemon and doing continuous deployment that&#8217;s cool,<br />
but I&#8217;m still not getting it for periodic deploys of a certain branch<br />
or for rolling back.</p>
<p>I mean, a collegue asked me, &#8220;how do I deploy the app&#8221;, and I told<br />
him, &#8220;well, you don&#8217;t really deploy the app, you bring the node into a<br />
state of convergence.&#8221;, then he said, &#8220;What?&#8221;</p>
<p>I&#8217;m deploying with the deploy resource and apps data bag, and I&#8217;m<br />
thinking of making a knife plugin where I can do `knife deploy<br />
production myapp` that sets an attribute for the action of the deploy<br />
resource or something, so I was wondering how you handle rolling back<br />
(as I understand it, the way the defaults work I have to edit a<br />
cookbook if I want to roll back, which is not cool.)</p>
<p>Also, you said, &#8220;Take deployment and rollback even a step further with<br />
a tool like Hudson or TeamCity. Configure a job for them to run and<br />
wire up the Chef deployment script. The “easy button” deployment and<br />
rollback.&#8221; Could you explain how you do this?</p>
<p>* He replied: *</p>
<p>Hi Nathan,</p>
<p>For some reason your name sounds familiar. Thanks for the inquiry and the complement. I think Chef is a good choice for deployment if you are already using it for automating your setups. It is probably way too much trouble in terms of setup and understanding for just the deploy resource. Although you could just use chef-solo to sidestep the complicated steps of maintaining and managing the full Chef server stack. I&#8217;m assuming you&#8217;re intending on using it to its fullest extent. I&#8217;ve used the deploy resource a couple different ways. The first way I used it was to create a recipe that does deploying/rollbacks for each target environment. Imagine a cookbook with the following recipes:</p>
<p>&#8212; deploy_some_app_cookbook<br />
  &#8211; development.rb<br />
  &#8211; qa.rb<br />
  &#8211; staging.rb<br />
  &#8211; production.rb</p>
<p>All of these recipes share the same code except for a couple things captured in attributes. The recipes have attributes for the target tag or branch and potentially if you&#8217;e deploying or rolling back:<br />
default[:deploy_apps][:vcs_branch_or_tag] = &#8220;Tag v0.0.1&#8243;<br />
default[:deploy_apps][:rollback] = false</p>
<p>So when you use these recipes you can reference the attributes in the deploy resource. This way you aren&#8217;t always deploying master or trunk. Update the recipes and attributes across Chef accordingly as things for your project(s) change.</p>
<p>Another approach is to use data bags. You can access data bags similarly in your recipes. By the way, the deploy resource is extensible to just about any application, not just Rails apps. I&#8217;ve molded it to deploy WAR files, background applications, and all types of services. </p>
<p>You were concerned about rollback, but Chef does 2 types of deployments &#8211; timestamped or commit revisions. When you execute a rollback, Chef places a file on your server that keeps track of the last 10 or so deploys in the exact order they were performed along with all of the artifacts necessary to perform the rollback. So when you do a rollback you don&#8217;t have to worry about specifying a revision number, tag, or anything of that sort. Just &#8220;rollback&#8221; and Chef will automatically change the symlink it uses to point to the previous deploy. </p>
<p>In terms of using Team City or Jenkins as an &#8220;easy button&#8221;. Both of the CI servers will take an arbitrary shell script, executable, rake task, maven task, ant task, or whatever else you can dream up. You would normally use the command line to do a deploy with Chef, so my suggestion was to make it one step easier. Create a job that will execute a shell script that wraps the Chef commands used for deployment and rollback.</p>
<p>I think once you get Chef fully up and running and begin using it this will be easier and also become very clear. Hope this helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JavaScript MVC Pattern by Joel</title>
		<link>http://techwhizbang.com/2011/04/javascript-mvc-pattern/comment-page-1/#comment-223</link>
		<dc:creator>Joel</dc:creator>
		<pubDate>Fri, 15 Jul 2011 14:45:15 +0000</pubDate>
		<guid isPermaLink="false">http://techwhizbang.com/?p=395#comment-223</guid>
		<description>If you really crave simplicity, knockout is seriously worth checking out.  I know it advertises itself as an MVVM framework and not MVC but it is pretty easy to roll out a knockout based MVC architecture instead.  What I like about knockout is that it is just 3 functions.

~approximately~
myModel = function(){
this.myField = ko.observable() -&gt; creates a field that binds to the view 

this.myArray = ko.observableArray() -&gt; creates an array that binds to the view 
}

ko.applyBindings(myModel);

I tried backbone first.  Pretty cool for sure, but I didn&#039;t like being tied to the backbone base classes.  With knockout, I can pretty easily switch frameworks if I every need to.  The integration is pretty flexible.

Just my two cents</description>
		<content:encoded><![CDATA[<p>If you really crave simplicity, knockout is seriously worth checking out.  I know it advertises itself as an MVVM framework and not MVC but it is pretty easy to roll out a knockout based MVC architecture instead.  What I like about knockout is that it is just 3 functions.</p>
<p>~approximately~<br />
myModel = function(){<br />
this.myField = ko.observable() -&gt; creates a field that binds to the view </p>
<p>this.myArray = ko.observableArray() -&gt; creates an array that binds to the view<br />
}</p>
<p>ko.applyBindings(myModel);</p>
<p>I tried backbone first.  Pretty cool for sure, but I didn&#8217;t like being tied to the backbone base classes.  With knockout, I can pretty easily switch frameworks if I every need to.  The integration is pretty flexible.</p>
<p>Just my two cents</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Object Oriented JavaScript by JavaScript Testing with Jasmine &#8211; Nick Zalabak - techwhizbang</title>
		<link>http://techwhizbang.com/2011/05/object-oriented-javascript/comment-page-1/#comment-219</link>
		<dc:creator>JavaScript Testing with Jasmine &#8211; Nick Zalabak - techwhizbang</dc:creator>
		<pubDate>Tue, 17 May 2011 05:11:27 +0000</pubDate>
		<guid isPermaLink="false">http://techwhizbang.com/?p=428#comment-219</guid>
		<description>[...] can be found here: https://github.com/techwhizbang/js_techtalk. Have a look at my presentation on Object Oriented JavaScript also. Testing JavaScript with Jasmine View more presentations from [...]</description>
		<content:encoded><![CDATA[<p>[...] can be found here: <a href="https://github.com/techwhizbang/js_techtalk" rel="nofollow">https://github.com/techwhizbang/js_techtalk</a>. Have a look at my presentation on Object Oriented JavaScript also. Testing JavaScript with Jasmine View more presentations from [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Multiple Sinatra Apps and Cucumber by WaYdotNET</title>
		<link>http://techwhizbang.com/2010/09/modular-sinatra-apps-with-cucumber/comment-page-1/#comment-204</link>
		<dc:creator>WaYdotNET</dc:creator>
		<pubDate>Thu, 24 Feb 2011 10:25:50 +0000</pubDate>
		<guid isPermaLink="false">http://techwhizbang.com/?p=332#comment-204</guid>
		<description>Great post! Many thanks !</description>
		<content:encoded><![CDATA[<p>Great post! Many thanks !</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Session Store Strategy Using Memcached by ehcache.net</title>
		<link>http://techwhizbang.com/2009/12/memcache-session-store/comment-page-1/#comment-166</link>
		<dc:creator>ehcache.net</dc:creator>
		<pubDate>Thu, 06 Jan 2011 09:28:47 +0000</pubDate>
		<guid isPermaLink="false">http://techwhizbang.com/?p=65#comment-166</guid>
		<description>&lt;strong&gt;Session Store Strategy Using Memcached...&lt;/strong&gt;

It is becoming increasingly popular to mix technologies, frameworks, and languages to power a web site. So what happens when you want to share session data between some permutation of a Ruby, PHP, .NET, Python, Java web framework? Well of course using ...</description>
		<content:encoded><![CDATA[<p><strong>Session Store Strategy Using Memcached&#8230;</strong></p>
<p>It is becoming increasingly popular to mix technologies, frameworks, and languages to power a web site. So what happens when you want to share session data between some permutation of a Ruby, PHP, .NET, Python, Java web framework? Well of course using &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JRuby, ActiveRecord, JDBC to SQL Server by Sinatra + Microsoft SQL server ?? &#8212; halfdecent.net</title>
		<link>http://techwhizbang.com/2010/03/jruby-activerecord-jdbc-sqlserver/comment-page-1/#comment-135</link>
		<dc:creator>Sinatra + Microsoft SQL server ?? &#8212; halfdecent.net</dc:creator>
		<pubDate>Tue, 21 Sep 2010 12:51:21 +0000</pubDate>
		<guid isPermaLink="false">http://techwhizbang.com/?p=109#comment-135</guid>
		<description>[...] http://techwhizbang.com/2010/03/jruby-activerecord-jdbc-sqlserver/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://techwhizbang.com/2010/03/jruby-activerecord-jdbc-sqlserver/" rel="nofollow">http://techwhizbang.com/2010/03/jruby-activerecord-jdbc-sqlserver/</a> [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 0.833 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-05-20 10:09:56 -->

