开发者

is there a deploy tool (or set of tools) that supports rollback of a deployment?

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开发者_C百科, 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.


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:

  • MSDeploy, for deploying web application.
  • Microsoft Deployment Services, for managing operating system configuration
  • Microsoft's System Center Configuration Manager
  • BladeLogic
  • HP's Operations Center

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.


We have been using Git to do our deploys for the last 6 months.

Here is the whole process:

  1. CI server build the project
  2. CI server checks it in to a local git repository
  3. CI server pushes the changes to the centralised git repository
  4. User creates an empty repository on the live server
  5. User adds the central git repository to the remotes
  6. User pulls the latest version over https (no need to open any ports)

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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