使用 TFS Build 2010 一键部署
让我从我的网站架构开始,我有 2 个 Web 服务器(员工)、2 个 Web 服务器(外部用户)、2 个应用程序服务器 (wcf) 和数据库服务器。我有超过 5 个环境(其中会有相应的配置)。
我使用 Team Build 2010 在共享文件夹中生成包。这不包括数据库增量脚本(上次构建的架构更改)。
目前,我将这些包带到远程服务器并使用 MSBUILD 进行部署。
现在我需要
- 此架构的一键部署方法。 (一个想法)
我可以使用的MSBUILD命令(如果可能的话,给我指出完整的列表)
如何生成增量数据库脚本和更新数据库的方法作为自动化的一部分(我的解决方案中有数据库项目,目前我正在每次构建后进行模式比较)
大多数情况下,我认为必须编辑 BuildProcesstemplate.xaml。也以这种方法进行指导。
我提到的事情(对我的情况没有帮助)
- Vishal R. Joshi 的 PDC 09 演讲
- 使用 TFS 2010 Build Agent 进行持续部署(Hakan Forss 博客)
- Web 部署非常棒:如果您使用 XCopy,那么您就错了(Scott汉塞尔曼)。
大多数谷歌搜索和堆栈通讯都向我展示了简单场景的帮助。请把您的想法放在您的项目中或使用过。
多谢。
Let me start with my website architecture I have 2 web servers (staff), 2 web servers (external user), 2 App Servers (wcf) and database server. I have more then 5 environments (which will have there corresponding configuration).
Using Team Build 2010 I am generating packages in the shared folder. This doesn't include database incremental script (schema changes from the last build).
Currently I taking these packages to the remote servers and deploying them using MSBUILD.
Now I need
One click deployment approach for this architecture. (an idea)
MSBUILD commands that I could use (if possible point me to the complete list)
How to generate incremental database script and way to update the database as part of automation (I have Database project in my solution currently I am doing a schema compare after each build)
Mostly I think BuildProcesstemplate.xaml has to be edited. Guide in this approach as well.
Things i referred (not helpful in my case)
- PDC 09 talk by Vishal R. Joshi
- Continuous deployment with TFS 2010 Build Agent (Hakan Forss blog)
- Web Deployment Made Awesome: If You're Using XCopy, You're Doing It Wrong (Scott Hanselman).
Most of googling and Stack comm showed me help with simple scenario's. Please put your idea's you have or used in your projects.
Thanks a lot.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以将 MSBuild 参数添加到 TFS 构建以强制 MsDeploy (http: //dotmac.rationalmind.net/2011/03/continuous-integration-with-tfs/)。
然而,它似乎只在简单的示例中运行良好(据我所知),当您:
对于更高级的部署,我建议查看在 TFS 的插件中。
您只需自定义构建即可使用 Tfs Deployer(开源 - http://tfsdeployer.codeplex.com/ )设置触发 powershell 脚本运行 msdeploy 的构建质量,并且可以根据需要复杂或简单。
或者等待 Octopus(商业 - http://octopusdeploy.com/ )可用并找出一些东西。
You can add MSBuild arguments to TFS build to force a MsDeploy ( http://dotmac.rationalmind.net/2011/03/continuous-integration-with-tfs/ ).
However it only seems to work well (from what I can tell) in simple examples when you:
For more advanced deploying, I would suggest looking at an addon for TFS.
Either Tfs Deployer (OpenSource - http://tfsdeployer.codeplex.com/ ) where you simply customize your build to set a build quality which triggers powershell scripts to run msdeploy and can be as complex or simple as you like.
Or wait for Octopus (Commercial - http://octopusdeploy.com/ ) to become available and figure out something with that.
MSbuild 脚本和 PS 工具的组合即可完成这项工作。
A combination of MSbuild scripts and PS tools will do the job.