Raised This Month: $51 Target: $400
 12% 

[HOW TO] The definitive guide to organize your servers and setting up Fast Downloads


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
thesixhalcon
SourceMod Donor
Join Date: Jul 2010
Location: Madrid, Spain
Old 07-14-2010 , 07:21   [HOW TO] The definitive guide to organize your servers and setting up Fast Downloads
Reply With Quote #1

Hi! As I've seen on this forum, lots of people ask for Fast Download related questions and always the same thing.

Ok, this guide is made for you, I hope this thread will help you in all the complexity (ironic) of the Fast Downloads setup.

This thread also shows you how to correctly store your files to save time on organizing them. At least, I think is the best way.

Let's start.

First of all, you have to own two servers, a Game server (CS:S, DoD:S, TF2, etc) and a Web server. The Game one is going to be the server that contains game server files (srcds), this one, will have ALL files that you can download from your Fast Download server and the Web server is going to store the extra maps, materials, models, resources, navigations, sounds, and all this anoying stuff.

As usual, it's very important to have our stuff ordered by folders. We will create now a 'skeleton' folder. This skeleton will able us to make a new generic structure for a new server or server reset, just only copy it and (I recommend) call it by your server IP and PORT.
So, open your navigator/explorer and lets create a generic folder structure (from now, the 'skeleton'):
PHP Code:
// Make the next skeleton if you own only one server
// This will be the default skeleton, it will be always without any files
// always prepared to copy-paste in case of a new server o server 
// reset. Remind that this is only to make it clean.
// For this example we'll suppose that we are going to activate fast
// downloads for our Counter-Strike: Source server, so the main
// folder will be called 'cstrike'.

000.000.000.000_0000
|-+ cstrike
|-|--addons
|-|--cfg
|-|--maps
|-|--materials
|-|--models
|-|--resource
|-|--sound
| /
/

// READ THIS IF YOU OWN MORE THAN ONE SERVER.
// In the case that you are a multi server owner, you optionally can
// have a 'common' folder to store the common stuff, like addons, cfg's
// or other stuff. The structure is completely the same as the last skeleton
// but instead of '000.000....' you can call the folder 'common'.
// So, you have a folder called 'common', eh? What happens with the last
// skeleton? Ok, you will put in your server folder (last/upside skeleton)
// the things that this server is going to have ¡, but only the things that
// are UNIQUE for this server. 
Oh! I don't like reading all of this. Don't worry, that was only the beginning.

Continuing with this proccess, we now copy 2 TIMES the skeleton (keeping a copy of the skeleton intact) and we will name one of the copies as 'fastdl', and the other one as our server IP and PORT as I've told you.
Quote:
Originally Posted by NOTE
If you own different servers remember to create one more copy of the skeleton called 'common' to put server common files (and other copies of the skeleton as servers you have).
Once we have all these things correctly completed well procced copying the files in their respective folders.
Quote:
Originally Posted by AN EXAMPLE
I have activated GameMe (HLstatsX) in all of my servers and in one of them I have a weapon restrict plugin, and in the other server I have a dm_lite plugin.

So I have to put in the common folder (common/cstrike/addons/sourcemod/plugins/) the GameMe addon.
I have no more common files so I will put in my DM server the dm_lite plugin in 666.000.01.45:06660/cstrike/addons/sourcemod/plugins/ and if I have extra maps running ONLY on this server I have to put it in the maps folder.

I have to repeat this proccess with ALL the rest of my servers.

NOTE: The server has a ficticious IP and PORT, dont try to connect it ;)
To enable the Fast Download on one of your servers, you only have to add to SERVER.CFG LOCATED ON CFG FOLDER this:
Quote:
sv_downloadurl "http://CHANGE_ME_WITH_YOUR_DOMAIN/cstrike"
sv_allowdownload 1
sv_allowupload 1
I'm bored, please tell me THE F****** HOW TO!

Ok, I supposed that you are bored right now, so I spend a little on making a BATCH script with a simple configuration to make the rest of the proccess automaticly, just copy it into a .bat file. (This works only for Windows).

Quote:
Originally Posted by SETTING THE SCRIPT UP
If you only have one server, set the variable 'cs1_folder' to your server folder and delete all common related lines. If you own more servers, only change the 'cs1_folder' and create a new var repeating the 'cs1_folder' related lines.

IMPORTANT: YOU HAVE TO PUT IN THE SAME FOLDER AS THE BATCH SCRIPT IS, A BZIP2 COMPRESSOR CALLED 'BZIP2.EXE'. SEARCH IN GOOGLE FOR IT.
Easy isn't it?
Code:
@echo off
color 1e

