How would you deploy this .net stack?

I have a .net application with an MVC3 frontend and two windows services.

It all depends on 2 installations of RavenDB that can run as Windows or IIS services. I'm not worried here.

Services are created using TopShelf and testing is done using direct NUnint. I am using Github as my repo.

Ideally, on every successful "Release" build, I would like to build, test, erase directories and RavenDb dir, then deploy (web services and services) and then start processes to complete completion in a console app i'm that can run in default dataset.

How would you handle the deployment here? I don't have a CI server yet. I have a brand new server that I can do however I like. I haven't done a CI / CD in a long time and I suspect the weapon has changed.

Should I be looking at MSBuild / NAnt? PSake, Rake? Command city?

How would you handle post build processes?

+3


source to share


2 answers


I am using Jenkins with psake and it works really well. To be honest, psake does most of the work with Jenkins just dumping the source and then calling my psake script, but as Nick Nislanik says you can easily get Jenkins to call MSBuild / NUnit / etc directly if you like.

Jenkins

From Jenkins vs. CruiseControl (.NET) on StackOverflow, the general consensus seems to have been to go with Jenkins. Without trying CruiseControl, I can't vouch for it, but I'll say Jenkins is very good. I found Jenkins to be easy to set up. I took a quick look at CruiseControl.NET and found Jenkins to get started easier. I haven't watched TeamCity at all, so I can't talk to that.

Jenkins has a good plugin system and tons of plugins, including one for Powershell which makes it easy to jump to a psake script.

Psake

So far, I think psake is awesome. It is based on the rake syntax, but is slightly more Windows native than rake. Since it sits at the top of PowerShell, you can take advantage of the many handy Windows administration features that come with it. For example, see this post for a great example of configuring and tearing down IIS application pools and sites directly from your psake tasks. I think this is great and I'm not sure how you are going to do this in MSBuild, Nant, or rake. Basic file system operations are also bread and butter - seems better than having copied parentheses just to copy some files.



As for MSBuild and Nant, I think they are both pretty powerful, but editing XML files for this kind of thing is just painful. Powershell is a proper scripting language with deep Windows integration. psake is a DSL for building and other tasks on top of this. This is a good combination.

However, for the actual build, I just handle this in msbuild from within psake and call it on the solution / project files I want to build. Psake has a built-in command to call msbuild and determine which version to use, etc. (In truth, the biggest pain so far comes from msbuild, which creates solution files that builds beautifully in Visual Studio.)

As you work with RavenDB, you might be interested to know what they use psake to build RavenDB (and Rhino-ESB ).

For some good psake advice in general see this post .


In short, I would recommend Jenkins and Peiki. This combo works great with git, msbuild, NUnit, IIS, and maybe even Windows services.

+4


source


I would use Jenkins as my job execution engine. I could then create a set of MSBuild scripts to do the core build, and use the Jenkins pluggable model to add pre- and post-build tasks as needed (like doing NUnit and parsing the results, Powershell script for some deployment), etc. Jenkins has great Github integration using Post / Pre-commit hooks that allow you to create CI builds with ease.



+1


source







All Articles