Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions euro-truck-simulator-2/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Euro Truck Simulator 2

Euro Truck Simulator 2 dedicated convoy server backed by a Gameplane-owned container with diagnostic idle support (FR-013).
Euro Truck Simulator 2 dedicated convoy server backed by a Gameplane-owned SteamCMD-based container that installs the dedicated server (Steam app `1948160`, anonymous login) into the persistent volume at start, with diagnostic idle support for a missing token (FR-013). The first start downloads the server, which can take several minutes; if the install fails the container exits non-zero and the reason is in the pod log.

## Install

Expand All @@ -10,7 +10,7 @@ kubectl apply -f modules/euro-truck-simulator-2/template.yaml

## Server Logon Token

An authenticated Steam server logon token is required for the dedicated server to register with Steam's session coordinator. Obtain a token for App ID `1948400` from [steamcommunity.com/dev/managegameservers](https://steamcommunity.com/dev/managegameservers) and supply it via `SERVER_LOGON_TOKEN`.
An authenticated Steam server logon token is required for the dedicated server to register with Steam's session coordinator. Obtain a token for App ID `227300` (Euro Truck Simulator 2) from [steamcommunity.com/dev/managegameservers](https://steamcommunity.com/dev/managegameservers) and supply it via `SERVER_LOGON_TOKEN`.

If the token is omitted or empty, the server enters a graceful idle state (FR-013) that displays diagnostic setup instructions in the pod log instead of crash-looping.

Expand All @@ -27,8 +27,9 @@ ETS2 dedicated servers do not expose an RCON TCP port. Remote console interactio

## Storage

Storage is mounted at `/home/steam/.local/share/Euro Truck Simulator 2` (10 GiB default), retaining:
- Convoy configuration (`server_config.sii`)
Storage is mounted at `/data` (10 GiB default), retaining:
- The installed dedicated server (`bin/linux_x64/eurotrucks2_server`)
- Convoy configuration (`profile/server_config.sii`, linked into `~/.local/share/Euro Truck Simulator 2`)
- Server logs and player records
- Custom packages and mod manifests

Expand Down
23 changes: 12 additions & 11 deletions euro-truck-simulator-2/specs.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

## 2. Container Image & Architecture

- **Base Image**: `ghcr.io/gameplanepanel/gameplane/euro-truck-simulator-2:latest@sha256:170562b495bca0535830ada89d9d01b52d94e79c99a2354b2cffcb72103a19f5`
- **Base Image**: `ghcr.io/gameplanepanel/gameplane/euro-truck-simulator-2:latest@sha256:3296f2b444b1924933256e7e965ab96ba737c514542064db6a634759869e5e6d`
- **Architecture**: `linux/amd64`
- **Runtime Model**: Linux 64-bit standalone dedicated server binary (`eurotrucks2_server`) managed by Gameplane supervisor script.
- **User & Execution Context**: UID `1000`, GID `1000`, working directory `/serverdata`.
- **Runtime Model**: Linux 64-bit standalone dedicated server binary (`eurotrucks2_server`) installed at start into the volume with SteamCMD (app `1948160`, anonymous) and managed by Gameplane supervisor script. The entrypoint exits non-zero if the binary is missing after install.
- **User & Execution Context**: UID `10000`, GID `10000` (SteamCMD base image user), working directory `/data`.

---

Expand All @@ -31,12 +31,13 @@ Declared ports under `spec.ports`:

## 4. Storage & Persistence Layout

- **Mount Path**: `/home/steam/.local/share/Euro Truck Simulator 2`
- **Mount Path**: `/data` (`GP_DATA_DIR`)
- **Default Sizing**: `10Gi`
- **Persisted Content**:
- Convoy configuration files (`server_config.sii`)
- Installed dedicated server (`bin/linux_x64/`)
- Convoy configuration files (`profile/server_config.sii`)
- Server packages, saves, and session cache
- **Non-Shadowing Invariant**: Mount path isolates user profile state without shadowing the server binary in `/serverdata`.
- **Non-Shadowing Invariant**: The server is installed into the mounted volume itself, so nothing the entrypoint needs is shadowed by the mount.

---

Expand Down Expand Up @@ -72,14 +73,14 @@ Declared ports under `spec.ports`:

## 8. Key Invariants & Security

- **User Matching**: `spec.security.runAsUser: 1000` matches image user.
- **Environment**: `spec.env` defines `HOME: /home/gameplane`.
- **Filesystem Permissions**: `spec.security.fsGroup: 1000` guarantees write permissions.
- **Diagnostic Idle**: Automatically enters idle state with step-by-step instructions if `SERVER_LOGON_TOKEN` is missing (FR-013).
- **User Matching**: `spec.security.runAsUser: 10000` matches image user.
- **Environment**: `spec.env` defines `GP_DATA_DIR: /data`.
- **Filesystem Permissions**: `spec.security.fsGroup: 10000` guarantees write permissions.
- **Diagnostic Idle**: Automatically enters idle state with step-by-step instructions if `SERVER_LOGON_TOKEN` is missing (FR-013). The entrypoint touches `/tmp/gp-diagnostic-idle`, which only the startup probe accepts, so the idle is not restarted; readiness still requires the bound UDP port.

