让 Capistrano 跳过已关闭的主机

发布于 2024-10-07 21:08:56 字数 338 浏览 0 评论 0原文

我的设置

我正在将 Ruby on Rails 应用程序部署到 70 多个主机。这些主机位于消费级 ADSL 连接后面,该连接可能已启动,也可能未启动。成功的概率约为 99%,但绝对不是 100%。

部署过程工作得很好,我没有遇到任何特定的问题。

问题

当 Capistrano 遇到宕机的主机时,它会停止整个进程。这是一个问题,因为如果主机 n°30 关闭,那么它后面的 40 个其他主机将无法获得部署。

我想要的是对于已关闭的主机来说肯定是一个错误,但我也希望 Capistrano 继续部署到所有已启动的主机。

是否有任何设置或配置可以让我做到这一点?

My setup

I am deploying a Ruby on Rails application to 70+ hosts. These hosts are located behind consumer-grade ADSL connections which may or may not be up. Probability of being up is aroud 99% but definently not 100%.

The deploy process works perfectly fine and I have no problem specific to it.

The problem

When Capistrano encounters a down host, it stops the entire process. This is a problem because if host n°30 is down, then the 40 other hosts after it do not get the deployment.

What I would like is definently an error for the hosts that are down but I would also like Capistrano to continue deploying to all the hosts that are up.

Is there any setting or configuration that would enable me to do this ?

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

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

发布评论

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

评论(1

鲸落 2024-10-14 21:08:56

我最终为每个 IP 运行一个 Capistrano 实例,然后解析日志以查看哪个 IP 失败、哪个 IP 成功。

根据我的需要调整的一个 Python 脚本就可以做到这一点。

I ended up running a Capistrano instance for each IP then parsing the logs to see which one has failed and which one has succeeded.

A little Python script adjusted to my needs does this fine.

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