keymaster wrote:
> What do people do to minimize downtime when upgrading/maintaining  a
> live site ?
>   

All my deployments (of the same app, in different locales) are done 
direct from cvs
Most PHP apps in my experience are fine with this sort of live upgrade - 
ymmv
I admit this is not very elegant and carries risk, but by this point 
I've used a staging
server to verify the changes, and its cheap and cheerful.

Chris Hartjes has mentioned "Capistrano" on his blog which I admit I had 
not heard of until recently;
I took a look and it does sound appealing especially for the kind of 
development deployment I am
talking about here (single package, multiple virtually identical server 
envs)

When actually updating a deployment, I change to the cake dir, then 
update direct from my
cvs repository either from HEAD or a nominated tag (preferred)
....remembering most crucially to clear the cache to pickup new models 
(if you are caching/persisting)

cvs -q update -P -d ; rm -rf app/tmp/cache/models/default_* 
app/tmp/cache/persistent/*.php

One benefit of CVS is that if you are particularly familiar with your 
app, it is possible to do file by
file update replacements which does have certain advantages (rolling out 
emergency fixes occasionally
without pulling down lots of untried changes) but you need nerves of 
steel and a steady hand!

Another benefit is that rolling back to a nominated tag should be 
straightforward (haven't had to
do that, thankfully)

To do testing, I have a cron job that copies my database to a 
development (and the staging)
server a few times a day, so I always have those dev apps database.php 
pointing at that, so I can play
away with pseudo-live data. My apache always points to my checked out / 
updated directory from
CVS that I am working in for ease of access.

I would add multiple machines, or zones/virtual servers to your list of 
"ideals" if that is feasible.

In a similar vein, if upgrading cake itself...

Recently I've shifted the cake core into a separate dir rather than 
bundled with my apps cvs module
and i update direct from the subversion repo.

svn checkout https://svn.cakephp.org/repo/trunk/cake/1.2.x.x/[EMAIL PROTECTED] 
/export/cake/1.2.x.x/5875/cake

Then I just modify app/webroot/CAKE_CORE_INCLUDE_PATH within my 
application cvs module
so i can trial new versions on my dev server very easily by pointing at 
the appropriate subdir,
and cut them in on the production servers in a second.

Cheers, Howard

> Ideally the steps should be:
>
> 1. install the new version into a separate app directory and database.
> 2. somehow test the installation is working
> 3. switch over from the old app directory and DB, to the new app
> directory and new DB.
>
> For this process to work, you need a way for existing users to
> continue seeing the old site, while you see the new site for final
> setup.
>
> Alternatively, a less ideal method is:
>
> 1. set site to "down for maintenance"
> 2. upload and replace your app directory
> 3. test to make sure it's working
> 4. put site back online.
>
> This process also requires that users continue to see the "down for
> maintenance" page, while you see the new site for final setup.
>
> How have you approached this problem?
> >
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to