Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automate Deployment for Web Applications? [closed]

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.

We require a solution that will enable us to:

- Compile the application     - Version the application with the SVN version number   - Backup the existing site   - Deploy to a web farm 

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.

Are there any other deployment tools out there that would help us?

like image 802
Sam Wessel Avatar asked Sep 05 '08 13:09

Sam Wessel


People also ask

Can we automate deployment?

Deployment automation is what enables you to deploy your software to testing and production environments with the push of a button. Automation is essential to reduce the risk of production deployments.


2 Answers

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.

This article has some great information: Integrating MSBuild with CruiseControl.NET

Here's roughly how our solution works:

  • Developers build the 'debug' version of the app and run unit tests, then check in to SVN.
  • CruiseControl sees the updates and calls our build script...
    • Runs any new migrations on the build database
    • Replaces the config files with the build server config
    • Builds the 'debug' configuration of the app
    • Runs all unit and integration tests
    • Builds the 'deploy' configuration of the app
      • Versions the DLLs with the current major/minor version and SVN revision, e.g. 1.2.0.423
      • Moves this new build to a 'release' folder on our build server
      • Removes unneeded files
    • Updates IIS on the build server if required

Then when we have verified everything is ready to go up to live/staging we run another script to:

  • Run migrations on live/staging server
  • MSDeploy: archive current live/staging site
  • MSDeploy: sync site from build to live/staging

It wasn't pretty getting to this stage, but it's mostly working like a charm now :D

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.

like image 152
Sam Wessel Avatar answered Sep 20 '22 18:09

Sam Wessel


I have used Visual Build Pro for years, It's quite slick and easy to use and has many standard operations (like the ones you mentioned) built in.

like image 23
jeremcc Avatar answered Sep 19 '22 18:09

jeremcc