How can I best set up my PHP (LAMP) development environment so that I have development, staging and production servers. One-"click" deployment to any of those, as well as one-click rollback to any revision. Rollback should also rollback the database schema and data to how it was when that source code was current.

Right now I've done all of this (except the DB rollback ability) for one application using shell scripts. I'm curious to know how others' environments are setup, and also if there are any generic tools or best-practices out there to follow as far as layout is concerned.

So, how do you do this? What existing tools do you make use of?

Thanks!

UPDATE: Just to clarify as there is some confusion about what I'm interested in.

I really want people to chime in with how their environment is set up.

If you run a PHP project and you have your DB schema in version control, how do you do it? What tools do you use? Are they in-house or can we all find them on the web somewhere?

If you run a PHP project and you do automated testing on commit (and/or nightly), how do you do it? What source versioning system do you use? Do you use SVN and run your tests in post-commit hooks?

If you run a PHP project with multiple dev servers, a staging server and production server(s), how do you organize them and how do you deploy?

What I hope to get out of this is a good idea of how others glue everything together.

Edit
Report