Changes between Version 1 and Version 2 of Instance management
- Timestamp:
- May 26, 2014, 2:16:06 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Instance management
v1 v2 1 1 '''DRAFT''' 2 With 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. 2 3 3 == Creati on==4 == Creating == 4 5 5 6 === Templates === 7 Creating an instance optionally makes use of template files. Currently those are: 6 8 * admins.xml 7 9 * config.xml 10 Those have to be in a folder called ''templates'' below ''SDTD_BASE''. 11 12 If 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 14 If the admins.xml exists it is automatically copied over to new instances. 8 15 9 16 === Create === 17 18 To create a new instance enter the following command: 10 19 {{{ 11 20 7dtd.sh instances create 12 21 }}} 22 This 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 {{{ 24 Server name: 25 26 Public server [false]: 27 28 Drop on Death, options: 29 0: Everything 30 1: Toolbelt only 31 2: Backpack only 32 3: Delete all 33 Select option (0-3) [1]: 34 35 Night 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 51 When you are done with entering all parameters the config.xml will be saved and the instance is ready to be started. 52 53 13 54 14 55 == Editing == 56 57 To edit the configuration of an instance start 15 58 {{{ 16 59 7dtd.sh instances edit <instancename> 17 60 }}} 18 61 62 You will then be shown an interface to edit the options similar to the interface when creating a new instance. 63 64 19 65 == Deleting == 66 67 To delete an instance enter: 20 68 {{{ 21 69 7dtd.sh instances delete <instancename> 22 70 }}} 23 71 72 You 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 24 80 == Listing == 81 82 To list all defined instances use: 25 83 {{{ 26 84 7dtd.sh instances list 27 85 }}} 28 86 87 This will output a list like in the following example: 88 {{{ 89 Instance name | Running | Players | Port 90 ---------------------+----------+---------+------ 91 test | no | -/ 4 | 25252 92 my_first_instance | yes | 2/ 6 | 25000 93 }}} 94 95 96 29 97 == Start/Stop == 98 99 Starting and stopping instances can be done through the following two commands: 30 100 {{{ 31 101 7dtd.sh start <instancename> … … 35 105 }}} 36 106 107 108 37 109 == Status == 110 111 To get a more detailed information about an instance use the following command: 38 112 {{{ 39 113 7dtd.sh status <instancename> 40 114 }}} 41 115 116 For a running instance the output will look like this: 117 {{{ 118 Instance: my_first_instance 119 120 Status: Running 121 Open ports: 122 25000 (udp) 123 25001 (udp) 124 25002 (udp) 125 25003 (tcp) 126 Players: 2 127 128 Game info: 129 Server name: _ 130 Password: XXXXXX 131 Max players: 6 132 World: Navezgane 133 134 Network info: 135 Port: 25000 136 Public: false 137 Control Panel: off 138 Telnet: Port 25003, Pass 123 139 }}} 140 If the instance is not running it will look like this: 141 {{{ 142 Instance: my_first_instance 143 144 Status: Not running 145 146 Game info: 147 Server name: _ 148 Password: XXXXXX 149 Max players: 6 150 World: Navezgane 151 152 Network info: 153 Port: 25000 154 Public: false 155 Control Panel: off 156 Telnet: Port 25003, Pass 123 157 }}} 158