<p>My team is currently trying to automate the deployment of our .Net and PHP web applications. We want to streamline deployments, and to avoid the hassle and many of the headaches caused by doing it manually.</p>

<p>We require a solution that will enable us to:</p>

<pre><code>- Compile the application  
  - Version the application with the SVN version number
  - Backup the existing site
  - Deploy to a web farm
</code></pre>

<p>All our apps are source controlled using SVN and our .Net apps use CruiseControl.
We have been trying to use MSBuild and NAnt deployment scripts with limited success. We have also used Capistrano in the past, but wish to avoid using Ruby if possible.</p>

<p>Are there any other deployment tools out there that would help us?</p>

[{'answer_id': 45799, 'author': 'Jordi Bunster', 'author_id': 4272, 'author_profile': 'https://Stackoverflow.com/users/4272', 'pm_score': 0, 'selected': False, 'text': '<p><a href="http://www.nongnu.org/fab/" rel="nofollow noreferrer">Fabric</a>. Seems small, simple, procedural. Written in Python, since Ruby is a no-no (why?).</p>\n'}, {'answer_id': 45809, 'author': 'kemiller2002', 'author_id': 1942, 'author_profile': 'https://Stackoverflow.com/users/1942', 'pm_score': 0, 'selected': False, 'text': "<p>Check out Setup Factory (from indigo rose).  It's pretty robust in what it can do.  It uses the Windows installer API.  It can probably do what you need.  </p>\n"}, {'answer_id': 45868, 'author': 'jeremcc', 'author_id': 1436, 'author_profile': 'https://Stackoverflow.com/users/1436', 'pm_score': 2, 'selected': False, 'text': '<p>I have used <a href="http://www.kinook.com/VisBuildPro/" rel="nofollow noreferrer">Visual Build Pro</a> for years, It\'s quite slick and easy to use and has many standard operations (like the ones you mentioned) built in.</p>\n'}, {'answer_id': 45997, 'author': 'Gary Richardson', 'author_id': 2506, 'author_profile': 'https://Stackoverflow.com/users/2506', 'pm_score': 2, 'selected': False, 'text': '<p>I use <a href="http://reductivelabs.com/trac/puppet/" rel="nofollow noreferrer">Puppet</a>, Makefiles to build RPMs and <a href="http://www.atlassian.com/software/bamboo/" rel="nofollow noreferrer">Bamboo</a> to do this for me. My system doesn\'t directly apply, and I\'m not to familiar with the Windows world, but there are some transferable patterns.</p>\n\n<p>My make setup allows me to build RPM\'s for everything (php libs, php websites, perl modules, C apps, etc) that make up my app. This can be called manually, or through Bamboo. I transfer these RPM\'s into a yum repo and puppet handles making sure the latest (or correct) versions of software are installed in the cluster.</p>\n\n<p>Could you automate building software packages into MSI\'s? I think Puppet can manage installation of software packages and versions in Windows.</p>\n'}, {'answer_id': 56109, 'author': 'Sam Wessel', 'author_id': 4734, 'author_profile': 'https://Stackoverflow.com/users/4734', 'pm_score': 6, 'selected': True, 'text': '<p>Thank you all for your kind suggestions. We checked them all out, but after careful consideration we decided to roll our own with a combination of CruiseControl, NAnt, MSBuild and MSDeploy.</p>\n\n<p>This article has some great information:\n<a href="http://dougrohm.com/blog/post/2006/01/29/Integrating-MSBuild-with-CruiseControlNET.aspx" rel="noreferrer">Integrating MSBuild with CruiseControl.NET </a></p>\n\n<p>Here\'s roughly how our solution works:</p>\n\n<ul>\n<li>Developers build the \'debug\' version of the app and run unit tests, then check in to SVN.</li>\n<li>CruiseControl sees the updates and calls our build script...\n\n<ul>\n<li>Runs any new migrations on the build database</li>\n<li>Replaces the config files with the build server config</li>\n<li>Builds the \'debug\' configuration of the app</li>\n<li>Runs all unit and integration tests</li>\n<li>Builds the \'deploy\' configuration of the app\n\n<ul>\n<li>Versions the DLLs with the current major/minor version and SVN revision, e.g. 1.2.0.423</li>\n<li>Moves this new build to a \'release\' folder on our build server</li>\n<li>Removes unneeded files</li>\n</ul></li>\n<li>Updates IIS on the build server if required</li>\n</ul></li>\n</ul>\n\n<p>Then when we have verified everything is ready to go up to live/staging we run another script to:</p>\n\n<ul>\n<li>Run migrations on live/staging server</li>\n<li>MSDeploy: archive current live/staging site</li>\n<li>MSDeploy: sync site from build to live/staging</li>\n</ul>\n\n<p>It wasn\'t pretty getting to this stage, but it\'s mostly working like a charm now :D</p>\n\n<p>I\'m going to try and keep this answer updated as we make changes to our process, as there seem to be several similar questions on SA now.</p>\n'}, {'answer_id': 70621, 'author': 'Paul Shannon', 'author_id': 11503, 'author_profile': 'https://Stackoverflow.com/users/11503', 'pm_score': 1, 'selected': False, 'text': "<p>Rather than using xcopy we managed to use the -source:dirpath command with UNC addresses to the servers with msdeploy. The key was the ignoreAcls=true and removing calls to username and password in the msdeploy string:</p>\n\n<pre><code>msdeploy -verb:sync -source:dirpath=\\\\build\\e$\\app -dest:dirpath=\\\\live\\d$\\app,ignoreAcls=true\n</code></pre>\n\n<p>The example deploys the site from our build server's E drive to the D drive on our live server. There are some security considerations with exposing shares or this level of disk access on a live server. We're currently looking into using a limited access shared folder.</p>\n\n<p>We then pipe this output to a log file which is then moved to the backup archive for reference. The log file records which files were moved and when.Continuing the example above with the output pipe command:</p>\n\n<pre><code>... &gt; E:\\archive\\msdeploy.log\n</code></pre>\n"}, {'answer_id': 3125942, 'author': 'S P', 'author_id': 359508, 'author_profile': 'https://Stackoverflow.com/users/359508', 'pm_score': 2, 'selected': False, 'text': '<p>I use msdeploy for this. It works perfect. </p>\n\n<p>About Ant; for the .NET platform we have NAnt and you can use it in combination with MSDeploy; you have the possibility to call MSDeploy from your Nant-script. </p>\n\n<p>Edited:\nJust to make things clear; you can do everything with msdeploy. Using Nant is not a requirement. </p>\n'}, {'answer_id': 3125965, 'author': 'pdr', 'author_id': 176703, 'author_profile': 'https://Stackoverflow.com/users/176703', 'pm_score': 0, 'selected': False, 'text': "<p>The only reason Nant should exist is so that you have a framework similar to Ant in which we can write Tasks using the .NET set of languages.  If you don't want to get a pure .NET developer to write custom Tasks, I can't see any reason you can't use Ant.  Just because you write your application in a .NET language, doesn't mean you have to use a .NET build tool.</p>\n"}, {'answer_id': 3661674, 'author': 'BozoJoe', 'author_id': 38461, 'author_profile': 'https://Stackoverflow.com/users/38461', 'pm_score': 1, 'selected': False, 'text': '<p>No one mentioned Final Builder <a href="http://www.finalbuilder.com" rel="nofollow noreferrer">http://www.finalbuilder.com</a>.  Its on par with Visual build Pro.   Good GUI for creating automated build deployment harnesses</p>\n'}]
['https://Stackoverflow.com/questions/45783', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4734/']