在自动部署到我们的 QA 环境期间如何远程解压?

发布于 2024-09-12 18:56:16 字数 407 浏览 2 评论 0原文

我正在尝试找出一种方法来自动部署到我们的 QA 环境。问题是我们的版本相当大,因此需要压缩、FTP,然后在 QA 服务器上解压缩。我不确定如何最好地远程解压。

我可以想到几个选项,但没有一个听起来正确:

  • 使用 PsExec 在 QA 服务器上执行远程命令行调用来解压缩版本。
  • 在 QA 服务器上托管一个 Web 服务,用于解压缩版本并将其复制到正确的位置。当文件上传完成后,我们的版本可以调用此服务。
  • 在 QA 服务器上托管一个 Windows 服务,用于监视文件位置并执行解压缩。

但这些都不漂亮。我想知道其他人是如何解决这个问题的?

PS:我们使用 CruiseControl.NET 执行 NAnt 脚本来进行构建、压缩和 FTP。

I'm trying to figure out a way to automate the deployment to our QA environment. The problem is that our release is quite big, so needs to be Zipped, FTP'd and then Unzipped on the QA server. I'm not sure how best to unzip remotely.

I can think of a few options, but none of them sound right:

  • Use PsExec to execute a remote commandline call on the QA server to unzip the release.
  • Host a web service on the QA server that unzips the release and copies it to the right place. This service can be called by our release when it's done uploading the files.
  • Host a windows service on the QA server that monitors a file location and does the unzipping.

None of these are pretty though. I wonder how others have solved this problem?

PS: we use CruiseControl.NET to execute a NAnt script that does the building, zipping and FTP.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

小猫一只 2024-09-19 18:56:16

您可以使用 rsync 等工具,而不是压缩和解压缩;它可以在文件传输过程中透明地压缩数据。 -z 选项告诉 rsync 使用压缩。

但我假设您处于 Windows 环境中,在这种情况下您可以使用 cwRsync (这是“适用于 Windows 的 rsync”)。

根据您对 QA 框的访问,这可能不是一个可行的解决方案。您需要:

  • 在远程计算机上安装 cwRsync 服务器并
  • 允许流量通过任何防火墙。

Instead of compressing and un-compressing, you can use a tool like rsync; which can transparently compress data during file transfer. The -z option tells rsync to use compression.

But I assume you are in a Windows environment, in which case you could use cwRsync (which is "rsync for Windows").

Depending on your access to the QA box this might not be a viable solution. You'll need to:

  • install the cwRsync server on the remote machine and
  • allow the traffic through any firewalls.
浅忆流年 2024-09-19 18:56:16

在我工作的最后一个地方,我们让一个人在 CI 盒子上编写一个 Windows 服务来进行解压缩。 TFS Team Server 完成构建并通知服务压缩已完成的构建并将其复制到 CI 盒。 CI 盒找到新文件并将其解压缩。它可能有点重,但效果很好 - 而且他知道将所有操作记录到事件日志中,因此很容易诊断服务器是否已重置并且服务尚未启动。

更新:我们希望改进该流程的一件事是让 CI 框上的服务检查超过 x 个月的 zip 文件和未压缩文件,以进行清除。我们经常会耗尽磁盘空间(这是我们很少查看的虚拟机),并且在发生这种情况时必须手动清除旧版本。

At the last place I worked at, we had a guy write a Windows service on the CI box to do the unzipping. TFS Team Server finished the build and notified a service to zip the completed build and copy it to the CI box. The CI box picked up on the new file, and unzipped it. It may have been a bit heavy, but it worked well - and he was cognizant to log all actions to the event log, so it was easy to diagnose if a server had been reset and the service hadn't started.

Update: One thing that we would have liked to improve on that process was to have the service on the CI box check for zip files and uncompressed files that were older than x months, for purging purposes. We routinely ran out of disk space (it was a VM that we rarely looked at), and had to manually purge old builds when it happened.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文