Skip to content

MIP Control Panel

A tkinter GUI that centralizes the entire dev-ops pipeline — packaging, Docker builds, Kubernetes management, backend deployment, and game client launching — into a single window with three independent console channels.

Location: MIPScripts/mip_control_panel.py Launch: double-click MIPScripts/launcher.bat or run py MIPScripts/mip_control_panel.py


First-time Setup

Run the setup script once to configure all machine-specific paths and your GitLab registry URLs. Open Git Bash in the project root:

bash MIPScripts/setup.sh

It asks four questions and writes everything for you:

Step What it configures
1 — Workspace root UPROJECT, SLN, and ARCHIVED_DIR paths derived from your project location
2 — UE engine root RUNUAT path (e.g. C:\UnrealEngine-5.7.1-release\Engine\Build\BatchFiles\RunUAT.bat)
3 — mip-be path BE_LOCAL_PATH in all env files
4 — GitLab registries UE_SERVER_REGISTRY and DOCKER_REGISTRY for Test and Shipping modes

Files written: MIPScripts/variables.txt, MIPScripts/env/local.env, MIPScripts/env/test.env, MIPScripts/env/shipping.env.

Tip

Re-run setup.sh any time you move the project, reinstall UE, or change registries — all other env values are left untouched.

After setup, launch the panel to verify:

python MIPScripts/mip_control_panel.py

Or double-click MIPScripts/launcher.bat. The config bar at the top shows the resolved RUNUAT path — if it shows (not set), re-run setup.sh.


Configuration Reference

MIPScripts/variables.txt is the shared config file read by all .bat/.ps1 scripts. The first four values are written by setup.sh. The remaining values are auto-managed by the control panel when you switch modes.

Key Example Description
PROJECT_NAME ModularInventory Your UE project name (must match the .uproject filename without extension)
UPROJECT D:\mip_workspaces\ModularInventory\ModularInventory.uproject Absolute path to your .uproject file
SLN D:\mip_workspaces\ModularInventory\ModularInventory.sln Absolute path to your .sln file (used by some build scripts)
RUNUAT C:\UnrealEngine-5.7.1-release\Engine\Build\BatchFiles\RunUAT.bat Absolute path to your UE source build's RunUAT.bat
CONFIGURATION Development (auto-managed) UE build config — set by the active mode's .env
ARCHIVED_DIR D:\...\Packaged\LOCAL (auto-managed) Output directory for packaged builds — set by the active mode's .env
UE_SERVER_IMAGE mip-server:local (auto-managed) Docker image name for the UE server — set by the active mode's .env
DELETE_DEBUG true (auto-managed) Whether to strip debug symbols from server builds — set by the active mode's .env

Warning

The RUNUAT path must point to a source build of Unreal Engine — the Launcher version does not include RunUAT.bat in the same location and does not support dedicated server targets.

Environment Files (env/)

Each mode has its own .env file in MIPScripts/env/. When you switch modes in the control panel, it reads the corresponding file and writes the relevant values into variables.txt. You need to edit these files to match your infrastructure.

Common Keys (all modes)

Key Example (Local) Description
CONFIGURATION Development UE build configuration. Development for local, Test for testing, Shipping for production.
ARCHIVED_DIR D:\...\Packaged\LOCAL Where packaged client and server builds are output. Each mode should use a separate folder.
UE_SERVER_IMAGE mip-server:local Docker image name and tag for the UE dedicated server.
DELETE_DEBUG true Strip debug symbols from Linux server builds to reduce image size.
BE_LOCAL_PATH D:\mip_workspaces\mip-be Absolute path to your local mip-be backend repository. Used by the Backend tab's path field.

Remote Registry Keys (Test/Shipping only)