---

## 9. References & Upstream Documentation

- Official Game Documentation: https://eurotrucksimulator2.com/
- Steam Dedicated Server AppID: `1948400`
- Steam Dedicated Server AppID: `1948160`
42 changes: 31 additions & 11 deletions euro-truck-simulator-2/template.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# yaml-language-server: $schema=../.schema/gametemplate.schema.json
# Gameplane GameTemplate for Euro Truck Simulator 2 (dedicated server).
#
# Backed by Gameplane-owned ETS2 container with non-crashing diagnostic idle
# Backed by Gameplane-owned ETS2 container (SteamCMD base) that installs the
# dedicated server into the volume at start, with non-crashing diagnostic idle
# when the server logon token is missing (FR-013).
#
# Cluster-scoped; apply once per cluster:
Expand All @@ -21,19 +22,20 @@ spec:
accentColor: "#3b82f6"
description: |
Euro Truck Simulator 2 dedicated convoy server. Interactive console
connects via container PTY stdin/stdout. Server state and configs persist
under the user profile directory.
connects via container PTY stdin/stdout. The dedicated server (Steam app
1948160) is installed into the `/data` volume at start; the convoy profile
persists under `/data/profile`.

image: ghcr.io/gameplanepanel/gameplane/euro-truck-simulator-2:latest@sha256:170562b495bca0535830ada89d9d01b52d94e79c99a2354b2cffcb72103a19f5
image: ghcr.io/gameplanepanel/gameplane/euro-truck-simulator-2:latest@sha256:3296f2b444b1924933256e7e965ab96ba737c514542064db6a634759869e5e6d

env:
- name: HOME
value: /home/gameplane
- name: GP_DATA_DIR
value: /data

security:
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
runAsUser: 10000
runAsGroup: 10000
fsGroup: 10000

ports:
- name: game
Expand All @@ -47,7 +49,7 @@ spec:

storage:
size: 10Gi
mountPath: /home/steam/.local/share/Euro Truck Simulator 2
mountPath: /data

resources:
requests: {cpu: "1", memory: 2Gi}
Expand All @@ -58,14 +60,32 @@ spec:

consoleMode: pty

probes:
startup:
# Ready once the game UDP socket is bound (27015 = 0x6987, state 07).
# First start downloads the server through SteamCMD, so allow ~30 min.
# The entrypoint touches /tmp/gp-diagnostic-idle while idling without a
# logon token (FR-013) so the accepted idle is not restarted. Readiness
# below does not accept the marker: an idle pod is never Ready.
exec:
command: ["sh", "-c", "[ -f /tmp/gp-diagnostic-idle ] || grep -qsE ':6987 [0-9A-F:]+ 07' /proc/net/udp /proc/net/udp6"]
initialDelaySeconds: 60
periodSeconds: 15
failureThreshold: 120
readiness:
exec:
command: ["sh", "-c", "grep -qsE ':6987 [0-9A-F:]+ 07' /proc/net/udp /proc/net/udp6"]
periodSeconds: 10
failureThreshold: 6

capabilities:
lifecycle:
stop: ["exit"]

configSchema:
- name: SERVER_LOGON_TOKEN
displayName: Server Logon Token
description: Steam Game Server Logon Token for ETS2 (App ID 1948400) from steamcommunity.com/dev/managegameservers.
description: Steam Game Server Logon Token for ETS2 (App ID 227300) from steamcommunity.com/dev/managegameservers.
type: password
required: true
default: ""
Expand Down
4 changes: 4 additions & 0 deletions farming-simulator-25/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ Farming Simulator dedicated servers do not expose an interactive stdin console o

Gameplane's agent communicates directly with the portal's HTTP endpoints (`rcon.protocol: rest`) to query server status and trigger game saves prior to shutdown.

## Server files (upload required)

Gameplane cannot download the Windows dedicated server. Before the first start, upload your licensed Farming Simulator 25 server install (`FarmingSimulator2025.exe`, `dedicatedServer.exe` and the game data) into the server's volume with the Files tab or SFTP; the volume root is `/data/My Games/FarmingSimulator2025`. If neither executable is found the container logs these instructions and exits non-zero.

## Ports

| Name | Port | Protocol | Advertised | Purpose |
Expand Down
7 changes: 4 additions & 3 deletions farming-simulator-25/specs.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

## 2. Container Image & Architecture

