Published on August 6, 2008
in Articles.
Let’s go on with the saga of installing and configuring virtualization server for the efficient .NET development.
Primary requirements for such a development server are:
- 64 bit OS (to utilize more than 4 GBs of RAM and leverage Intel Core 2 CPUs natively)
- Efficient virtualization (to provide virtual development sandbox environment)
- Cheap
- Simple and easy deployment and management
Note, that these requirements are just spawned by the opportunities provided by the new Windows Server 2008 64 bit.
The primary (and, obviously, the only) candidate is Windows Server 2008 64 bit with Hyper-V (btw, it is free for 240 days). This OS has two primary installation options:
Continue reading ‘Development meets virtualization - installing Windows Server 2008′
Published on August 1, 2008
in Snippets.
Synergy is the term used to describe a situation where the final outcome of a system is greater than the sum of its parts.
Integration between different development subsystems does not yield only benefits and efficiency boosts. You can get more issues as well. Here’s vivid example:
- User is located in Russia (GMT +5). He sends in the change to SVN at August 1, 01:21 local time (via TSVN 1.5.0)
- Subversion repository (SVN 1.5) is located in the France (GMT +1). It files changes as July 31, 19:21 universal time
- Integration server (CC.NET 1.4) is hosted somewhere in Arizona (GMT -7). A bit later it requests changes in the interval up to July 31, 19:34 universal time (using SVN client 1.5.0.31699)
- Subversion server returns XML like:
<?xml version="1.0"?>
<log>
<logentry revision="20">
<author>rinat.abdullin</author>
<date>2008-07-31T17:37:43.265138Z</date>
<paths>
<path action="M">/Platform/trunk/CENSORED.build</path>
</paths>
<msg>Restored back FxCop analysis. #DistribRelease</msg>
</logentry>
<logentry revision="21">
<author>rinat.abdullin</author>
<date>2008-07-31T19:21:12.328206Z</date>
<paths>
<path action="M">/Platform/trunk/Libraries/!Readme.txt</path>
</paths>
</logentry>
</log>
- Note, that the second log entry does not have the msg item. That’s what hits CruiseControl.NET hard in some C# code:
private static string ParseMessage(XmlNode logEntry)
{
XmlNode msgNode = logEntry.SelectSingleNode("msg");
return msgNode.InnerText;
}
- TortoiseSVN does display the second message properly:
Now here’s the challenge: which issue tracker(s) does this issue belong to?
Never host any services critical for the customer on your development server “just till he gets the new server”. You would not be able to easily move them off your back, even when you leave the project.
Finally, today I’ll be able to stop my dev server, upgrade it to Windows Server 2008 64 bit with Hyper-V and get going. This means:
- Ability to set up CruiseControl.NET 1.4 on a separate virtual machine, clean up existing integration projects and finally add the continuous integration support for the Autofac Contrib (Nick, sorry for the delay).
BTW, running integration server for any open source project inside virtual machine is important, since the build process itself is a huge security vulnerability. Although this approach does not eliminate it completely, it does reduce the threat (and the potential damage) quite a bit.
- Ability to set up separate virtual environments to test the infrastructure of the current development project, run deployment and integration scenarios on this local sandbox etc.
- Ease and flexibility of deploying, saving, copying and migrating different deployment and development scenarios (think of the logical encapsulation of some development or production subsystem at the OS image level)
- Ability to leverage continuous integration, testing and auto-deployment under different OSes and software configurations (not that I expect to need this ability in the next 6 months)
- Valuable experience of structuring and managing development workflows in the environment where VM is a cheap resource that could be created, deployed and deleted within a single integration build (we are not there yet, but that’s where the technology goes).
All-in-all, virtualization is going to be a big hit next years. Especially, with the Hyper-V by Microsoft (kernel-level virtualization technology built into Windows Server 2008) that comes at the cost of peanuts (VMWare has got some decent competition in their market niche). Just check out this great podcast for the details and some inspiration.
PS: I wonder, when .NET will finally get this construct (captures all details of the exception in VMI with the debugger attached):
catch (Exception ex)
{
get new VirtualMachineImage(ex);
}
PPS: VMWare has just made their move on the market by rolling out free hypervisor.
The management of software development is all about using scarce development resources to satisfy unlimited wants of the customers.
In the situations with limited resources (time, budget and skilled labor) the only way to get more out of nothing is to use these resources more efficiently. One way of achieving such a goal is about better automation of some development processes and leveraging the opportunities provided by the integration of different development subsystems.
Here some examples of such automation and integration:
- Integration server tags SVN on every production build, runs the normal routine, then packages all redistributables in a separate folder (matching build label) that is accessible via FTP (side effect is that all production packages are saved somewhere and could be easily retrieved if such need arises).
- Integration server uses svnRevisionLabeller (or any other similar plugin) to retrieve revision number from the SVN, incorporate it into the proper 4-digit version and build .NET assemblies with that.
- Integration server updates version flag on every production release. Production systems have module that checks this flag regularly and informs user of the new version.
- Integration server updates Click-Once publication on every production release and the client application updates automatically after the next launch.
- Keywords (feature from the Subversion) are used to populate attributes of some business classes with the “last changed” and “latest revision id” values on per-file basis. These values are retrieved via the reflection upon the generation of some inter-development reports/statistics
- Integration server hosts continuous monitoring project that regularly checks the production systems, runs some sanity checks and reports any failures or deviations if they are detected
- Integration server checks commit messages before build and passes all encountered tags to the build script (i.e.: #RunAllTests, #DeployToTest, #CreateRelease, #SetVersion(1.2), #TestPerformance etc). Friend of mine used to do that on his projects.
- Integration server locates all issues/tickets that were closed since the last release build, marks them with the build version and either creates a link to the filter in issue management system (JetBrains does that) or auto-populates change log report (being delivered with the release artifacts).
- Integration server runs the unit-tests and captures screen-shots of all the presenters available. These shots are then labeled and framed nicely and are used to update the pictures in the product documentation (which is also gets packaged and processed on the release cycle)
- Production release creates Virtual Machine package with the pre-installed and pre-configured solution (could be used by testers and sales-people)
I’ve leveraged some of these scenarios (items 1 through 6) in different development projects I’ve been a part of (esp. in projects that were based on the xLim principles). On the overall such things do really reduce the development friction and have solid Return On Investment rate in increased stability and saved time. And they also reduce the risk that a mere mortal would make a stupid mistake while performing some mundane action.
Reduced development and release friction obviously promote faster development iterations. That shrinks the lag between the moment customers have requested some functionality and the moment they can inspect it (and provide feedback for the next changes).
Are there any time-saving recipes that have proved themselves worthy in your project and are not on this list?
NB: Obviously one must be cautious about taking any single item from the list and applying it to the specific development project. Specifics always matter and not all combinations will be worth it.
Joannes Vermorel has posted on migrating from the Axosoft OnTime bug tracker to the open source issue tracker Trac. Here are some thoughts, that were spiked off by the topic:
- Trac does integrate really nicely with the TortoiseSVN:
- You could configure TSVN to recognize issue numbers like #134 in the commit messages and turn them into the URLs that point to the appropriate web page.
- Trac does keep track of all the SVN commits (along with the ticket and wiki changes) and all #ID numbers are treated as links in the timeline as well (additionally you can reference milestones and wiki articles in SVN commit messages, and they will be decoded).
- Trac (at least in the default installation and in my opinion) does not fit really well into Agile-type of the development (esp. when used in teams with the complex organizational and management structure). But it can play out really well in small and medium teams, when it is used along the lines of the classical Project Management approach and is utilized merely as light-weight tool to pass tasks/assignments from the Microsoft Project to the resources and track their execution.
That’s what happens to the Resharper 4.0, if you open 14MB flat XML file in Visual Studio 2008.

Note, that after closing this file and running GC, memory consumption drops to a mere 880 MB. This feels like a tiny memory leak, does not it?
And that’s one more reason to switch to 64 bit OS - you can add enough RAM to keep R# happy.
Latest Comments