ruby - 有没有一种方式让我同时部署多个不同项目到不同的服务器上面去呢?
大家讲道理
大家讲道理 2017-04-21 10:57:49
0
2
714

情况是这个样子:
"A"是开发机,
"B"是用来专门放开发项目的服务器,
"C,D,E...等 "是其它人要访问的服务器对外

现在有多个项目我需要部署到多台服务器上面去,现在我的方法是使用"capistrano"

1: 在A新建一个部署项目"deploy"让其来发送指令,使C,D,E..服务器到"B"服务器上下载项目

2: 以前我部署的时候是进到deploy中然后进到对应的项目进行 cap production deploy 来部署

3: 现在我要想用一个项目来专门负责部署类似"deploy"但是我想同时部署多个项目到多台服务器上去.

4: 所以我想问请教一下,是否有那么一个机制"同时部署多项目到多台服务器上"

5:我听说过caphub 但是还没有怎么领会其用法,还有其它的方法吗?

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(2)
阿神

As long as you can ssh to operate the remote machine, you can change it to the command you want to execute

for i in 1.1.1.1 2.2.2.2 3.3.3.3 4.4.4.4 ; do
    ssh root@$i 'cd /path/to; git pull; supervisor reload'
done;
Peter_Zhu

@yanyaoer The method used is the simplest shell implementation. The disadvantage is that the whole process is queued and not concurrent. You can use some concurrency gadgets such as pssh onall, which can be very complete and have other great uses and result feedback. It is also very easy to operate more server command operations at the same time.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template