Fourth Day of Xmas
On the fourth day of Xmas I went a bit insane …
On the second day of Xmas my nerdy love led to me … writing https://github.com/Cervator/KubicTerasology - unsurprisingly a Kubernetes hosting setup for Terasology now!
Post series - part one, part two, part three, part four
After the first blog entry on KubicArk this 2nd one is probably fairly obvious, and there isn’t that much to share which isn’t already covered. But still, not every blog entry has to be a huge wall of text, some can be small’ish walls of text!
Much like with KubicARK the fundamental purpose here simply is being able to easily spin up a Terasology game server in Kubernetes, even managing several with different configuration just as easily.
For the Terasology community setting up servers more easily and quickly would help in a variety of ways, from maintaining official long-lived servers, spinning up a play test server real quick, or even running an ad-hoc test using a game zip from a PR build (although TODO: Actually make that work with modules …)
Before getting ChatOps working a simple job in Jenkins able to use a Kubernetes credential to allow it access into the parent cluster would then be able to execute a few commands (even partially provided by job parameters) and a server should be available in a few minutes.
So ARK is a vastly more complicated game, clearly, at least so far! But even looking aside its complexity and relative configuration nightmare the sheer fact that it is closed source and not officially documented contribute plenty to making it hard. No such problem with Terasology!
KubicARK for instance has a sizable init container that needs to run before the main server container starts, as exactly which files get read from where and can even exist at which points in time is complicated. Additionally with a game cluster setup it makes sense to have a global set of configs of a given type plus a server-specific set - we don’t need that for Terasology, yet. So no init container. Yay simplicity!
ARK also uses multiple game ports and has a Steam integration which can make it hard to redirect ports, especially when you then try to transfer between servers in a cluster from in-game. So in that case ARK had to use pass-through ports - same numbers on the outside and the inside. For Terasology we could always leave the server on the same internal port (and have to, for now, as we don’t even support changing it, I think?) then simply use a different port externally and redirect it via Kubernetes.
We also don’t need the file share, only have one config file, and we can easily redirect where said file lives.
For Terasology specifically we can modify the engine and everything else easily, yay! So the sky’s the limit, don’t have to worry about what you may be able to mod or not. So that gives us some immediate options:
override.cfg
file comes from a ConfigMap and is thus read-only. It’ll apply every time the server starts, so if the FacadeServer is used to change things it cannot edit that file. An similar workaround is used in KubicArk where config files are copied forward from the config volume to other resting places where they can be editedconfig.cfg
- but again, these aren’t implemented on the game server side yetOn the fourth day of Xmas I went a bit insane …
On the third day of Xmas I wrote a bunch of stuff!
On the second day of Xmas my nerdy love led to me … writing https://github.com/Cervator/KubicTerasology - unsurprisingly a Kubernetes hosting setup for Teras...
On the first day of Xmas my nerdy love led to me … writing https://github.com/Cervator/KubicArk - a Kubernetes hosting setup for ARK!
A Trellorific Time
One more time