W
W
WebDev2019-07-15 12:05:27
Continuous Integration
WebDev, 2019-07-15 12:05:27

How to properly deploy an application to multiple servers?

Could you tell me, please, how to properly organize the laying out of releases on several servers?
It is planned to scale the project: put 3 servers instead of one and a balancer, such as HAProxy or Nginx, which will distribute requests between them.
Now I have the following deployment process:
1. on the PC git push
2. on the server git pull
3. on the server npm run build
If the number of servers increases, you need to somehow synchronize the data between them. I haven't studied CI/CD tools yet, maybe this is what I need. But until I looked at them, I have a question, why not set up the servers so that one of them is the "master", and the other two simply pull all changes from it via rsync?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly Karasik, 2019-07-15
@vitaly_il1

why not set up the servers so that one of them is the "master", and the other two just pull all the changes from it via rsync?

Because it is not customary to rely on static servers.
You can make either a standalone script, or based on Jenkins (CircleCI or a dozen others) which will be:
git pull
npm build
rsync to a list of servers

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question