Announcement

Collapse
No announcement yet.

DDUT4: Linux Server Administration & Deployment Suite

Collapse
This is a sticky topic.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

    [OFFICIAL TUTORIAL] DDUT4: Linux Server Administration & Deployment Suite

    Recent Updates

    • v0.4c (06-Mar-16): Updated server launch filename from Test to Shipping. Requires migration procedure from previous versions! See bottom of post.
    • v0.4b (02-Oct-15): Fixed a nasty bug in the updater (LSDIR not found, 'cp' file exists)
    • v0.4 (27-Sep-15): Redesigned configuration system. Now using hardlinks to mirror base directory. Can now be used to stop servers. Requires migration procedure from previous versions! See bottom of post.
    • v0.3 (30-Aug-15): Configuration is now super-easy. You'll have a hub/server running in no time!


    Note: Please refer to Joe's post for info on .ini files, ports, and the various server options (which this suite can control).

    Features

    • Install a server or hub from scratch, and update it with a URL whenever a new build is available, with the ability to update the configuration in bulk.
    • Edit server configuration files
    • Launch / automatically launch & monitor server instances
    • Designed to fully support multiple servers on the same machine.


    Installation and Configuration Summary

    • Extract the attached archive to your base directory of choice
    • Configure (edit) ddut4.conf
    • (optional) Provide Engine.ini, SRVNAME-Game.ini, SRVNAME-Rules.ini files to apply configuration
      • Typical configuration templates are available under the conf_templates directory. Copy the files to your configuration directory to use them.

    • Install / update with updateServer.sh
      • If .ini files are found in the base directory, they will be pushed to the SRVNAMES. Engine.ini is global to all SRVNAMES. This only happens when updateServer is executed to completion.

    • Edit Game.ini and Rules.ini files with editConfig.sh and editRules.sh
      • The files will also be synced to your base directory as SRVNAME-Game.ini and SRVNAME-Rules.ini when you're done editing.

    • Launch a server instance:
      • Preferred method: Automatically launch and monitor servers with ut4wd.sh
        • Example: ./ut4wd.sh HUB

      • Manually: Launch/stop servers directly with launchServer.sh (read more below)
        • Restart a server by running launchServer.sh SRVNAME restart & followed by the disown command.
        • Stop a server by running launchServer.sh SRVNAME stop.
          • Note: If ut4wd.sh is running in the background, a new server instance will eventually be started!






    Deep-dive (Most users don't need this)

    Using the suite:

    Initial configuration: ddut4.conf (and ddut4_init.def)

    To start, extract the archive to a directory of your choice, then proceed to edit ddut4.conf.
    Change "rootdir" to the directory in which servers will be created and to which updates will be downloaded. Default is "/home/ut4".
    Change "srvnames" to the servers you want to create. Default is "HUB" which will create 1 server as a hub. "DM CTF" will create 2 servers, 1 for DM, and 1 for CTF.
    Define "SRVNAME_CMD" as the launch command for your server. Typical examples for HUB, DM, and CTF are included.
    Server names are not necessarily game-modes. You can create DM1, DM2, CTF1, CTF2, ClanServer, FamilyServer etc.



    Additional configuration defaults are available in the definition file, ddut4_init.def. To override the defaults, specify them in ddut4.conf.

    Installing/Updating a server: updateServer.sh

    Run "updateServer.sh" and provide the server archive URL. Press enter and let the magic happen!
    The server updater will fetch the file, and create "ROOTDIR/ut4-base". This will serve as the skeleton for each server instance you want to create.
    After fetching the file, the updater will proceed to update/create "ROOTDIR/ut4-SRVNAME" based on your configuration. So if "srvnames" was set to "DM CTF", you'll end up with two directories: ut4-DM and ut4-CTF.
    The updater will copy all files from the skeleton (using hardlinks, unless "cplink" was set to "0" in ddut4_init.def), back-up any existing configuration (via copy), then proceed to apply your custom Game.ini, Engine.ini, and Rules.ini, if they exist. For each SRVNAME you specified, the updater will copy:

    • Engine.ini to ROOTDIR/ut4-SRVNAME/UnrealTournament/Saved/Config/LinuxServer/Engine.ini
    • SRVNAME-Game.ini to ROOTDIR/ut4-SRVNAME/UnrealTournament/Saved/Config/LinuxServer/Game.ini
    • (Used by hubs) SRVNAME-Rules.ini to ROOTDIR/ut4-SRVNAME/UnrealTournament/Saved/Config/LinuxServer/Rules.ini


    This feature is optional, and only gets enabled if the files were found. The "Config/LinuxServer" directory is always backed up with a timestamp before installation.
    Example DM-Game.ini, CTF-Game.ini, HUB-Game.ini, HUB-Rules.ini, and Engine.ini are included in the conf_templates directory. Engine.ini is the same file for all SRVNAMES.
    Note: If using the conf_templates, remember to edit Engine.ini before installing, to set your administrator password.

    An additional feature is "INSTALL" mode. If you type "install" as the URL, and "ut4-base" exists, the installer will (re)install based on the skeleton directory (without downloading the package from Epic).

    The installer also notifies the watchdog that it should refrain from launching currently-updated servers until the installation is complete.

    Editing the server configuration: editConfig.sh and editRules.sh

    This script will launch an editor for the corresponding SRVNAME's Game.ini file.
    Edit this file to set up game-related options such as the maplist and game rules, as well as the server's name, MOTD and description.
    Use nosync as a second argument to prevent your .ini file from being saved to your configuration directory (to be used for update persistence).

    Syntax: editConfig.sh <SRVNAME> [nosync]
    Example: editConfig.sh DM

    The script above will edit Game.ini. To edit Rules.ini, run editRules.sh with the same syntax.

    Launching a server: launchServer.sh and ut4wd.sh

    launchServer.sh will launch servers based on the declarations in ddut4.conf.

    You may launch servers directly using launchServer.sh (the "&" means "send to background"):

    ./launchServer.sh DM &
    ./launchServer.sh CTF &
    ./launchServer.sh HUB &


    If a server is already running, and was launched with the same command launchServer is about to execute, launchServer will not start a new instance.
    You can force a restart by killing the old instance - to do this, add "restart" after the SRVNAME:

    ./launchServer.sh DM restart &

    You can also kill an instance without restarting it. Add "stop" after the SRVNAME:

    ./launchServer.sh DM stop

    Note that in the Linux world, you must type "disown" for background tasks (such as server launches or restarts) or they will be stopped when you log off (you can also use "nohup").
    The easier way would be to launch servers automatically and in the background using the watchdog daemon, ut4wd.sh:

    ./ut4wd.sh DM CTF

    Running the above command will launch and will always keep the servers specified running. There's no need to send to the background or disown the process, as it's a self-daemonizing script.
    The most common deployment method is to add ut4wd.sh to the rc.local file (launches on boot).

    Todo/wishlist

    • Make start/stop/restart procedures easier (right now you can use launchServer to start, stop, or restart, but it doesn't go into background).
    • Add "stop" functionality to ut4wd.sh
    • Create first-time-wizard to generate INI files
    • Create a hub and attach preconfigured dedicated instances, also deployed by the script (depends on feature support by the game itself, which is currently undetermined).
    • Compare source-INI maplist to user's maplist, if defined, and offer new maps if available
    • Add editEngine.sh and combine to a unified editor (depending on demand, based on comments below)



    Download
    The latest version is available on GitHub: https://github.com/DDRRE/ddut4/releases

    Upgrades

    Upgrading between versions: Simply copy over all *.sh files and ddut4_init.def.
    Upgrading from v0.4b to 0.4c: Same procedure + edit ddut4.conf, and remove all lines under the 3rd section (Additional Tweaks).
    Please note that ddut4.conf pre-v0.4 isn't backward-compatible. You must transfer your settings manually.

    Enjoy!
    Attached Files
    Last edited by DDRRE; 03-06-2016, 12:04 AM.
    Snir "DDRRE" Hassidim - Living and breathing UT since 2002!
    "When Video Games and the Enterprise Meet" - Read my chronicles of building a gamers club at my workplace.
    Facebook | LinkedIn

    #2
    Thx, it does help me a lot!

    Comment


      #3
      Anyone know the ram requirements per dedicated server?

      Assuming its currently 1GB/2GB for a decent slot server.

      Comment


        #4
        Thanks, but is it a way to use it on Debian ?
        Run updateServer.sh give error "ddut4.conf" not found...

        Comment


          #5
          It was actually developed under Debian.

          You're getting this error since the script can't access ddut4.conf. It needs to be placed either in the working directory you launched the script from, or in /etc/.
          Snir "DDRRE" Hassidim - Living and breathing UT since 2002!
          "When Video Games and the Enterprise Meet" - Read my chronicles of building a gamers club at my workplace.
          Facebook | LinkedIn

          Comment


            #6
            Updated: Now supports hubs!
            Snir "DDRRE" Hassidim - Living and breathing UT since 2002!
            "When Video Games and the Enterprise Meet" - Read my chronicles of building a gamers club at my workplace.
            Facebook | LinkedIn

            Comment


              #7
              nice giving it a test for hubs as soon as Speed is supported.. Btw, i'm launching a server..
              and i get following warnings ..
              [2015.08.31-13.20.09:878][ 0]LogModuleManager:Warning: No filename provided for module ImageWrapper[2015.08.31-13.20.09:878][ 0]LogLinux:Warning: dlopen failed: /home/unreal/servers/ut4-DM/Engine/Binaries/Linux/: cannot read file data: Is a directory
              [2015.08.31-13.20.09:878][ 0]LogModuleManager:Warning: ModuleManager: Unable to load module '/home/unreal/servers/ut4-DM/Engine/Binaries/Linux/' because the file couldn't be loaded by the OS.
              [2015.08.31-13.20.10:466][ 0]LogInit: Initializing SDL.
              [2015.08.31-13.20.10:466][ 0]LogInit:Warning: Could not initialize SDL: No available video device
              [2015.08.31-13.20.10:466][ 0]LogGenericPlatformMisc:Warning: Cannot display dialog box on this platform: READ ME FIRST : Do you accept the license agreement at http://epic.gm/eula ?
              [2015.08.31-13.20.10:466][ 0]LogGenericPlatformMisc: FPlatformMisc::RequestExit(0)
              [2015.08.31-13.20.10:655][ 0]LogAssetRegistry: FAssetRegistry took 0.0706 seconds to start up
              [2015.08.31-13.20.10:656][ 0]LogStreaming:Warning: Failed to read file '../../../UnrealTournament/UnrealTournament-AssetRegistry.bin' error.
              [2015.08.31-13.20.10:656][ 0]UT:Warning: UnrealTournament-AssetRegistry.bin could not be found

              I configured the ddut4.conf only to launch a DM server.
              Whenever i edit the DM-Game.ini it doesn't seem to push the settings trough to the DM server..
              neither does it disable the EULA in the Engine.ini

              I'ma try ur new suite now. i'll keep up 2 date
              BT-AncientLost | BT-Indus12 | BT-AirRace | BT-YouAreLOL
              DM-Pure-Pro | DM-Vezon | DM-RedeemerSniperHeaven

              blog | home | discord
              ‚Äč
              Come frag with us! Absolute (Amsterdam) , Absolute (Atlanta) , Absolute (Indiana)

              Comment


                #8
                Originally posted by irridium77 View Post
                nice giving it a test for hubs as soon as Speed is supported.. Btw, i'm launching a server..
                and i get following warnings ..

                I configured the ddut4.conf only to launch a DM server.
                Whenever i edit the DM-Game.ini it doesn't seem to push the settings trough to the DM server..
                neither does it disable the EULA in the Engine.ini

                I'ma try ur new suite now. i'll keep up 2 date

                Files get pushed from the base directory only when the updateServer script is launched. If you want to edit files, use editConfig. It will modify the actual config (Game.ini), and will also sync to the base directory (DM-Game.ini).
                Engine.ini gets the same treatment. If you had it in the base directory, it will be pushed to all configured SRVNAMES whenever updateServer is fully executed.

                You must have the files in the base directory for them to be pushed through updateServer. Engine.ini is included in the conf_templates directory, and has the EULA disabled. Copy it over to the base directory and run updateServer (in install mode, for example) to apply all configuration found in the basedir. I'm not saying you should use updateServer to edit configuration, editConfig and editRules are there for that. But the only way to apply Engine.ini right now with the scripts is by using updateServer. You can always copy it manually.
                Last edited by DDRRE; 08-31-2015, 03:57 PM.
                Snir "DDRRE" Hassidim - Living and breathing UT since 2002!
                "When Video Games and the Enterprise Meet" - Read my chronicles of building a gamers club at my workplace.
                Facebook | LinkedIn

                Comment


                  #9
                  @DDRRE
                  Hi
                  I use your scripts since beginning and without i would lost because i am a linux noob and start learning. I really thank you for that!
                  You have forget in the first line of ut4wd.sh
                  #!/bin/bash

                  Code:
                  #!/bin/bash
                  #UT4 Linux Server Updater by DDRRE
                  #v0.3
                  Without you get a bit trouble.

                  Thx

                  Comment


                    #10
                    How to actually stop the server/hub and the monitor?

                    Comment


                      #11
                      Originally posted by TFMvdBroek View Post
                      How to actually stop the server/hub and the monitor?
                      You'd have to find the relevant process and kill it. Right now you can restart servers with "./launchServer.sh SRVNAME restart &" and "disown".
                      I'll add functionality to stop servers and the watchdog later. The code to stop servers is already there (used as part of the restart procedure). As for watchdog termination, I'll need to write and test PID file handling.

                      Originally posted by [PHX]Big_Deal View Post
                      @DDRRE
                      Hi
                      I use your scripts since beginning and without i would lost because i am a linux noob and start learning. I really thank you for that!
                      You have forget in the first line of ut4wd.sh
                      #!/bin/bash

                      Code:
                      #!/bin/bash
                      #UT4 Linux Server Updater by DDRRE
                      #v0.3
                      Without you get a bit trouble.

                      Thx
                      Fixed, thanks.
                      Snir "DDRRE" Hassidim - Living and breathing UT since 2002!
                      "When Video Games and the Enterprise Meet" - Read my chronicles of building a gamers club at my workplace.
                      Facebook | LinkedIn

                      Comment


                        #12
                        Big update to v0.4:

                        • Redesigned configuration system.
                        • Now using hardlinks to mirror base directory.
                        • Can now be used to stop servers (launchServer.sh SRVNAME stop).


                        Requires migration procedure from previous versions! Migrating from v0.3 to v0.4:

                        ddut4.conf before v0.4 is incompatible with newer versions. Please update the relevant fields in the newer ddut4.conf from the archive.
                        Last edited by DDRRE; 10-02-2015, 03:07 PM.
                        Snir "DDRRE" Hassidim - Living and breathing UT since 2002!
                        "When Video Games and the Enterprise Meet" - Read my chronicles of building a gamers club at my workplace.
                        Facebook | LinkedIn

                        Comment


                          #13
                          Archives in the cap broken

                          Comment


                            #14
                            Your upload seems do be corrupted.

                            Code:
                            [root@samba ragnos]# unzip ddut4.zipArchive:  ddut4.zip
                            warning [ddut4.zip]:  21 extra bytes at beginning or within zipfile
                              (attempting to process anyway)
                            error [ddut4.zip]:  start of central directory not found;
                              zipfile corrupt.
                              (please check that you have transferred or created the zipfile in the
                              appropriate BINARY mode and that you have compiled UnZip properly)
                            Attached Files
                            Last edited by Ragnos; 09-27-2015, 07:28 AM.
                            Kind Regards,
                            Patrick "Ragnos" Frings

                            Co-Admin UTzone.de
                            http://www.ragnos.de/utzone_bar.gif
                            Maps, Mods and more for UT99, UT2kx and UT3!

                            Comment


                              #15
                              Originally posted by Ragnos View Post
                              Your upload seems do be corrupted.
                              Indeed. Fixed, thanks!
                              Snir "DDRRE" Hassidim - Living and breathing UT since 2002!
                              "When Video Games and the Enterprise Meet" - Read my chronicles of building a gamers club at my workplace.
                              Facebook | LinkedIn

                              Comment

                              Working...
                              X