Stormancer.GameServers.Agent 0.5.0.10-pre

This is a prerelease version of Stormancer.GameServers.Agent.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet tool install --global Stormancer.GameServers.Agent --version 0.5.0.10-pre
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local Stormancer.GameServers.Agent --version 0.5.0.10-pre
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Stormancer.GameServers.Agent&version=0.5.0.10-pre&prerelease
nuke :add-package Stormancer.GameServers.Agent --version 0.5.0.10-pre

The Stormancer.GameServer.Agent tool provides a way to control a docker daemon to start, monitor and stop gameservers linked to Stormancer gamesessions.

Installation

Prerequisites

apt-get install docker.io

Install the agent

First create a tool manifest in the folder you want your agent to run from

dotnet new tool-manifest

Then install the Stormancer.GameServer.Agent tool

dotnet tool install --local Stormancer.GameServers.Agent --version <current-version>

Configuration

"Agent": {
  "StormancerEndpoint": "https://serverendpoint.com",
  "StormancerAccount": "account",
  "StormancerApplication": "app",
  "PrivateKeyPassword": "password",
  "PrivateKeyPath": "<path-to-the-private-key-authenticating-the-agent.pfx>"
}

Setting up core dumps

  1. Run echo '/tmp/core-dump.%p' | sudo tee /proc/sys/kernel/core_pattern on the agent to setup the host core pattern.

For more information about the core_pattern : https://www.kernel.org/doc/html/latest/admin-guide/sysctl/kernel.html#core-pattern

To make the change in the host core pattern permanent, add kernel.core_pattern = /tmp/core-dump.%p to /etc/sysctl.conf, then reload it with sysctl -p

  1. Set the CorePath value in the agent configuration to the path of the generated core dump in the container.

    "Agent":{ "CorePath":"/tmp/core-dump.PID" }

Once it's done, if a game server doesn't stop with exit code 0, the agent will zip the server logs, the set of files specified in the app config and the generated core dump, and store the resulting archive in the diagnostics system for later download.

Agent as a service (ubuntu)

Create a service file (gameservers-agent.service) in /etc/systemd/system using nano or your favorite text editor

sudo nano /etc/systemd/system/gameservers-agent.service

  • A sample service file would be as follow:
[Unit]
Description=Game server agent
After=network-online.target

[Service]
Type=simple

#a user with sufficient permissions
User=root 

ExecStart=/usr/bin/dotnet tool run stormancer-gameservers-agent
#use your agent installation folder as WorkingDirectory
WorkingDirectory=/home/agent

Restart=on-failure

TimeoutStopSec=30

[Install]
WantedBy=multi-user.target
  • Enable the service

sudo systemctl daemon-reload sudo systemctl enable gameservers-agent.service

  • Start the service

sudo systemctl start gameservers-agent.service

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
0.5.1.2-pre 54 3/11/2024
0.5.1.1-pre 66 3/11/2024
0.5.1-pre 79 1/17/2024
0.5.0.24-pre 101 12/13/2023
0.5.0.23-pre 129 11/14/2023
0.5.0.22-pre 76 11/13/2023
0.5.0.21-pre 72 11/12/2023
0.5.0.20-pre 102 11/12/2023
0.5.0.19-pre 117 11/12/2023
0.5.0.18-pre 86 11/12/2023
0.5.0.17-pre 89 11/12/2023
0.5.0.16-pre 114 11/12/2023
0.5.0.15-pre 71 11/11/2023
0.5.0.10-pre 56 11/7/2023
0.5.0.9-pre 172 11/3/2023
0.5.0.8-pre 159 11/3/2023
0.5.0.6-pre 160 11/3/2023
0.5.0.5-pre 156 11/3/2023
0.5.0.4-pre 220 10/25/2023
0.5.0.3-pre 213 10/25/2023
0.5.0.2-pre 203 10/17/2023
0.5.0.1-pre 213 5/11/2023
0.5.0-pre 176 5/11/2023
0.4.0-pre 187 5/9/2023
0.3.0.8 187 5/9/2023
0.3.0.8-pre 228 5/5/2023
0.3.0.7-pre 164 5/3/2023
0.3.0.6-pre 239 4/26/2023
0.3.0.5-pre 149 4/26/2023
0.3.0.4-pre 165 4/18/2023
0.3.0.2-pre 288 4/13/2023
0.3.0.1-pre 205 4/13/2023
0.3.0-pre 169 4/13/2023
0.2.1.3-pre 205 4/6/2023
0.2.1.2-pre 201 4/6/2023
0.2.1.1-pre 243 4/6/2023
0.2.1-pre 236 4/6/2023
0.2.0 186 4/4/2023
0.2.0-pre 218 3/31/2023
0.1.0-pre 250 3/21/2023

Added
*****
- Create server crash reports and store them locally.
- Added APIs and systems to support best region detection.