Files
tgstation-server/docs/Features.dox
T
2023-06-11 18:07:00 -04:00

122 lines
9.3 KiB
Plaintext

/*!
@page features Features
@tableofcontents
@section new_features New since TGS3 (Rewrite)
- Agnostic HTTP API: The replaces the WCF service calls used in TGS3. This helps avoid Windows vendor lock-in and get away from the SOAP API that literally no one understood (not even me). With it, it's much easier to expose TGS to the internet, all you need is a HTTPS reverse proxy in front of it. A rundown of the new API exists here: https://tgstation.github.io/tgstation-server/api.html.
- Granular Access Controls: Windows users are no longer (required to be) the basis for authentication to the server. We now have database-backed users as a login option. These use a combined Basic/JWT authentication scheme with industry standard password hashing and salting. Users are fully customizable and can be given granular access to every bit of the server via the new permissions system. From changing the BYOND version, to test merging a PR, to restarting the server, every action may now be granted or revoked on a per user basis.
- Limitation: Users can be disabled but not deleted.
- Proper Long Running Operation Support: Server actions take a long time, from a git pull to a DreamMaker compile. TGS now internally allows for them to be run in parallel with each other and provides an audit record via the database. This is an improvement over the old system where connections had to be held open for the duration of operations.
- Database Backend: TGS requires an SQL database to operate. This allows for much better concurrency and is just overall much cleaner than the old single json file storage blob per instance.
- Limitation: There is a one-to-one relationship with a TGS server and a database. **DO NOT SHARE TGS DATABASES OUTSIDE OF SWARM MODE**.
- Linux/Docker Support: TGS is Linux and docker compatible. (Note this does not mean that rust-g and BSQL work out of the box, they must be compiled using event scripts like PreCompile.sh).
- Limitation: TGS has a dependency on the native library libgit2 which is known to cause issues on Linux. The binaries distributed with TGS are kept up to date with the upstream repository, but out of the box Linux support can't be assured in every environment. Docker is guaranteed to always work, however. See the repository for the distributed binary here: https://github.com/libgit2/libgit2sharp.nativebinaries.
- Limitation: System based logins are not supported on Linux. https://github.com/tgstation/tgstation-server/issues/709
- Incredibly Detailed Logging: Various log levels exist now (Trace/Debug/Info/Warning/Error/Critical) and are sanely output to a rolling file on the host. Significant improvement over having to use the Windows event viewer with TGS3. Until such a point where bugs stop copping up I'd recommend Trace logging for the main log level.
- Historical Deployment Data: Every time code is compiled the following data is logged and stored.
- The User that initiated it.
- When it was started.
- When it finished.
- All revision information including local/remote SHAs, test merged pull requests and their SHAs.
- The BYOND version used.
- The DMAPI version in the binary
- Multiple chat bots per instance: Up to 65535 as a matter of fact (who knows why I chose that number?)!
- Automatic Chat Bot Reconnection Intervals: Set in minutes.
- Better Error State Handling: The Server and Watchdog aren't your momma's boys anymore. Every error state will be automatically resolved or reported with recommended actions.
- Watchdog Health Checks: An interval in seconds can now be set at which TGS will send /world/Topic() packets to DreamDaemon. If four of these are missed, the server will be rebooted. No more endless @Key Holder pings in discord (and I can finally unmute the /tg/ guild)! This feature can be disabled.
- Better DMAPI: No longer requires injecting a .NET runtime .dll into the DreamDaemon process. DD -> TGS communication is now handled securely via BYOND's native /world/Export() API ("But Cyberboss, BYOND only supports GET requests." Who said anything about respecting HTTP standards when dealing with BYOND?).
- Safe/Ultrasafe Security Support: Thanks to the new DMAPI, the ultrasafe and safe security levels may be used without running into BYOND's limitations. But no one really cares...
- Private/Invisible visibility Support: Stored per instance.
- Self Upgrading: To upgrade TGS3 you needed to download and run the installer. This was pretty seamless, but it's now even better in versions >=4 as the command to upgrade can be given straight to the API. At that point the server will handle downloading the update, detaching running DreamDaemon instances, restarting with the new version, and reattaching to them. Easier than ever patch delivery.
- Multi-server co-operation: TGS installed on multiple machines can share the same database by using Swarm Mode. This mode keeps TGS and account details in sync on all machines.
- OAuth 2.0 Support: Integrate with your favorite 3rd party authentication providers
- *Gasp* TESTING: TGS currently has over 60% code coverage in automated unit and full stack integration tests. I aim to have that number ever increasing to prevent trivial mistakes. Big improvement over V3 which had... literally none...
Along with these features, nearly every single V3 feature has been included and possibly improved in some fashion. This includes stuff like Windows accounts for logins, and using ACLs for static file handling. The following exceptions exist but are planned for future updates:
- Process memory/CPU diagnostic data is not generated: https://github.com/tgstation/tgstation-server/issues/611
- Direct server announcements are no longer present but may be readded upon request.
@section features_list Comprehensive Feature List
tgstation-server is a BYOND server managment suite. It includes all the following features
- Standalone server with OpenAPI 3.0 defined HTTP REST API
- Web based client included
- Secure user authentication, management, and permissions system
- Support for using Windows accounts as logins
- OAuth 2.0 support with several providers
- InvisionCommunity
- /tg/ Forums
- Discord
- GitHub
- Keycloak
- Long running operation support via the jobs subsystem with error handling and stage reporting
- Logging system with configurable levels of verbosity
- Logs can be downloaded via the API
- Supports Elasticsearch ingesting
- Able to self update with user input
- Updates are sourced from our (or anyone else's if configured to do so) GitHub releases or uploaded directly by the user.
- Swarm system to coordinate servers across systems
- Database backend supporting several providers
- Microsoft SQL Server
- MySQL/MariaDB
- PostgresSQL
- SQLite
- Instances: Managing multiple sets of the below features seperately on the same machine
- Git repository managment
- Cloning
- Checking out SHAs and references
- Local Merging
- Hard resetting to references
- Merging GitHub pull requests locally, optionally commenting on them
- Optionally pushing commits for GitHub visibility
- Can be deleted and changed to a different origin
- BYOND version management
- Downloading and installing a given BYOND version
- Includes DirectX installation on Windows and proper handling of POSIX shared libraries
- Supporting any amount of installed versions
- Cleaning the BYOND cache
- Uploading a custom version .zip
- Code Deployment
- Compiles git code with DreamMaker and the active BYOND version
- Validates interop with the compiled binary
- Can be scheduled to pull the repository and build on a given interval
- Test merge commenting support for GitHub and GitLab
- GitHub Deployment Environments support
- The Watchdog, a DreamDaemon uptime monitor
- Automatically restarts the server when crashed until told to stop
- "Health Check" system for checking DreamDaemon isn't hung
- Seamless automatic application of new deployments on /world/Reboot
- Automatic startup at server boot time
- Automatically handles Windows prompts related to trusted mode
- TGS restarts/updates do not interrupt the DreamDaemon process
- Raises process priority of DreamDaemon for increased performance
- Support for logging DreamDaemon output
- Support for the `-profile` command line option
- Safe session recovery from TGS crashes
- Chat System
- Support multiple chat bots per instance. Current providers:
- Discord
- Supports rich embeds created from DM code and when deployments occur
- IRC
- Supports several authentication types
- Bots come out of the box with some basic commands like showing the server revision
- Support different chat channel types & tags for use in DM code
- Configuration system
- Allows specifying files/directories to be permanently symlinked with active game code
- Support for scripts that run on certain events. e.g. Before/after compiling
- Allows including arbitrary .dm code in compilations
- ACL support with Windows based logins
- DMAPI, DM code interop
- Provides metadata such as the current TGS version, git revision, active pull requests, security level
- Provides API for responding to TGS events (compile, update, etc)
- Provides API for sending chat bot messages
- Provides API for implementing chat bot commands in DM code
- Gives the ability to restart the DreamDaemon process from DM code
- Functions with all 3 DreamDaemon security levels
- Provides notifications of TGS side events
- Allows specifying the .dmb's minimum required security level
*/