Inside my company you will find there's number of 8 web-developers for the business site (entirely designed in PHP, but that should not matter). Everybody within the group is focusing on different projects simultaneously and whenever they are completed with their task, they immediately deploy it (cause clients are moving fast nowadays).

Presently the expansion happens on a single shared server with all of designers focusing on exactly the same code base (using RCS to "lock" files from others). When deployment arrives, the transformed files are replicated to a "staging" server after which a sync script uploads the files to the primary webserver where it's distributed to another 9 servers.

Quite happily, the net dev team requested us for help to be able to enhance the process (after us worrying for some time) and today our idea for establishing their dev atmosphere is the following:

  • A dev server with virtual sites, to ensure that everyone has their very own codebase,
  • SVN (or other VCS) to keep an eye on changes
  • a central server for testing holding the most recent checked in code

Now you ask , now: How can we have the ability to deploy the transformed files onto the server without accidentaly uploading bugs using their company projects? My first idea ended up being to simply export the most recent revision in the repository, but that will not give full treatments for the files.

How can you manage this type of situation? What type of deployment scripts have you got for action?

(Like a special challenge: the web site has organically grown during the last ten years, therefore the projects aren't separate in small portions, but files for just one specific feature are dispersed all around the directory tree.)

Cassy - you clearly possess a lengthy approach to take before you will get your source code management entirely so as, however it seems like you are well on the right path!

Getting individual sandboxes will certainly help on things. Next then make certain the website is definitely only a clean checkout of the particular revision, tag or branch from subversion.

We use git, but you will find there's similar setup. We tag a specific version having a version number (in git we reach give a description towards the tag great for release notes!) therefore we possess a script that anybody with use of "perform a release" can run that can take two parameters -- which system will probably be up-to-date (the datacenter and when we are upgrading the exam or even the production server) and so the version number (the tag).

The script uses sudo to then run the discharge script inside a shared account. It will a checkout from the relevant version, minimizes javascript and CSS[1], pushes the code towards the relevant servers for that atmosphere after which restarts what must be restarted. The final type of the discharge script connects to among the webservers and tails the mistake log.

On our websites we have an html comment at the end of every page using the current server title and also the version -- causes it to be easy to understand "What's running at this time?Inch

[1] and a lot of other housekeeping tasks like this...

You are able to most likely use Capistrano despite the fact that is much more for ruby you will find some articles that describe using it for PHP

I believe Phing could be use with Resumes although not with SVN (a minimum of that things i last read)

You will find several project around that mimic Capistrano but designed in PHP.

Otherwise there's additionally a customized solution :

  1. tag files you need to deploy.
  2. checkout files while using tag inside a
    specific directory
  3. symlink your directory to the present document root (simple to rollback to the prior version)

You should look at using branching and merging for individual projects (on a single codebase), when they make huge changes towards the shared codebase.

we will often have a nearby dev enviroment for testing (meaning, webserver in your area) for testing the uncommited code (you won't want to commit non functioning code whatsoever), but that dev enviroment can also be on the separeate server using shared folders.

however, committed code, ought to be used to some staging server for testing before putting it in production.