<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dr Nic &#187; Capistrano</title>
	<atom:link href="http://drnicwilliams.com/category/capistrano/feed/" rel="self" type="application/rss+xml" />
	<link>http://drnicwilliams.com</link>
	<description>Ruby makes Rails, Javascript makes Ajax, Dr Nic makes Magic</description>
	<lastBuildDate>Mon, 21 May 2012 03:31:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Installing Mingle with Capistrano/Deprec</title>
		<link>http://drnicwilliams.com/2007/11/27/installing-mingle-with-capistranodeprec/</link>
		<comments>http://drnicwilliams.com/2007/11/27/installing-mingle-with-capistranodeprec/#comments</comments>
		<pubDate>Mon, 26 Nov 2007 23:20:18 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Capistrano]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/2007/11/27/installing-mingle-with-capistranodeprec/</guid>
		<description><![CDATA[The other day I visited the ThoughtWorks office in Melbourne (they hosted the Melb Ruby meeting). The most notable feature of their office versus any office I&#8217;ve ever worked in before were the 5&#215;3 cards (and post-it notes) &#8230; all over the walls. From my understanding &#8211; which came after asking lots of questions &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>The other day I visited the ThoughtWorks office in Melbourne (they hosted the Melb Ruby meeting). The most notable feature of their office versus any office I&#8217;ve ever worked in before were the 5&#215;3 cards (and post-it notes) &#8230; all over the walls.</p>
<p>From my understanding &#8211; which came after asking lots of questions &#8211; is that the cards help with:</p>
<ul>
<li>The team (developers, clients, etc) deciding what parts of the application are most important to be built. The cards are isolated stories/use cases and should implicitly/explicitly state the business value. At each stage of the project &#8211; &#8220;iterations&#8221; which are 1 or 2 week long &#8211; the team decides which cards/stories should be implemented.</li>
<li>The cards for an iteration are placed on the wall. Thus it is transparent to all the team what work is being performed.</li>
<li>From left to right, the wall is divided into columns. Each card can be placed in one column. Columns are typically labelled with stage names like &#8220;Under development&#8221;, &#8220;Completed&#8221;, &#8220;QA/Testing&#8221;, &#8220;Accepted&#8221;. This gives a visualisation of what work/card is where in the development/release process. It can also indicate if there is a bottleneck &#8211; a lot of cards in the &#8220;QA/Testing&#8221; column might mean you need more testers.</li>
</ul>
<p>The first point &#8211; using stories on cards to decide what should be built now &#8211; seemed like a winning idea. A new client of mine has trouble translating a gazillion feature requests into a sequence of &#8220;this part should be built now&#8221; stages. Everything is uber cricital, all the time. And often the feature requests don&#8217;t seem related to something a user might actually want to use.</p>
<p>Whilst cards on a wall would work if the client and developers were co-located (aka &#8220;sitting together&#8221;), that&#8217;s not the situation here. I&#8217;m in Brisbane, and they are in Sydney (1000km).</p>
<p>With colourful 5&#215;3 cards and the promise of fruitful client relationships burned into my retina I wondered what web tools might help with emulating this process. The cards. The wall. The transparency. The understanding that &#8220;software costs money to build so what is most important?&#8221;</p>
<p>And I remembered <a href="http://studios.thoughtworks.com/mingle-project-intelligence">Mingle</a> &#8211; a tool built by ThoughtWorks for agile project development, but not (to my knowledge) used by any ThoughtWorks teams themselves. UPDATE: Jay Fields says several teams are currently using it.</p>
<p>But I can understand why they don&#8217;t use it. They have their own 5&#215;3 cards with their &#8220;ThoughtWorks&#8221; logo on it. Well, they had some. I stole a bunch. They also have walls and co-location. </p>
<p>Nonetheless, I gave it a burl. I runs nicely when the server is installed on my CoreDuo 2gig MacBook. It didn&#8217;t run nicely at all on my 256Mb VPS that was already busy running a bunch of other things (mongrels, mysql, etc).</p>
<p>Mingle requires 2 gig of RAM. Even on the ever affordable Slicehost, that&#8217;s $140 USD a month. Mingle might be free for < 5 users (and OSS projects) but there is a notable hardware requirement, thanks I guess to the Java/JRuby/Rails stack.</p>
<p>But I've done something useful - I've written capistrano/deprec recipies to install Mingle on a remote machine with (minimal) manual intervention. You just need to choose a machine with 2G RAM spare. You also need Java and MySQL installed, but there are capistrano tasks to help with that too.</p>
<p>Ahh, the world of remote automation.</p>
<p>The recipe below is mostly *nix agnostic, except the <code>java_install</code> task which uses ubuntu/debian's <code>apt-get</code> system. Actually, it tells you what to manually run yourself, as Sun are tools and require you to "click" the word "Yes" twice. I don't know how to automate this with Capistrano.</p>
<p>The <code>mingle_install</code> task downloads and installs Mingle, and includes an JVM optimisation option that I found on the forums (the MingleServer.vmoptions file created).</p>
<p>So, from scratch, if you want to install Mingle on a remote server (independently of any Rails app etc), do the following:</p>
<pre>
sudo gem install deprec -v 1.9.1
alias cap1='cap _1.4.1_'
mkdir -p mingle_installer/config
cd !$
vim deploy.rb
</pre>
<p>And insert the following into the deploy.rb script.</p>
<textarea name="code" class="ruby" cols="60" rows="10">
require 'deprec/recipes'
role :scm, "YOURDOMAIN"
set :user, "mingle"

set :mingle_path, "/var/www/apps/mingle"
set :mingle_data_path, "#{mingle_path}/data"
set :mingle_port, 8080
set :mingle_src_version, 'mingle_unix_1_1_5169'
set :mingle_src_package, {
  :file => mingle_src_version + '.tar.gz',   
  :dir => "mingle",  
  :url => "http://studios.thoughtworks.com/mingle/download/#{mingle_src_version}.tar.gz",
  :unpack => "tar zxf #{mingle_src_version}.tar.gz;"
}

desc "Install Mingle"
task :mingle_install, :roles => :scm do
  puts "Checking that Java is installed..."
  run "test -x '/usr/bin/java'"
  puts "Checking that MySQL is installed..."
  run "test -x '/usr/bin/mysqladmin'"
    
  deprec.download_src(mingle_src_package, src_dir)
  deprec.install_from_src(mingle_src_package, src_dir)

  deprec.mkdir mingle_data_path, :user => user
  template = <<-EOS
mingle.port=<%= mingle_port %>
mingle.dataDir=<%= mingle_data_path %>
  EOS

  mingle_install_path = "#{src_dir}/#{mingle_src_package[:dir]}"
  tmp_conf = "/tmp/mingle.properties"
  put ERB.new(template,0, "%<>").result(binding), tmp_conf
  sudo "mv #{tmp_conf} #{mingle_install_path}/mingle.properties", :as => user
  
  tmp_vmoptions = "/tmp/MingleServer.vmoptions"
  put "-Xmx1024m -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:MaxPermSize=256m", tmp_vmoptions
  sudo "mv #{tmp_vmoptions} #{mingle_install_path}/MingleServer.vmoptions", :as => user

  mysql.create_database('mingle', user)

end

desc "Start the Mingle server"
task :mingle_start, :roles => :scm do
  mingle_install_path = "#{src_dir}/#{mingle_src_package[:dir]}"
  run_with_input "su - #{user} -c '#{mingle_install_path}/MingleServer start'"
  
  mingle_domain = roles[:scm].first.host
  puts "Open browser to http://#{mingle_domain}:#{mingle_port}"
end

desc "Stop the Mingle server"
task :mingle_stop, :roles => :scm do
  mingle_install_path = "#{src_dir}/#{mingle_src_package[:dir]}"
  run "#{mingle_install_path}/MingleServer stop"
end


desc "Install Java"
task :java_install do
  enable_multiverse
  puts <<-EOS
  Run the following commands on each machine:"
  1. sudo apt-get install sun-java6-jre"
  2. sudo perl -pi -e 's/^([^#]*multiverse)/#\\1/g' /etc/apt/sources.list"

  Why? Because Sun are tools, and force you to answer licence questions.
  EOS
  exit
end
</textarea>
<p>Modify YOURDOMAIN to an IP that you have root access to. The script will create two folders - /usr/local/src/mingle and /var/www/apps/mingle. Its pretty harmless.</p>
<p>To install, run the capistrano tasks:</p>
<pre>
cd ..
cap1 java_install
cap1 mingle_install
cap1 mingle_start
</pre>
<p>BUT, mingle_start doesn't work. The server just doesn't start and I don't know why.</p>
<p>So, ssh into your machine (you had to do this for the java install step too BTW), and run:</p>
<pre>
/usr/local/src/mingle/MingleServer start
</pre>
<p>If we can fix this then that'd be uber cool.</p>
]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2007/11/27/installing-mingle-with-capistranodeprec/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

