<?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>toniBlog &#187; build</title>
	<atom:link href="http://www.the-arm.com/tag/build/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.the-arm.com</link>
	<description>A weblog about Methodologies for Development</description>
	<lastBuildDate>Tue, 22 Jun 2010 08:01:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>Promote environments not artifacts</title>
		<link>http://www.the-arm.com/2010/04/promote-environments-not-artifacts/</link>
		<comments>http://www.the-arm.com/2010/04/promote-environments-not-artifacts/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 08:38:50 +0000</pubDate>
		<dc:creator>toni</dc:creator>
				<category><![CDATA[work]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[deploy]]></category>
		<category><![CDATA[environments]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://www.the-arm.com/?p=518</guid>
		<description><![CDATA[Lately I&#8217;ve been working quite a lot with environments and release issues. On my last project we had eight environments: development, continuous integration, test, performance, pre-live and live plus a couple of demo boxes. This over-engineered  situation caused few issues but at the same time made me think and write this blog post What we did to improve deployment Well, automation [...]]]></description>
			<content:encoded><![CDATA[<p>Lately I&#8217;ve been working quite a lot with environments and release issues.</p>
<p>On my last project we had eight environments: development, continuous integration, test, performance, pre-live and live plus a couple of demo boxes.</p>
<p>This over-engineered  situation caused few issues but at the same time made me think and write this blog post <img src='http://www.the-arm.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><strong>What we did to improve deployment</strong></p>
<p>Well, automation is the key, even if we are in a windows environment we wrote remote deployment scripts to do remote deploy in the machines using <a href="http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx">psexec</a> and <a href="http://technet.microsoft.com/en-us/library/cc733145(WS.10).aspx">robocopy</a>.</p>
<p>We template our config files and we have one config per machine.</p>
<p>So far so good, old school good practices.</p>
<p><strong>What still doesn&#8217;t work</strong></p>
<p>Your software is done, finished, all the test are passing, unit and integration on the development boxes, acceptance on the CI box, the QA is happy in the testing environment and the product owners are happy on both of the demo boxes, the performance test team is happy on the performance box, the security team is happy with their tests executed on the pre live box.</p>
<p>But still your sofware may not work on live. Or most likely in any of those environments.</p>
<p><strong>Configuration is vital</strong></p>
<p>Your application without configuration doesn&#8217;t neither start or with a wrong configuration won&#8217;t log or work properly. There&#8217;s test coverage on all the aspects of your application but not on environment configuration. You may misspell a name of a server or simply forget that something is different from environment to environment. Your application won&#8217;t work as expected.</p>
<p>The configuration of the environment itself may cause serious problems. The most different your live boxes are from your test/integration/performance ones the higher is the risk that your software won&#8217;t perform as expected on the target servers.</p>
<p><strong>So, my humble recommendations</strong></p>
<p><em>Move fast</em></p>
<p>Moving fast is essential in any aspect of software development, when talking about releasing software is essential that you should be able to continuously deploy and redeploy in a repeatable stable way your application as fast as possible. Use remote scripts, even if you are not working with the cool kids in the ruby world do something similar to what <a href="http://www.capify.org/index.php/Capistrano">capistrano</a> does.</p>
<p>Have a look on the <a href="http://heroku.com/">heroku</a> website for a good example of moving fast&#8230;</p>
<p><em>Reduce as much as possible the number of environments</em></p>
<p>It&#8217;s clear that in the above example we have too many environments, if you have full control ask yourself why do you need them and just take them off. If an environment doesn&#8217;t produce any value it&#8217;s just a waste of time and resources. Environments can be recycled, most of the applications won&#8217;t need two demo environments and a performance environments available for the whole project life-cycle.</p>
<p>How would I cut down the number of environments on my previous example?</p>
<p>Development, continuous integration, test &amp; performance, that&#8217;s it, four, it&#8217;s a 50% cut down!</p>
<p>A good rule is that your environments should be the same number of your story wall lanes:</p>
<ol>
<li>Story in dev &gt; development environment</li>
<li>Story dev complete &gt; CI environment</li>
<li>Story in test &gt; test environment</li>
<li>Story ready to sign off &gt; performance environment</li>
</ol>
<p>The performance environment can be used as stable build environment for showcases, demonstration of the software and indeed performance tests. But also for one last, more important thing, which is the whole point of this blog post:</p>
<p><em>Promote environments not artifacts </em></p>
<p>Imagine that you&#8217;re happy with you software, it has been signed off by the product owner and it&#8217;s performing well.</p>
<p>Probably you made some changes to the performance environment, maybe you started with a cluster of two machine and ended up with a cluster of four. Now you want to go live, but the live environment that you have is different, you may have some problems.</p>
<p>My idea is to promote the whole environment. You are probably using cloud computing or virtualization, just move this stuff to the live environment, clone it and you are done.</p>
<p>Promote the environment with the artifacts, all together.</p>
<p>Try to define your environments as executable scripts (in the *nix world won&#8217;t be that hard) and version control these scripts with your environment configuration, the creation of the whole environment should be scriptable, repeatable and should evolve with your code.</p>
<p><a href="http://www.markhneedham.com/blog/">Mark</a> told me that <a href="http://blog.chris-read.net/">Chris Read</a> has been talking about this stuff for years, you may want to check out his blog or his <a href="http://www.slideshare.net/ChristopherRead/all-my-tests-are-passing-now-what">presentations</a>, he&#8217;s anyway way much better than me explaining and making these things real.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.the-arm.com/2010/04/promote-environments-not-artifacts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Maven Facts</title>
		<link>http://www.the-arm.com/2009/04/maven-facts/</link>
		<comments>http://www.the-arm.com/2009/04/maven-facts/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 15:27:07 +0000</pubDate>
		<dc:creator>toni</dc:creator>
				<category><![CDATA[work]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[pom]]></category>

		<guid isPermaLink="false">http://www.the-arm.com/?p=382</guid>
		<description><![CDATA[Maven will never tell you which phases or goals are available in the pom, you have to guess or check the on-line documentation Maven by default uses text files to dump the test execution results, if you want to see what&#8217;s happening on the console you have to call it with -Dsurefire.useFile=false Maven can skip [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li><a href="http://maven.apache.org/">Maven </a>will never tell you which phases or goals are available in the pom, you have to guess or check the <a href="http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html">on-line documentation</a></li>
<li>Maven by default uses text files to dump the test execution results, if you want to see what&#8217;s happening on the console you have to call it with -Dsurefire.useFile=false</li>
<li>Maven can skip the executions of the tests (sometimes might be useful!) call it with <a href="http://maven.apache.org/plugins/maven-surefire-plugin/examples/skipping-test.html">-Dmaven.test.skip=true</a></li>
<li>Maven knows what inheritance is (and therefore claims that it&#8217;s object oriented&#8230; grrr&#8230;) so if you can&#8217;t find where some property is defined <a href="http://mavenize.blogspot.com/2007/06/pom-inheritance.html">have a look up on the parent</a></li>
<li>Maven is based on XML but you won&#8217;t write as much XML as with Ant</li>
<li>Maven can create Eclipse project files and even download the sources for you (<a href="http://maven.apache.org/guides/mini/guide-ide-eclipse.html">mvn eclipse:eclipse -DdownloadSources=true</a>)</li>
<li>Maven downloads stuff from the internet  (#1 failure reason for 99% Maven presentations) but can be run in offline mode (if you had a sucessfull install previously), try mvn -o</li>
<li>Maven uses repositories, but since not all the libs in the world are in repositories you should setup a local repository (<a href="http://archiva.apache.org/">Archiva</a> works well)</li>
<li>Maven uses repositories, but since you don&#8217;t want to hog all your company bandwith you should setup a local repository</li>
<li>Maven goes great with stuff like <a href="https://hudson.dev.java.net/">Hudson</a>, <a href="http://sonar.codehaus.org/">Sonar</a></li>
<li>Maven <a href="http://maven.apache.org/guides/introduction/introduction-to-profiles.html">build profiles</a> are really cool</li>
<li>Maven is not <a href="http://en.wikipedia.org/wiki/Silver_bullet">silver bullet</a> but I&#8217;ll never go back to <a href="http://ant.apache.org/">Ant</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.the-arm.com/2009/04/maven-facts/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
