Package your game
Package your game once and install it on any Akua Cluster: on your own network, or for every server owner you share it with. A Package holds your server image, the settings owners may change, and a version number. Akua turns the settings into an install form, and a running world changes only when its owner updates it.
Build the server image
Section titled “Build the server image”Build a container image with the server software and plugins your game needs, and push it to your registry. Include the Connect plugin and leave its endpoint name unset, so every copy picks its own public address without an open port. Keep the world and the plugin’s config directory on a mounted volume, so the address and the save survive restarts and updates. For a private registry, see Private images.
Describe the settings
Section titled “Describe the settings”Keep the Package manifest (akua.toml) and its KCL program (package.k) next to the game; akua pkg init creates both. Declare what owners may change in the typed Input schema, for example the message of the day as a string and the game mode as a fixed set of choices:
type Mode = "survival" \ | "creative" | "adventure"
schema Input: motd: str = "Paper on Akua" """Shown in the server list.""" game_mode: Mode = "survival" max_players: int = 10
check: 1 <= max_players <= 50, \ "max_players: 1 to 50"Each field becomes a field of the install form, and check refuses a value outside the range. Use those inputs when building the workload and its volume, and pin the image version. The Package format has the full syntax. If you already have a Helm chart, Packages shows how to publish it instead.
Check and publish
Section titled “Check and publish”From the Package directory, in the Workspace that owns the game, run:
akua pkg checkakua pkg publishEach version number is published once and never changes. Install the new version on your own Cluster, join the game, change a setting and check that the world survives an update. See Publish a Package privately for repository and release settings.
Publish from your CI
Section titled “Publish from your CI”The same commands run in any CI system, such as GitHub Actions. Give the job a Workspace API token in AKUA_API_TOKEN and the Workspace in AKUA_WORKSPACE, then on each release:
- Build and push the game image.
- Run
akua pkg checkandakua pkg publishfor the Package version that references it. - Optionally move your own test or production Install to the new version with
akua installs update.
See CLI for installing and authenticating the CLI in automation.
Update a running world
Section titled “Update a running world”Publishing never changes a running Install. Its owner moves it to a newer version when they are ready, with akua installs update; the Install keeps its address, its settings and its world volumes. Keep volume names and data formats compatible between versions, because Akua does not migrate the data inside a volume. Update an installation shows the exact command.
Was this helpful?
Thanks for the feedback.