.net(winforms,不是asp)多服务器部署
我有一个小型.NET WinForms应用程序,以及几个Linux服务器,DEV和CL1,CL2..CLN(DEV是开发服务器,CL*是属于我们客户的服务器,它们位于专用网络中,是一种生产服务器)服务器)
我想要一个更新机制,以便
(1)我开发一个新版本并将其发布到DEV
(2) DEV-server的用户从DEV安装最新版本
(3) CL2的用户(client2的员工)直接从CL-2安装稳定版本
(4) 应用程序使用安装它的服务器检查更新(因此,如果它是从 CL-2 安装的,它应该检查 CL-2 是否有更新)
(5) 如果我想要的话,我应该能够将更新传播到选定的 CL 服务器(仅使用文件复制和可能 sed;而不是重新发布)(如果我不这样做,该 CL 服务器将有一个旧版本,直到我手动更新它)
我尝试使用 clickonce,但看起来它只满足前两个要求。
我应该怎么办?
I have a small .NET WinForms application, and couple of linux servers, DEV and CL1,CL2..CLN (DEV is development server and CL* are servers which belons to our clients, they are in private networks and it's a kind of production servers)
I want an update mechanism so that
(1) i develop a new version and publish it to a DEV
(2) users of DEV-server install latest version from DEV
(3) users of CL2 (employees of client2) install stable version from CL-2 directly
(4) application checks for updates using server it was installed from (so, if it was installed from CL-2, it should check CL-2 for updates)
(5) i should be able to propogate the update to a selected CL-server (using just file copy & maybe sed; not republishing), if i want that (and if i don't, that CL-server will have an old version until manually i update it)
I tried to use clickonce, but looks like it meets only first two requirements.
What should i do?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
老实说,ClickOnce 应该可以处理 1-4 个。所需要的只是对于您想要部署/更新的每个站点,您需要它有自己的发布,在查看您的规范后,这样做是正确的。
为了使 5. 适用,您可以做的是创建一个自动化流程来重新发布文件。这可以执行发布,然后上传到正确的服务器。
请记住,ClickOnce 需要每个版本一个新的清单,而新版本需要发布,因此我不确定您是否可以通过简单的文件替换来解决 5. 问题。
ClickOnce should handle 1-4 to be honest. All that would be needed is that for each site you want to deploy/update from, you'll need it to have its own publish, which after looking at your specifications is not incorrect to do.
What you could then do in order to make 5. applicable, is create an automated process to re-publish the file. This could perform a publish and then upload to the correct server.
Remember that ClickOnce needs a new manifest per version, and a new version requires a publish, so I'm not sure that you'll get around 5. with a simple file replacement.
凯尔是对的。但对于第五点,您只需复制部署,然后使用 mage 修改安装 URL 并将其指向新服务器,然后重新签署清单即可。
Kyle is right. But for the 5th note, you just need to copy the deployment, and then use mage to modify the installation URL and point it to the new server, and then re-sign the manifests.
我支持我们部署到 DEV、QA、PROD 服务器的应用程序。我处理这个问题的方式是
我创建了一个 cmd 文件,其中包含对 MSBUILD 的命令行调用。它使用适当的 URL 和开关为每个服务器构建一次应用程序。我给我的 DEV 和 QA 构建了一个不同的 AssemblyName,这样我就可以并行运行所有 3 个环境。这样我的构建过程是自动化的,我根本不需要发布。
这是一篇描述您可以使用的参数的文章。
http://msdn2.microsoft.com/en-us /library/ms165431(VS.80).aspx
@Kyle,
对于上述解决方案,不同版本可以并行运行,或者您是否会收到指示应用程序已安装的错误。
I support an app that we deploy to a DEV, QA, PROD servers. The way I handled this is that
I created created a cmd file that has command line calls to MSBUILD. It builds the app once for each server with the appropriate URLs and switches. I give my DEV and QA builds a different AssemblyName that way I can run all 3 environments side by side. This way my build process is automated and I don't have to publish at all.
Here's an article that describes the parameters you can use.
http://msdn2.microsoft.com/en-us/library/ms165431(VS.80).aspx
@Kyle,
For the above solution can the different versions run side by side or do you get errors indicating the app is already installed.