Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

5 Answers 5

up vote 3 down vote accepted

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.

share|improve this answer
add comment

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,

share|improve this answer
add comment

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.

share|improve this answer
    
Some of our developers are actually offshore, working on low-powered hardware, or direct in the terminal. I know this is far from ideal, but it's how things are for the moment. –  lo_fye Aug 7 '09 at 1:02
add comment

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.

share|improve this answer
add comment

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?

share|improve this answer
    
I was unaware of the --php-ini option, but I will definitely look into it asap. Thanks! (btw, I too was wondering which site I should post to) –  lo_fye Aug 7 '09 at 1:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.