How to auto deploy code on multiple droplets/servers?

Im using LAMP stack droplets. Im looking for automated deployment tool or method to push my code on multiple servers at once. Im using Load balancer for 2 droplets. When i push some code to droplet1, it should also be auto deployed to server2. I tried using Git hooks 2014 answer from DO Community, but was not successful. Or how to use RSYNC or any method? Actively looking for answers.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @lalithaxlrose,

There are multiple ways of doing this and using rsync to copy files over is a really good idea however there are tools generated exactly for configuration management like Ansible, Puppet and many others. I’ll recommend checking out the two I mentioned and seeing which one would you like more.

Ansible is the new technology while Puppet as a little older one however based on your needs, you’ll decide which one to use as they have some differences.

Regards, KDSys