From ea01a70f5b0ca4902c3cab3d71dd0ceae0618be0 Mon Sep 17 00:00:00 2001 From: "tgstation-server-ci[bot]" <161980869+tgstation-server-ci[bot]@users.noreply.github.com> Date: Fri, 26 Jul 2024 17:39:27 +0000 Subject: [PATCH] Deploy code docs to GitHub Pages for workflow run 2907 Commit: c54fbb665d480742b238d17dd95e4931e3ca426b --- ...r_8_common_8_assembly_info_8cs_source.html | 2 +- ...r_8_shared_8_assembly_info_8cs_source.html | 2 +- index.html | 203 +++++++++--------- 3 files changed, 101 insertions(+), 106 deletions(-) diff --git a/_tgstation_8_server_8_common_8_assembly_info_8cs_source.html b/_tgstation_8_server_8_common_8_assembly_info_8cs_source.html index 0d8a868585..d386d571d3 100644 --- a/_tgstation_8_server_8_common_8_assembly_info_8cs_source.html +++ b/_tgstation_8_server_8_common_8_assembly_info_8cs_source.html @@ -95,7 +95,7 @@ $(function() {
15[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright (c) Jordan Brown 2018")]
16[assembly: System.Reflection.AssemblyDescriptionAttribute("Common functions for tgstation-server.")]
17[assembly: System.Reflection.AssemblyFileVersionAttribute("7.0.0.0")]
-
18[assembly: System.Reflection.AssemblyInformationalVersionAttribute("7.0.0+ce67c948cac3b2636dad3e434b892ce103b9afe6")]
+
18[assembly: System.Reflection.AssemblyInformationalVersionAttribute("7.0.0+c54fbb665d480742b238d17dd95e4931e3ca426b")]
19[assembly: System.Reflection.AssemblyProductAttribute("Tgstation.Server.Common")]
20[assembly: System.Reflection.AssemblyTitleAttribute("Tgstation.Server.Common")]
21[assembly: System.Reflection.AssemblyVersionAttribute("7.0.0.0")]
diff --git a/_tgstation_8_server_8_shared_8_assembly_info_8cs_source.html b/_tgstation_8_server_8_shared_8_assembly_info_8cs_source.html index 2e37a4f4e9..08eb849a6a 100644 --- a/_tgstation_8_server_8_shared_8_assembly_info_8cs_source.html +++ b/_tgstation_8_server_8_shared_8_assembly_info_8cs_source.html @@ -93,7 +93,7 @@ $(function() {
13[assembly: System.Reflection.AssemblyCompanyAttribute("Tgstation.Server.Shared")]
14[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
15[assembly: System.Reflection.AssemblyFileVersionAttribute("6.7.0.0")]
-
16[assembly: System.Reflection.AssemblyInformationalVersionAttribute("6.7.0+ce67c948cac3b2636dad3e434b892ce103b9afe6")]
+
16[assembly: System.Reflection.AssemblyInformationalVersionAttribute("6.7.0+c54fbb665d480742b238d17dd95e4931e3ca426b")]
17[assembly: System.Reflection.AssemblyProductAttribute("Tgstation.Server.Shared")]
18[assembly: System.Reflection.AssemblyTitleAttribute("Tgstation.Server.Shared")]
19[assembly: System.Reflection.AssemblyVersionAttribute("6.7.0.0")]
diff --git a/index.html b/index.html index 1f61c5ac09..f2f3fdfce2 100644 --- a/index.html +++ b/index.html @@ -74,14 +74,18 @@ $(function() {
tgstation-server
-

CI Pipeline codecov

+

+

+

+tgstation-server

+

CI Pipeline codecov

[GitHub license](LICENSE) Average time to resolve an issue NuGet version NuGet version

forthebadge forinfinityandbyond forthebadge

This is a toolset to manage production DreamMaker servers. It includes the ability to update the server without having to stop or shutdown the server (the update will take effect on a "reboot" of the server), the ability to start the server and restart it if it crashes, as well as systems for managing code and game files, and locally merging GitHub Pull Requests for test deployments.

-

-Setup

-

-Pre-Requisites

+

+Setup

+

+Pre-Requisites

Note: If you opt to use the Windows installer, most pre-requisites for running BYOND servers (including MariaDB) are provided out of the box.

If you are running on a Windows Server OS. You might need to install the x86 Visual C++ 2015 Runtime to run BYOND.

If you wish to use OpenDream you will need to install the required dotnet SDK manually.

@@ -100,19 +104,17 @@ Pre-Requisites
  • No pre-existing database WITH schema creation permissions. or
  • Exclusive access to a database schema that TGS has full control over.
  • -

    -Installation

    +

    +Installation

    Follow the instructions for your OS below.

    -

    -Windows

    -
    Note about Digital Signatures
    +

    +Windows

    +
    Note about Digital Signatures

    Note that the Windows Service and installer executables require administrative privileges. These are digitally signed against the Root CA managed by Jordan Dominion. Consider installing the certificate into your Trusted Root Authorities store for cleaner UAC prompts. The certificate can be downloaded here, please validate the thumbprint is 70176acf7ffa2898fa5b5cd6e38b43b38ea5d07f before installing. The OCSP server for this is http://ocsp.dextraspace.net.

    -

    -Installer

    +

    Installer

    Download the latest release's tgstation-server-installer.exe. Executing it will take you through the process of installing and configuring your server. The required dotnet runtime may be installed as a pre-requisite.

    Note: If you use the /silent or /passive arguments to the installer, you will not be able to install MariaDB using it. In addition, if those arguments are present, you'll need to either pre-configure TGS or configure and start the tgstation-server service after installing. A shortcut will be placed on your desktop and in your start menu to assist with this.

    -

    -winget (Windows 10 or later)

    +

    winget (Windows 10 or later)

    winget installed is the easiest way to install the latest version of tgstation-server (provided Microsoft has approved the most recent package manifest).

    Check if you have winget by running the following command.

    winget --version

    If it returns an error that means you don't have winget. You can easily install it by running the following commands in an administrative Windows Powershell instance:

    Import-Module Appx
    @@ -128,19 +130,17 @@ winget (Windows 10 or later)

    The required dotnet runtime may be installed as a pre-requisite. MariaDB will not be installed.

    Note: If you use the -h or --disable-interactivity winget arguments, you will need to either pre-configure TGS or configure and start the tgstation-server service after installing. A shortcut will be placed on your desktop and in your start menu to assist with this.

    Note: The winget package is submitted to Microsoft for approval once TGS releases. This means the winget version may be out of date with the current release version. You can always use the TGS updater after installing. You can see the versions still awaiting approval here.

    -

    -Manual

    +

    Manual

    If you don't have it installed already, download and install the ASP .NET Core Runtime Hosting Bundle (>= v8.0). Ensure that the dotnet executable file is in your system's PATH variable (or that of the user's that will be running the server). You can test this by opening a command prompt and running dotnet --list-runtimes.

    Download the latest release .zip. Typically, you want the ServerService.zip package in order to run TGS as a Windows service. Choose ServerConsole.zip if you prefer to use a command line daemon.

    Extract the .zip file to where you want the server to run from. Note the account running the server must have write, execute, and delete access to the lib subdirectory.

    If you wish to install the TGS as a service, run Tgstation.Server.Host.Service.exe. It should prompt you to install it. Click Yes and the setup wizard should run.

    Should you want a clean start, be sure to first uninstall the service by running Tgstation.Server.Host.Service.exe -u from the command line.

    If using the console version, run ./tgs.bat in the root of the installation directory. Ctrl+C will close the server, terminating all live game instances.

    -

    -Linux

    +

    +Linux

    Installing natively is the recommended way to run tgstation-server on Linux.

    -

    -Ubuntu/Debian Package

    +

    Ubuntu/Debian Package

    You first need to add the appropriate Microsoft package repository for your distribution

    Refer to the Microsoft website for steps for

      @@ -161,8 +161,7 @@ Ubuntu/Debian Package
      && sudo tgs-configure \
      && sudo systemctl start tgstation-server

    The service will execute as the newly created user: tgstation-server. You should, ideally, store your instances somewhere under /home/tgstation-server.

    -

    -Manual Setup

    +

    Manual Setup

    The following dependencies are required.

    See https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/

    -

    -Apache

    +

    +Apache

    1. Ensure the mod_proxy extension is installed.
    2. Setup a basic website configuration. Instructions on how to do so are out of scope.
    3. @@ -439,12 +437,12 @@ Apache
      ProxyPassReverse / http://127.0.0.1:8080/
      </VirtualHost>
      </IfModule>
      -

    -Swarmed Servers

    +

    +Swarmed Servers

    Multiple tgstation-servers can be linked together in a swarm. The main benefit of this is allowing for users, groups, and permissions to be shared across the servers. Servers in a swarm must connect to the same database, use the same tgstation-server version, and have their own unique names.

    In a swarm, one server is designated the 'controller'. This is the server other 'node's in the swarm communicate with and coordinates group updates. Issuing an update command to one server in a swarm will update them all to the specified version.

    -

    -Swarm Server Instances

    +

    +Swarm Server Instances

    Instances can be either part of a swarm or not. Once in the database they cannot switch between these states. In order to brin a non-swarmed instance into a swarmed server or vice-versa follow these steps.

    1. With the existing server, detach the instance.
    2. @@ -455,54 +453,51 @@ Swarm Server Instances
      1. Reattach the instance after starting the server again.
      -

      -Usage

      +

      +Usage

      tgstation-server is controlled via a RESTful HTTP json API. Documentation on this API can be found here. This section serves to document the concepts of the server. The API is versioned separately from the release version. A specification for it can be found in the api-vX.X.X git releases/tags.

      -

      -Updating TGS

      +

      +Updating TGS

      TGS can self update without stopping your DreamDaemon servers. Releases made to this repository are bound by a contract that allows changes of the runtime assemblies without stopping your servers. Database migrations are automatically applied as well. Reverting to lower versions works but only works so far back in time, do so at your own risk (check changes made to /src/Tgstation.Server.Host/Models/Migrations).

      Major version updates may require additional action on the part of the user (apart from the configuration changes).

      -

      -Linux Notes

      +

      +Linux Notes

      If TGS was installed via a package manager, using the TGS self updater will cause the version to change without notifying said package manager. This is not necessarily a problem if you're okay with the deviation.

      To avoid this, use the package manager to update TGS. It is just as seamless as the self-updater.

      -

      -apt

      +

      apt
      sudo apt update && sudo apt upgrade -y
      -

      -Notifications

      +

      +Notifications

      If a server update is available, it will be indicated in the response from the GET /Administration endpoint and shown as a green exclamation mark in the webpanel navbar. For more active notifications, you can subscribe to this GitHub discussion.

      -

      -Users

      +

      +Users

      All actions apart from logging in must be taken by a user. TGS installs with one default user whose credentials can be found here. It is recommended to disable this user ASAP as it is used to create Jobs that are started by the server itself. If access to all users is lost, the default user can be reset using the Database:ResetAdminPassword configuration setting.

      Users can be enabled/disabled and have a very granular set of rights associated to them that determine the actions they are allowed to take (i.e. Modify the user list or create instances). Users can be database based or system based. Database users are your standard web users with a username and password. System users, on the otherhand, are authenticated with the host OS. These users cannot have their password or names changed by TGS as they are managed by the system (and in reverse, login tokens don't expire when their password changes). The benefit to having these users is it allows the use of system ACLs for static file control. More on that later.

      -

      -Instances

      +

      +Instances

      A TGS deployment is made up with a set of instances, which each represent a production BYOND server. As many instances as desired can be created. Be aware, however, due to the nature of BYOND, this will quickly result in system resource exhaustion.

      An instance is stored in a single folder anywhere on a system and is made up of several components: The source code git repository, the BYOND installations, the compiler, the watchdog, chat bots, and static file management systems.

      -

      -Instance Users

      +

      Instance Users

      All users with access to an instance have an InstanceUser object associated with the two that defines more rights specific to that instance (i.e. Deploy code, modify bots, edit other InstanceUsers).

      -

      -Repository

      +

      +Repository

      The Repository folder is a git repository containing the code of the game you wish to host. It can be cloned from any public or private remote repository and has capabilities to affect changes back to it. All the standard benefits of git are utilized (i.e. check out any revision or reference).

      Additional features become available if the remote repository is hosted on https://github.com/. Namely the Test Merge feature, which allows you to take a pull request opened on the repository and compile it into a game deployment for testing. Information about test merges is available in game via the DMAPI and via the main API as well.

      Manual operations on the repository while an instance is running may lead to git data corruption. Thankfully, it's simple enough to delete and reclone the repository via the API.

      -

      -Byond

      +

      +Byond

      The Byond folder contains installations of BYOND or OpenDream versions. The version which is used by your game code can be changed on a whim (Note that only versions >= 511.1385 have been thouroughly tested. Lower versions should work but if one doesn't function, please open an issue report) and the server will take care of installing it.

      -

      -Environment Variables

      +

      Environment Variables

      You can specify additional environment variables to launch your server/compiler with by adding server.env/compiler.env to your engine installation directory (i.e. <instance>/Byond/515.1530/server.env). These are .env files.

      -

      -Compiler

      +

      +Compiler

      The compiler deploys code from the Repository folder to the Game folder and compiles it either by autodetecting the .dme or having it set by configuration. Several other step are also run such as validating the DMAPI version and creating symlinks for static files are done at this point. The compiler also applies server side code modifications and duplicates compiled code for the watchdog as well (See following section).

      -

      -Watchdog

      +

      +Watchdog

      The watchdog is responsible for starting and keeping your server running. It functions by launching two servers which are hot-swapped on /world/Reboots and during crashes to prevent downtime. This hot swapping feature is also what allows TGS to deploy updates to live servers without bringing them down.

      DreamDaemon can be finicky and will crash with several high load games or bad DM code. The watchdog has several failure prevention methods to keep at least one server running while these issues are sorted out.

      -

      -Chat Bots

      +

      +Chat Bots

      TGS supports creating infinite chat bots for notifying staff or players of things like code deployments and uptime in. Currently the following providers are supported

      More can be added by providing a new implementation of the IProvider interface

      Bots have a set of built-in commands that can be triggered via !tgs, mentioning, or private messaging them. Along with these, custom commands can be defined using the DMAPI by creating a subtype of the /datum/tgs_chat_command type (See tgs.dm for details). Invocation for custom commands can be restricted to certain channels.

      -

      -Static Files

      +

      +Static Files

      All files in game code deployments are considered transient by default, meaning when new code is deployed, changes will be lost. Static files allow you to specify which files and folders stick around throughout all deployments.

      The StaticFiles folder contains 3 root folders which cannot be deleted and operate under special rules

      These files can be modified either in host mode or system user mode. In host mode, TGS itself is responsible for reading and writing the files. In system user mode read and write actions are performed using the system account of the logged on User, enabling the use of ACLs to control access to files. Database users will not be able to use the static file system if this mode is configured for an instance.

      This folder may be freely modified manually just beware this may cause in-progress deployments to error if done on Windows systems.

      -

      -CodeModifications

      +

      +CodeModifications

      When a deployment is made by the compiler, all the contents of this folder are copied over the repository contents. Then one of two code change modes are selected based on the prescense of certain files.

      If <target dme>.dme is present, that .dme will be used instead of the repository's .dme

      Otherwise the files HeadInclude.dm and TailInclude.dm are searched for and added as include lines to the top and bottom of the target .dme repsectively if they exist. These files can contain any valid DreamMaker code (Including #includeing other .dm files!) allowing you to modify the a repository's code on a per instance basis

      -

      -EventScripts

      +

      +EventScripts

      This folder can contain anything. But, when certain events occur in the instance, TGS will look here for .bat or .sh files with the same name and run those with corresponding arguments. List of supported events can be found here.

      -

      -GameStaticFiles

      +

      +GameStaticFiles

      Any files and folders contained in this root level of this folder will be symbolically linked to all deployments at the time they are created. This allows persistent game data (BYOND .savs or code configuration files for example) to persist across all deployments. This folder contains a .tgsignore file which can be used to prevent symlinks from being generated by entering the names of files and folders (1 per line).

      This functionality has the following prerequisites:

      -

      -Clients

      +

      +Clients

      Here are tools for interacting with the TGS web API

      Contact project maintainers to get your client added to this list

      -

      -Backup/Restore

      +

      +Backup/Restore

      Note that tgstation-server is NOT a backup solution, the onus is on the server runners.

      The Repository folder should be backed up on the remote server, do not rely on the instance copy to store changes.

      The BYOND and Game folders should never be backed up due to being intertwined with instance data.

      @@ -572,16 +567,16 @@ Backup/Restore

      The database should be fully backed up.

      To restore an installation from backups, first restore the instance Configuration folder in its new home. Then restore the database, modifying the Path column in the Instances table where necessary to point to the new instances. Then start the server pointed at the new database.

      Should you end up with a lost database for some reason or want to reattach a detached instance you can reattach an existing folder by creating an empty file named TGS4_ALLOW_INSTANCE_ATTACH inside it (This is automatically created when detaching instances). Then create a new instance with that path, this will bypass the empty folder check. Note that this will not restore things such as user permissions, server config options, or deployment metadata. Those must be reconfigured manually.

      -

      -Troubleshooting

      +

      +Troubleshooting

      Feel free to ask for help on the discussions page.

      -

      -Contributing

      +

      +Contributing

      -

      -Licensing

      +

      +Licensing