I am attempting to figure out a good way to push out a new commit to a group of EC2 server instances behind a ELB (load balancer). Each instance is running Nginx and PHP-FPM
I would like to perform the following workflow, but I am unsure of a good way to push out a new version to all instances behind the load balancer.
- Dev is done on a local machine
- Once changes are ready, I perform a "git push origin master" to push the changes to BitBucket (where I host all my git repos)
- After being pushed to bitbucket, I would like to have the new version pushed out to all EC2 instances simultaneously.
- I would like to do this without having to SSH in to each instance (obviously).
Is there a way to configure the remote servers to accept a remote push? Is there a better way to do this?