set cs1_folder=94.46.240.24_26060\
set web_folder=fastdl\
set tmp_folder=temp\
set cmn_folder=common\

set maps=cstrike\maps\
set sounds=cstrike\sound\
set materials=cstrike\materials\
set models=cstrike\models\

cls 

echo FASTDL Automator

echo Creating temp folders...
mkdir %tmp_folder%
mkdir %tmp_folder%%maps%
mkdir %tmp_folder%%sounds%
mkdir %tmp_folder%%materials%
mkdir %tmp_folder%%models%


echo Procesando archivos de '%cmn_folder%'...
xcopy %cmn_folder%%maps%*.bsp %tmp_folder%%maps% /D /E /C /R /H /I /K /Y >> log.txt
xcopy %cmn_folder%%maps%*.nav %tmp_folder%%maps% /D /E /C /R /H /I /K /Y >> log.txt
xcopy %cmn_folder%%maps%*.res %tmp_folder%%maps% /D /E /C /R /H /I /K /Y >> log.txt
xcopy %cmn_folder%%sounds%*.* %tmp_folder%%sounds% /D /E /C /R /H /I /K /Y >> log.txt
xcopy %cmn_folder%%materials%*.* %tmp_folder%%materials% /D /E /C /R /H /I /K /Y >> log.txt
xcopy %cmn_folder%%models%*.* %tmp_folder%%models% /D /E /C /R /H /I /K /Y >> log.txt

echo Procesando archivos de '%cs1_folder%'...
xcopy %cs1_folder%%maps%*.bsp %tmp_folder%%maps% /D /E /C /R /H /I /K /Y >> log.txt
xcopy %cs1_folder%%maps%*.nav %tmp_folder%%maps% /D /E /C /R /H /I /K /Y >> log.txt
xcopy %cs1_folder%%maps%*.res %tmp_folder%%maps% /D /E /C /R /H /I /K /Y >> log.txt
xcopy %cs1_folder%%sounds%*.* %tmp_folder%%sounds% /D /E /C /R /H /I /K /Y >> log.txt
xcopy %cs1_folder%%materials%*.* %tmp_folder%%materials% /D /E /C /R /H /I /K /Y >> log.txt
xcopy %cs1_folder%%models%*.* %tmp_folder%%models% /D /E /C /R /H /I /K /Y >> log.txt



echo Compressing files...
BZIP2 %tmp_folder%%maps%*.* >> log.txt

echo Copying final content...
xcopy %tmp_folder%%maps%*.bz2 %web_folder%%maps% /D /E /C /R /H /I /K /Y >> log.txt
xcopy %tmp_folder%%sounds%*.* %web_folder%%sounds% /D /E /C /R /H /I /K /Y >> log.txt
xcopy %tmp_folder%%materials%*.* %web_folder%%materials% /D /E /C /R /H /I /K /Y >> log.txt
xcopy %tmp_folder%%models%*.* %web_folder%%models% /D /E /C /R /H /I /K /Y >> log.txt


echo Deleting temps...
rmdir %tmp_folder% /S /Q >> log.txt

pause
To execute the batch, just double click on it.
Congratulations! You have finished!

The last step, uploading your files. Drag n' drop the common folder to all your servers, and the specific server folders to the corresponding server, then upload the CONTENT OF 'fastdl' folder to your web server and you have finished!

I hope this thread help you.
Any questions, please ask here, I wont help you if you PM me.
Please, if I leave something, tell me what and I'll add to the post.
thesixhalcon is offline
vertexshader
Senior Member
Join Date: Mar 2008
Old 07-14-2010 , 07:32   Re: [HOW TO] The definitive guide to organize your servers and setting up Fast Downlo
Reply With Quote #2

Usually servers need and performance optimizations, so if you have enough memory it's a better idea to start the server directly from RAM drive. For example times for loading maps and saving logs are cut at half.
vertexshader is offline
Hawkeye-
Senior Member
Join Date: Jan 2009
Old 07-18-2010 , 10:02   Re: [HOW TO] The definitive guide to organize your servers and setting up Fast Downlo
Reply With Quote #3

If your running multiple instances, you might have a bucket of "Pristine" versions of CSS on your server (un-edited) and then xcopy or robocopy these into your various game folders once its downloaded to minimize downtime after an update.
Hawkeye- is offline
Reply



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:55.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode