Setting up test and live enviornment – how

deployment

I am a bit new to servers and stuff so had a question. I have my development team working on my website. They are in different countries and currently they put all the work live on the test site. But the test site is open to anyone who knows the URL. It is behind a directory but this effects my QA process because i cannot use the accurate URL structures to prevent the general public from seeing it. So what I want to do it:

Have my site live on the net but only for me and my team, so like an internal network. Also I will need to mirror this to my live site when i put it live. So i guess this is something like setting up a staging and live environment.

  1. So how to do it and are both environments on the same physical server or do i need to buy two servers?
  2. And if i setup a staging environment how will i access it and my team since we are all spread out so i assume we need to log into something to access it?
  3. What about the URL – do i need a different URL for the test site or can i use the same live url for the test site?

I plan to get a dedicated server + CDN for my site. Platform is PHP codeignitor and MySQL.

Best Answer

Generally speaking your testing environment should be entirely separate from your production environment -- This allows you to test things like software updates before rolling them out to production, so if they break stuff you can determine what and how to fix it without the time pressures associated with your live environment being down.


My suggestion for an ideal scenario would be to build a development environment that is an exact copy of your production environment - same releases of all software, same database contents, etc. This can be made publicly accessible, or locked away behind a firewall where all your developers & QA folks VPN in to do their work (which way you go depends heavily on your workflow and processes, but I personally like the VPN solution).

It's also often advantageous to build your development environment using something like VMWare, where you can snapshot the environment before making major changes.

You will also need a process in place for promoting your changes to production. If you have the time to invest in a solution like Puppet or radmind now it will make future deployments much easier (VMWare comes in handy here too -- You can test your deployment process on virtual machines and debug it so when it runs in production you know how it will behave).