Ludus

devops-infra MCP Server

CLI tool that automates the end-to-end pipeline for deploying Unreal Engine 5 dedicated servers to AWS GameLift

Verified
devops-infradevops-infraaws
3 views3 stars1 forksMIT

Why This Matters

Discovered via github-topic:mcp and last synced 2mo ago.

Verified
Source
github-topic:mcp
Stars
3
Last synced
2mo ago
Install
Check source

Install

Install instructions not detected yet

Check the source repository for the latest setup steps.

View source instructions
41
Tools
0
Resources
0
Prompts
Standard I/O
Transport

Available Tools (41)

Flag

Effect

arm64

+--> container build + ECR push ---> deploy fleet

Engine

`ludus_engine_setup`

Deploy

`ludus_deploy_fleet`

BuildGraph

`ludus_buildgraph`

ludus_game_client_start

Start client build (returns immediately)

Archive

83s

Init

`ludus_init`

Container

`ludus_container_build`

Async

`ludus_engine_build_start`

Setting

Description

Status

`ludus_status`

Phase

Cold (empty Zen cache)

Target

Command

Client

Config file

ludus_engine_build

Build UE5 from source (long-running, blocks)

ludus_deploy_stack

Deploy via CloudFormation (long-running)

DDC

`ludus_ddc_status`

ludus_build_status

Poll build status, retrieve output, or cancel

Compile

308s (5m)

Cursor

`.cursor/mcp.json` (workspace) or `~/.cursor/mcp.json` (global)

Game

`ludus_game_build`

ludus_deploy_ec2

Deploy via GameLift Managed EC2 (no Docker)

Cook

1321s (22m)

Yes

Yes

Kiro

`.kiro/settings/mcp.json` (workspace) or `~/.kiro/settings/mcp.json` (global)

ludus_engine_push

Push engine Docker image to ECR

ludus_deploy_anywhere

Deploy locally via GameLift Anywhere

ludus_ddc_clean

Delete all DDC cache content, freeing disk space

Stage

Time

No

Yes

Domain

Tool

ludus_game_client

Build standalone client for Linux or Win64 (long-running, blocks)

ludus_deploy_session

Create a game session, returns connection details

ludus_ddc_warm

Run a cook-only Docker build to pre-populate the DDC

ludus_container_push

Push container image to ECR

Connect

`ludus_connect_info`

ludus_game_build_start

Start game server build (returns immediately)

ludus_ddc_configure

Set DDC mode and/or path in ludus.yaml

true