Key Example Description
UE_SERVER_REGISTRY registry.gitlab.com/dana-rs/mip/mip-server Remote container registry URL where the UE server image is pushed.
DOCKER_REGISTRY registry.gitlab.com/.../mip-be-registry Remote container registry URL for the backend image.
DOCKERFILE scripts/test/Dockerfile-test Path to the Dockerfile used to build the backend image.
BUILT_DOCKER_TAG mip-be:test Docker image name and tag for the backend build.

Backend Deploy Keys (Test/Shipping only)

Key Example Description
BE_COMPOSE_FILE scripts/test/docker-compose-test.yml Docker Compose file used for remote backend deployment.
BE_ENV_FILE scripts/test/.env.test Environment file passed to the remote Docker Compose.
BE_CONTAINER mip_backend_test Container name for the backend (used by docker logs).
BE_BUILD_BAT scripts/test/build-docker-testing.bat Build script run by the Build button (without deploy).
BE_BUILD_DEPLOY_BAT scripts/test/build-deploy-docker-testing.bat Build script run by the Build button when the Deploy checkbox is checked.

Tip

For Local mode, the backend deploy keys (BE_COMPOSE_FILE, BE_ENV_FILE, BE_BUILD_BAT, BE_BUILD_DEPLOY_BAT) are not used — local backend runs directly via the Build Local button.


Modes

The control panel operates in three modes, selectable via radio buttons in the top bar. Switching modes updates variables.txt and loads mode-specific environment variables from MIPScripts/env/<mode>.env.

Mode Config Use Case
Local Development Local development with Minikube. Docker builds target the local Minikube registry.
Test Test Remote test cluster. Docker images are pushed to a remote registry. Backend deploys via SSH.
Shipping Shipping Production. Same flow as Test but with production-specific Dockerfiles, compose files, and env.

Each mode stores its own settings (server IPs, usernames, paths) independently in launcher_settings.json.


Layout

