<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Dr Nic</title>
	
	<link>http://drnicwilliams.com</link>
	<description>Ruby makes Rails, Javascript makes Ajax, Dr Nic makes Magic</description>
	<lastBuildDate>Wed, 08 May 2013 17:27:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/DrNic" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="drnic" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">DrNic</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Creating new BOSH releases with bosh-gen and bosh-solo</title>
		<link>http://drnicwilliams.com/2012/08/20/creating-new-bosh-releases-with-bosh-gen-and-bosh-solo/</link>
		<comments>http://drnicwilliams.com/2012/08/20/creating-new-bosh-releases-with-bosh-gen-and-bosh-solo/#comments</comments>
		<pubDate>Mon, 20 Aug 2012 15:01:32 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Announcement]]></category>
		<category><![CDATA[BOSH]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=879</guid>
		<description><![CDATA[Below is a 45-minute walk-thru tutorial of creating and deploying a BOSH release for a Redis VM. It introduces a brand new tool: bosh-solo. A BOSH release describes a complete running system from the ground up &#8211; compiled packages from source, templated configuration files, and monit to start/stop processes. BOSH itself then allows you to [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2012/05/15/bosh-what-how-when/' rel='bookmark' title='Permanent Link: BOSH: What, How, When'>BOSH: What, How, When</a> <small>I&#8217;m still very bullish on BOSH. I&#8217;ve been experimenting with...</small></li><li><a href='http://drnicwilliams.com/2012/04/16/creating-a-bosh-from-scratch-on-aws/' rel='bookmark' title='Permanent Link: Creating a BOSH from scratch on AWS'>Creating a BOSH from scratch on AWS</a> <small> A lot of devops projects revolve around managing instances/VMs...</small></li><li><a href='http://drnicwilliams.com/2012/04/10/instant-new-rails-applications-with-the-app-scrolls/' rel='bookmark' title='Permanent Link: Instant new Rails applications with the App Scrolls'>Instant new Rails applications with the App Scrolls</a> <small>When I start a new project I want to start...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>Below is a 45-minute walk-thru tutorial of creating and deploying a BOSH release for a Redis VM. It introduces a brand new tool: <a href="https://github.com/drnic/bosh-solo">bosh-solo</a>.</p>
<p>A BOSH release describes a complete running system from the ground up &#8211; compiled packages from source, templated configuration files, and monit to start/stop processes. BOSH itself then allows you to deploy your release across 1 or more VMs with optional persistent disks on the target infrastructure of your choice.</p>
<p>With bosh-solo you can develop and test BOSH releases without BOSH itself. Develop an entire working system quickly before you deploy to production.</p>
<blockquote>
<p>&#8220;Just wanted to share a small personal achievement, last night I was able to<br />
take a release I had created (actually, the redis-on-demand from your<br />
tutorial) and bring it up using bosh-solo, connect to it, set/get, etc. </p>
<p>&#8220;I&#8217;ve gotta say, this is VERY slick. Awesome work on this.&#8221; &#8211; <a href="http://www.brianmmcclain.com/" title="Blog of Brian - brianmmcclain.com">Brian McClain</a>, creator of <a href="http://boshdb.cloudfoundry.com/">BoshDB</a>.</p>
</blockquote>
<p><iframe width="560" height="315" src="http://www.youtube.com/embed/0pnzDmIrspY" frameborder="0" allowfullscreen></iframe></p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2012/05/15/bosh-what-how-when/' rel='bookmark' title='Permanent Link: BOSH: What, How, When'>BOSH: What, How, When</a> <small>I&#8217;m still very bullish on BOSH. I&#8217;ve been experimenting with...</small></li><li><a href='http://drnicwilliams.com/2012/04/16/creating-a-bosh-from-scratch-on-aws/' rel='bookmark' title='Permanent Link: Creating a BOSH from scratch on AWS'>Creating a BOSH from scratch on AWS</a> <small> A lot of devops projects revolve around managing instances/VMs...</small></li><li><a href='http://drnicwilliams.com/2012/04/10/instant-new-rails-applications-with-the-app-scrolls/' rel='bookmark' title='Permanent Link: Instant new Rails applications with the App Scrolls'>Instant new Rails applications with the App Scrolls</a> <small>When I start a new project I want to start...</small></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DrNic?a=1ZVPWC92tWc:Gp11MK_herM:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/DrNic?i=1ZVPWC92tWc:Gp11MK_herM:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=1ZVPWC92tWc:Gp11MK_herM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DrNic?i=1ZVPWC92tWc:Gp11MK_herM:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=1ZVPWC92tWc:Gp11MK_herM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/DrNic?i=1ZVPWC92tWc:Gp11MK_herM:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2012/08/20/creating-new-bosh-releases-with-bosh-gen-and-bosh-solo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BOSH: What, How, When</title>
		<link>http://drnicwilliams.com/2012/05/15/bosh-what-how-when/</link>
		<comments>http://drnicwilliams.com/2012/05/15/bosh-what-how-when/#comments</comments>
		<pubDate>Wed, 16 May 2012 05:38:41 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[BOSH]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=851</guid>
		<description><![CDATA[I&#8217;m still very bullish on BOSH. I&#8217;ve been experimenting with it internally at work, looking to see how it could duplicate or improve upon our current infrastructure, automation and release management. I&#8217;ve also watched the commits that have come out in the last month and I&#8217;m excited by the project velocity and direction. A few [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2012/08/20/creating-new-bosh-releases-with-bosh-gen-and-bosh-solo/' rel='bookmark' title='Permanent Link: Creating new BOSH releases with bosh-gen and bosh-solo'>Creating new BOSH releases with bosh-gen and bosh-solo</a> <small>Below is a 45-minute walk-thru tutorial of creating and deploying...</small></li><li><a href='http://drnicwilliams.com/2012/04/16/creating-a-bosh-from-scratch-on-aws/' rel='bookmark' title='Permanent Link: Creating a BOSH from scratch on AWS'>Creating a BOSH from scratch on AWS</a> <small> A lot of devops projects revolve around managing instances/VMs...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m still very bullish on <a href="https://github.com/cloudfoundry/bosh">BOSH</a>. I&#8217;ve been experimenting with it internally at work, looking to see how it could duplicate or improve upon our current infrastructure, automation and release management. I&#8217;ve also watched the commits that have come out in the last month and I&#8217;m excited by the project velocity and direction.</p>
<p>A few weeks ago I was fortunate to be invited to LinkedIn to the SV Forum group to give an introduction to BOSH. What it is, why it was created, how to use it and when you might use it.</p>
<p>This talk also includes cutaways to Vadim Spivak from the Cloud Foundry &#038; BOSH core teams, who has many very interesting things to say about BOSH and the future of BOSH.</p>
<p><iframe src="http://player.vimeo.com/video/42248020" width="600" height="337" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
<p><a href="http://vimeo.com/42248020">BOSH: What, How, When</a> from <a href="http://vimeo.com/drnicwilliams">Dr Nic</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>This talk is one hour. If you only have 10 minutes, there is a good introduction upfront. Or you could read the slides first to decide if you want to watch the talk.</p>
<p><script async class="speakerdeck-embed" data-id="4fb3a58225741e00220266f8" data-ratio="1.7777777777777777" src="//speakerdeck.com/assets/embed.js"></script></p>
<p>I&#8217;ve rewatched this talk. Given all the things I&#8217;ve learnt about using it and living it, for the most part I still agree with myself and what I said. That&#8217;s handy.</p>
<p>It was two days after RedHat had released OpenShift, so I had a few bonus comments to make about OpenShift towards the end of the talk. I&#8217;m also some what liberal with making jokes about any other technology that comes into my mind at the time. A politically correct person might have said different things. </p>
<p>At the time of the talk, I was not able to give a live demo of BOSH. I think such a demo would be valuable to get a complete &#8220;what is BOSH?&#8221; understanding, since it was a 5 minute demo that sold me on it.</p>
<p>Thanks to LinkedIn for recording the talk and for letting me share the video, and to LinkedIn&#8217;s Dan Lujan for doing the great post-production work. It&#8217;s a great room they have there for giving talks, and with all the cameras in the room they got some great shots of Vadim answering questions.</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2012/08/20/creating-new-bosh-releases-with-bosh-gen-and-bosh-solo/' rel='bookmark' title='Permanent Link: Creating new BOSH releases with bosh-gen and bosh-solo'>Creating new BOSH releases with bosh-gen and bosh-solo</a> <small>Below is a 45-minute walk-thru tutorial of creating and deploying...</small></li><li><a href='http://drnicwilliams.com/2012/04/16/creating-a-bosh-from-scratch-on-aws/' rel='bookmark' title='Permanent Link: Creating a BOSH from scratch on AWS'>Creating a BOSH from scratch on AWS</a> <small> A lot of devops projects revolve around managing instances/VMs...</small></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DrNic?a=F_6HQuekJhw:TntOnlaljnk:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/DrNic?i=F_6HQuekJhw:TntOnlaljnk:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=F_6HQuekJhw:TntOnlaljnk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DrNic?i=F_6HQuekJhw:TntOnlaljnk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=F_6HQuekJhw:TntOnlaljnk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/DrNic?i=F_6HQuekJhw:TntOnlaljnk:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2012/05/15/bosh-what-how-when/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a BOSH from scratch on AWS</title>
		<link>http://drnicwilliams.com/2012/04/16/creating-a-bosh-from-scratch-on-aws/</link>
		<comments>http://drnicwilliams.com/2012/04/16/creating-a-bosh-from-scratch-on-aws/#comments</comments>
		<pubDate>Mon, 16 Apr 2012 23:24:36 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[BOSH]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=837</guid>
		<description><![CDATA[A lot of devops projects revolve around managing instances/VMs once they already exist. For example, Chef and Puppet do configuration management of instances once the instances have been created. The &#8220;monitoring sucks&#8221; work is concerned with monitoring the contents/jobs/processes of instances and the instances themselves. Libraries such as fog and jclouds dedicate themselves to provisioning [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2012/08/20/creating-new-bosh-releases-with-bosh-gen-and-bosh-solo/' rel='bookmark' title='Permanent Link: Creating new BOSH releases with bosh-gen and bosh-solo'>Creating new BOSH releases with bosh-gen and bosh-solo</a> <small>Below is a 45-minute walk-thru tutorial of creating and deploying...</small></li><li><a href='http://drnicwilliams.com/2012/05/15/bosh-what-how-when/' rel='bookmark' title='Permanent Link: BOSH: What, How, When'>BOSH: What, How, When</a> <small>I&#8217;m still very bullish on BOSH. I&#8217;ve been experimenting with...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p><a href="https://github.com/cloudfoundry/oss-docs/blob/master/bosh/documentation/documentation.md#readme"><img src="https://github.com/cloudfoundry/oss-docs/raw/master/bosh/documentation/fig1.png" alt="BOSH architecture" style="float: right; width: 200px"/></a></p>
<p>A lot of devops projects revolve around managing instances/VMs once they already exist. For example, <a href="https://github.com/opscode/chef">Chef</a> and <a href="https://github.com/puppetlabs/puppet">Puppet</a> do configuration management of instances once the instances have been created. The &#8220;<a href="http://lusislog.blogspot.com/2011/06/why-monitoring-sucks.html">monitoring sucks</a>&#8221; work is concerned with monitoring the contents/jobs/processes of instances and the instances themselves. Libraries such as <a href="https://github.com/fog/fog">fog</a> and <a href="http://www.jclouds.org/">jclouds</a> dedicate themselves to provisioning instances and other cloud resources. </p>
<p><a href="https://github.com/cloudfoundry/bosh">BOSH</a> attempts to do something that I haven&#8217;t seen in OSS yet. It wants to allow a devops team to describe the entire software stack &#8211; from the base operating system image used to boot new instances (stemcell), to the software packages installed on instances (packages), to the processes that are run on each instance (jobs). It wants to allow a devops team to describe the runtime deployment of your stack &#8211; which instance types are used, how many of them, how much disk is attached, and how networking properties such as IPs are configured.</p>
<p>More than that, BOSH then wants to allow you to change the configuration &#8211; change instance types (scale vertically), how many of them (scale horizontally), upgrade packages, and even upgrade the base image &#8211; and deploy all those changes/deltas to the running system.</p>
<p>That&#8217;s what it wants to do.</p>
<p>And then I saw a demo of it doing it. This demo was running against vSphere. There was a running deployment of instances, which I could also see in vCenter. A simple YAML configuration file was changed &#8211; he changed the instance specification to add more CPUs to each instance &#8211; and ran <code>bosh deploy</code>. </p>
<p>Then I watched vCenter light up as it reflectively showed that disks were being detached; instances were being torn down; new, bigger CPU instances being booted, and the disks reattached.</p>
<p>I needed one of these BOSH things immediately. It has some good high-level and low-level <a href="https://github.com/cloudfoundry/oss-docs/blob/master/bosh/documentation/documentation.md#readme">documentation</a>&#8230;</p>
<p>But first, I needed a BOSH. And I needed a BOSH that could talk to AWS instead of vSphere.</p>
<p>Below is a screencast of creating your own BOSH on AWS. <a href="https://github.com/drnic/bosh-getting-started/blob/master/creating-a-bosh-from-scratch.md">The written instructions are also available.</a></p>
<p><iframe src="http://player.vimeo.com/video/40484383" width="550" height="415" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></p>
<p>Thanks to a whole bunch of CloudFoundry folk who wrote BOSH and also helped me figure out how to set it up: <a href="https://twitter.com/#!/olegshaldybin">Oleg</a>, <a href="https://twitter.com/#!/vadimspivak">Vadim</a>, <a href="https://twitter.com/#!/skaar">skaar</a>, <a href="https://twitter.com/#!/pmenglund">Martin</a>, and Mahesh. Also to <a href="https://twitter.com/#!/marklucovsky">Mark</a>, <a href="https://twitter.com/#!/mccrory">Dave</a>, <a href="https://twitter.com/#!/mreider">Matt</a> and <a href="https://twitter.com/#!/jambay">James</a> for sharing and caring when I visited the team.</p>
<h3 id="what8217s_next_how_do_i_use_bosh">What&#8217;s next? How do I use BOSH?</h3>
<p>Once you get a BOSH created, I&#8217;ve <a href="https://github.com/drnic/bosh-getting-started/blob/master/README.md">started some other tutorials</a> for how to use BOSH as I figure it out. Perhaps it could become a handbook or guide in the future. If you find any bugs, or have suggestions, please drop a ticket in the Issues.</p>
<p>At the time of writing, there are the following tutorials/guides:</p>
<ul>
<li><a href="https://github.com/drnic/bosh-getting-started/blob/master/creating-a-bosh-from-scratch.md">Creating a BOSH from scratch</a></li>
<li><a href="https://github.com/drnic/bosh-getting-started/blob/master/uploading-public-stemcell.md">Uploading a public stemcell</a></li>
<li><a href="https://github.com/drnic/bosh-getting-started/blob/master/deploying-sample-release.md">Deploy a sample application</a></li>
</ul>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2012/08/20/creating-new-bosh-releases-with-bosh-gen-and-bosh-solo/' rel='bookmark' title='Permanent Link: Creating new BOSH releases with bosh-gen and bosh-solo'>Creating new BOSH releases with bosh-gen and bosh-solo</a> <small>Below is a 45-minute walk-thru tutorial of creating and deploying...</small></li><li><a href='http://drnicwilliams.com/2012/05/15/bosh-what-how-when/' rel='bookmark' title='Permanent Link: BOSH: What, How, When'>BOSH: What, How, When</a> <small>I&#8217;m still very bullish on BOSH. I&#8217;ve been experimenting with...</small></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DrNic?a=YeP_nJy0uhk:CPVrSyk_vU4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/DrNic?i=YeP_nJy0uhk:CPVrSyk_vU4:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=YeP_nJy0uhk:CPVrSyk_vU4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DrNic?i=YeP_nJy0uhk:CPVrSyk_vU4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=YeP_nJy0uhk:CPVrSyk_vU4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/DrNic?i=YeP_nJy0uhk:CPVrSyk_vU4:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2012/04/16/creating-a-bosh-from-scratch-on-aws/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Instant new Rails applications with the App Scrolls</title>
		<link>http://drnicwilliams.com/2012/04/10/instant-new-rails-applications-with-the-app-scrolls/</link>
		<comments>http://drnicwilliams.com/2012/04/10/instant-new-rails-applications-with-the-app-scrolls/#comments</comments>
		<pubDate>Tue, 10 Apr 2012 22:01:03 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Announcement]]></category>
		<category><![CDATA[Engine Yard]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=833</guid>
		<description><![CDATA[When I start a new project I want to start how I plan to finish. If I intend to write integration tests then I want to start them immediately. If I intend to set up continuous integration then I want CI setup immediately. If I intend to deploy the app somewhere then I want to [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2010/03/15/using-coffeescript-in-rails-and-even-on-heroku/' rel='bookmark' title='Permanent Link: Using CoffeeScript in Rails and even on Heroku'>Using CoffeeScript in Rails and even on Heroku</a> <small>I&#8217;m pretty excited about CoffeeScript as a clean-syntax replacement for...</small></li><li><a href='http://drnicwilliams.com/2009/11/03/first-look-at-rails-3-0-pre/' rel='bookmark' title='Permanent Link: First look at rails 3.0.pre'>First look at rails 3.0.pre</a> <small> This article is out of date in some aspects....</small></li><li><a href='http://drnicwilliams.com/2009/10/07/rails-themes-can-remember-things/' rel='bookmark' title='Permanent Link: Rails themes can remember things'>Rails themes can remember things</a> <small>I was getting annoyed at having to remember all the...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>When I start a new project I want to start how I plan to finish. </p>
<p>If I intend to write integration tests then I want to start them immediately. If I intend to set up continuous integration then I want CI setup immediately. If I intend to deploy the app somewhere then I want to deploy it immediately. If I intend to use some background workers, I want to know that they are setup immediately.</p>
<p>I want it all setup as easily as I can generate a new Rails app. They shouldn&#8217;t be extra work later. I&#8217;ll be busy then.</p>
<p>Assuming you want the same simplicity and speed, then let me share with you the <a href="http://appscrolls.org/">App Scrolls</a>!</p>
<pre><code>gem install appscrolls
scrolls new mydemoapp -s twitter_bootstrap unicorn postgresql resque github eycloud
</code></pre>
<p>This one command will:</p>
<ul>
<li>create a new Rails application called &#8220;mydemoapp&#8221;</li>
<li>install Twitter Bootstrap (you choose fixed or floating) and some other Rails basic tweaks</li>
<li>sets up Unicorn and Postgresql in the application</li>
<li>sets up Resque and Redis for background workers</li>
<li>hosts the project on GitHub (public or private repo)</li>
<li>deploys the application on Engine Yard Cloud</li>
</ul>
<p>These are the magical App Scrolls!</p>
<p>Can you run the command above, or do you need a video to see it happen? Let me know.</p>
<h3 id="scrolls_are_interactive">Scrolls are interactive</h3>
<pre><code>$ scrolls new myapp -s twitter_bootstrap github resque postgresql unicorn eycloud
...
   question  Create a GitHub repository?
          1)  Public
          2)  Private
      github  Enter your selection: 1
...
      resque  Enter a secret string for the route /resque/YOUR-SECRET-STRING: mysecret
...
    question  Which Twitter Bootstrap layout?
          1)  Fluid
          2)  Fixed
  twitter_bootstrap  Enter your selection: 2
...
    question  Select application cluster configuration?
          1)  Basic - 1 app VM (5 CPU-based processes) &amp; DB Master VM
          2)  Pro   - 3 app highly-available VMs (15 CPU-based processes) &amp; DB Master VM
          3)  Solo  - 1 VM for app processes, DB and other services
     eycloud  Enter your selection: 1
</code></pre>
<h3 id="deploy_automatically">Deploy automatically</h3>
<p>I perfer to host on Engine Yard Cloud and I work there. So I added support to Engine Yard Cloud to all the scrolls and it will automatically boot a new environment and deploy your new application. Thanks to David Calavera&#8217;s unofficial <a href="https://github.com/calavera/ey_cli">ey_cli</a> tool and the unofficial <a href="https://github.com/defunkt/github-gem">github-ruby</a> CLI for making this possible!</p>
<h3 id="which_scrolls_are_supported">Which Scrolls are supported?</h3>
<p>Lots of magical scrolls are available!</p>
<pre><code>administration: active_admin
assets: jquery, prototype
deployment: eycloud, eycloud_recipes_on_deploy, git, github, passenger, unicorn
persistence: mysql, postgresql, redis, sqlite3
stylesheet: twitter_bootstrap
templating: simple_form
testing: capybara, cucumber, rspec, test_unit
worker: delayed_job, resque
other: env_yaml, guard, rails_basics, split
</code></pre>
<p>I might blog about individual combinations later. My favourite is <code>guard</code>, which magically combines with other scrolls you choose.</p>
<h3 id="heroku_or_cloudfoundry">Heroku or CloudFoundry?</h3>
<p>If you&#8217;re a fan/employee of Salesforce/Heroku or VMWare/CloudFoundry or other platform, can I please ask for your help to make the current set of scrolls work? I&#8217;ll pair with you to get you started if you need it; though I think the code base and the scrolls are relatively self explanatory.</p>
<h3 id="isn8217t_this_like_rails_wizard">Isn&#8217;t this like Rails Wizard?</h3>
<p>Yes! Before the App Scrolls, there was Michael Bleigh&#8217;s <a href="http://railswizard.org/">Rails Wizard</a>. He created the first version during the 2010 Rails Rumble [<a href="http://intridea.com/posts/the-rails-rumble-intridean-tradition" title="The Rails Rumble: An Intridean Tradition | Intridea Blog">Intridea blog post</a>], and iterated on it a few times. I especially like that he extracted the project into two codebases &#8211; the <a href="https://github.com/intridea/rails_wizard">CLI/scrolls</a> and the <a href="https://github.com/intridea/rails_wizard.web">web version</a>.</p>
<p>I renamed it because ultimately I think it could support more than Rails applications and it definitely should become more than a &#8220;new application wizard&#8221;. And because I&#8217;ve been playing Elder Scrolls. Fortunately, Michael convinced me not to name the project after the computer game. Thanks to Thom Mahoney for suggesting &#8220;App Scrolls&#8221; and saving me from a naming nightmare.</p>
<p>A new name and a new repository? I&#8217;m still in two minds as to if I should have done that. Oh well, its done now. App Scrolls is a cool name.</p>
<h3 id="why_8220scrolls8221">Why &#8220;Scrolls&#8221;?</h3>
<p>Rails Wizard used the word &#8220;recipe&#8221; to describe each component or service that would be added to a new application. Talking with others at Engine Yard, the word &#8220;recipe&#8221; got confusing. There were wizard recipes and chef recipes. When you wanted to use Resque you needed both. &#8220;Scrolls!&#8221; seemed a fun alternative name. </p>
<p>Wizards use scrolls, not recipes. Every D&amp;D person knows that.</p>
<h3 id="where_are_all_the_old_scrolls">Where are all the old scrolls?</h3>
<p>For the initial release, I&#8217;ve moved many contributed &#8220;recipes&#8221; from the Rails Wizard into the <a href="https://github.com/drnic/appscrolls/tree/master/scrolls/zzz">scrolls/zzz</a> archive folder. There are so many and I don&#8217;t yet know how to ensure they all work as expected. I intend to find a good way to allow rubygems to self-host their scroll.</p>
<h3 id="continuous_integration">Continuous Integration?</h3>
<p>I mentioned that I like CI to be setup immediately for new applications. That&#8217;s next. Jenkins, Travis CI (when they release private application support), and what other CI systems should be supported?</p>
<p>I hope you use the App Scrolls for your next big or small Rails app and that its useful to you!</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2010/03/15/using-coffeescript-in-rails-and-even-on-heroku/' rel='bookmark' title='Permanent Link: Using CoffeeScript in Rails and even on Heroku'>Using CoffeeScript in Rails and even on Heroku</a> <small>I&#8217;m pretty excited about CoffeeScript as a clean-syntax replacement for...</small></li><li><a href='http://drnicwilliams.com/2009/11/03/first-look-at-rails-3-0-pre/' rel='bookmark' title='Permanent Link: First look at rails 3.0.pre'>First look at rails 3.0.pre</a> <small> This article is out of date in some aspects....</small></li><li><a href='http://drnicwilliams.com/2009/10/07/rails-themes-can-remember-things/' rel='bookmark' title='Permanent Link: Rails themes can remember things'>Rails themes can remember things</a> <small>I was getting annoyed at having to remember all the...</small></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DrNic?a=lW21HeGiq2U:0NqrY5_ECxY:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/DrNic?i=lW21HeGiq2U:0NqrY5_ECxY:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=lW21HeGiq2U:0NqrY5_ECxY:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DrNic?i=lW21HeGiq2U:0NqrY5_ECxY:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=lW21HeGiq2U:0NqrY5_ECxY:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/DrNic?i=lW21HeGiq2U:0NqrY5_ECxY:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2012/04/10/instant-new-rails-applications-with-the-app-scrolls/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>How to stop killing people with your public speeches</title>
		<link>http://drnicwilliams.com/2011/11/11/how-to-stop-killing-people-with-your-public-speeches/</link>
		<comments>http://drnicwilliams.com/2011/11/11/how-to-stop-killing-people-with-your-public-speeches/#comments</comments>
		<pubDate>Sat, 12 Nov 2011 00:11:19 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Speaking]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=819</guid>
		<description><![CDATA[Let&#8217;s do the math. If you give a speech to 200 people for 30 minutes you are consuming 100 hours of human life. Giving an hour-long talk to a thousand people? That&#8217;s six weeks of human life devoted to your talk. *gulp*! Let&#8217;s assume 6 weeks of human life is at stake. It is not [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s do the math.</p>
<p>If you give a speech to 200 people for 30 minutes <strong>you are consuming 100 hours of human life</strong>.</p>
<p>Giving an hour-long talk to a thousand people? That&#8217;s <strong>six weeks</strong> of human life devoted to your talk.</p>
<p><strong>*gulp*</strong>! </p>
<p>Let&#8217;s assume 6 weeks of human life is at stake. It is not a loan and you cannot give it back. One hour after you finish speaking, you&#8217;ve used up 6 weeks of human life.</p>
<p>If you&#8217;re bad enough for long enough you kill a whole person.</p>
<p>Mathematically, if 1000 people witness your speech and 0 of them change any aspect of their life then you should not have given the talk. You used up 6 weeks of human life and achieved nothing.</p>
<p>Let&#8217;s all pledge together:</p>
<ul>
<li>I am valuable</li>
<li>I will continue to share my ideas and my work in public</li>
<li>I will continue to improve the craft of sharing publicly (for example, speech craft and blogging)</li>
<li>I will respect the time of other people as a gift</li>
<li>I will change lives</li>
</ul>
<p>This pledge needs a name; anyone?</p>
<p>You are an incredible individual. You have done things, seen things, diagnosed things, solved things that no one else has done. No one else has the accumulated knowledge and reasoning that you have. You were the one who conclusively deduced that all solutions to World Peace involved chocolate biscuits.</p>
<p>You are also unique in your methods of communication. You have different stories, different mental models, and different approaches to communication. You do that thing with your voice and your posture. As a child you were beaten up for being different. As an adult it makes you extremely valuable.</p>
<p>There are human beings who need to have their lives changed by you. Your value is when other people behave differently because of you.</p>
<h2 id="what_to_do_next">What to do next?</h2>
<p>There is no check box, pass or fail, &#8220;crossing the finish line&#8221; in public speaking. I&#8217;d rather watch you play Guitar Hero. Aim higher.  Take responsibility for your communication. Look at the human beings in front of you and rock their world.</p>
<h2 id="how">How?</h2>
<p>Like the craft of software development, there is the craft of communication.</p>
<p>Practise the craft of communication. Limit the minutes/hours/days/weeks that you use of other people&#8217;s lives. Write your speeches and then practise them to increasingly larger audiences. </p>
<h3 id="8220i8217m_not_very_good_at_speeches8221">&#8220;I&#8217;m not very good at speeches&#8221;</h3>
<p>Write small speeches for small audiences. As you improve, increase the size of the audience. If it&#8217;s necessary to achieve your goal, increase the duration of your talk. Though how often can you communicate 80% of your message in just 5 to 15 minutes? </p>
<p>If you are given 45 minutes at a conference to speak, you are permitted by me to speak for 15 minutes only. If you know you only have 15 minutes, perhaps invite one or two other people to share during the remaining time. Or give back the remaining time to the audience. Ask them to use it to think about or explore the idea you&#8217;ve shared with them.</p>
<p><em>&#8220;Where can I find small audiences?&#8221;</em> If you&#8217;re practising a large audience speech, then pull a handful of people into a room and they can alpha test your talk. As a small group they&#8217;ll probably do something annoying like give feedback. You&#8217;re probably self-conscious enough that your brain is full of negative self-feedback, so you may or may not want their feedback. But let them give it to you. &#8220;Thanks, that&#8217;s a good idea&#8221; is the reward you give them back.</p>
<p>Next, find another small audience. The jokes won&#8217;t be as funny in small audiences. Large audiences laugh louder and stronger. Do the talk again.</p>
<p>Follow up with the first group &#8211; did they do anything different in their lives after your talk? Did they talk about your ideas or thoughts during the week? If your speech is good then some small nugget will carry with them, regardless that they are a friend/peer/family member.</p>
<p>Don&#8217;t worry too much if you don&#8217;t rock their world: friends and peers tend to not learn as much from you. &#8220;You can&#8217;t be a guru in your home town.&#8221; That&#8217;s not the job of a friend. Friends are there to laugh at you and put you in embarrassing situations for their own amusement. Nonetheless, it&#8217;s interesting to see if your small friendly audiences thought about your talk in the days afterwards.</p>
<p>Even in a small room with friends, unload on them with energy and passion. Practise your communication as much as you practise your content.</p>
<h3 id="8220where_can_i_learn_speech_craft8221">&#8220;Where can I learn speech craft?&#8221;</h3>
<p>Toastmasters.</p>
<p>You learnt to drive with your parents and a driving instructor. You learnt software development by writing small demo apps and pair programming. And yet some people have the audacity to stand on stage in front of 100s of people and be terrible. Those people are not you. You will not suck. You are going to learn the craft of speaking because you want to use people&#8217;s time well and you want to change their life. </p>
<p>Toastmasters is a club format. There is no &#8220;school&#8221; concept. Rather a group of 20 people meet twice a month and each time they all suck less. They stop stuttering. They tell interesting stories. Everyone learns something fascinating from other members who have different backgrounds and professions.</p>
<p>The practise format is interesting and successful. You give three types of speeches: 5-7 minute prepared talks, 1-3 minute impromptu talks, and 2-3 minute improptu evaluation talks about the previous speakers. That&#8217;s right, you get immediate evaluation from another club member!</p>
<p>Every club is different so visit a few of them to find a club that you like. Some a filled with old farts who value meeting protocol over having a good time. Some clubs like doing competitions. Some clubs meet weekly. Some clubs meet for breakfast or lunch or in the evening.</p>
<p>It&#8217;s relatively cheap.</p>
<p>You will learn the craft of speaking and leadership. And conversely, though not explicitly promised in any Toastmasters literature, you&#8217;ll stop killing people.</p>
<h2 id="is_it_really_that_important">Is it really that important?</h2>
<p>Personally, I think its a bit unfair of a presenter to be bad in front of a large audience for a long duration and say &#8220;I&#8217;m sorry if I was bad. I&#8217;m trying to get better.&#8221; </p>
<p>But! It is far far worse is the competent presenter who does no preparation, does a terrible job, and merely hopes it goes better next time. There are human lives at stake. One of them might be mine.</p>
<p>As a public speaker you have a gift &#8211; human lives. You have their time and their open minds. Aim high. Change lives. You are special. I hope to experience you speaking awesomely at a conference near me soon!</p>
<h2 id="thanks">Thanks</h2>
<p>Thanks to <a href="http://zachholman.com/" title="Zach Holman">Zach Holman</a> for our chat on the plane back from <a href="http://www.rubymidwest.com/" title="Ruby Midwest">Ruby MidWest</a> and for proof reading and fixing the post. He is a great speaker and will definitely <strike><del datetime="2011-11-11T16:03:10+00:00">convince you of whatever snake oil he&#8217;s selling</del></strike> rock your world. Just <a href="http://zachholman.com/talk/how-github-uses-github-to-build-github">look at these slides</a>!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DrNic?a=FIscoZEiw0E:OIklpXgcL4U:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/DrNic?i=FIscoZEiw0E:OIklpXgcL4U:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=FIscoZEiw0E:OIklpXgcL4U:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DrNic?i=FIscoZEiw0E:OIklpXgcL4U:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=FIscoZEiw0E:OIklpXgcL4U:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/DrNic?i=FIscoZEiw0E:OIklpXgcL4U:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2011/11/11/how-to-stop-killing-people-with-your-public-speeches/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>Never fear $ in READMEs again</title>
		<link>http://drnicwilliams.com/2011/06/11/never-fear-dollar-in-readmes-again/</link>
		<comments>http://drnicwilliams.com/2011/06/11/never-fear-dollar-in-readmes-again/#comments</comments>
		<pubDate>Fri, 10 Jun 2011 15:37:37 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Trick]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=809</guid>
		<description><![CDATA[Ever see example shell commands like this and wish you could paste them in? Fear no more. A pastie is at hand. Here&#8217;s how to install it: In your `.bash_profile` add the following: Thanks @dwaite and others for `$@` instead of `$0 $1 &#8230;`. Related posts:Pastie paradise Summary: click to select Ever tried emailing someone [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2007/06/28/pastie-paradise/' rel='bookmark' title='Permanent Link: Pastie paradise'>Pastie paradise</a> <small>Summary: click to select Ever tried emailing someone a chunk...</small></li><li><a href='http://drnicwilliams.com/2006/09/22/remote-shell-with-ruby/' rel='bookmark' title='Permanent Link: Remote Shell with Ruby'>Remote Shell with Ruby</a> <small>I wrote Composite Primary Keys and Dr Nic&#8217;s Magic Models...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>Ever see example shell commands like this and wish you could paste them in?</p>
<p><script src="https://gist.github.com/1019041.js?file=example_readme.sh"></script></p>
<p>Fear no more. A <a href="https://gist.github.com/1019041">pastie is at hand</a>.</p>
<p><script src="https://gist.github.com/1019041.js?file=$"></script></p>
<p>Here&#8217;s how to install it:</p>
<p><script src="https://gist.github.com/1019041.js?file=install.sh"></script></p>
<p>In your `.bash_profile` add the following:</p>
<p><script src="https://gist.github.com/1019041.js?file=prompt_addition.sh"></script></p>
<h3>Thanks</h3>
<p><a href="http://twitter.com/dwaite">@dwaite</a> and others for `$@` instead of `$0 $1 &#8230;`.</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2007/06/28/pastie-paradise/' rel='bookmark' title='Permanent Link: Pastie paradise'>Pastie paradise</a> <small>Summary: click to select Ever tried emailing someone a chunk...</small></li><li><a href='http://drnicwilliams.com/2006/09/22/remote-shell-with-ruby/' rel='bookmark' title='Permanent Link: Remote Shell with Ruby'>Remote Shell with Ruby</a> <small>I wrote Composite Primary Keys and Dr Nic&#8217;s Magic Models...</small></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DrNic?a=CVOH2Z7boUk:QMwu4V3j7XQ:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/DrNic?i=CVOH2Z7boUk:QMwu4V3j7XQ:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=CVOH2Z7boUk:QMwu4V3j7XQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DrNic?i=CVOH2Z7boUk:QMwu4V3j7XQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=CVOH2Z7boUk:QMwu4V3j7XQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/DrNic?i=CVOH2Z7boUk:QMwu4V3j7XQ:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2011/06/11/never-fear-dollar-in-readmes-again/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Trialing RedCar instead of TextMate – replacing my aliases</title>
		<link>http://drnicwilliams.com/2011/04/27/replacing-aliases-to-use-redcar-or-textmate/</link>
		<comments>http://drnicwilliams.com/2011/04/27/replacing-aliases-to-use-redcar-or-textmate/#comments</comments>
		<pubDate>Tue, 26 Apr 2011 18:31:38 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Mocra]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=803</guid>
		<description><![CDATA[I&#8217;m interested to trial RedCar in my life, instead of TextMate. So I need RedCar to appear on my screen whenever I think &#8220;give me an editor&#8221;. I&#8217;ve had m bound to TextMate for years. I also have it set to my $EDITOR variable, so it is launched by git commands, etc. To change the [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/' rel='bookmark' title='Permanent Link: Packaging TextMate bundles in OS X DMGs'>Packaging TextMate bundles in OS X DMGs</a> <small>Last week Engine Yard released a CLI for their Engine...</small></li><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m interested to trial <a href="http://redcareditor.com/">RedCar</a> in my life, instead of TextMate. So I need RedCar<br />
to appear on my screen whenever I think &#8220;give me an editor&#8221;.</p>
<p>I&#8217;ve had <code>m</code> bound to TextMate for years. I also have it set to my <code>$EDITOR</code> variable, so it is launched by git commands, etc.</p>
<p>To change the default to RedCar, and to allow me to toggle between RedCar and TextMate, AND to allow me to use Edge RedCar (from source instead from a RubyGem).</p>
<p><script src="https://gist.github.com/942597.js"> </script></p>
<p>This file comes from my <a href="https://github.com/drnic/.dotfiles/blob/master/editor.sh">editor.sh</a> file which is loaded into all shell terminals.</p>
<p>I can change to TextMate with:</p>
<pre><code>use_textmate
</code></pre>
<p>Back to RedCar (via gem) or RedCar (from source):</p>
<pre><code>use_redcar_gem
use_redcar_dev
</code></pre>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/' rel='bookmark' title='Permanent Link: Packaging TextMate bundles in OS X DMGs'>Packaging TextMate bundles in OS X DMGs</a> <small>Last week Engine Yard released a CLI for their Engine...</small></li><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DrNic?a=ck3sBnGtJr8:u8Sf777kDvs:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/DrNic?i=ck3sBnGtJr8:u8Sf777kDvs:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=ck3sBnGtJr8:u8Sf777kDvs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DrNic?i=ck3sBnGtJr8:u8Sf777kDvs:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=ck3sBnGtJr8:u8Sf777kDvs:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/DrNic?i=ck3sBnGtJr8:u8Sf777kDvs:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2011/04/27/replacing-aliases-to-use-redcar-or-textmate/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Making CI easier to do than not to with Hudson CI and Vagrant</title>
		<link>http://drnicwilliams.com/2010/11/09/making-ci-easier-to-do-than-not-to-with-hudson-ci-and-vagrant/</link>
		<comments>http://drnicwilliams.com/2010/11/09/making-ci-easier-to-do-than-not-to-with-hudson-ci-and-vagrant/#comments</comments>
		<pubDate>Mon, 08 Nov 2010 17:36:34 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Hudson]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[VM]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=784</guid>
		<description><![CDATA[It irked me a little that I could develop on one stack (OS X, Rubinius, Sqlite3), run continuous integration (CI) on another stack (Ubuntu, Ruby 1.8.7, Postgresql), and deploy into another stack (Gentoo, Ruby 1.9.2, MySQL). I think what irks and worries me is that there are three sets of differences to be aware of. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://skitch.com/drnic/d9mk1/inconsistency-between-environments"><img src="http://img.skitch.com/20101108-j11f4dk5745wieuu8i9skybat4.preview.png" style="float: right; width: 200px;"></a></p>
<p>It irked me a little that I could develop on one stack (OS X, Rubinius, Sqlite3), run continuous integration (CI) on another stack (Ubuntu, Ruby 1.8.7, Postgresql), and deploy into another stack (Gentoo, Ruby 1.9.2, MySQL). I think what irks and worries me is that there are three sets of differences to be aware of. A bug in production? Was it a missing test scenario or one of the many differences between production and CI environments?</p>
<p>So I think I have two solutions. </p>
<p>First, use a VM that matches the production environment. Each different production environment would mean another VM. If you are managing your own production environment, then all you need is the tools (described in this article) to recreate your production environment in a VM. </p>
<p>Second, use a clone of your production environment. That is, if you deploy to Engine Yard AppCloud then run CI in Engine Yard AppCloud; if you deploy to a single Ubuntu instance on Slicehost, the have another matching Ubuntu instance on Slicehost.</p>
<p>I&#8217;ll write about the first solution &#8211; using VMs &#8211; here, and I&#8217;ll write on the <a href="http://www.engineyard.com/blog/" title="Ruby on Rails Blog | Engine Yard">Engine Yard Blog</a> about the solution for Engine Yard AppCloud customers. For AppCloud users life will be even easier because there are zero setup steps to ensure you have consistent environments. It&#8217;s been one of my favorite projects in the two months since I arrived at Engine Yard.</p>
<p>I&#8217;ll also introduce a CLI for talking to Hudson &#8211; one that assumes you are working on Ruby/Rails projects &#8211; and makes it really easy to get up and running with a server, your Rails/Ruby projects, and any VMs you need (optional for Hudson, but they are the point of my line of thinking).</p>
<p>And I&#8217;ll introduce Vagrant, a CLI for creating/managing/destroying VMs.</p>
<p>Oh, and I&#8217;ll introduce Hudson CI.</p>
<p>Ok, let&#8217;s fix all our CI problems in one go&#8230;</p>
<h3 id="hudson_ci">Hudson CI</h3>
<p>I needed a CI tool to allow tests to run inside VMs or on remote servers/VMs. Back in May I found and fell in love with <a href="http://hudson-ci.org/" title="Hudson CI">Hudson CI</a>. Fortunately it had support for &#8220;slaves&#8221;, and a way for CI jobs (your applications or rubygems) to select which slaves can be used. Hudson is also great because it is easy to try out (one click to <a href="https://hudson.dev.java.net/hudson.jnlp">install and launch</a>), easy to configure, and has 350+ plugins.</p>
<p><a href="http://wiki.hudson-ci.org/display/HUDSON/Meet+Hudson">What is Hudson?</a></p>
<h3 id="cli_for_hudson">CLI for Hudson</h3>
<p>Charles Lowell&#8217;s <a href="https://github.com/cowboyd/hudson.rb">hudson.rb</a> project is a CLI for launching Hudson (it&#8217;s bundled inside the gem), and a set of CLI tasks to add/remove projects (jobs), add slaves, trigger builds and more. </p>
<pre><code>gem install hudson
</code></pre>
<p>You can launch Hudson via:</p>
<pre><code>hudson server  # Default: --port 3001
open http://localhost:3001
</code></pre>
<p>It currently assumes you are working on Ruby projects, using bundler, and attempts to create a useful set of default steps for your CI jobs.</p>
<pre><code>cd /some/rails3/app
hudson create . --host localhost --port 3001 --template rails3
</code></pre>
<p>Hudson CI will automatically start running steps to install your application&#8217;s gems, database, and run your tests. When it does it on your local machine it&#8217;s not that impressive. When it happens on a fresh VM or slave node and you didn&#8217;t have to do anything to set it up, it&#8217;s awesome.</p>
<h3 id="v_is_for_vagrant_virtualbox_and_all_things_vm">V is for Vagrant, VirtualBox and all things VM</h3>
<p>If you can script it, then you can automate it. Fortunately, as a virtual machine <a href="http://www.virtualbox.org/" title="VirtualBox">VirtualBox</a> is both scriptable <em>and</em> FREE! Secondly, if you have a VM, you&#8217;ll need to script its setup/provisioning; so fortunately there exists <a href="https://github.com/opscode/chef">chef</a> and <a href="https://github.com/lak/puppet">puppet</a>, amongst others.</p>
<p>Thirdly, if you are really really really lazy, like me, you will want <a href="http://vagrantup.com/">Vagrant</a>. Created by <a href="http://mitchellhashimoto.com/">Mitchell Hashimoto</a> and <a href="http://nickelcode.com/">John Bender</a>, Vagrant is a tool for building and distributing virtualized development environments. Everyone in your team have their own OS/configuration? Got Windows users on your team? Use Vagrant.</p>
<p>Once you have VirtualBox installed, getting any of your projects live within a VM is trival:</p>
<pre><code>gem install vagrant
vagrant box add base http://files.vagrantup.com/lucid32.box
vagrant init
vagrant up
vagrant ssh
$ cd /vagrant/
$ ls -al
</code></pre>
<p>You will now see the contents of your project folder, but from within the VM instance! They are linked &#8211; a change to either is automatically reflected inside and outside of the VM.</p>
<p>In this example, the Guest OS being downloaded and installed into VirtualBox (note: without any GUI) is <a href="http://releases.ubuntu.com/lucid/" title="Ubuntu 10.04.1 LTS (Lucid Lynx)">Ubuntu Lucid</a>, but you could use any VirtualBox packaged unix system.</p>
<p>For wonderful guided tour of Vagrant see the <a href="http://vimeo.com/9976342">Getting Started</a> video.</p>
<p><iframe src="http://player.vimeo.com/video/9976342" width="400" height="225" frameborder="0"></iframe>
<p><a href="http://vimeo.com/9976342">Vagrant &#8211; Getting Started</a> from <a href="http://vimeo.com/mitchellh">Mitchell Hashimoto</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
</p>
<h3 id="hudson_ci_vagrant_perfect_ci">Hudson CI + Vagrant = Perfect CI</h3>
<p>Whether you choose to use VMs for a production-like development environment (a good idea for anyone, a wonderful idea for Windows developers who are very far removed from their production experience), it is a very good idea to have a CI environment as similar to your production environment as possible. Here, we want a VM instance with all the components/utilities/rubies set up that you have in production.</p>
<p>I have created an <a href="https://github.com/drnic/railsapp-vagrant">example Rails application</a> that is setup to use Vagrant for a CI slave VM.</p>
<p>See the README for complete instructions. See the <a href="https://github.com/drnic/railsapp-vagrant/blob/master/Vagrantfile">Vagrantfile</a> and the <a href="https://github.com/drnic/railsapp-vagrant/tree/master/cookbooks/">cookbooks</a> folder for the configuration and provisioning recipes.</p>
<p>Once you have the VM instantiated, you add it to your Hudson CI master (either the localhost one above or your remotely hosted server) with the CLI:</p>
<pre><code>hudson add_node localhost --name "VM" --label railsapp-vagrant ...
</code></pre>
<p>(See the <a href="https://github.com/drnic/railsapp-vagrant">example Rails application</a> for the other flags I used to get this working). It is now available to all Hudson jobs; but has a label &#8220;railsapp-vagrant&#8221; to allow jobs (Hudson&#8217;s name for a project) to specify that slave node specifically.</p>
<p>To add the Rails application to Hudson CI, and force it to run the tests in this VM:</p>
<pre><code>hudson create . --template rails3 --assigned-node railsapp-vagrant
</code></pre>
<p>If you visit the Hudson master (at <code>http://localhost:3010</code> in the example) you will see the job automatically running (&#8220;building&#8221;) within your VM. It will use bundler to install the gems, and run all the tests.</p>
<p><img src="http://img.skitch.com/20101108-jpitj3arquqthqndhs4eagmy89.png"></p>
<p><img src="http://img.skitch.com/20101108-f4ndidacj2cjxy249nbd82sjg6.png"></p>
<h3 id="that8217s_it">That&#8217;s it?</h3>
<p>I know, CI is historically a pain in the arse. When CruiseControl was the only CI kid-on-the-block, it was standard for people to respond &#8220;4 days&#8221; to the question &#8220;How long does it take to get set up?&#8221; </p>
<p>It can now be really easy.</p>
<p>More importantly than being easy, you are running an application&#8217;s tests within an isolated VM that you can design to match your production environment.</p>
<p>I think there can be a good future for CI and Rails applications. <strong>Thoughts on this solution?</strong></p>
<h3 id="thanks">Thanks</h3>
<p>Some of the technology in this article is old, other bits are very new, but for all of it I thank all the creators and contributors. Hudson CI was created by <a href="http://www.kohsuke.org/">Kohsuke Kawaguchi</a> during his days at Sun. He is now offering Hudson support services via his company <a href="http://infradna.com/" title="InfraDNA | The Hudson company">InfraDNA</a>. </p>
<p>The <a href="https://github.com/cowboyd/hudson.rb">Hudson.rb project</a> was created by <a href="http://cogentdude.com/">Charles Lowell</a> to bundle the Hudson CI and some common useful plugins for Ruby/Rails projects. He came all the way to Gothenburg, Sweden for <a href="http://nordicruby.com/" title="Nordic Ruby Conference â€“ Gothenburg, Sweden May 21-23, 2010">NordicRuby</a> conference (great conference by the way!) I fell in love with Hudson and started helping Charles on Hudson.rb.</p>
<p>Thanks also to both Kohsuke and Charles for starting work on a JRuby plugin for Hudson CI, and writing up a <a href="http://infradna.com/content/hudson-jruby-integration-preliminary-report">progress report</a>.</p>
<p>Thanks to everyone who agrees that Hudson CI is awesome.</p>
<p>Thanks to Mitchell Hashimoto and John Bender for creating Vagrant. It is an incredible tool for developing within a VM (on OS X <em>or</em> Windows).</p>
<p>Finally, thanks to <a href="http://bjeanes.com/">Bo Jeanes</a> who helped on the <a href="http://www.engineyard.com/products/appcloud">Engine Yard AppCloud</a> version of this project. Coming soon!</p>
<h3 id="rubyconf_rubybayou">RubyConf &amp; RubyBayou</h3>
<p>If you&#8217;re in New Orleans this week for RubyConf, I&#8217;ll be at the local Ruby group RubyBayou talking about Hudson CI, Vagrant, and AppCloud on <a href="http://www.meetup.com/RubyBayou/calendar/14580950/" title="RubyConf &amp; Code Quality -  Ruby Bayou (New Orleans, LA) - Meetup">Thursday night</a>. There&#8217;s a happy hour from 5pm till the 7pm start.</p>
<p>Location: <a href="http://goo.gl/maps/WLNW" title="LaunchPad NOLA 643 Magazine St New Orleans, LA 70130 - Google Maps">LaunchPad NOLA, 643 Magazine St, New Orleans, LA 70130</a></p>
<p>Come and let me convince you about the wonders of Hudson CI and having a CI test environment that matches your production env. You know you want to be convinced. It&#8217;s good for you, like fruit.</p>
<h3 id="don8217t_forget_chuck_norris">Don&#8217;t forget Chuck Norris</h3>
<p>Always remember to install the <a href="http://wiki.hudson-ci.org/display/HUDSON/ChuckNorris+Plugin" title="ChuckNorris Plugin - hudson - Hudson Wiki">Chuck Norris plugin</a> for Hudson, and enable it for each job. Don&#8217;t forget Chuck Norris.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DrNic?a=2aiFxeOQkIs:I4ENjrEhMaU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/DrNic?i=2aiFxeOQkIs:I4ENjrEhMaU:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=2aiFxeOQkIs:I4ENjrEhMaU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DrNic?i=2aiFxeOQkIs:I4ENjrEhMaU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=2aiFxeOQkIs:I4ENjrEhMaU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/DrNic?i=2aiFxeOQkIs:I4ENjrEhMaU:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2010/11/09/making-ci-easier-to-do-than-not-to-with-hudson-ci-and-vagrant/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Coming to America</title>
		<link>http://drnicwilliams.com/2010/08/04/coming-to-america/</link>
		<comments>http://drnicwilliams.com/2010/08/04/coming-to-america/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 23:44:48 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Announcement]]></category>
		<category><![CDATA[Engine Yard]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=782</guid>
		<description><![CDATA[Have you ever looked at your biological watch and thought, &#8220;it looks like it&#8217;s time to change the world?&#8221; My biological time piece has a full set of inscriptions: go to university, chase girls, get a post-graduate qualification, catch a girl, get a professional job, marry the girl, change into contracting, change into consulting (and [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever looked at your biological watch and thought, &#8220;it looks like it&#8217;s time to change the world?&#8221;</p>
<p>My biological time piece has a full set of inscriptions: go to university, chase girls, get a post-graduate qualification, catch a girl, get a professional job, marry the girl, change into contracting, change into consulting (and ponder what the difference is), work overseas (and marvel at the differences), make a baby, change into training, move back to Australia, buy a home, start a consultancy (Mocra), make another baby, grow the consultancy, and &#8230;</p>
<p>Really, I&#8217;m not sure what comes next in the script of normal life. Retire in 30 years? Create more little open source projects? Just keep growing the consultancy? Until what?</p>
<p>A few weeks ago, John Dillon, the CEO of Engine Yard, drew some pictures on a whiteboard for me and asked, &#8220;Do you want to help change the world?&#8221; Sure, a classic Steve Jobs one-liner from the history books of Apple. I said, &#8220;Yes&#8221;.</p>
<p>On the 1st of September I will start work at <a href="http://maps.google.com/maps?q=500+3rd+Street,+San+Francisco">500 3rd Street, San Francisco</a> as <a href="http://www.engineyard.com/">Engine Yard<br />
</a>&#8217;s VP, Technology. Job description: <em>help web application developers win</em>. </p>
<p><a href="http://maps.google.com/maps?f=d&amp;source=s_d&amp;saddr=46+Douglas+St,+Milton+QLD+4064,+Australia&amp;daddr=500+3rd+Street,+San+Francisco&amp;hl=en&amp;geocode=&amp;mra=ls&amp;sll=37.780991,-122.39559&amp;sspn=0.009497,0.01929&amp;g=500+3rd+Street,+San+Francisco&amp;ie=UTF8&amp;z=3"><img src="http://img.skitch.com/20100803-ethi1qtq3e5ictbwx2b919nefp.png" alt="22000km to work" style="float: right"/></a></p>
<h2 id="the_daily_commute">The daily commute</h2>
<p>Google Maps suggests my daily commute to work will be 22,300km. Some of that will be heavy morning traffic, so at say 30km/hr, that is almost 750 hours. Each way.</p>
<p>So instead, my family will pack its bags and move overseas again. Though for the first time, we&#8217;re coming to America!</p>
<h2 id="how_to_move_your_family_to_america">How to move your family to America</h2>
<p>It hasn&#8217;t been all smooth sailing on the home front since I broached the idea with my wife. Personally, have you ever turned to your wife and said, &#8220;Honey, I think we are going to move to America!&#8221;</p>
<p>Try it at home for a laugh. Perhaps your wife will say something witty or clever like mine. Something like, &#8220;No.&#8221;</p>
<p>&#8220;No, baby, really. I have something important to do for a few years. It&#8217;s in America. San Francisco. Apparently it&#8217;s lovely!&#8221;</p>
<p>&#8220;Is the weather nice?&#8221; she might ask looking for any reason to want to leave beautiful, sunny Brisbane.</p>
<p>&#8220;No. I think it&#8217;s kind of cold there. And foggy. There was even a taxi with &#8216;Fog City Taxi&#8217; on its side. But there are wonderful schools and the people are fabulous and are from all over the world!&#8221;</p>
<p>&#8220;So our young kids won&#8217;t get an American accent?&#8221; she might ask pleadingly.</p>
<p>&#8220;Well, they won&#8217;t get all of the accents, no.&#8221;</p>
<p>&#8220;&#8230;&#8221;</p>
<p>&#8220;I love you!&#8221;</p>
<p>And so eventually your wife will say yes.</p>
<h2 id="how_do_we_get_to_win_as_web_developers">How do we get to win as web developers?</h2>
<p>Choose to use Rails. Improve Rails. Improve the ecosystem above/below/around Rails. Improve our daily lives. Expand the sweet spot of Rails to solve problems. </p>
<p>In the future, can we look back at the work we did, the fun we had, the problems we solved, the time we spent working, and feel that it was worth the effort? Will we remember when we first discovered Ruby and Rails and remember the joy?</p>
<p>This is a world-changing set of issues to care about. I&#8217;ve always cared about them before now, but never had resources or reach to work on them beyond my own little projects or cunningly worded, suggestive emails/tweets/chat with other open source developers.</p>
<p>Though from now onwards I will get to work with one of the greatest concentrations of Rails talent and one of the largest <a href="http://www.engineyard.com/open-source">open source programs</a> in the our community. I&#8217;m more than just a little bit excited. Imagine working with full-time contributors to Rails, JRuby and Rubinius as well as the dozens of developers, devops and more.</p>
<p>As Engine Yard continues to grow and win then its capacity to fund and resource more contributions will grow. And then we all win faster.</p>
<p>Can you imagine what else should be funded, promoted or prioritised? I have a dozen solid ideas but I would love suggestions.</p>
<h2 id="mocra">Mocra</h2>
<p>I will miss my guys at Mocra, a wonderful Rails consultancy with clients around the world whilst based out of Brisbane, Australia. I founded and ran Mocra for the last two wonderful years. It will be slightly annoying &#8211; I won&#8217;t get to take any credit for all the success the Mocra team will have in the years to come. </p>
<p>Definitely, if you need an awesome Rails team for your project, contact <a href="http://mocra.com/">Mocra</a>. If you need a personal introduction, let me know. I know some people there.</p>
<h2 id="san_francisco">San Francisco</h2>
<p>I am very excited to move to SF and to hang out on a regular basis all the people I have only been able to see at conferences.</p>
<p>I&#8217;d also love suggestions of where a family of four (including a 4yo and 2yo; oh, plus another one due in February) could live. I&#8217;ve briefly seen parts of SF and many of the surrounding towns in the bay area. Thanks to Randall, Tammer and Marcy for their turns as tour guides during my visit a few weeks ago.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DrNic?a=1pbQgAO0_AE:Lh6Go3N1HQA:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/DrNic?i=1pbQgAO0_AE:Lh6Go3N1HQA:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=1pbQgAO0_AE:Lh6Go3N1HQA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DrNic?i=1pbQgAO0_AE:Lh6Go3N1HQA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=1pbQgAO0_AE:Lh6Go3N1HQA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/DrNic?i=1pbQgAO0_AE:Lh6Go3N1HQA:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2010/08/04/coming-to-america/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>Packaging TextMate bundles in OS X DMGs</title>
		<link>http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/</link>
		<comments>http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/#comments</comments>
		<pubDate>Sat, 31 Jul 2010 21:11:22 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Engine Yard]]></category>
		<category><![CDATA[Mocra]]></category>
		<category><![CDATA[TextMate]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=765</guid>
		<description><![CDATA[Last week Engine Yard released a CLI for their Engine Yard AppCloud. Delights such as: ey deploy ey rebuild ey logs ey ssh They simultaneously released a TextMate bundle to deploy, rebuild, view logs, etc using Ctrl+Alt+Cmd+E. Like all TextMate bundles, you can install it in one of two ways: via git (see the README), [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2012/04/10/instant-new-rails-applications-with-the-app-scrolls/' rel='bookmark' title='Permanent Link: Instant new Rails applications with the App Scrolls'>Instant new Rails applications with the App Scrolls</a> <small>When I start a new project I want to start...</small></li><li><a href='http://drnicwilliams.com/2011/04/27/replacing-aliases-to-use-redcar-or-textmate/' rel='bookmark' title='Permanent Link: Trialing RedCar instead of TextMate &#8211; replacing my aliases'>Trialing RedCar instead of TextMate &#8211; replacing my aliases</a> <small>I&#8217;m interested to trial RedCar in my life, instead of...</small></li><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>Last week Engine Yard released a <a href="http://www.engineyard.com/products/appcloud/features/cli">CLI</a> for their Engine Yard AppCloud. Delights such as:</p>
<pre><code>ey deploy
ey rebuild
ey logs
ey ssh
</code></pre>
<p><a href="http://www.engineyard.com/docs/Engine_Yard.tmbundle.dmg"><img src="http://img.skitch.com/20100731-gqkw2eb9666qc415akcggjuet1.png" alt="Engine Yard.tmbundle" style="float: right" width="281" height="153"/></a></p>
<p>They simultaneously released a TextMate bundle to deploy, rebuild, view logs, etc using Ctrl+Alt+Cmd+E. Like all TextMate bundles, you can install it in one of two ways: via git (see the <a href="http://github.com/engineyard/engineyard.tmbundle">README</a>), or via a beautiful DMG. <a href="http://www.engineyard.com/docs/Engine_Yard.tmbundle.dmg">Download it here!</a></p>
<p>Yes indeed, TextMate bundles can now be packaged up and distributed via DMGs using ChocTop!</p>
<p><a href="http://drnicwilliams.com/wp-content/uploads/tmbundles/ruby-on-rails"><img src="http://img.skitch.com/20100731-n6hc948m7bd1qbwykwn1wxyhc1.png" alt="Ruby on Rails.tmbundle" width="380" height="246"/></a></p>
<p>For example, the <a href="http://drnicwilliams.com/wp-content/uploads/tmbundles/ruby-on-rails">Ruby on Rails.tmbundle</a> using a simple purple theme.</p>
<h2 id="first_the_engine_yard_tmbundle">First, the Engine Yard tmbundle</h2>
<p>To use the Engine Yard tmbundle, you first need to install and use the CLI once. Instructions at the bottom of the <a href="http://www.engineyard.com/products/appcloud/features/cli">information page</a>.</p>
<h2 id="how_to_package_a_textmate_bundle_into_a_dmg">How to package a TextMate bundle into a DMG</h2>
<p><a href="http://drnic.github.com/choctop">ChocTop</a> is a packaging and distribution tool originally designed only for Cocoa applications, but can now package any assets, URL links, or even the whole project folder itself. This makes it ideal for packaging TextMate bundles which have no compiled/built output to distribute (like a Cocoa application), rather the project folder itself is the distributed item (the <code>Engine Yard.tmbundle</code> folder in this case).</p>
<h2 id="getting_started">Getting started</h2>
<p>Everything is added into your TextMate bundle project. For example, with the EngineYard bundle:</p>
<pre><code>gem install choctop
cd Library/Application\ Support/TextMate/Bundles/Engine\ Yard.tmbundle
install_choctop . --tmbundle
</code></pre>
<p>If your tmbundle already has a Rakefile, then don&#8217;t overwrite it. Instead, inside the Rakefile, add the ChocTop configuration:</p>
<pre><code>require "choctop"

ChocTop::Configuration.new do |s|
  s.add_root :position =&gt; [290, 200], :exclude =&gt; %w[appcast build .bundle .git]
  s.add_link 'http://github.com/engineyard/engineyard.tmbundle', 'GitHub', :position =&gt; [520, 200]
  s.defaults :textmate
end
</code></pre>
<p>For TextMate bundles the DMG magic is from the <code>s.add_root</code> line. The resulting DMG will include the entire project as a folder/bundle. For example, you&#8217;ll want to exclude <code>appcast</code>, <code>build</code>, <code>.bundle</code> (if you&#8217;re using Bundler), and <code>.git</code> folders.</p>
<p>The <code>s.defaults :textmate</code> provides a generic background and volume icon for a TextMate bundle DMG. See below for customising the background and volume icons. The <code>:position</code> coordinates above are for the generic background.</p>
<h2 id="building_your_dmg">Building your DMG</h2>
<p>To build your DMG and then view it in Finder:</p>
<pre><code>rake dmg
open appcast/build/*.dmg
# or together
rake dmg[automount]
</code></pre>
<p>You can now share the DMG file. See below for how to upload it to a server.</p>
<h2 id="versioning">Versioning</h2>
<p>In future, it would be great to use Sparkle&#8217;s auto-update mechanism (as seen in nearly every Cocoa application). ChocTop will automatically generate the required XML feed; TextMate nor the bundle has a way to ask Sparkle to poll for it nor update itself, yet.</p>
<p>But, you can start versioning your DMGs today:</p>
<pre><code>$ rake version:current
0.0.0
$ rake version:bump:major
$ rake version:current
1.0.0
$ rake dmg
</code></pre>
<p>The DMG will now have a version number.</p>
<h2 id="uploading_new_dmg_versions">Uploading new DMG versions</h2>
<p>The original ChocTop was designed for Cocoa applications and included Sparkle support so your Cocoa applications automatically updated themselves when you built and uploaded a new version. I haven&#8217;t got a solution for this for TextMate bundles yet; but it seems like a good idea for the future.</p>
<p>Nonetheless, ChocTop still includes a <code>rake upload</code> task to ship new versions of your DMG to a server somewhere.</p>
<p>In your Rakefile, add the following config lines to the ChocTop block:</p>
<pre><code>s.base_url   = 'http://some.host.com/upload/folder'
s.remote_dir = '/path/to/upload/folder'
s.host       = 'some.host.com'
s.user       = 'remote-user'
</code></pre>
<p>The <code>s.base_url</code> is the URL from where the DMG file will be found by users. Later, when I figure out how to do auto-updating of the TextMate bundles, it will also use this URL. This URL is also used to determine the host for uploading the file.</p>
<p>The <code>s.remote_dir</code> is a path on the target server that maps to the <code>base_url</code>. This folder must already exist; rsync cannot create it as far as I can tell. So <code>ssh</code> into the machine and <code>mkdir -p /path/to/upload/folder</code></p>
<p>The latter two are optional: <code>s.host</code> is derived from <code>s.base_url</code> and <code>s.user</code> defaults to your current local user.</p>
<p>To upload the latest DMG, run:</p>
<pre><code>rake upload
</code></pre>
<p>You can now share the URL <code>http://some.host.com/upload/folder</code> for people to download the DMG. A small PHP script redirects from the folder path to the DMG filename.</p>
<h2 id="customising">Customising</h2>
<p>ChocTop allows you to customise nearly everything.</p>
<p>The <code>s.defaults :textmate</code> line is similar to the following configuration:</p>
<pre><code>s.background_file = "...choctop/assets/textmate_background.jpg"
s.volume_icon     = "...choctop/assets/textmate_volume.icns"
s.icon_size       = 104
s.icon_text_size  = 12
</code></pre>
<p>For TextMate bundles, perhaps put customised assets into a <code>Support/dmg</code> folder.</p>
<p>A background image should include blank space for the large YourBundle.tmbundle icon and webloc URL file to your GitHub project (or other target URLs). There are no size constraints on the background image. Design something beautiful.</p>
<p>The volume icon is an <code>icns</code> file. You create this using OS X&#8217;s Icon Composer application. Start with a transparent <code>png</code> file and drop it into the box with the corresponding size.</p>
<p>For the Engine Yard tmbundle, the following configuration is used:</p>
<pre><code>s.background_file = 'Support/dmg/engineyard.tmbundle.dmg.png'
s.volume_icon     = 'Support/dmg/engineyard.dmg.icns'
</code></pre>
<h2 id="additional_files">Additional files</h2>
<p>If there are other files you explicitly want bundled in the DMG, say a pretty README.html or a folder of documentation, then you can specify them:</p>
<pre><code>s.add_file 'README.html', :position =&gt; [50, 100]
s.add_file 'docs', :position =&gt; [100, 100], :name =&gt; 'Documentation'
</code></pre>
<h2 id="summary">Summary</h2>
<p>ChocTop is pretty cool for bundling any set of files into a custom DMG, especially Cocoa applications and now TextMate bundles.</p>
<p>Hopefully one day we can have Sparkle auto-updates for TextMate bundles too.</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2012/04/10/instant-new-rails-applications-with-the-app-scrolls/' rel='bookmark' title='Permanent Link: Instant new Rails applications with the App Scrolls'>Instant new Rails applications with the App Scrolls</a> <small>When I start a new project I want to start...</small></li><li><a href='http://drnicwilliams.com/2011/04/27/replacing-aliases-to-use-redcar-or-textmate/' rel='bookmark' title='Permanent Link: Trialing RedCar instead of TextMate &#8211; replacing my aliases'>Trialing RedCar instead of TextMate &#8211; replacing my aliases</a> <small>I&#8217;m interested to trial RedCar in my life, instead of...</small></li><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DrNic?a=CMx4NaLoe5I:qvYQKwZM5Ts:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/DrNic?i=CMx4NaLoe5I:qvYQKwZM5Ts:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=CMx4NaLoe5I:qvYQKwZM5Ts:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/DrNic?i=CMx4NaLoe5I:qvYQKwZM5Ts:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DrNic?a=CMx4NaLoe5I:qvYQKwZM5Ts:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/DrNic?i=CMx4NaLoe5I:qvYQKwZM5Ts:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
