[nzlug] sync with linux cluster
Robert Coup
robert.coup at onetrackmind.co.nz
Thu Apr 17 16:01:29 NZST 2008
On Thu, Apr 17, 2008 at 3:42 PM, Hadley Rich <hads at nice.net.nz> wrote:
> Puppet rocks :)
puppet/cfengine runs every N minutes in general, and may not be
consistent across the cluster in terms of timing. The update will be
applied, but maybe not on your schedule - each machine will be in a
different state.
clusterssh/dsh would allow you to do "svn up /path/to/code" on every
machine with one command. That might be a simple solution. Capistrano
is a scripted deployment system if you need to do more complex stuff.
Its focussed around rails but works nicely for all sorts of
applications.
for a simple php app you might have a capistrano/clusterssh script
that does the following on each machine in parallel:
a2ensite 01maintenance # display a down-for-maintenance page
/etc/init.d/apache2 reload
svn up /path/to/code # update the code
... do db migrations or other "upgrade" things ...
a2dissite 01maintenance # take away down-for-maintenance
/etc/init.d/apache2 reload
The next step of complexity is to make it so your application is happy
running different code versions at the same time, so you can upgrade
one machine at a time without taking the site down.
Rob :)
More information about the NZLUG
mailing list