Unitech / pm2

Node.js Production Process Manager with a built-in Load Balancer.
https://pm2.keymetrics.io/docs/usage/quick-start/
Other
41.59k stars 2.62k forks source link

Simultaneous Deployments #5880

Open quadrateer opened 3 months ago

quadrateer commented 3 months ago

This is more like a feature request. Let's say our config is exactly like https://pm2.keymetrics.io/docs/usage/deployment/ with three hosts:

(...)
deploy : {
    production : {
       "user" : "ubuntu",
       "host" : ["192.168.0.13", "192.168.0.14", "192.168.0.15"],
       "ref"  : "origin/master",
       "repo" : "git@github.com:Username/repository.git",
       "path" : "/var/www/my-repository",
       "post-deploy" : "npm install"
    }
  }
(...)

Now running:

$ pm2 deploy production

will work in a chain. 192.168.0.13, then 14 and finally 15 (if there is no error in each case).

Is there an option or a chance to have an option to run these tasks in parallel? It could reduce the deployment time significantly in case of long hosts array.