Difference between revisions of "Server Setup"

From #openttdcoop wiki

Jump to: navigation, search
m
m (CoopServer (Soap): Link to config.py)
 
(18 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Server Administration (Soap) ==
+
== Server details ==
 
+
=== Servers / Directories ===
+
 
{| class="wikitable"
 
{| class="wikitable"
 
|+ publicserver-new.openttdcoop.org
 
|+ publicserver-new.openttdcoop.org
|-
+
|- align="center"
 
! Name !! Address !! Port !! Admin Port !! IRC channel !! Directory
 
! Name !! Address !! Port !! Admin Port !! IRC channel !! Directory
|-
+
|- align="center"
! Public Server || ps.openttdcoop.org || 3983 || 3982 || #openttdcoop || ~/svn-publicserver/
+
| Public Server || publicserver-new.openttdcoop.org || 3979 (3983) || 4079 (3980) || #openttdcoop || ~/svn-publicserver/
 
|}
 
|}
 
{| class="wikitable"
 
{| class="wikitable"
 
|+ games.openttdcoop.org
 
|+ games.openttdcoop.org
|-
+
|- align="center"
 
! Name !! Address !! Port !! Admin Port !! IRC channel !! Directory
 
! Name !! Address !! Port !! Admin Port !! IRC channel !! Directory
|-
+
|- align="center"
! Welcome Server || stable.openttdcoop.org || 3999 || 3998 || #openttdcoop.stable || ~/svn-stable/
+
| Nightly || nightly.openttdcoop.org || 3997 || 3996 || #openttdcoop.nightly || ~/svn-nightly/
 +
|- align="center"
 +
| ProZone || pz.openttdcoop.org || 3982 || 3981 || #openttdcoop.pro || ~/svn-prozone/
 +
|- align="center"
 +
| Welcome Server || stable.openttdcoop.org || 3999 || 3998 || #openttdcoop.stable || ~/svn-stable/
 
|}
 
|}
Both game port and admin port numbers should be unique for each server. Exceptions are temporary servers which will never run simultaneously. An example of this are the patch test servers (YACD, h2h, etc) which are run in #openttdcoop.dev
+
Permanent servers should have unique game- and adminports assigned to them.
 +
Temporary servers should all share the same ports, and also the same irc-channel. This makes it easier to switch CoopServer between them.
 +
Portnumbers in () are temporary, and will be removed once the ports are updated
  
 
+
== Directory Structure ==
=== Directory Structure ===
+
 
Each server should adhere to the following directory structure:
 
Each server should adhere to the following directory structure:
 
+
===Top directory===
====Top directory====
+
 
Contains the SVN checkout, existing files should not be altered manually. The subdirectories bin/, bundle/, media/, os/, projects/ and src/ are also part of the SVN checkout and should not be altered manually.
 
Contains the SVN checkout, existing files should not be altered manually. The subdirectories bin/, bundle/, media/, os/, projects/ and src/ are also part of the SVN checkout and should not be altered manually.
 
+
===Patches/ (NOT YET IMPLEMENTED)===
====Patches/ (NOT YET IMPLEMENTED)====
+
Contains patches to applied to the source. Unless the server is meant to test patches for multi-player compatibility, patches in here should be multi-player safe. No changes in savegame allowed either, we want people to be able to download and play these games in vanilla OpenTTD.
Contains patches to applied to the source. Unless the server is meant to test patches for multi-player compatibility, patches in here should be multi-player safe. No changes in savegame allowed either, we want people to be able to download and play these games in vanilla OpenTTD
+
===Server/===
 
+
====Server/====
+
 
In here is the actual running server. important files include:
 
In here is the actual running server. important files include:
 
* content_download: This should sym-link to shared content_download per user, generally ~/content_download/
 
* content_download: This should sym-link to shared content_download per user, generally ~/content_download/
Line 34: Line 34:
 
* openttd: The game, need I say more? Preferably use ofs-start.py to start it rather than simply running ./openttd. Ofs-start will ensure the right cfg file and latest autosave gets loaded
 
* openttd: The game, need I say more? Preferably use ofs-start.py to start it rather than simply running ./openttd. Ofs-start will ensure the right cfg file and latest autosave gets loaded
 
* openttd.cfg: Server configuration file
 
* openttd.cfg: Server configuration file
* openttd.log: As OpenTTD now gets started with -D -f and no longer within a screen session, the console output gets logged into this file. Tail -f openttd.log if you need a live feed of console output
+
* openttd.log: As OpenTTD now gets started with -D -f and no longer within a screen session, the console output gets logged into this file. use 'tail -f openttd.log' if you need a live feed of console output
 
* openttd.pid: Used by ofs-start to determine wether openttd is already running or not. Contains the pid from the last time ofs-start started the server
 
* openttd.pid: Used by ofs-start to determine wether openttd is already running or not. Contains the pid from the last time ofs-start started the server
 
* save/autosave/: Ofs-start will load the most recent savegame from here, including autosavesoap.sav (generated when Soap shuts down the server for restart/update etc.)
 
* save/autosave/: Ofs-start will load the most recent savegame from here, including autosavesoap.sav (generated when Soap shuts down the server for restart/update etc.)
 
* save/uploads/: Set ofs-getsave to download savegames into this directory.
 
* save/uploads/: Set ofs-getsave to download savegames into this directory.
 +
===Web/===
 +
This directory willbe accessible through http as http://<serveraddress>/<port>/. Ofs-scripts will place some files here needed by tools such as Zuu's Ottdau.
 +
* finger/openttd: Contains a line similar to the ones in openttd.org's finger.txt, with the branch and revision used.
 +
 +
 +
== Required extras ==
 +
===Openttd File Scripts (OFS, http://dev.openttdcoop.org/projects/ofs)===
 +
These file scripts should be installed in the server/ directory, where the server binary is located. Configure these for the above directory structure by editing the appropriate scripts. Each one contains a few configuration lines at the top of the file. For more information see the included README.txt
 +
  
====Web/====
+
== CoopServer (Soap) ==
This directory willbe accessible through http as http://<serveraddress>/<port>/. Ofs-scripts will place some files here needed by tools such as autostart.
+
A bot-owner has to add the server to the CoopServer irc-bot.
* grfversion: currently used #openttdcoop NewGRF package version (must be updated/created manually)
+
# Make CoopServer join the channel using '!join #channel'
* rev (NOT YET IMPLEMENTED): contains the currently installed SVN revision, kept up-to-date by ofs-svnupdate
+
# Use '!config channel plugins.Soap.<variable> <value>' from within the channel to set up the various settings. See Soap's config.py (available online at https://rhodecode.openttdcoop.org/soap/files/tip/config.py) for a description of what each one does. The defaults make sense. Make sure that you do not set the adminport password in the channel!! For that use '!config channel <channel> plugins.Soap.password <password>' in a private message to the bot.
* $OS.url (NOT YET IMPLEMENTED): links to the relevant binary downloads, kept up-to-date by ofs-svnupdate
+
# Last but not least, the channel will need to be added to plugins.Soap.channels. First use '!config plugins.Soap.channels' without any value to get the current one. run the same  command again, this time adding the existing channellist as well as the channel to be added: '!config plugins.Soap.channels #openttdcoop #openttdcoop.stable'.
 +
# use '!reload Soap' to reload the plugin so that it will read the new server configuration. Warning: will cause all existing servers to momentarily lose connection. Those with autoConnect=True will automatically reconnect though.
 +
# Test it. use '!start' and '!apconnect' to check that everything works as you expect it to work.
  
=== Required extras ===
 
====Openttd File Scripts (OFS, http://dev.openttdcoop.org/projects/ofs)====
 
These file scripts should be installed in the server/ directory, where the server binary is located. Configure these for the above directory structure by editing the appropriate scripts. Each one contains a few configuration lines at the top of the file.
 
  
 
[[Category:Guides]]
 
[[Category:Guides]]

Latest revision as of 20:58, 10 March 2014

Server details

publicserver-new.openttdcoop.org
Name Address Port Admin Port IRC channel Directory
Public Server publicserver-new.openttdcoop.org 3979 (3983) 4079 (3980) #openttdcoop ~/svn-publicserver/
games.openttdcoop.org
Name Address Port Admin Port IRC channel Directory
Nightly nightly.openttdcoop.org 3997 3996 #openttdcoop.nightly ~/svn-nightly/
ProZone pz.openttdcoop.org 3982 3981 #openttdcoop.pro ~/svn-prozone/
Welcome Server stable.openttdcoop.org 3999 3998 #openttdcoop.stable ~/svn-stable/

Permanent servers should have unique game- and adminports assigned to them. Temporary servers should all share the same ports, and also the same irc-channel. This makes it easier to switch CoopServer between them. Portnumbers in () are temporary, and will be removed once the ports are updated

Directory Structure

Each server should adhere to the following directory structure:

Top directory

Contains the SVN checkout, existing files should not be altered manually. The subdirectories bin/, bundle/, media/, os/, projects/ and src/ are also part of the SVN checkout and should not be altered manually.

Patches/ (NOT YET IMPLEMENTED)

Contains patches to applied to the source. Unless the server is meant to test patches for multi-player compatibility, patches in here should be multi-player safe. No changes in savegame allowed either, we want people to be able to download and play these games in vanilla OpenTTD.

Server/

In here is the actual running server. important files include:

  • content_download: This should sym-link to shared content_download per user, generally ~/content_download/
  • ofs-*: Filehandling scripts used by Soap. These can be executed manually for troubleshooting.
  • openttd: The game, need I say more? Preferably use ofs-start.py to start it rather than simply running ./openttd. Ofs-start will ensure the right cfg file and latest autosave gets loaded
  • openttd.cfg: Server configuration file
  • openttd.log: As OpenTTD now gets started with -D -f and no longer within a screen session, the console output gets logged into this file. use 'tail -f openttd.log' if you need a live feed of console output
  • openttd.pid: Used by ofs-start to determine wether openttd is already running or not. Contains the pid from the last time ofs-start started the server
  • save/autosave/: Ofs-start will load the most recent savegame from here, including autosavesoap.sav (generated when Soap shuts down the server for restart/update etc.)
  • save/uploads/: Set ofs-getsave to download savegames into this directory.

Web/

This directory willbe accessible through http as http://<serveraddress>/<port>/. Ofs-scripts will place some files here needed by tools such as Zuu's Ottdau.

  • finger/openttd: Contains a line similar to the ones in openttd.org's finger.txt, with the branch and revision used.


Required extras

Openttd File Scripts (OFS, http://dev.openttdcoop.org/projects/ofs)

These file scripts should be installed in the server/ directory, where the server binary is located. Configure these for the above directory structure by editing the appropriate scripts. Each one contains a few configuration lines at the top of the file. For more information see the included README.txt


CoopServer (Soap)

A bot-owner has to add the server to the CoopServer irc-bot.

  1. Make CoopServer join the channel using '!join #channel'
  2. Use '!config channel plugins.Soap.<variable> <value>' from within the channel to set up the various settings. See Soap's config.py (available online at https://rhodecode.openttdcoop.org/soap/files/tip/config.py) for a description of what each one does. The defaults make sense. Make sure that you do not set the adminport password in the channel!! For that use '!config channel <channel> plugins.Soap.password <password>' in a private message to the bot.
  3. Last but not least, the channel will need to be added to plugins.Soap.channels. First use '!config plugins.Soap.channels' without any value to get the current one. run the same command again, this time adding the existing channellist as well as the channel to be added: '!config plugins.Soap.channels #openttdcoop #openttdcoop.stable'.
  4. use '!reload Soap' to reload the plugin so that it will read the new server configuration. Warning: will cause all existing servers to momentarily lose connection. Those with autoConnect=True will automatically reconnect though.
  5. Test it. use '!start' and '!apconnect' to check that everything works as you expect it to work.
Powered by MediaWiki
  • This page was last modified on 10 March 2014, at 20:58.