如何组织 WCF 服务的持续交付?
我有一些部署到多个虚拟机的 WCF 服务。 VM 是仅限内部网络的一部分,未加入域。我有时需要将二进制文件更新到最新版本。为此,我有一个 .bat 脚本。现在,我在每个虚拟机上手动触发更新,并且希望通过单击 TeamCity 按钮来自动交付。
我尝试从 powershell(来自 TeamCity 的远程作业)运行脚本,但安全问题配置起来有点痛苦,所以我放弃了它并返回到手动更新。后来我考虑向基础合约添加一个新方法,例如
void Update(string fromBatFile);
WCF 服务将在单独的进程中调用该文件(例如通过 cmd.exe)并关闭其主机。 bat 文件将执行更新并再次启动 WCF 主机。
这是一个好方法吗?有没有更好的持续交付WCF服务的解决方案?
I have a few WCF services that are deployed to several VMs. VMs are part of the internal only network and are not joined into the domain. From time to time I need to update the binaries to the latest version. For that I have a .bat script. Right now I trigger the update manually on each VM and I want to automate delivery via a button click from TeamCity.
I tried to run the scripts from powershell (remote jobs from TeamCity), but the security issues were a bit painful to configure, so I dropped that and returned to manual updates. Later I was thinking of adding a new method to a base contract, something like
void Update(string fromBatFile);
WCF service will call the file in a separate process (for example via cmd.exe) and will shut down its host. The bat file will perform the update and start WCF host back again.
Is this a good approach? Are there any better solutions for continuous delivery of WCF services?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看 WebDeploy。
请注意“有效同步您的服务器场”的部分。
Look into WebDeploy.
Note the part where it says "Synchronize your server farm efficiently".