- **Base Image**: `ghcr.io/gameplanepanel/gameplane/farming-simulator-25:latest@sha256:a19a825612a2a77b5a27224bcd4c3362e604ec4b962d4f77e1cbb22c71f2773f`
- **Base Image**: `ghcr.io/gameplanepanel/gameplane/farming-simulator-25:latest@sha256:4c88775823e48e1f20d8357d57c513edf777e1d7e8815716fa7421c7e47a2e76`
- **Architecture**: `linux/amd64`
- **Runtime Model**: Headless Wine and dummy X11 (Xvfb) supervising the GIANTS dedicated server and web admin portal in a single-pod architecture (FR-012).
- **User & Execution Context**: UID `1000`, GID `1000`, working directory `/serverdata`.
- **User & Execution Context**: UID `1000`, GID `1000`, working directory is the mounted volume `/data/My Games/FarmingSimulator2025` (`GP_DATA_DIR`), where the user uploads the server files (`FarmingSimulator2025.exe`, `dedicatedServer.exe`). The entrypoint exits non-zero when they are missing.

---

Expand All @@ -35,9 +35,10 @@ Declared ports under `spec.ports`:
- **Default Sizing**: `20Gi`
- **Persisted Content**:
- Farm progress, terrain modifications, and career saves (`savegame*`)
- Uploaded server files (`FarmingSimulator2025.exe`, `dedicatedServer.exe`)
- Server configuration files (`dedicated_server/`)
- Downloaded mods and DLCs (`mods/`)
- **Non-Shadowing Invariant**: The mount path resides in `/data/My Games/FarmingSimulator2025` which is isolated from the container wineprefix and entrypoint scripts.
- **Non-Shadowing Invariant**: The mount path resides in `/data/My Games/FarmingSimulator2025` which is isolated from the container wineprefix and entrypoint scripts; the entrypoint looks for the server executables inside this volume.

---

Expand Down
2 changes: 1 addition & 1 deletion farming-simulator-25/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
an integrated web management portal. Remote control and state management
use the web portal REST API.

image: ghcr.io/gameplanepanel/gameplane/farming-simulator-25:latest@sha256:a19a825612a2a77b5a27224bcd4c3362e604ec4b962d4f77e1cbb22c71f2773f
image: ghcr.io/gameplanepanel/gameplane/farming-simulator-25:latest@sha256:4c88775823e48e1f20d8357d57c513edf777e1d7e8815716fa7421c7e47a2e76

env:
- name: HOME
Expand Down
4 changes: 4 additions & 0 deletions fivem/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ A **CitizenFX server license key** is required for FiveM to start. Register a se

If the license key is missing, the entrypoint enters a **graceful diagnostic idle** mode (FR-013) that prints instructions to the container log without crash-looping.

## FXServer install

The image does not bundle FXServer. On first start the entrypoint downloads a pinned artifact (build 38435, `runtime.fivem.net`) into `/server-data/fxserver`, verifies its sha256 and extracts it. Override `FXSERVER_URL` and `FXSERVER_SHA256` together to use another build. A download, checksum or extract failure exits the container non-zero with the reason in the log.

## Management & Remote Console (RCON)

Administration is driven through txAdmin's HTTP API (`rcon.protocol: rest`) listening on internal port 40120. Gameplane's agent connects directly to the REST API to execute console commands, broadcasts, and graceful shutdowns.
Expand Down
4 changes: 2 additions & 2 deletions fivem/specs.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

## 2. Container Image & Architecture

- **Base Image**: `ghcr.io/gameplanepanel/gameplane/fivem:latest@sha256:23d65f59793e5f207c4c4ee5c320bca5aa56003fd95be259a887f4e58f3d77b1`
- **Base Image**: `ghcr.io/gameplanepanel/gameplane/fivem:latest@sha256:4ae111599ac8fc51368091810550f824692bc8cdb646ae28a9f00d1eaa42d6d4`
- **Architecture**: `linux/amd64`
- **Runtime Model**: CitizenFX server supervised alongside embedded MariaDB and txAdmin in a single-pod architecture (FR-012).
- **User & Execution Context**: UID `1000`, GID `1000`, working directory `/server-data`.
Expand Down Expand Up @@ -39,7 +39,7 @@ Declared ports under `spec.ports`:
- Server configuration files (`server.cfg`)
- Embedded MariaDB relational data (`mysql/`)
- Custom resources, scripts, and assets (`resources/`)
- **Non-Shadowing Invariant**: The mount path `/server-data` hosts the writable server assets and state without overriding `/opt/cfx-server` or system binaries.
- **Non-Shadowing Invariant**: The mount path `/server-data` hosts the writable server assets and state without overriding system binaries; FXServer is downloaded (pinned build, sha256-verified) into `/server-data/fxserver` at start and the entrypoint exits non-zero if it is still missing.

---

Expand Down
2 changes: 1 addition & 1 deletion fivem/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
database supervision. Remote console and commands operate via txAdmin's
REST API.

image: ghcr.io/gameplanepanel/gameplane/fivem:latest@sha256:23d65f59793e5f207c4c4ee5c320bca5aa56003fd95be259a887f4e58f3d77b1
image: ghcr.io/gameplanepanel/gameplane/fivem:latest@sha256:4ae111599ac8fc51368091810550f824692bc8cdb646ae28a9f00d1eaa42d6d4

env:
- name: HOME
Expand Down
Loading