Changes between Version 1 and Version 2 of Instance management


Ignore:
Timestamp:
May 26, 2014, 2:16:06 PM (10 years ago)
Author:
Christian Illy
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Instance management

    v1 v2  
    11'''DRAFT'''
     2With the instance management you can create a new server instance, edit existing instances or delete them. You can also list all defined instances and show the status of a single instance.
    23
    3 == Creation ==
     4== Creating ==
    45
    56=== Templates ===
     7Creating an instance optionally makes use of template files. Currently those are:
    68* admins.xml
    79* config.xml
     10Those have to be in a folder called ''templates'' below ''SDTD_BASE''.
     11
     12If a config.xml exists in this location the create-part of instance management will ask whether this should be used as a base for the new instance config.
     13
     14If the admins.xml exists it is automatically copied over to new instances.
    815
    916=== Create ===
     17
     18To create a new instance enter the following command:
    1019{{{
    11207dtd.sh instances create
    1221}}}
     22This will first ask for a name for the new instance and afterwards ask you for all the config-parameters. Parameter queries look like this:
     23{{{
     24Server name:                   
     25
     26Public server [false]:             
     27
     28Drop on Death, options:
     29   0: Everything
     30   1: Toolbelt only
     31   2: Backpack only
     32   3: Delete all
     33Select option (0-3) [1]:           
     34
     35Night percentage (10-90) [15]:     
     36}}}
     37 Server name::
     38   This example shows a parameter which has no default so you have to enter a name.
     39 Public server::
     40   Here a default value (false) is given. If you only press <ENTER> without typing anything the default will be used. Also this is a boolean value, so you can only enter yes/no/y/n/true/false.
     41 Drop on Death::
     42   This is a enumerated value, meaning you are shown the option values and then select one of them by the appropriate number.
     43 Night percentage::
     44   Here a valid range (10-90) is given, meaning you can not enter a value outside this range.
     45
     46'''NOTE:''' Currently there are three options that are automatically set:
     47* TelnetEnabled: This has to ''true'' so the management scripts can access the instance. '''Having this open to the public internet is a security risk. See [[Securing Telnet]]'''
     48* AdminFileName: This is set to ''admins.xml'' so it automatically uses that file in the instance folder.
     49* SaveGameFolder: This is set to the instance folder.
     50
     51When you are done with entering all parameters the config.xml will be saved and the instance is ready to be started.
     52
     53
    1354
    1455== Editing ==
     56
     57To edit the configuration of an instance start
    1558{{{
    16597dtd.sh instances edit <instancename>
    1760}}}
    1861
     62You will then be shown an interface to edit the options similar to the interface when creating a new instance.
     63
     64
    1965== Deleting ==
     66
     67To delete an instance enter:
    2068{{{
    21697dtd.sh instances delete <instancename>
    2270}}}
    2371
     72You will then be asked to enter a confirmation code so you do not accidentally delete an instance.
     73
     74'''WARNING:''' This will delete every aspect of the instance:
     75* Save games
     76* Configuration
     77* Logs
     78
     79
    2480== Listing ==
     81
     82To list all defined instances use:
    2583{{{
    26847dtd.sh instances list
    2785}}}
    2886
     87This will output a list like in the following example:
     88{{{
     89Instance name        | Running  | Players | Port
     90---------------------+----------+---------+------
     91test                 |       no |    -/ 4 | 25252
     92my_first_instance    |      yes |    2/ 6 | 25000
     93}}}
     94
     95
     96
    2997== Start/Stop ==
     98
     99Starting and stopping instances can be done through the following two commands:
    30100{{{
    311017dtd.sh start <instancename>
     
    35105}}}
    36106
     107
     108
    37109== Status ==
     110
     111To get a more detailed information about an instance use the following command:
    38112{{{
    391137dtd.sh status <instancename>
    40114}}}
    41115
     116For a running instance the output will look like this:
     117{{{
     118Instance: my_first_instance
     119
     120Status: Running
     121Open ports:
     122    25000 (udp)
     123    25001 (udp)
     124    25002 (udp)
     125    25003 (tcp)
     126Players: 2
     127
     128Game info:
     129    Server name:    _
     130    Password:       XXXXXX
     131    Max players:    6
     132    World:          Navezgane
     133
     134Network info:
     135    Port:           25000
     136    Public:         false
     137    Control Panel:  off
     138    Telnet:         Port 25003, Pass 123
     139}}}
     140If the instance is not running it will look like this:
     141{{{
     142Instance: my_first_instance
     143
     144Status: Not running
     145
     146Game info:
     147    Server name:    _
     148    Password:       XXXXXX
     149    Max players:    6
     150    World:          Navezgane
     151
     152Network info:
     153    Port:           25000
     154    Public:         false
     155    Control Panel:  off
     156    Telnet:         Port 25003, Pass 123
     157}}}
     158