Stormancer.GameServers.Agent 0.5.1-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.1-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.1-pre                
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Stormancer.GameServers.Agent&version=0.5.1-pre&prerelease                
nuke :add-package Stormancer.GameServers.Agent --version 0.5.1-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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.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 96 3/11/2024
0.5.1.1-pre 115 3/11/2024
0.5.1-pre 124 1/17/2024
0.5.0.24-pre 135 12/13/2023
0.5.0.23-pre 163 11/14/2023
0.5.0.22-pre 120 11/13/2023
0.5.0.21-pre 129 11/12/2023
0.5.0.20-pre 150 11/12/2023
0.5.0.19-pre 171 11/12/2023
0.5.0.18-pre 139 11/12/2023
0.5.0.17-pre 148 11/12/2023
0.5.0.16-pre 173 11/12/2023
0.5.0.15-pre 129 11/11/2023
0.5.0.10-pre 106 11/7/2023
0.5.0.9-pre 223 11/3/2023
0.5.0.8-pre 204 11/3/2023
0.5.0.6-pre 211 11/3/2023
0.5.0.5-pre 210 11/3/2023
0.5.0.4-pre 270 10/25/2023
0.5.0.3-pre 262 10/25/2023
0.5.0.2-pre 258 10/17/2023
0.5.0.1-pre 263 5/11/2023
0.5.0-pre 224 5/11/2023
0.4.0-pre 238 5/9/2023
0.3.0.8 235 5/9/2023
0.3.0.8-pre 274 5/5/2023
0.3.0.7-pre 207 5/3/2023
0.3.0.6-pre 277 4/26/2023
0.3.0.5-pre 191 4/26/2023
0.3.0.4-pre 212 4/18/2023
0.3.0.2-pre 339 4/13/2023
0.3.0.1-pre 255 4/13/2023
0.3.0-pre 217 4/13/2023
0.2.1.3-pre 254 4/6/2023
0.2.1.2-pre 250 4/6/2023
0.2.1.1-pre 287 4/6/2023
0.2.1-pre 281 4/6/2023
0.2.0 218 4/4/2023
0.2.0-pre 259 3/31/2023
0.1.0-pre 295 3/21/2023

Added
*****
- Create server crash reports and store them locally.
- Added APIs and systems to support best region detection.
- Added web API to connect the agent to an application.

Fixed
*****
- Fixed an issue in Stormancer.Client which could prevent reconnections.
- Properly register already running server instances.