Re: Build and Deployment Process

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



VamVan wrote:
Hello All,

What is the best method to build and deploy php scripts along the different
environments? You can talk about rpm's and stuff

My specific scenario is

Step1:

Developer checks code in to perforce (repo)

Step 2:

Then I need to upgrade my integration instance.

Step 3:

Upgrade QA instance

Step 4:

Upgrade staging Server

Step 5:

Upgrade production machines

What would be the specific build mechanism that I can use for such kind of
environments? I also have db scripts that might alter schema.

Please provide me samples of any scripts that you might have written to
achieve this kid of structure. Any suggestions or scripts will be highly
appreciated.

Personally, I use various branches in our repo to do this kind of roll out. I have various (simple) scripts that do all the updating on the various environments and it's usually just a matter of switching to a different branch.

It kind of depends whether all of your productions environments are under your control or not. If they are then you can do a kind of direct access to your repo on them (security considerations aside).

On production, I personally do a pull from the repop to an offline area on a "master" production server, do rsync dry-runs to online areas (to get the disc cache all warmed up) to each production server (there can be more than one!) and then do a quick: disable, rysnc, update, enable run to do the final deployment.

If we know there are no race type issues in our deployment we can opt to avoid the disable/enable bit of it and just deploy it live.

Not much in the way of attached scripts but that how I do it and it works pretty well :)

As a side note, if you have larger load sites, you'll probably be doing some caching cleverness with APC (or similar), in which case you'll probably want to invalidate some caches before update. In order to prevent spike loading upon enabling again, you may also want to do some kind of "priming" of the caches before opening it all to the public.

Col


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux