亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

ruby - 有沒(méi)有一種方式讓我同時(shí)部署多個(gè)不同項(xiàng)目到不同的服務(wù)器上面去呢?
大家講道理
大家講道理 2017-04-21 10:57:49
0
2
788

情況是這個(gè)樣子:
"A"是開(kāi)發(fā)機(jī),
"B"是用來(lái)專(zhuān)門(mén)放開(kāi)發(fā)項(xiàng)目的服務(wù)器,
"C,D,E...等 "是其它人要訪問(wèn)的服務(wù)器對(duì)外

現(xiàn)在有多個(gè)項(xiàng)目我需要部署到多臺(tái)服務(wù)器上面去,現(xiàn)在我的方法是使用"capistrano"

1: 在A新建一個(gè)部署項(xiàng)目"deploy"讓其來(lái)發(fā)送指令,使C,D,E..服務(wù)器到"B"服務(wù)器上下載項(xiàng)目

2: 以前我部署的時(shí)候是進(jìn)到deploy中然后進(jìn)到對(duì)應(yīng)的項(xiàng)目進(jìn)行 cap production deploy 來(lái)部署

3: 現(xiàn)在我要想用一個(gè)項(xiàng)目來(lái)專(zhuān)門(mén)負(fù)責(zé)部署類(lèi)似"deploy"但是我想同時(shí)部署多個(gè)項(xiàng)目到多臺(tái)服務(wù)器上去.

4: 所以我想問(wèn)請(qǐng)教一下,是否有那么一個(gè)機(jī)制"同時(shí)部署多項(xiàng)目到多臺(tái)服務(wù)器上"

5:我聽(tīng)說(shuō)過(guò)caphub 但是還沒(méi)有怎么領(lǐng)會(huì)其用法,還有其它的方法嗎?

大家講道理
大家講道理

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

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