Dev Shed Lounge
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherDev Shed Lounge

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old January 9th, 2002, 12:34 PM
edwards151 edwards151 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Posts: 26 edwards151 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
test server

Wasn't sure which forum this topic belonged in, so here I am.

Looking for ideas on this one.

The small company I work for runs an e-commerce site, driven by Perl and MySQL. Everything is run off a Linux dedicated server that is hosted at a server farm. The problem we have is we don't have a test server. Changes to the perl script and MySQL tables are done live! As you might realize, this can cause some major problems.

We would like to set up some sort of testing platform, with our limited budget and manpower. The two ideas I have come up with are either setting up a test linux server in-house (that would be essentially free) or set aside a certain part of our primary server as a testing area, whether that be a different virtual domain, or a separate hard drive... Not being an absolute Linux guru, I'm affraid that trying to set up a Linux test server in-house that is identical to our primary server (or close to that) will be a huge project, not to mention one more server to maintain. I'm leaning towards just setting up a test area on our current server, but I'm not sure the best way to do this.

The main problem that I see with either of these ideas is, how do you syncronize files between the two? In order to have a 'test area' set up on our current server, I'll need to completely replicate the database, and all web-site files. Once I've made a number of changes in the test area, how do I update the live area accordingly? For example, I add a few products to the test database, then want to put just one of those product up on the live site. Is there an easy way to manage this sycronization (software..)?

All of this makes me wonder how the big guys do it, like Amazon or even this site!

Any thoughts or ideas will be greatly appreciated.

Jon

Reply With Quote
  #2  
Old January 9th, 2002, 01:36 PM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 5th Plane (7000 - 7499 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,409 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 2 Weeks 9 h 28 m 23 sec
Reputation Power: 255
It's incredible, every serious being uses three staged development!!
- Develop
- Test
- Production

Ok, for budget reason is often
- Develop&Test
- Production

and you are running everything on the production server!
Your customers must be idiots or have never heard about SLA!!!

Put up an inhouse server and use ftp or webDAV and CVS!

Reply With Quote
  #3  
Old January 9th, 2002, 10:26 PM
rycamor rycamor is offline
Gödelian monster
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jul 1999
Location: Pembroke Pines, Florida, USA
Posts: 2,298 rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Days 1 h 54 m 21 sec
Reputation Power: 41
A limited budget is hardly a barrier to having a development/testing machine.

Usually a very cheap used computer is all you need. Find out what version of Linux is running on your dedicated server, and then get that same version. If you are using standard configurations of Apache, Perl and MySQL, then its very easy, because all Linux distributions I know of include these as choices, even with a basic (beginner) install.

If you really want to do some sophisticated performance benchmarks, then you would want to have a machine that is an exact duplicate of your dedicated server. Otherwise, you should be fine even with a Pentium 166 with 64 MB RAM. If your application runs fine on a slower machine, then it should have no problem on your full server. I developed my first large PHP/MySQL application on a pentium 90 with 16 MB RAM, and had no problem at all.

There are many solutions to synchronization, but mainly you should divide it into two issues: 1. Data synchronization (such as MySQL tables, flat file databases, lists, etc...), and 2. Code synchronization (your Perl code that runs the web application).

1. At the beginning, code synchronization can even be done manually, if you don't have too many files. Just be sure to enforce some method of transferring files back and forth. Eventually it is a good idea to move to CVS, or some other source control application.

The following command is very useful in getting a compressed "snapshot" of a directory:

tar -zpscf my_snapshot.tar.gz directory_name/*

Unpack this complete directory tree anywhere with:

tar -zxvf snapshot.tar.gz (careful, this will overwrite any files of the same name and directory where you unpack)

(I'm sure you know these, but I'm providing them just in case)

2. When it comes to part data synchronization, you have to ask yourself "Do I use any data during development that will be important to transfer to the server?". If so, then your application design should probably be rethought. But let's just say that you want to continually be working with a mirror of your main server's MySQL tables. MySQL now supports replication, which means your development server can have a continuously updated database mirror (remember, unless MySQL is compiled with SSL support, then that data might be vulnerable to sniffers).

Usually you won't need this, though. More likely, the problem you will have is that you have changed the structure of your database on your development server, and you now want to update the main server. In this case, you will need to not only put the new database structure in place, but import the data from the old structure, massaging it as needed to fit the new structure. I usually solve this by doing several test data imports on the dev server, then writing a script that can do the import quickly. Then, when ready, you will have to shut down your server for a couple minutes, run a backup (mysqldump) of your existing database, then rename the old database, create your database with its new structure, and run whatever scripts you need to import the data.

As always, make multiple backup copies every time you do something like this. Also, it's always best to only do a large update right after you have done a full tape backup of your server, so you can roll back if needed.
__________________
The real n-tier system:

FreeBSD -> PostgreSQL -> [any_language] -> Apache -> Mozilla/XUL

Amazon wishlist -- rycamor (at) gmail.com

Reply With Quote
  #4  
Old January 9th, 2002, 10:48 PM
andnaess andnaess is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Jul 2001
Location: Oslo
Posts: 1,516 andnaess User rank is Private First Class (20 - 50 Reputation Level)andnaess User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
I use an extremely simple setup. We have a test server which is organized in the exact same way as the production server (allthough that's not a must). I do all my development here, and when I think the code is ready for the live server I use a small utility called rsync to sync the two version, typically I do:
rsync -uvre ssh /path/to/test/site/ username@production.server:/path/to/live/site

Then rsync figures out which files have changed, and uses ssh to upload them. It's amazingly simple and works like charm. It especially nice when you need to do some major maintenance and change lots of files but have a slightly different directory structure on the remote server (for example, we have some folders where the clients can upload data). If I was to simply copy the test version over using for example tar, I would have to take care not to remove these extra files, and move them around will I did the untaring etc., very annoying, with rsync I have no worries.

Try it!
http://rsync.samba.org/
__________________
--
Regards
André Nćss

Puritanism: The haunting fear that someone, somewhere may be having fun

Reply With Quote
  #5  
Old January 10th, 2002, 03:00 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 5th Plane (7000 - 7499 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,409 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 2 Weeks 9 h 28 m 23 sec
Reputation Power: 255
Not to mention that you can use VMWare or VirtualPC and have a second OS in your PC, just add some memory.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherDev Shed Lounge > test server


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway