TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 06-05-2009, 06:11 AM   #1 (permalink)
The Contributor
 
Join Date: Jan 2008
Posts: 25
Thanks: 8
cosmok is on a distinguished road
Help Deploying Web Apps, How do you guys do it?

Hello,

I am trying to automate deployment/rollback of new versions of our Web Based application at work. This is what I have in mind:
  • Create a backup of our app on production
  • Do an SVN Export from our local server
  • Stop apache and then mysql on production
  • Execute MySQL changes on production
  • Rsync to our prodcution server
  • Restart MySQl and then Apache on production.

Rollback is something similar (Exporting the previous tag from SVn, Rsyncing and executing SQL Rollback queries)

I am also automating the whole thing (except for starting/stopping Apache) using PHING.

I am concerned about the minute or two downtime while we release the new version of the app. And, I have been thinking about the process of Deploying web apps for a while now and have been reading about it online and I am wanting to know more about this topic.

Please share with us your experiences/best practices followed while deploying a Web App.

Pl
cosmok is offline  
Reply With Quote
Old 06-11-2009, 09:14 AM   #2 (permalink)
The Contributor
 
dschreck's Avatar
 
Join Date: Nov 2007
Location: California
Posts: 82
Thanks: 0
dschreck is on a distinguished road
Default

There's no reason to stop apache/mysql on prod.

If you have database migrations, you should be able to run them live, prior to pushing your code.

What i've done, is simply set the doc root on apache to a sym link, ie:

/builds/current

and then have folder:

/builds/releases/

each release goes into it's own folder there.

Have the deploy script move all of the files over, chagne the symlink to point to the new release number, and then restart apache.

No downtime.


I've used this method, and continue to use this method, on projects that receive millions of unique users a month, all of it swapping on the fly.

Only rarely is there ever a need to bring the application down for DB migrations. If replication falls behind by 10, 15 minutes, it's nothing major.
__________________
Where I Ramble: http://www.iwilldomybest.com/
What I do: Zynga Game Network
Senior Software Engineer at CityVille
dschreck is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
hi guys.. opojal Member Introductions 1 03-10-2009 11:24 AM
Hi there guys gilbertoalbino Member Introductions 5 11-05-2008 07:34 PM
Hi guys, kalyan from India kalyan02 Member Introductions 5 08-28-2008 12:25 PM
Hey guys ReSpawN Member Introductions 4 11-26-2007 07:09 AM


All times are GMT. The time now is 01:23 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design