See [`internal/config/config.go`](internal/config/config.go) for the full list of configuration keys including CI, EC2 fleet, and content validation options. ## Usage ### Full pipeline ```bash # Run all 6 stages ./ludus run --verbose # Skip engine build (use existing) ./ludus run --verbose --skip-engine # Skip game build (use existing packaged server) ./ludus run --verbose --skip-engine --skip-game # Dry run — print commands without executing ./ludus run --dry-run ``` ### Individual commands ```bash # Interactive first-run setup wizard ./ludus setup # Validate prerequisites (--fix to auto-remediate) ./ludus init --verbose # Deep diagnostics (toolchain, disk, Docker, AWS, security lint) ./ludus doctor # Build engine only ./ludus engine build --verbose # Build game server only (--arch arm64 for Graviton) ./ludus game build --verbose # Build and push container ./ludus container build --verbose ./ludus container push --verbose # Deploy to GameLift (imperative API calls) ./ludus deploy fleet --verbose # Deploy via CloudFormation (atomic with rollback) ./ludus deploy stack --verbose # Deploy via Managed EC2 (no Docker required) ./ludus deploy ec2 --verbose # Deploy locally via GameLift Anywhere (seconds, not minutes) ./ludus deploy anywhere --verbose # Create a game session and connect ./ludus deploy session ./ludus connect # Tear down all Ludus-managed AWS resources ./ludus deploy destroy --verbose # Generate BuildGraph XML for Horde/UET ./ludus buildgraph -o build.xml # DDC management ./ludus ddc status ./ludus ddc warmup --verbose ./ludus ddc clean ./ludus ddc prune --days 30 # Build logs (build output is persisted to .ludus/logs/ by default) ./ludus logs list # list recent build runs ./ludus logs path # print the latest run's log path ./ludus logs tail # tail the latest run's log # Quick config changes ./ludus config set game.arch arm64 ./ludus config get engine.sourcePath ``` ### Container build backend Instead of building the engine natively on the host, Ludus can build UE5 inside a container (Docker or Podman), producing a reusable image. CI runners then pull the image to run game builds without recompiling the engine. ```bash # Build engine inside a container (produces a reusable image) ./ludus engine build --backend docker --verbose # or --backend podman # Push the engine image to ECR ./ludus engine push --verbose # Build game server using the engine image ./ludus game build --backend docker --verbose # Full pipeline with container backend ./ludus run --backend docker --verbose ``` The `--backend` flag can be set per-command or configured as a default in `ludus.yaml`: ```yaml engine: backend: "docker" # or "podman" ``` **Pre-built engine image**: If the engine image already exists in a registry (built once by a team member or CI), point to it directly and skip the engine build entirely: ```yaml engine: backend: "docker" dockerImage: "123456789.dkr.ecr.us-east-1.amazonaws.com/ludus-engine:5.6.1" ``` With `dockerImage` set, `ludus game build --backend docker` and `ludus run --backend docker` will skip the engine build stage and use the specified image for game builds. **How it works**: - `ludus engine build --backend docker` generates a Dockerfile (configurable base image, default Ubuntu 22.04), runs `docker build` (or `podman build`) with the engine source as context, and tags the image as `ludus-engine:<version>`. Use `--base-image` or set `engine.dockerBaseImage` in `ludus.yaml` to use Amazon Linux, RHEL, or other bases (auto-detects `apt-get` vs `dnf`) - `ludus engine push` authenticates with ECR and pushes the image (creates the ECR repository if needed) - `ludus game build --backend docker` runs `docker run` (or `podman run`) with volume mounts for the packaged output, executing RunUAT BuildCookRun inside the engine container - The rest of the pipeline (container build, ECR push, deploy) works unchanged --- the game server output directory is the same regardless of backend **Notes**: - Engine container images are large (60-100 GB) --- this is expected for UE5. Use `--skip-engine` to produce smaller images from pre-built binaries. - Container client builds are Linux-only (Win64 cross-compile in containers is not supported) - Epic's EULA allows private engine images within an organization; the restriction is on public distribution ### Docker Desktop vs Podman on Windows Docker Desktop's containerd storage backend has a lease timeout that crashes during image export for large UE5 engine images (60-100+ GB). The engine compiles successfully but the final image export phase fails with errors like `lease does not exist` or `failed to solve: exporting to image`. This is a [known Docker Desktop limitation](https://github.com/docker/for-win/issues) with no workaround. **Podman** uses its own `containers/storage` driver without lease timeouts, making it a reliable alternative for large image builds. All Ludus commands accept `--backend podman` as a drop-in replacement for `--backend docker`. > **Note**: GameLift container image builds (`ludus container build`) and ECR pushes (`ludus container push`, `ludus engine push`) currently use Docker only. These images are small (~3-5 GB) and are unaffected by the lease timeout issue. Podman support for GameLift containers is planned for a future release. #### Installing Podman on Windows Install Podman Desktop or the CLI: ```bash # Option 1: Install via winget (recommended) winget install RedHat.Podman # Option 2: Download the installer from https://podman.io/docs/installation#windows ``` Then initialize the Podman machine (a lightweight WSL2 VM): ```bash # Create and start the machine podman machine init podman machine start # Verify installation podman --version podman machine list ``` On Linux, Podman runs natively without a machine --- just install via your package manager (`apt install podman`, `dnf install podman`, etc.). #### Using Podman with Ludus ```bash # Package pre-built engine binaries into a container image ludus engine build --backend podman --skip-engine # Full pipeline: build game server + deploy with persistent DDC ludus run --backend podman --ddc zen ``` These two commands are the recommended workflow. `--skip-engine` packages your existing Linux binaries into the image without recompiling (minutes, not hours). `--ddc zen` enables persistent shader caching so subsequent builds skip expensive re-derivation. Other useful commands: ```bash # Build game server only (no deploy) ludus game build --backend podman --ddc zen --verbose # Build engine from source inside Podman (full compile, slow) ludus engine build --backend podman --verbose ``` Or set Podman as the default backend in `ludus.yaml`: ```yaml engine: backend: "podman" ``` #### Recommended workflow for Windows Build the engine natively on the host, then package the pre-built Linux binaries into a Podman image with `--skip-engine`. This avoids both multi-hour recompilation inside the container and Docker Desktop's export crashes: ```bash # 1. Package pre-built binaries into container image ludus engine build --backend podman --skip-engine # 2. Build and deploy with persistent DDC ludus run --backend podman --ddc zen ``` The `--skip-engine` flag generates a lean 2-stage Dockerfile that copies pre-built binaries directly from the host instead of compiling inside the container. Combined with `--ddc zen` for persistent shader caching, this is the fastest iteration path on Windows. **Image size trade-off**: UE5 engine images are large (60-100+ GB) because they include the full editor, shader compiler, build tools, and runtime libraries needed for BuildCookRun. The runtime stage also installs X11, accessibility, and audio libraries (~150 MB) that UnrealEditor-Cmd links against even in headless/server mode. This is inherent to UE5's architecture and applies to both Docker and Podman. Use `.dockerignore` (generated automatically by Ludus) to exclude host-platform binaries, debug symbols, and build intermediates from the build context. ### WSL2 build backend (Windows) On Windows, Ludus can build the engine and game server directly inside a WSL2 Linux distro, bypassing container runtimes entirely. This gives native Linux I/O performance without Docker or Podman overhead. Two modes: - **Default** (`--backend wsl2`): Zero setup. Accesses your engine source via `/mnt/<drive>/` (virtiofs). Works immediately but I/O is slower for large codebases. - **High-performance** (`--backend wsl2 --wsl-native`): One-time rsync of engine source to native ext4 inside WSL2 (`~/ludus/engine/<version>/`). DDC cache also lives on ext4. 3-10x faster I/O for builds and cooking. ```bash # Build engine in WSL2 (zero-setup, uses /mnt/ virtiofs) ludus engine build --backend wsl2 --verbose # Build engine with native ext4 for maximum speed (one-time rsync) ludus engine build --backend wsl2 --wsl-native --verbose # Build game server in WSL2 with persistent DDC cache ludus game build --backend wsl2 --ddc zen --verbose # Full pipeline with WSL2 backend ludus run --backend wsl2 --verbose # Full pipeline with native ext4 sync for fastest builds ludus run --backend wsl2 --wsl-native --verbose ``` **Options**:

ludus_deploy_destroy

Tear down the active target's ephemeral resources (durable ECR/S3 artifacts preserved). `all_targets` sweeps every target; `purge` also deletes durable artifacts