Reputation:
We are about to outgrow our web server and will deploy the homepage on two load balanced web servers. We currently have a working copy checked out, and whenever (daily) we change anything we svn update the copy. The problem of running on two servers is of course the increased chance of not complete updates on either server leading to strange behaviour.
We also have a separate web server for internal use, and a separate database server. The question is how, if possible, to run one command (probably on the admin server) to update both working copies?
We use subversion over SSH.
Upvotes: 0
Views: 91
Reputation: 3989
Just have the server working directory symlinked to a common location that both servers point to. You only have 1 working copy and both servers point to it. Then you only have to update 1 location.
Upvotes: 0
Reputation: 6871
brute force,,,
why not having a script on your server like:
svn up /var/html/myapp
ssh user@host2 'svn up /var/html/myapp'
then everyone (or the project manager) has to execute this script (remotely) to update the production servers.
But I am sure that there are more elegant solutions out there
Upvotes: 0
Reputation: 20240
Here's what we do:
The path to our rails-app contains a symbolic link. When updating our app we completely check out the repo on all the servers to a new location and run the unit tests. When all update-processes have successfully finished their job, we update the symbolic link - almost simultaneously.
Check out http://www.capify.org for a deployment-strategy of this kind
Upvotes: 1