Add BeamMP (#414)

* Add BeamMP

This PR is on hold until either liblua5.3-0 is added to the ampbase image, or `Meta.DockerContainerPacakges` is implemented.

* Update beammpconfig.json

* Adjustments for Debian 12

* Metaconfig and binary changes

* Add Greelan

* Changes for binary downloads and setting enhancements

* Update beammpconfig.json

* Update beammpupdates.json

* Update beammpconfig.json

* Update beammp.kvp

* Update beammpconfig.json

* Make symlink relative (local)

* Update server description default

* Update beammpconfig.json

* Update beammpconfig.json

* Update source

---------

Co-authored-by: Greelan <53196309+Greelan@users.noreply.github.com>
This commit is contained in:
IceOfWraith 2023-09-10 02:26:31 -05:00 committed by GitHub
parent a3d3776594
commit c7fc92dd3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 478 additions and 0 deletions

89
beammp.kvp Normal file
View File

@ -0,0 +1,89 @@
Meta.DisplayName=BeamMP
Meta.Description=BeamMP Dedicated Server
Meta.OS=Windows, Linux
Meta.AarchSupport=Unknown
Meta.Arch=x86_64
Meta.Author=IceOfWraith, Greelan
Meta.URL=https://beammp.com/
Meta.DisplayImageSource=steam:284160
Meta.EndpointURIFormat=
Meta.ConfigManifest=beammpconfig.json
Meta.MetaConfigManifest=beammpmetaconfig.json
Meta.ConfigRoot=beammp.kvp
Meta.MinAMPVersion=2.4.5.4
Meta.SpecificDockerImage=
Meta.DockerRequired=False
Meta.ContainerPolicy=RecommendedOnLinux
Meta.ContainerPolicyReason=The default executable on Linux is built for Ubuntu 22.04 and works also on Debian 12. For this reason, it's recommended to run the server in Docker.
Meta.ExtraSetupStepsURI=
Meta.ConfigReleaseState=NotSpecified
Meta.NoCommercialUsage=False
App.DisplayName=BeamMP
App.RootDir=./beammp/
App.BaseDirectory=./beammp/serverfiles/
App.ExecutableWin=serverfiles\BeamMP-Server.exe
App.ExecutableLinux=serverfiles/BeamMP-Server
App.WorkingDir=serverfiles
App.LinuxCommandLineArgs=
App.WindowsCommandLineArgs=
App.CommandLineArgs={{$PlatformArgs}} {{$FormattedArgs}}
App.UseLinuxIOREDIR=False
App.EnvironmentVariables={}
App.CommandLineParameterFormat=-{0} "{1}"
App.CommandLineParameterDelimiter=
App.ExitMethod=OS_CLOSE
App.ExitTimeout=30
App.ExitString=stop
App.ExitFile=app_exit.lck
App.HasWriteableConsole=True
App.HasReadableConsole=True
App.SupportsLiveSettingsChanges=False
App.LiveSettingChangeCommandFormat=set {0} "{1}"
App.ApplicationIPBinding=0.0.0.0
App.Ports=@IncludeJson[beammpports.json]
App.AdminPortRef=0
App.PrimaryApplicationPortRef=MainGamePort
App.UniversalSleepApplicationUDPPortRef=0
App.UniversalSleepSteamQueryPortRef=0
App.MaxUsers=8
App.UseRandomAdminPassword=True
App.PersistRandomPassword=False
App.RemoteAdminPassword=
App.AdminMethod=STDIO
App.AdminLoginTransform=None
App.LoginTransformPrefix=
App.RCONConnectDelaySeconds=30
App.RCONConnectRetrySeconds=15
App.RCONHeartbeatMinutes=0
App.RCONHeartbeatCommand=ping
App.TelnetLoginFormat={0}
App.UpdateSources=@IncludeJson[beammpupdates.json]
App.SteamUpdateAnonymousLogin=True
App.SteamForceLoginPrompt=False
App.RapidStartup=False
App.MonitorChildProcess=False
App.DumpFullChildProcessTree=False
App.MonitorChildProcessWaitMs=1000
App.MonitorChildProcessName=
App.SupportsUniversalSleep=False
App.WakeupMode=Any
App.ApplicationReadyMode=RegexMatch
App.TemplateMatchRegex={{(\$?[\w]+)}}
Console.FilterMatchRegex=^.*[[\d\s:\/]+\]\s
Console.FilterMatchReplacement=
Console.ThrowawayMessageRegex=(WARNING|ERROR): Shader.+
Console.AppReadyRegex=^.*\[INFO\] ALL SYSTEMS STARTED SUCCESSFULLY, EVERYTHING IS OKAY|.*\[ERROR\] No AuthKey specified in the \"ServerConfig\.toml\" file\. Please get an AuthKey, enter it into the config file, and restart this server\.$
Console.UserJoinRegex=^.*\[INFO\] (?<username>.+?) is now synced!$
Console.UserLeaveRegex=^.*\[INFO\] (?<username>.+?) Connection Terminated$
Console.UserChatRegex=^.*\[CHAT\] \(\d+\) <(?<username>.+?)> (?<message>.+)$
Console.UpdateAvailableRegex=^\[\d\d:\d\d:\d\d\] \[INFO\] A new server update is available! v[\d\.]+.$
Console.MetricsRegex=
Console.SuppressLogAtStart=False
Console.ActivateLogRegex=
Console.UserActions={}
Limits.SleepMode=True
Limits.SleepOnStart=False
Limits.SleepDelayMinutes=5
Limits.DozeDelay=2
Limits.AutoRetryCount=5
Limits.SleepStartThresholdSeconds=25

25
beammpServerConfig.toml Normal file
View File

@ -0,0 +1,25 @@
[HTTP]
HTTPServerEnabled = false
UseSSL = false
HTTPServerIP = "0.0.0.0"
HTTPServerPort = 30815
SSLCertPath = "./.ssl/HttpServer/cert.pem"
SSLKeyPath = "./.ssl/HttpServer/key.pem"
[Misc]
SendErrorsShowMessage = true
SendErrors = true
ImScaredOfUpdates = false
[General]
Description = "A BeamMP server"
ResourceFolder = "Resources"
Map = "/levels/gridmap_v2/info.json"
MaxPlayers = 8
Port = 30814
Private = true
Debug = false
Name = "AMP Powered BeamMP Server"
LogChat = true
MaxCars = 1
AuthKey = ""

281
beammpconfig.json Normal file
View File

@ -0,0 +1,281 @@
[
{
"DisplayName":"Linux Server Version",
"Category":"BeamMP - Server Settings",
"Description":"Sets the server version to install on Linux, based on the host system. Use \"Ubuntu 22.04/Debian 12\" if using AMP's Docker. NOTE: Update the server after changing this setting",
"Keywords":"server,version",
"FieldName":"ServerVersion",
"InputType":"enum",
"IsFlagArgument":false,
"ParamFieldName":"ServerVersion",
"IncludeInCommandLine":false,
"DefaultValue":"linux",
"EnumValues":{
"linux":"Ubuntu 22.04/Debian 12 (default)",
"ubuntu-20.04":"Ubuntu 20.04",
"debian-11":"Debian 11",
"archlinux":"Arch Linux"
}
},
{
"DisplayName": "Auth Key",
"Category": "BeamMP - Server Settings",
"Description": "The auth key for your server can be obtained from [Keymaster](https://beammp.com/keymaster). This is required for the server to start.",
"Keywords": "auth,key,authkey",
"FieldName": "AuthKey",
"InputType": "text",
"ParamFieldName": "General.AuthKey",
"DefaultValue": "",
"EnumValues": {}
},
{
"DisplayName": "Server Name",
"Category": "BeamMP - Server Settings",
"Description": "The name of the server as shown in the server list (if the server is public). You can use [special characters](https://wiki.beammp.com/en/home/server-maintenance#customize-the-look-of-your-server-name) to format this with colors and styles.",
"Keywords": "server,name",
"FieldName": "Name",
"InputType": "text",
"ParamFieldName": "General.Name",
"DefaultValue": "AMP Powered BeamMP Server",
"Placeholder": "AMP Powered BeamMP Server",
"EnumValues": {}
},
{
"DisplayName": "Server Description",
"Category": "BeamMP - Server Settings",
"Description": "The description for the server as shown in the server list (if the server is public). You can use [special characters](https://wiki.beammp.com/en/home/server-maintenance#customize-the-look-of-your-server-name) to format this with colors and styles.",
"Keywords": "description",
"FieldName": "Description",
"InputType": "text",
"ParamFieldName": "General.Description",
"DefaultValue": "A BeamMP server",
"Placeholder": "A BeamMP server",
"EnumValues": {}
},
{
"DisplayName": "Port",
"Category": "BeamMP - Server Settings",
"Description": "The main game port",
"Keywords": "",
"FieldName": "$MainGamePort",
"InputType": "number",
"ParamFieldName": "General.Port",
"Hidden": true,
"EnumValues": {}
},
{
"DisplayName": "Make Server Private",
"Category": "BeamMP - Server Settings",
"Description": "When enabled, your server will not be shown in the server list. Anyone with the correct IP and port can still connect.",
"Keywords": "private",
"FieldName": "Private",
"InputType": "checkbox",
"ParamFieldName": "General.Private",
"DefaultValue": "true",
"EnumValues": {
"True": "true",
"False": "false"
}
},
{
"DisplayName": "Map",
"Category": "BeamMP - Server Settings",
"Description": "The map to load. If Custom is selected, Custom Map Name must also be set.",
"Keywords": "map",
"FieldName": "Map",
"InputType": "text",
"ParamFieldName": "General.Map",
"DefaultValue": "/levels/gridmap_v2/info.json",
"EnumValues": {
"/levels/automation_test_track/info.json": "Automation Test Track",
"/levels/derby/info.json": "Derby",
"/levels/driver_training/info.json": "Driver Training",
"/levels/east_coast_usa/info.json": "East Coast USA",
"/levels/gridmap_v2/info.json": "Gridmap V2 (default)",
"/levels/hirochi_raceway/info.json": "Hirochi Raceway",
"/levels/industrial/info.json": "Industrial",
"/levels/italy/info.json": "Italy",
"/levels/johnson_valley/info.json": "Johnson Valley",
"/levels/jungle_rock_island/info.json": "Jungle Rock Island",
"/levels/small_island/info.json": "Small Island",
"/levels/smallgrid/info.json": "Smallgrid",
"/levels/utah/info.json": "Utah",
"/levels/west_coast_usa/info.json": "West Coast USA",
"{{CustomMap}}": "--Custom--"
}
},
{
"DisplayName":"Custom Map Name",
"Category":"BeamMP - Server Settings",
"Description":"Sets a custom map for the server. Custom type must be selected under \"Map\", and the map must be installed in Resources/Client.",
"Keywords":"custom,map",
"FieldName":"CustomMap",
"InputType":"text",
"IsFlagArgument":false,
"ParamFieldName":"CustomMap",
"IncludeInCommandLine":false,
"DefaultValue":"",
"Placeholder":"/levels/minato_rock_crawling/info.json",
"EnumValues":{}
},
{
"DisplayName": "Max Players",
"Category": "BeamMP - Server Settings",
"Description": "The maximum number of players on the server at one time.",
"Keywords": "max,players,maxplayers",
"FieldName": "$MaxUsers",
"InputType": "number",
"ParamFieldName": "General.MaxPlayers",
"DefaultValue": "8",
"Placeholder": "8",
"Suffix": "players",
"EnumValues": {}
},
{
"DisplayName": "Max Cars Per Player",
"Category": "BeamMP - Server Settings",
"Description": "The maximum number of cars allowed per player. Any additional cars a player tries to spawn will be deleted instantly.",
"Keywords": "max,cars,maxcars",
"FieldName": "MaxCars",
"InputType": "number",
"ParamFieldName": "General.MaxCars",
"DefaultValue": "1",
"Placeholder": "1",
"MinValue": "1",
"Suffix": "cars",
"EnumValues": {}
},
{
"DisplayName": "Resource Folder",
"Category": "BeamMP - Server Settings",
"Description": "The folder for Resources inside the datastore.",
"Keywords": "",
"FieldName": "ResourceFolder",
"InputType": "text",
"ParamFieldName": "General.ResourceFolder",
"DefaultValue": "Resources",
"Hidden": true,
"EnumValues": {}
},
{
"DisplayName": "Log Chat Messages",
"Category": "BeamMP - Server Settings",
"Description": "Whether to log chat messages in the console and log.",
"Keywords": "log,chat,logging,logchat",
"FieldName": "LogChat",
"InputType": "checkbox",
"ParamFieldName": "General.LogChat",
"DefaultValue": "true",
"EnumValues": {
"True": "true",
"False": "false"
}
},
{
"DisplayName": "Enable Debug Logging",
"Category": "BeamMP - Server Settings",
"Description": "Turn on debug logging. Enabling this will drastically increase the size of the log file.",
"Keywords": "debug,log,logging",
"FieldName": "Debug",
"InputType": "checkbox",
"ParamFieldName": "General.Debug",
"DefaultValue": "false",
"EnumValues": {
"True": "true",
"False": "false"
}
},
{
"DisplayName": "Hide Update Messages",
"Category": "BeamMP - Server Settings",
"Description": "Hides the periodic update message which notifies you of a new server version. Recommended to keep this setting disabled and always update as soon as possible.",
"Keywords": "hide,updates,message,imscaredofupdates",
"FieldName": "ImScaredOfUpdates",
"InputType": "checkbox",
"ParamFieldName": "Misc.ImScaredOfUpdates",
"DefaultValue": "false",
"EnumValues": {
"True": "true",
"False": "false"
}
},
{
"DisplayName": "Send Errors",
"Category": "BeamMP - Server Settings",
"Description": "If enabled, the server will send info about crashes and other issues to the BeamMP devs. This may include your config, who is on your server at the time of the error, and similar general information. This has no impact on server performance.",
"Keywords": "send,errors,senderrors",
"FieldName": "SendErrors",
"InputType": "checkbox",
"ParamFieldName": "Misc.SendErrors",
"DefaultValue": "true",
"Placeholder": "true",
"EnumValues": {
"True": "true",
"False": "false"
}
},
{
"DisplayName": "Enable Send Errors Message",
"Category": "BeamMP - Server Settings",
"Description": "If enabled, the Send Errors message will show on startup.",
"Keywords": "send,errors,show,message,senderrorsshowmessage",
"FieldName": "SendErrorsShowMessage",
"InputType": "checkbox",
"ParamFieldName": "Misc.SendErrorsShowMessage",
"DefaultValue": "true",
"EnumValues": {
"True": "true",
"False": "false"
}
},
{
"DisplayName": "HTTPServerIP",
"Category": "BeamMP - Server Settings",
"Description": "The binding IP for the HTTP webserver.",
"Keywords": "",
"FieldName": "$ApplicationIPBinding",
"InputType": "text",
"ParamFieldName": "HTTP.HTTPServerIP",
"Hidden": true,
"EnumValues": {}
},
{
"DisplayName": "HTTPServerPort",
"Category": "BeamMP - Server Settings",
"Description": "The port used for the HTTP webserver.",
"Keywords": "",
"FieldName": "$HTTPServerPort",
"InputType": "number",
"ParamFieldName": "HTTP.HTTPServerPort",
"Hidden": true,
"EnumValues": {}
},
{
"DisplayName": "Enable HTTP Server",
"Category": "BeamMP - Server Settings",
"Description": "Enables the internal HTTP server.",
"Keywords": "http,server,enabled,httpserverenabled",
"FieldName": "HTTPServerEnabled",
"InputType": "checkbox",
"ParamFieldName": "HTTP.HTTPServerEnabled",
"DefaultValue": "false",
"EnumValues": {
"True": "true",
"False": "false"
}
},
{
"DisplayName": "Use SSL For HTTP Server",
"Category": "BeamMP - Server Settings",
"Description": "Recommended to have enabled for servers which face the internet. With SSL the server will serve https and requires valid key and cert files. Key and cert files should be stored in \".ssl/HttpServer/key.pem\" and \".ssl/HttpServer/cert.pem\" in the instance datastore.",
"Keywords": "use,ssl,usessl",
"FieldName": "UseSSL",
"InputType": "checkbox",
"ParamFieldName": "HTTP.UseSSL",
"DefaultValue": "false",
"EnumValues": {
"True": "true",
"False": "false"
}
}
]

16
beammpmetaconfig.json Normal file
View File

@ -0,0 +1,16 @@
[
{
"ConfigFile": "ServerConfig.toml",
"AutoMap": true,
"ConfigType": "ini",
"ConfigFormat": "{0} = \"{1}\"",
"ConfigFormatRegex": "^(?<key>.+?) = \"(?<value>.*?)\"$"
},
{
"ConfigFile": "ServerConfig.toml",
"AutoMap": true,
"ConfigType": "ini",
"ConfigFormat": "{0} = {1}",
"ConfigFormatRegex": "^(?<key>.+?) = (?<value>[^\"]*?)$"
}
]

16
beammpports.json Normal file
View File

@ -0,0 +1,16 @@
[
{
"Protocol": "Both",
"Port": "30814",
"Name": "Main Game Port",
"Description": "Port used for main game traffic",
"Ref": "MainGamePort"
},
{
"Protocol": "TCP",
"Port": "30815",
"Name": "HTTP Server Port",
"Description": "Port used to access the HTTP webserver",
"Ref": "HTTPServerPort"
}
]

51
beammpupdates.json Normal file
View File

@ -0,0 +1,51 @@
[
{
"UpdateStageName":"Binary and Symlink Removal",
"UpdateSourcePlatform":"Linux",
"UpdateSource":"Executable",
"UpdateSourceData":"/bin/bash",
"UpdateSourceArgs":"-c 'rm {{$FullBaseDir}}BeamMP-Server*'"
},
{
"UpdateStageName":"BeamMP Download",
"UpdateSourcePlatform":"Windows",
"UpdateSource":"GithubRelease",
"UpdateSourceData":"BeamMP-Server.exe",
"UpdateSourceArgs":"BeamMP/BeamMP-Server",
"UpdateSourceTarget":"{{$FullBaseDir}}",
"UnzipUpdateSource":false,
"OverwriteExistingFiles":true
},
{
"UpdateStageName":"BeamMP Download",
"UpdateSourcePlatform":"Linux",
"UpdateSource":"GithubRelease",
"UpdateSourceData":"BeamMP-Server-{{ServerVersion}}",
"UpdateSourceArgs":"BeamMP/BeamMP-Server",
"UpdateSourceTarget":"{{$FullBaseDir}}",
"UnzipUpdateSource":false,
"OverwriteExistingFiles":true
},
{
"UpdateStageName":"Set Executable Flag",
"UpdateSourcePlatform":"Linux",
"UpdateSource":"SetExecutableFlag",
"UpdateSourceArgs":"{{$FullBaseDir}}BeamMP-Server-{{ServerVersion}}"
},
{
"UpdateStageName":"Binary Symlink Creation",
"UpdateSourcePlatform":"Linux",
"UpdateSource":"Executable",
"UpdateSourceData":"/bin/bash",
"UpdateSourceArgs":"-c 'cd ./beammp/serverfiles/ && ln -s BeamMP-Server-{{ServerVersion}} BeamMP-Server'"
},
{
"UpdateStageName":"Config File Download",
"UpdateSourcePlatform":"All",
"UpdateSource":"FetchURL",
"UpdateSourceData":"https://github.com/CubeCoders/AMPTemplates/raw/main/beammpServerConfig.toml",
"UpdateSourceTarget":"{{$FullBaseDir}}",
"UpdateSourceArgs":"ServerConfig.toml",
"OverwriteExistingFiles":false
}
]