Is it possible to achieve Continuous Delivery using TFS e.g. Windows Service? There are > 1000 posts on how to use msdeploy with TFS for WEB projects.
I am trying to understand why there are no resources such as blogs, articles, msdn or best practises for Continuous Delivery for Windows service using TFS.
I am not sure tow to achieve the following without any working reference materials. This is so frustrating.
-
Archive existing codebase on Remote server for Service as well for Web project not on Integration Server please!
-
How To Stop services on Remote server not on Integration Server
-
Copy New code Base on Remote Server
-
Start Services
6
Msdeploy is the worst thing you’ll ever to do to yourself. It is very very hard to get the IIS versions and configurations right for it to work as expected. I would definitely use something like 7-zip to zip the code and xcopy to copy it and of course powershell to remote to the box. You can then manage IIS using powershell commands. You could also try alternatives like albacore if you don’t mind learning ruby (in my opinion, ruby is way better and object oriented than powershell is)
3
It looks like there’s a gap in continuous delivery and deployment.. But there are some tools that are really powerful and can fill in the gap!
I had the same problem a while ago and I found an amazing tool that saved my life, and everyones in my company that had to deploy manually our solution -every release- to all our customers. This tool is called Octopus Deploy.
In their Website they describe the product as:
Octopus Deploy is a user-friendly release management system for professional .NET developers.
It enables automated, frequent, low-risk releases of ASP.NET applications and Windows Services into development, test, staging and production environments.
And it really does very well.
This is the way we set it up in my company:
We have a Git repository divided in three branches: dev-pre-pro.
As a continuous integration tool we use Hudson. Everytime Hudson compiles any of the three branches, it generates a Nuget Package (using OctoPack + MSBuild).
This packages can be consumed from our OctopusDeploy Administration site inside our domain. OctopusDeploy basically pushes nuget packages to its “tentacles” (services installed in the machines where we want to deploy) and performs custom actions using PowerShell.
This way, using PS scripts you can copy your brand-new-just-compiled-solution to the selected environment, start/stop services before or after copying or even update your Database. Just let your imagination flow..
So after we compile the project in the CI tool (it could be done using TFS) we can go to OctopusDeploy’s administration site and perform an update to any of our environments (dev-pre-pro) with just two clicks!
Ps.- I don’t work for OD, but I think it’s an amazing tool! 😉
I decided to ignore msdeploy altogether. Largely for the same reasons you mention. Lack of documentation and noone seems to be using it (successfully).
My impression is that it only makes something that is not that hard complicated.
I stick with simple xcopy deploy methods. Most services like IIS have fine management interfaces, I just script against those.