auto update code to many servers at one time

149 Views Asked by At

I have a nodejs web app, I deploy this app to 3 servers to serve many requests from user. The problem is when everytime I update source code, I have to remote to every server to pull code from Bitbucket and restart the server. Is there any way to update one time for all servers?, thanks. How facebook do when they have thousand of servers?

1

There are 1 best solutions below

0
weiyin On BEST ANSWER

I would recommend removing git access from your servers. Instead, use a build tool like grunt or gulp to create a package. Then deploy it with something like Ansible (super simple, runs over ssh without any agents), or Chef, etc.