I'm working at a tiny start-up, and our budget is tight, but we do have one. Currently all developers work on a single server using separate virtual hosts. This is problematic because each needs his own php include path for command line scripts, but that's not doable with virtual hosts... I know ideally each developer would have their own box, but budget doesn't allow for that. Staging & Production have their own servers and dedicated include paths. What's a good way to ensure that development is as close to staging/production as possible? Is there a hosting company that can provide some kind of virtual machine clone of production? Is there some other strategy we should be using?
We are currently running CentOS, MySQL 5.1.x, Apache 2.x, PHP 5.1.x
If you have some budget, why not purchase a machine to run as a Xen server and give the developers virtual machines on which they can play? The VMs can all come from the same image and have the same software setup as your testing and production boxes.
You could actually buy a dedicated or setup one at your office (cost aren't high anymore), install centos and openVZ (which is the open source version of Parallels Virtuozzo Containers).
Create a container (which is a virtual private server) and install, tweak the private server as you wish, once you are done with it you can shut it down and wrap it up as a template.
Once done, you can use that template to fire multiple private server withing few seconds, that way you will be able to provide your developers with idential servers for their dev/staging/production environment.
Thanks,
Do you not develop locally? Why not have developers use their local machines for development and then test on staging before deplovment. I know it's not the exact environment, but works well at my shop.
You can actually setup separate paths for different vhosts, but I'd definitely go down the VM route (we use standardised KVM images to run on people's workstations), with configuration management (eg Puppet) everywhere to ensure that things stay in sync.
I almost wonder if this would be better asked on stackoverflow.
My preferred method tends is usually to automate with a script/program the creation of the development/staging/production environments. Then after you have a system where the critical details can be automatically setup, then wipe everything out occasionally, and force the developers to deal with a clean environment. If you have done backups properly, and they are commiting to the VCS and your setup script is perfect then they should never have any problems.
Use of Virtual machines would be ideal, but depending on what you are development possibly not required.
You mention you have problems with the php include path in command-line scripts? Why don't you simply use the php cli option --php-ini option to specify a configuration file that is individualized to each environment/developer with their include path set as required?