How to Stage a Server
Users access production servers from the Internet to take part in whatever service a company offers. Working on a production server while it is in service can be dangerous, and taking the server offline can cost the company money and customer respect. One way to mitigate these problems is to create a staging server, a server that stays offline but allows programmers to develop and test code before putting the code into production. You can use two techniques to set up a staging server: Either set up a physical computer identical to the production server for staging work, or allow developers to put virtual machines onto their workstations to mimic production conditions.
Instructions
-
Separate Hardware Setup
-
1
Select a machine to act as a staging server. This machine should have the exact same software setup and, ideally, the same hardware configurations as the actual server connected to the Internet for public access.
-
2
Connect the staging server to your local network. Write down its local IP information and the computer's name, as you will need these to log in to the server from other workstations on the local area network.
-
-
3
Configure all connections to that server. Ensure that all your existing remote connection services, such as ssh, ftp and database software, are accessible only from the local network. You can also integrate software, such as Capistrano for Ruby on Rails (capistranorb.com), or other language-neutral source-code management tools, such as GNU CVS (cvs.nongnu.org) or SubVersion (subversion.apache.org), to manage staging server updates for your particular server. You can now work on the staging server to correct errors or to create patches for the production server without disrupting the production server.
Virtual Machine
-
4
Download a virtual machine software package, such as VMware (vmware.com) or VirtualBox (virtualbox.org).
-
5
Get the installation CD or ISO file of the operating system used on the production server. This is usually available from a disc purchased from the manufacturer, as in the case of Windows, or an ISO file downloaded from the operating system maintainers, as in the case of most Linux distributions.
-
6
Install the operating system on the virtual machine, as instructed by the software's installation guides.
-
7
Install software packages identical to those on the production server.
-
8
Use the Virtual Machine OS as a staging server on the developer's workstation. This can help test code before even reaching the staging server. Hardware will be different, however, and a VM setup limits the ability to sync production and staging servers.
-
1
Tips & Warnings
For a separate hardware setup, you can also install staging and production software, such as IBM Websphere Commerce (ibm.com/software/genservers/commerceproductline/) or Drupal's Pantheon Suite (getpantheon.com) to load changes from staging servers to production servers.
Setting up a staging server on a virtual machine on a developer's workstation could cause organizational issues or confusion if the project files mix with the staging server files. However, it does offer the benefit of having multiple staging servers deployed on less hardware.