I'm running Fabric on Debian out of virtualenv to deploy a project to multiple remote Debian servers. When I run the command to deploy to a single server:
time .venv/bin/fabric server1 deploy
The server1
command sets the remote host. Deployment, which pulls code out of a repository and builds a virtualenv for the project on the remote server, takes about 7 minutes:
real 7m49.881s
user 0m52.883s
sys 0m18.345s
I configured passwordless SSH access to 3 servers and now run fabric with the -P
command:
.venv/bin/fabric parallel deploy
The parallel
command assigns 3 servers to env.hosts. Deployment takes 3 times as long:
real 22m22.259s
user 2m45.718s
sys 0m53.827s
I used the -P
option after reading the Fabric documentation on parallel execution.