Tuesday, 16 July 2013

Automatic Deployment :: Choosing the magic tool

About a year ago I was asked to automate the deployment process. Actually it has some level of automation, but it should be significantly improved. When my boss says "significantly improve", he means "completely rewrite". In the beginning I was looking for that magic tool, that click-and-relax solutions that will do the work. Polling at StackOverflow and googling around resulted with a list of tools. This post will focus on advantages and disadvantages of these tools. In the next post I will try to explain what solution was chosen and why.

eyeShare by Ayehu http://www.ayehu.com/

eyeShare is a descent UI based tool for deployment automation and monitoring. I was interested only in the automation part. It provides and drag and drop user interface with different kinds of actions: Copy, Stop Service, Start Service etc. It has many cool features, such as email and SMS notifications and listeners. The listeners allow the user to respond to some failure in some action. For example, deployment of the database failed, eyeShare will send email/SMS with notification and will wait for reply: proceed or rollback database changes. This might be extremely useful. However it has some major drawbacks for our basic scenario:

  1. deployment processes stored by eyeShare are not version controlled, they are stored in SQL Server database with no history tracking; 
  2. it requires installation of the UI management on each machine and there is no web UI accessible from all the machines; 
  3. something that took me sometime to understand and I had to talk to their support: let say I have action A and then action B. I assume that until action A is finished, action B does not start. Basic serial processing. However eyeShare executes action in parallel, even of they are organized serially in the deployment workflow. There are some workaround that need to be done using timers and timeout in order to overcome this behavior. 
Octopus Deploy http://octopusdeploy.com/

Octopus Deploy is a cool deployment project for ASP.NET and Windows Service projects. Actually I did not dive too much into it, since it requires any software component will be delivered as a nuget package. Since our product has many dependent components, it was decided that it would be too much work to package every component as nuget package.


Puppet http://puppetlabs.com/

Puppet, puppet, puppet! Everybody in the DevOps world talk about Puppet. If your want automatic deployment you have to use Puppet. 

I was curious when starting to learn about Puppet. I have to admit, that the learning curve was steep, but at the end we had automatic deployment POC using Puppet. After the POC was completed it was decided not to proceed with it. Here are some of the reasons. My feeling was that Puppet it more Linux/Unix oriented, that Windows. Since our main product is developed in .NET and should be deployed to Windows servers, the whole overhead with Linux style paths and Linux style commands is ridiculous. Some of the operations are not supported in Puppet agent on Windows and I had to write scripts in Powershell. At the end it resulted that most of the things are written in Powershell, so there was no reason to use Puppet as a manager of these scripts.

For the actual selected and working solution wait for the next post:
http://borismod.blogspot.co.il/2013/07/automatic-deployment-final-solution.html





Monday, 24 September 2012

The service did not respond to the start or control request in a timely fashion.

If your Windows Service does not start and there is the following error under System folder in the Event Viewer:


The ServiceName service failed to start due to the following error:
The service did not respond to the start or control request in a timely fashion.

It might occur if the .NET Framework, the service uses, is not installed on the machine.

Run your service in command line mode (if it's supported) and you'll see the error saying .NET Framework X.X is not installed.

Then you will know what version you need to download and install

Hope it saved you time, that I spent on finding this out

Sunday, 9 September 2012

How to change theme in VS2012

If you already upgraded to Visual Studio 2012 you must be noticed the lack of themes, except the two built-in themes: Light and Dark and menu that is all capitalized. For the last problem there is a workaroud:


  1. Run regedit.exe from command line and find the following: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\General
  2. Create a DWORD value named SuppressUppercaseConversion with value 1
In order to add more color themes you can use the Visual Studio 2012 Color Themes Editor by MS:

Thanks for the first tip to  answering the following question:







Tuesday, 3 July 2012

How to avoid "is never used" ReSharper warning when class is used in IoC container?

Those of us who use ReSharper and some IoC container, must be familiar with the situation. You write a class, then register it in your container and everything works fine. However, ReSharper marks the class as "is never instantiated" or "is never used". Here a new plugin from Igal Tabachnik comes to our help. It's called Agent Multer and here a short video on how it works.

At the time of writing these lines, the plugin support Ninject, Windsor, Unity and Autofac containers. More details at: http://hmemcpy.github.com/AgentMulder/

Wednesday, 8 February 2012

How to update references to a 3rd party assembly in all the projects in the solution?

Let's say you have a 3rd party assembly referenced in many projects in your solution. Once a new version of the 3rd party assembly is released, you probably would like to update the references in all your projects in a solution to the new version.

Are you using NuGet to update 3rd party libraries?
If the answer no, install Extension for Visual Studio RIGHT NOW from NuGet

Copy the following script to the root directory of your solution


Navigate to View -> Other Windows -> Package Management Console

Run the following command

PM> .\Upgrade-Package.ps1 -PackageID:log4net