Skip to main content
deleted 13 characters in body
Source Link
nkhuyu
  • 860
  • 3
  • 9
  • 23

Say I have a decent git server(source code repos). I want to push the code to 50 websevers, I can do the following in sequence:

#!/bin/bash for i in {1..50} do ssh root@websever$i  '(cd /var/www/project project; git pull)' done 

Question: Is there an easy way to push the code to 50 websevers in parallel? Thanks.

Say I have a decent git server(source code repos). I want to push the code to 50 websevers, I can do the following in sequence:

#!/bin/bash for i in {1..50} do ssh root@websever$i  cd /var/www/project  git pull done 

Question: Is there an easy way to push the code to 50 websevers in parallel? Thanks.

Say I have a decent git server(source code repos). I want to push the code to 50 websevers, I can do the following in sequence:

#!/bin/bash for i in {1..50} do ssh root@websever$i '(cd /var/www/project; git pull)' done 

Question: Is there an easy way to push the code to 50 websevers in parallel? Thanks.

Source Link
nkhuyu
  • 860
  • 3
  • 9
  • 23

Is there an easy way to push the code to 50 websevers **in parallel**?

Say I have a decent git server(source code repos). I want to push the code to 50 websevers, I can do the following in sequence:

#!/bin/bash for i in {1..50} do ssh root@websever$i cd /var/www/project git pull done 

Question: Is there an easy way to push the code to 50 websevers in parallel? Thanks.