自动部署Web应用程序? [英] Automate Deployment for Web Applications?

查看:209
本文介绍了自动部署Web应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的团队目前正在尝试自动化我们的.Net和PHP的Web应用程序的部署。我们要简化部署,并避免麻烦和多由手工做的头痛。

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

我们所有的应用程序都是源使用SVN和我们的.Net应用程序使用CruiseControl的控制。 我们一直在努力使用的MSBuild和楠部署脚本有限的成功。我们也使用Capistrano的过去,但希望避免使用Ruby如果可能的话。

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?

推荐答案

感谢大家的一种建议。我们检查了所有的手续,但经过慎重考虑,我们决定推出自己的CruiseControl的,楠,MSBuild的和MSDeploy的组合。

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.

这篇文章有一些伟大的信息: <一href="http://dougrohm.com/blog/post/2006/01/29/Integrating-MSBuild-with-CruiseControlNET.aspx">Integrating的MSBuild与CruiseControl.NET

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

下面是大致有我们的解决方案如下:

Here's roughly how our solution works:

  • 开发建设的调试版本的应用程序并运行单元测试,然后签入到SVN。
  • CruiseControl的看到了更新,并呼吁我们的构建脚本...
    • 在运行构建数据库的任何新的迁移
    • 替换配置文件与构建服务器配置
    • 构建应用程序
    • 的调试配置
    • 在运行所有的单元测试和集成测试
    • 构建应用程序的部署配置
      • 的版本与当前的主要/次要版本和SVN版本,如DLL文件1.2.0.423
      • 将这个新的版本为版本文件夹中我们构建服务器
      • 删除不需要的文件
      • 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

          然后,当我们已经验证一切都准备好了,不辜负/舞台,我们运行另一个脚本:

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

          • 在现场/分期服务器上运行迁移
          • MSDeploy:档案当前直播/舞台网站
          • MSDeploy:同步网站从建立到生活/分期

          这不是pretty的获取到这个阶段,但它主要的工作就像一个魅力现在:D

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

          我会尽力保持这个答案更新,我们改变我们的过程,似乎有对SA几个类似的问题了。

          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.

          这篇关于自动部署Web应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