Deploying ETPro Match Servers

The thing with competitive match servers is that they really don't vary much, they're almost exact duplicates of each other excluding a few configuration options such as hostname and passwords. If you go to a GamesTV ETPro server, and then hop over to your own - they will be pretty much the same.

When the servers start to become slightly different however, then problems occur - for example:
  • ETPro match servers not supporting ETTV.
  • Out of date configurations.
  • Staggered upgrades (an update would manually be changed on each server).

To resolve this issue, there needs to be a consistent setup of the gameserver service, that's where Docker comes in. Docker is a way of containing applications, it allows you to consistently replicate the environment (from files to operating system libraries) and easily provision a service based on an image.

These images typically have very few configurable options and are very lightweight but contain all the necessary data in order to provision a service. Such as ETPro.

ETPro Docker Image


image: BkSbS99

A while back, I started working on an ETPro Docker image (`msh100/ETPro`), I have been using this for some time now and I know of some other users (including the past couple of ET LANs). This image allows you to set a hostname, some passwords, and your maps - they're the only configurable options. Start a container from the image and you have a running ETPro match server with ETTV support.

Example:
Quote
docker run -d -p "27960:27960/udp" -e "MAPS=adlernest:supply:braundorf_b4" -e "PASSWORD=war" -e "REFEREEPASSWORD=pass123" msh100/etpro


Providing Docker is installed, by running this:
  1. The `msh100/ETPro` image downloads and the container starts.
  2. The requested maps download from the map redirect.
  3. The match server starts with the configuration options specified.

The gameserver service would then be running on port `27960` of your server with the latest version of the image `msh100/ETPro`, this means if the image is ever upgraded the updates would be usable by restarting the container.

Simplification


This is all nice, but it can become a hassle to maintain anything from the command line, especially if you only want to stop/start/restart services. Luckily the Docker ecosystem is quite large and there are numerous ways to simplify the deployment of these ETPro servers (or any Docker container).

Options


There are a number of services, and utilities to improve orchestrating services in Docker containers on Linux, we will mainly focus on Tutum here but some include:
  • Shipyard
  • Rancher
  • Mesos
  • Kubernetes
  • Many MANY more

For the sole use of gameservers, some of these may be far too complex for basic use so we're going to stick with Tutum.

Tutum


Tutum is a hosted service to manage Docker containers on your own servers. Once you have your own server, you can log into Tutum and obtain a shell line to run on the server in order to provision containers from Tutum's interface.

Provision Tutum Node

Note: This is a very basic example, you will only be able to run one container per node in this manner - It is of course possible to run more than one by using multiple services, or using the scaling option (provided you address port assignment correctly).

Assuming you're on your server and running as root, head over to the Tutum website and log in (or sign up), then head to the "Nodes" page and "Bring your own node". A box will appear with a `curl` command piped into `sh` - paste this into your server and wait.

image: wKWERce
This server was a fresh install of Ubuntu 14.04 with nothing extra installed.

Start an ETPro server

Once you have a node, you can start to run services on that instance. Head over to the Services page on Tutum and add a new service.

The first option will be which image do you want to run the service from, in this case we want to use the `msh100/ETPro` image on the Docker public registry - so type that in and proceed.

On the next page, you start with some basic configuration options. Most of this you can leave how it is but you want to set the following:
  • Service Name - Set this to something you will recognise.
  • Ports - Select `27960` as the container port (`udp`) this must not change and must be published, and you can chose whatever node port you want (click on "dynamic" to change this to your port, typically "27960"). This is the port that clients will connect on.
  • Autorestart - Always. In the event the gameserver crashes, or the node restarts, the gameserver will start itself back up.

Next proceed to environment variables. These are the configuration options for the gameserver itself.

The ETPro image has the following configurable environment variables:
image: XA808Xa
If you do not set an environment variable, the container will use the default. Here's an example of a completed environment variable page:
image: pbshC1n
Then "Create and deploy"!

Within a few minutes the gameserver will be online. It will take some time for the image to initially download and for the maps to download but once that's done the gameserver will be fully usable as expected.

image: dByVWUp

Server Providers


Running a server like this yourself can work out cheaper than using a gameserver provider and also give you a lot more flexibility. Here are a couple of hosts I recommend if you need somewhere to run these containers:

Between the two there are a lot of locations you can run your Docker containers (especially on Vultr).
Comments
17
Awesome
After running server can you access server console?
I use screen
You can view the console but can not input into it, I am not entirely sure of the best way around this and I recommend just using rcon in this case.
Parent
In my experience using RCON is the way to go as well yeah
Parent
Nice job. For people with basic Linux knowledge this is good turnkey solution.
When you have a Basic VPS from digitalocean for like 10$ you can easily host around 2~3 match servers. The Dutch location is also good regarding pings from my experience.

Regarding your image I would add baserace configurations as well and remove the pb folder. I also noticed you are working on CSGO docker image https://github.com/msh100/Docker-Images/tree/master/csgo Let me know if you got that finished, since I would like to run some csgo servers on demand.
Hey Zenix, thanks for the feedback! Do you mind opening a GitHub issue about the configurations?

As for CSGO, will keep you updated <3
Parent
Off topic but just wanted to know if you have experience developing Android applications using Android Studios
:D my only experience of Android Studio was starting a new project, trying to build with zero changes and it failed to compile... I instantly uninstalled - sorry, can't help with that shit
Parent
yeah its a piece of shit to start up
awesome project friend
Parent
let me help you friend
Parent
good shit teadrinker happy new year
Happy new year to you too baguetteman
Parent
We're about (this year) to use docker as well for our dev envorinment.
I'm no server admin, nor do I know much about it.
What I do know is that it looks pretty cool.
We're deploying localhost with Drush, Compass, composer, bulk, git, svn,... all with a push on the button (we made docker in a UI :D ; Basically we start containers by clicking on the container we want) So basically we can click what ever we need to setup a localhost in less than a min.
Problem is: a few bugs. Using stuff out of your docker is kinda fucked up if you want to let it work with something in your docker.

but anyway, I know just the small parts. 1.5 senior devs/server admins are working on it. This is not my expertise, but it looks pretty cool.
Well the main goal is to have everything within containers, then the issue of communicating to host services disappears. Otherwise you need to make your containers aware of the appropriate places on the host to get data, or how to address the host correctly.

It's a huge amount of work to transition but can be worth it!

You made a Docker UI? That means there are now 10 million and 1 of them! :D
Parent
nice screenshot :)
It is actually a photo! Bet you would never have guessed that! Taken from Unforgiven at LAN - The alt text disappeared when I put it on CF... writing content on this website is fucking horrible.
Parent
At first I thought it was a video but I noticed it has no sound and the image was still the same after 10 minutes ;)

Anyway, nice work here (but I prefer debian rather than ubuntu).
Parent
Run what you want, who cares? Doesn't really make a difference here.
Parent
Back to top