From 410a6c7cc6b0ab29def630ac500ec79d29a6aa6d Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 27 Nov 2026 21:14:29 +0000 Subject: [PATCH] fix(modules): pin fivem, fs25 and ets2 to the fixed images The FiveM, Farming Simulator 25 and Euro Truck Simulator 2 images built before Gameplane #1126 never installed or found the game. Pin the templates to the images that build published, and document how each one now gets its server files: - fivem: FXServer build 38435 is downloaded and sha256-verified into /server-data/fxserver at start. - farming-simulator-25: the licensed server install must be uploaded into the volume; the container exits non-zero with instructions when it is missing. - euro-truck-simulator-2: SteamCMD base (UID/GID 10000) installs app 1948160 into /data at start; startup probe accepts the diagnostic idle marker, readiness needs the bound UDP port. Logon token App ID corrected to 227300. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Claude --- euro-truck-simulator-2/README.md | 9 +++--- euro-truck-simulator-2/specs.md | 23 +++++++-------- euro-truck-simulator-2/template.yaml | 42 ++++++++++++++++++++-------- farming-simulator-25/README.md | 4 +++ farming-simulator-25/specs.md | 7 +++-- farming-simulator-25/template.yaml | 2 +- fivem/README.md | 4 +++ fivem/specs.md | 4 +-- fivem/template.yaml | 2 +- 9 files changed, 64 insertions(+), 33 deletions(-) diff --git a/euro-truck-simulator-2/README.md b/euro-truck-simulator-2/README.md index e586f6d..3d026c4 100644 --- a/euro-truck-simulator-2/README.md +++ b/euro-truck-simulator-2/README.md @@ -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 @@ -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. @@ -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 diff --git a/euro-truck-simulator-2/specs.md b/euro-truck-simulator-2/specs.md index 33268fd..3dcd6f3 100644 --- a/euro-truck-simulator-2/specs.md +++ b/euro-truck-simulator-2/specs.md @@ -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`. --- @@ -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. --- @@ -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` diff --git a/euro-truck-simulator-2/template.yaml b/euro-truck-simulator-2/template.yaml index 07b4112..5a38857 100644 --- a/euro-truck-simulator-2/template.yaml +++ b/euro-truck-simulator-2/template.yaml @@ -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: @@ -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 @@ -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} @@ -58,6 +60,24 @@ 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"] @@ -65,7 +85,7 @@ spec: 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: "" diff --git a/farming-simulator-25/README.md b/farming-simulator-25/README.md index 0a91d2b..a3d8cd0 100644 --- a/farming-simulator-25/README.md +++ b/farming-simulator-25/README.md @@ -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 | diff --git a/farming-simulator-25/specs.md b/farming-simulator-25/specs.md index 463e310..1b6c2ee 100644 --- a/farming-simulator-25/specs.md +++ b/farming-simulator-25/specs.md @@ -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. --- @@ -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. --- diff --git a/farming-simulator-25/template.yaml b/farming-simulator-25/template.yaml index 9839a6d..e220939 100644 --- a/farming-simulator-25/template.yaml +++ b/farming-simulator-25/template.yaml @@ -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 diff --git a/fivem/README.md b/fivem/README.md index bb2ebb3..149a8b7 100644 --- a/fivem/README.md +++ b/fivem/README.md @@ -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. diff --git a/fivem/specs.md b/fivem/specs.md index a59410f..36ad0f0 100644 --- a/fivem/specs.md +++ b/fivem/specs.md @@ -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`. @@ -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. --- diff --git a/fivem/template.yaml b/fivem/template.yaml index 41dd62c..bd71278 100644 --- a/fivem/template.yaml +++ b/fivem/template.yaml @@ -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