让 Capistrano 跳过已关闭的主机
我的设置
我正在将 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我最终为每个 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.