┌─────────────────────────────────────────────────────────────────────────────┐
│  Project: ModularInventory   Config: Development           [Local] [Test] [Shipping]  │
├──────────────────────────────────────────────────────────────┬──────────────┤
│  ┌─────────┐ ┌─────────┐ ┌─────────┐                       │   PLAY       │
│  │ Scripts │ │  Kubes  │ │ Backend │  ← tab panels          │ Client Path  │
│  └─────────┘ └─────────┘ └─────────┘                       │ [▶ Play]     │
│  (active tab's buttons shown here)                          │ Instances:   │
│                                                             │ [Stop] [Log] │
├─────────────────────┬─────────────────────┬─────────────────┴──────────────┤
│  Scripts Console    │  Kubes Console      │  Backend Console               │
│  (streaming output) │  (streaming output) │  (streaming output)            │
│  [Clear] [Cancel]   │  [Clear] [Cancel]   │  [Clear] [Cancel]              │
└─────────────────────┴─────────────────────┴────────────────────────────────┘

The three consoles run independently — you can package the client while managing Kubernetes and deploying the backend simultaneously.


Scripts Tab

Handles UE5 packaging and Docker image builds.

Client

Button Action
Package (Incr.) Incremental client build via RunUAT
Package (Clean) Full clean rebuild (deletes intermediates, confirmation required)

Server

Button Action
Package (Incr.) Incremental Linux dedicated server build
Package (Clean) Full clean Linux server rebuild
Package + Minikube (Incr./Clean) Package server, then auto-chain into Docker Build Minikube

In Test/Shipping mode, optional chain checkboxes appear: Build Docker and Push Registry run automatically after packaging completes.

Docker

Local mode:

Button Action
Build Local Build Docker image locally
Build Minikube Build image inside the Minikube VM (requires admin)

Test/Shipping mode:

Button Action
Build Build Docker image
Push Registry Push image to the remote container registry
Build + Push Build then push in sequence

Kubes Tab

Manages Kubernetes clusters, game servers, and contexts.

Game Servers

Button Action
Get Game Servers kubectl get gs
Delete All Game Servers kubectl delete gs --all (confirmation required)

Fleet

Button Action
Teardown Deletes autoscaler, fleet, and all game servers

Minikube (Local mode only)

Button Action
Start Minikube Stops then starts Minikube with Hyper-V (6 GB RAM, 2 CPUs, 50 GB disk)
Reconnect Updates kubeconfig after a PC restart
Load Image Loads the UE server Docker image into Minikube
Prune Docker Prunes images inside Minikube, stops it, then compacts the VHDX to reclaim disk space

Shell / Logs

Button Action
Exec Bash into Pod Opens an interactive bash shell inside a game server pod
Read Server Log Reads the UE log from inside Minikube via SSH (Local mode)
Read Remote Server Log Reads the UE log from a remote server via SSH (Test/Shipping mode)
Open CMD Here Opens a command prompt in the kubes/ directory

Config (Test/Shipping only)

Button Action
Merge Kubeconfig Merges a remote cluster's kubeconfig into ~/.kube/config
Get Token Opens a terminal to create a service account and retrieve a Kubernetes token
Create Pull Secret Opens a terminal to create a GitLab container registry pull secret

Context

Lists all kubectl contexts. The current context is highlighted in green. Switch between local Minikube and remote clusters with one click.


Backend Tab

Manages the NestJS backend — local builds and remote deployment via SSH.

Build

Local mode: a single Build Local button runs the backend's local build script.

Test/Shipping mode: a Build button with an optional Deploy checkbox. The env file determines which Dockerfile and build script to use.

Remote Deploy (Test/Shipping only)

Configure the remote server's IP, username, and backend path, then use:

Button Action
Restart (Down+Pull+Up) Teardown game servers → docker compose downpullup -d
Down Teardown game servers → docker compose down
Pull docker compose pull on the remote server
Up Dev docker compose up -d with the mode's compose and env files
Logs docker logs -f <container> on the remote server

Play Panel

Launch and manage packaged game client instances.

  • Client Path — path to the packaged .exe (auto-derived from ARCHIVED_DIR in the env file).
  • Play — launches a new client instance. Multiple instances can run simultaneously.
  • Running Instances — lists all active clients with PIDs and status.
  • Stop Selected / Stop All — kills client processes via taskkill.
  • Log — reads the last 200 lines of the client's UE log file.

File Structure

MIPScripts/
├── mip_control_panel.py       # Main GUI application
├── launcher.bat               # Double-click to launch
├── launcher_settings.json     # Persisted per-mode settings (auto-managed)
├── variables.txt              # Shared variables read by bat/ps1 scripts
├── env/
│   ├── local.env              # Local mode config
│   ├── test.env               # Test mode config
│   └── shipping.env           # Shipping mode config
├── Scripts/
│   ├── Packaging/             # RunUAT packaging scripts
│   │   ├── PackageGame_ClientOnly.bat
│   │   ├── PackageGame_ClientOnly_Clean.bat
│   │   ├── Package_Server_Only_Linux.bat
│   │   └── Package_Server_Only_Linux_Clean.bat
│   ├── Docker/                # Remote Docker build/push scripts
│   │   ├── DockerBuildOnly.bat
│   │   ├── DockerBuildPush.bat
│   │   └── DockerPushRegistry.bat
│   └── Local/                 # Local Docker build scripts
│       ├── DockerBuildLocal.bat
│       └── DockerBuildMinikube.ps1
└── kubes/
    ├── fleet.yaml             # Agones fleet definition
    ├── auto-scale.yaml        # Fleet autoscaler
    ├── create-server*.yaml    # Manual game server creation
    ├── allocate-server*.yaml  # Manual server allocation
    ├── teardown.bat           # Delete autoscaler + fleet + all GS
    ├── start-minikube.bat     # Start Minikube with Agones
    └── config/                # Kubeconfig merge, tokens, pull secrets

See First Steps — Configuration for the full list of environment variables and what to set.