是否有支持部署回滚的部署工具(或工具集)?
我正在学习 FluentMigrator。我喜欢 FM 的一点是它支持向前和向后迁移的想法(也称为向上/向下)。我发现这并不理想;有一些漏洞。不过,还是不错的。
这让我想知道是否有任何部署工具(nant、msbuild 或其他)支持这种向前和向后滚动的想法。我使用它的场景是部署具有相关数据库的 Web 应用程序。
理想情况下,我想设置我的部署,以便如果它的任何部分失败,它将恢复到以前已知的工作配置。对于 FM,这很容易做到(但也有一些困难),因此涵盖了 db。构成网络应用程序的文件怎么样?有部署工具支持这个吗?
部署到 Windows 服务器。假设我无法对服务器进行任何更改。
I'm learning FluentMigrator. The thing that I like about FM is that it supports the idea of Forward and Back for migrations (aka Up/Down). I'm finding that it's not ideal about this; there are some holes. Still, it's good.
This leads me to wonder if there are any deployment tools (nant, msbuild or other) that support this idea of rolling forward and back. The scenario that I'm using it in is the deployment of a web app with a related database.
Ideally I'd like to set up my deployment so that, should any part of it fail, it will revert to the previous known working configuration. With FM, this is pretty easy to do (but there are rough spots), so that covers the db. How about the files that make up the web app? Do any deploy tools have support for this?
Deploying to a Windows Server. Assume that I can't make any changes to the server.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我不知道有任何像 Capistrano 这样以 Microsoft 为中心的自动配置/部署工具。以下是我听说过但从未使用过的一些工具:
直到大约三个月前,我们使用自定义 MSBuild 脚本进行部署/配置。配置服务器后,使用 自动进行部署Robocopy 将文件复制到应用程序服务器上的共享,更新更改的应用程序二进制文件和标记文件。我们从来不需要回滚任何部署,但由于我们的脚本是自定义的,因此我们可以根据需要编写逻辑。
MSBuild 是一种糟糕的部署/配置语言。在过去的三个月中,我们一直在 PowerShell 中编写所有新脚本,并将现有脚本移植到 PowerShell。太棒了。第 2 版支持在远程服务器上运行命令,例如 SSH。我们尚未使用该功能,但我期待将安装脚本推送到远程服务器以同时配置和部署。
I don't know of any Microsoft-centric, automated provisioning/deployment tools like Capistrano. Here are some tools I've heard of, but never used:
Up until about three months ago, we did our deployment/provisioning using custom MSBuild scripts. After a server is provisioned, deploys happen automatically using Robocopy to copy files to a share on the application server, updating changed application binaries and markup files. We've never had a need to rollback any of our deployments, but since our scripts are custom, we could write the logic if we needed to.
MSBuild is a terrible deployment/provisioning language. For the past three months, we've been writing all new scripts in, and porting existing ones to, PowerShell. It is wonderful. With version 2, there is support for running commands on remote servers, like SSH. We haven't used that functionality yet, but I'm looking forward to pushing setup scripts to remote server to provision and deploy at the same time.
过去 6 个月我们一直使用 Git 进行部署。
整个过程如下:
一开始需要进行很多设置,但一旦设置就可以很好地工作。部署需要几秒钟的时间,因为只复制更改的文件。
此方法的另一个优点是 git 保留更改历史记录,因此回滚非常简单。您还可以回滚一些修订,这直接在实时服务器上完成。如果出现问题,恢复速度非常快。
此外,如果您为中央存储库使用托管 git 服务 (github),您还可以节省一些时间。
这是一个非常简短的描述,但如果您愿意,我可以为您提供更多信息。
We have been using Git to do our deploys for the last 6 months.
Here is the whole process:
It is a lot to setup in the beginning but once setup it works great. Deploys take seconds as only changed files get copied.
Another great thing about this method is that git keeps history of changes so rolling back is pretty simple. You can also roll back a few revisions and it's done straight on the live server. If something goes wrong reverting is super fast.
Also you can save some time if you use a hosted git service (github) for your central repository.
This is a very brief description but I can give you more info if you want.
当然!我最喜欢的是卡皮斯特拉诺。它最初是为 Ruby 构建的,但我发现它对于其他语言也同样有效。
https://github.com/capistrano/capistrano
Of course! My favorite is Capistrano. This was originally built for Ruby but I've found that it works just as well for other languages.
https://github.com/capistrano/capistrano